Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

The %date-modified('F jS, Y')% in post footer not working


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Apr 2, 2009, 09:38 AM
Glottis
 
23 posts · Dec 2008
Hi Flynn,

I put %date-modified('F jS, Y')% in the theme options, and it's being output as is, literally:

%date-modified('F jS, Y')%

I can't figure out what might be causing this.

Thanks in advance for your help.
  #2  
Old Apr 2, 2009, 08:18 PM
Flynn's Avatar
Flynn
 
3,763 posts · Oct 2008
Munich, Germany
This is a bug, thanks for finding. To fix it replace in functions/bfa_postinfo.php, line 135

PHP Code:
$postinfo preg_replace("/(.*)%date\((.*?)\)%(.*)/i""\${1}" .$date_modified"\${3}"$postinfo); 
with

PHP Code:
$postinfo preg_replace("/(.*)%date-modified\((.*?)\)%(.*)/i""\${1}" .$date_modified"\${3}"$postinfo); 
  #3  
Old Apr 3, 2009, 12:01 PM
Glottis
 
23 posts · Dec 2008
Thanks, and I'm glad I could help.
  #4  
Old Apr 9, 2009, 09:20 AM
perdox808's Avatar
perdox808
 
51 posts · Apr 2009
Melbourne, Australia
Send a message via Skype™ to perdox808
Hmm. This is rather scary. I have gone to Appearance>Editor and clicked on my bfa_postinfo.php file and did a search for what we have to replace, and my file doesn't have such a line. Gulp!

Can I just add the new line? Does it matter where in the excerpt below?

$postinfo = $postinfo_string;
$postinfo = preg_replace("/(.*)%tags\((.*?)\)%(.*)/i", "\${1}" .$tags. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%tags-linked\((.*?)\)%(.*)/i", "\${1}" .$tags_linked. "\${3}", $postinfo);
$postinfo = str_replace("%author%", $author, $postinfo);
$postinfo = str_replace("%author-linked%", $author_linked, $postinfo);
$postinfo = preg_replace("/(.*)%date\((.*?)\)%(.*)/i", "\${1}" .$date. "\${3}", $postinfo);
$postinfo = str_replace("%category%", $category_notlinked, $postinfo);
$postinfo = str_replace("%category-linked%", $category_linked, $postinfo);
$postinfo = preg_replace("/(.*)%categories\((.*?)\)%(.*)/i", "\${1}" .$categories. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%categories-linked\((.*?)\)%(.*)/i", "\${1}" .$categories_linked. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%comments\((.*?)\)%(.*)/i", "\${1}" .$comment_link. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%comments-rss\((.*?)\)%(.*)/i", "\${1}" .$comments_rss_link. "\${3}", $postinfo);
$postinfo = str_replace("%trackback%", $trackback_url, $postinfo);
$postinfo = preg_replace("/(.*)%trackback-linked\((.*?)\)%(.*)/i", "\${1}" .$trackback_link. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%edit\((.*?)\)%(.*)/i", "\${1}" .$edit. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%print\((.*?)\)%(.*)/i", "\${1}" .$print_link. "\${3}", $postinfo);
$postinfo = str_replace("%wp-print%", $wp_print, $postinfo);
$postinfo = str_replace("%wp-email%", $wp_email, $postinfo);
$postinfo = str_replace("%wp-postviews%", $wp_postviews, $postinfo);
$postinfo = str_replace("%wp-postratings%", $wp_postratings, $postinfo);
$postinfo = str_replace("%sociable%", $sociable, $postinfo);

if (strpos($postinfo_string,'<image(')!==false) {
// images
$postinfo = preg_replace_callback("|<image\((.*?)\)>|","image_ files",$postinfo);
}

return $postinfo;
}
?>

I have been rather daring and went ahead and added your line Flynn, so that now I have:

$postinfo = $postinfo_string;
$postinfo = preg_replace("/(.*)%tags\((.*?)\)%(.*)/i", "\${1}" .$tags. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%tags-linked\((.*?)\)%(.*)/i", "\${1}" .$tags_linked. "\${3}", $postinfo);
$postinfo = str_replace("%author%", $author, $postinfo);
$postinfo = str_replace("%author-linked%", $author_linked, $postinfo);
$postinfo = preg_replace("/(.*)%date\((.*?)\)%(.*)/i", "\${1}" .$date. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%date-modified\((.*?)\)%(.*)/i", "\${1}" .$date_modified. "\${3}", $postinfo);
$postinfo = str_replace("%category%", $category_notlinked, $postinfo);
$postinfo = str_replace("%category-linked%", $category_linked, $postinfo);
$postinfo = preg_replace("/(.*)%categories\((.*?)\)%(.*)/i", "\${1}" .$categories. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%categories-linked\((.*?)\)%(.*)/i", "\${1}" .$categories_linked. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%comments\((.*?)\)%(.*)/i", "\${1}" .$comment_link. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%comments-rss\((.*?)\)%(.*)/i", "\${1}" .$comments_rss_link. "\${3}", $postinfo);
$postinfo = str_replace("%trackback%", $trackback_url, $postinfo);
$postinfo = preg_replace("/(.*)%trackback-linked\((.*?)\)%(.*)/i", "\${1}" .$trackback_link. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%edit\((.*?)\)%(.*)/i", "\${1}" .$edit. "\${3}", $postinfo);
$postinfo = preg_replace("/(.*)%print\((.*?)\)%(.*)/i", "\${1}" .$print_link. "\${3}", $postinfo);
$postinfo = str_replace("%wp-print%", $wp_print, $postinfo);
$postinfo = str_replace("%wp-email%", $wp_email, $postinfo);
$postinfo = str_replace("%wp-postviews%", $wp_postviews, $postinfo);
$postinfo = str_replace("%wp-postratings%", $wp_postratings, $postinfo);
$postinfo = str_replace("%sociable%", $sociable, $postinfo);

if (strpos($postinfo_string,'<image(')!==false) {
// images
$postinfo = preg_replace_callback("|<image\((.*?)\)>|","image_ files",$postinfo);
}

return $postinfo;
}
?>


But I still get the literal stuff.

Last edited by perdox808; Apr 9, 2009 at 09:28 AM.
  #5  
Old Apr 9, 2009, 01:58 PM
Glottis
 
23 posts · Dec 2008
There are 2 bfa_postinfo.php. The one you need to edit isn't accessible from Appearance --> Editor. You can edit it through FTP by going to /wp-content/themes/atahualpa3/functions/bfa_postinfo.php

The one in Editor is located in /wp-content/themes/atahualpa3/bfa_postinfo.php
  #6  
Old Apr 9, 2009, 04:27 PM
RobertSGold
 
9 posts · Apr 2009
Hey, I am having the same problem, and I edited the correct file as specified, but no effect.

Thanks in advance.
  #7  
Old Apr 10, 2009, 02:12 AM
perdox808's Avatar
perdox808
 
51 posts · Apr 2009
Melbourne, Australia
Send a message via Skype™ to perdox808
Thanks to all! I found the file and made the change and the %date-modified% variable now works OK.

Thanks for all your help.
  #8  
Old Apr 10, 2009, 05:42 AM
Glottis
 
23 posts · Dec 2008
You're welcome, Perdox.

RobertSGold,
After (or before) editing the file /wp-content/themes/atahualpa3/functions/bfa_postinfo.php, did you put %date-modified('F jS, Y')% in the theme options?
  #9  
Old Apr 10, 2009, 06:16 AM
perdox808's Avatar
perdox808
 
51 posts · Apr 2009
Melbourne, Australia
Send a message via Skype™ to perdox808
Yes, I got rid of the line I inserted via the Admin>Editor and used the ftp client to copy the file to my machine, edited it (i.e. put that new line of code in), copied it back to server and all was well in my little brain! I was a happy chappy to say the least. Is this the correct procedure? I shouldn't try to edit the file while it is still on the server, should I?

I was working my way through all the options as described in the theme settings in the 'Post/Page Info Items' just out of curiosity. That's how I discovered the problem with the date-modified and the fact that if you put the %author-email% in the configuration fields, it throws the sidebars out. Flynn has already fixed this.

Everything works fine now with the code in the correct file.
  #10  
Old Apr 10, 2009, 07:29 AM
RobertSGold
 
9 posts · Apr 2009
Glottis:

Thanks - what wasn't clear to me was that the date format is specified both in the general WP options and in the Post Info Items options.

Working as desired now. Many thanks.
  #11  
Old Apr 10, 2009, 07:48 AM
Glottis
 
23 posts · Dec 2008
Quote:
Originally Posted by perdox808
Yes, I got rid of the line I inserted via the Admin>Editor and used the ftp client to copy the file to my machine, edited it (i.e. put that new line of code in), copied it back to server and all was well in my little brain! I was a happy chappy to say the least. Is this the correct procedure? I shouldn't try to edit the file while it is still on the server, should I?
You did everything correctly, yes. You can edit the file on the server, too. But not through Wordpress's Editor, though, because this particular file isn't accessible from there.

Quote:
Originally Posted by RobertSGold
Glottis:

Thanks - what wasn't clear to me was that the date format is specified both in the general WP options and in the Post Info Items options.

Working as desired now. Many thanks.
Great, glad it's working now!
  #12  
Old Apr 11, 2009, 04:52 AM
Flynn's Avatar
Flynn
 
3,763 posts · Oct 2008
Munich, Germany
The other bfa_postinfo.php, the one in the root directory is there by accident. Sorry about that

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Formats in Post Bylines bseppa Post-Kicker, -Byline & -Footer 8 Mar 26, 2010 04:13 PM
Can you suppress date on sticky post? Andante Atahualpa 3 Wordpress theme 6 Mar 21, 2010 05:39 AM
%comments in footer stopped working Dimitre Post-Kicker, -Byline & -Footer 4 Feb 21, 2010 12:36 PM
Post Footer not working right Steve_T Atahualpa 3 Wordpress theme 7 May 22, 2009 11:14 AM
Welcome message as post without date or title? blueprairie Header configuration & styling 1 Apr 2, 2009 08:12 PM


All times are GMT -6. The time now is 07:53 PM.


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