Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

A query on customizing the byline in config to allow external voting for a permalink


  #1  
Old Feb 14, 2009, 11:01 PM
stribe
 
19 posts · Feb 2009
Hi all:

That's a rather convoluted long title.. but I was trying to be descriptive as I could be.

What my situation is with this is as follows: I'm attempting to help a blogger friend put in a piece of code in her byline that will allow people to "vote" for the blogpiece at an external aggregator (as mentioned here)

When I was trying to set this up in the configuration for the Atahualpa 3 theme, it looked to me that it would best fit in the Byline:Homepage section. What I've currently got in there is this:

PHP Code:
Posted by %author% on %date('F j, Y, #a#t g:i a')% | <a class="comment-link" href="http://www.progressivebloggers.ca/vote/<?php the_permalink() ?>"> Recommend this at: <img src="http://www.progressivebloggers.ca/wiki/images/2/21/Progblog_small.png" border="0"></a> |
The problem with this is however that when I scroll over it to click on it to vote for her blogpost, I'm getting this:

HTML Code:
http://www.progressivebloggers.ca/vote/<?php the_permalink() ?>
..which is causing me an error, obviously when I click on it to try and vote for it at the external site. What I need is for that last part to actually point it to the actual permalink... i.e. http://www.progressivebloggers.ca/vo...ut.net/?p=1269

So.. I'd like to know what I actually need to put in there so that Atahualpa knows I'm trying to point it at the specific permalink for each different and new blogpost.

Thanks for any assistance.

Last edited by stribe; Feb 16, 2009 at 02:05 PM. Reason: adding question mark icon.. adding php and html tags
  #2  
Old Feb 15, 2009, 09:06 AM
stribe
 
19 posts · Feb 2009
Addenum: I note in Flynn's "to-do" list on here for Version 3.2.1 of this theme, I see he's added the following:

Add post info item "permalink URL of post"

..which is probably directly related to my question. I was going to try to put %link% in where php the_permalink ()?> is located to see if that would list the permanent link in the line for people to be able to vote.. but perhaps thats's not the right syntax.

So.. any other suggestions what bit of php code might work in there?
  #3  
Old Feb 15, 2009, 09:09 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
There's currently no permalink option in the post info items. I'll put it on my todo list and try to get it into the next version

At the moment you would have to find, at the bottom of functions/bfa_postinfo.php

PHP Code:
// images
$postinfo preg_replace_callback("|<image\((.*?)\)>|","image_files",$postinfo);

and right after it add:

PHP Code:
$postinfo .= ' | <a class="comment-link" href="http://www.progressivebloggers.ca/vote/' 
$post_permalink '"> Recommend this at: 
<img src="http://www.progressivebloggers.ca/wiki/images/2/21/Progblog_small.png" 
border="0" alt="" /></a> |'


Last edited by Flynn; Feb 15, 2009 at 03:47 PM. Reason: "Find" code was wrong
  #4  
Old Feb 15, 2009, 11:05 AM
stribe
 
19 posts · Feb 2009
Hi Flynn:

Well, I found that file and added what you suggested, but the code fails to show up on her page either above her posts in the byline or below the posts in the footer.

(Note: I removed that particular code out of her byline and had left it as it was originally, which was:
PHP Code:
<strong>Posted by %authoron %date('F j, Y, #a#t g:i a')% | %edit(' - ''Edit This Post''')%</strong
, because I figured your asking me to add those lines into bfa_postinfo.php would make what I had put into the byline redundant, and possibly show up twice in the byline with one working copy and one that didnt. But, obviously thats not the case).

Last edited by stribe; Feb 15, 2009 at 11:10 AM. Reason: adding Php code
  #5  
Old Feb 15, 2009, 11:26 AM
stribe
 
19 posts · Feb 2009
Addenum: I thought maybe the problem was you might have added some extra "." in that code you asked me to add (ie $postinfo.= etc etc) , but removing them didn't fix the issue either.
  #6  
Old Feb 15, 2009, 01:05 PM
stribe
 
19 posts · Feb 2009
Hi Flynn:

Just for the heck of it, I tried a few other things. I tried changing the part of the code line that reads $post_permalink to this:

PHP Code:
$postinfo ' | <a class="comment-link" href="http://www.progressivebloggers.ca/vote/'.
get_permalink($post_id) . '"> Recommend this at: 
<img src="http://www.progressivebloggers.ca/wiki/images/2/21/Progblog_small.png" 
border="0" alt="" /></a> |'

... as well as just plain old get_permalink() , but neither attempt results in anything showing up on the main page.

So, I've done all that I can here, Flynn. I'm stumped.. unless perhaps there is something that needs to be changed elsewhere (ie in the main index template php file?) for this additional code to work and show up in her byline.
  #7  
Old Feb 15, 2009, 03:48 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I am sorry, I gave you a slightly wrong place to add the code. Please check the post above again, I've corrected it.
  #8  
Old Feb 15, 2009, 03:50 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Right now that code would be appended to ANY post footer. You'd have to wrap it into conditional statements to display it only on certain pages.

To display it only on single post pages

PHP Code:
if ( is_single() ) {
$postinfo .= ' | <a class="comment-link" href="http://www.progressivebloggers.ca/vote/' 
$post_permalink '"> Recommend this at: 
<img src="http://www.progressivebloggers.ca/wiki/images/2/21/Progblog_small.png" 
border="0" alt="" /></a> |'


  #9  
Old Feb 15, 2009, 05:04 PM
stribe
 
19 posts · Feb 2009
Quote:
Originally Posted by Flynn
Right now that code would be appended to ANY post footer. You'd have to wrap it into conditional statements to display it only on certain pages.

To display it only on single post pages

Actually.. Id like it on all post pages.. both on the front pages and single post and so on.
  #10  
Old Feb 15, 2009, 05:10 PM
stribe
 
19 posts · Feb 2009
Quote:
Originally Posted by Flynn
I am sorry, I gave you a slightly wrong place to add the code. Please check the post above again, I've corrected it.

Hi Flynn:

I was going to say that looked exactly like what you sent me before.. but I see now that its below the bracket.. THat appears to have done the trick!!!

Thanks a lot.

Last edited by stribe; Feb 15, 2009 at 05:14 PM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paged comments in Permalink Matthuffy Comments, trackbacks & pings 2 Jul 3, 2009 09:17 PM
Using Query Posts plugin in non-widget area viewdesigninc Plugins & Atahualpa 8 Jun 19, 2009 02:03 PM
External Link in Byline Date cdevenish Post-Kicker, -Byline & -Footer 0 Mar 27, 2009 01:50 PM
Sidebar query Axon Sidebars & Widgets 2 Feb 10, 2009 01:58 PM
BUG:(Minor) Clearing the logo filename field on HEADER config tab does not stay clear chirri2000 Header configuration & styling 1 Dec 13, 2008 12:13 PM


All times are GMT -6. The time now is 06:27 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.