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 » Header configuration & styling »

[SOLVED] CSS Calendar icon not displaying correctly since upgrade to 3.6.7


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 May 18, 2011, 03:25 AM
GarethP
 
64 posts · Jun 2010
WordPress V3.1.2

I was using the Calendar Icon from here when I was running ATA 3.6.4

http://forum.bytesforall.com/showthread.php?t=12627

I have upgraded to 3.6.7 and this has stopped working now that PHP is banned from within the theme options. OK I thought, but %date% is given as a post info item so I updated the bits in the kickers to the following

Code:
<div class="date">
    <div class="date-inside">
        <div class="date-month">%date('M')%</div>
        <div class="date-day">%date('j')%</div>
        <div class="date-year">%date('Y')%</div>
    </div>
</div>
But, this is only returning the %date('M')% for all the parts - see here

http://www.nottshockey.org.uk/news/

Looking at the source I can see this

Code:
<div class="post-kicker">
    <div class="date">
        <div class="date-inside">
            <div class="date-month">May</div>
            <div class="date-day">May</div>
            <div class="date-year">May</div>
        </div>
    </div>
</div>
Have I missed something blatantly obvious? Can I only use one %date% per section?
  #2  
Old May 18, 2011, 07:38 AM
juggledad's Avatar
juggledad
 
22,314 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
I think I know what is happening, the code is replacing all occurrences of '%date...%' with the value in the first '%date...%'.

I think this can be fixed but it may take a couple days since I have some paying work to do.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old May 18, 2011, 08:12 AM
GarethP
 
64 posts · Jun 2010
Thanks Juggledad - for what it's worth I think you are right.

I think I found the right bit in bfa_popstinfo.php

starts at Ln183 in V3.5.7

Code:
	// Date & Time
	if ( strpos($postinfo_string,'%date(') !== FALSE ) {
		while ( strpos($postinfo,'%date(') !== FALSE ) {
			$date_param = preg_match("/(.*)\%date\('(.*?)'\)(.*)/i",$postinfo,$date_matches);
			ob_start(); 
				the_time($date_matches[2]); 
				$date = ob_get_contents(); 
			ob_end_clean();
			$postinfo = preg_replace("/(.*)%date\((.*?)\)%(.*)/i", "\${1}" .
	        $date. "\${3}", $postinfo);
		}
	}
I think I know what needs to be done in my head, but can't put it down on paper. I think it needs to scan through the contents of the box and replace the first occurrence of %date...% and then repeat the whole process again but starting where the first replace finished...
  #4  
Old May 18, 2011, 10:50 AM
juggledad's Avatar
juggledad
 
22,314 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
Try this, change
HTML Code:
<div class="date">
    <div class="date-inside">
        <div class="date-month">%date('M')%</div>
        <div class="date-day">%date('j')%</div>
        <div class="date-year">%date('Y')%</div>
    </div>
</div>
to be all one line like this
HTML Code:
<div class="date"><div class="date-inside"><div class="date-month">%date('M')%</div><div class="date-day">%date('j')%</div><div class="date-year">%date('Y')%</div></div></div>
Looks like you have to have it all on one line, the preg-match likes it that way. I'm sure there is a way around it, but the preg functions make my head hurt (grin)
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; May 18, 2011 at 11:00 AM.
  #5  
Old May 19, 2011, 02:30 AM
GarethP
 
64 posts · Jun 2010
Yay! works like a charm - the preg function do seem a little confusing! I guess the <return> character in the string throws them...

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar icon for date jpreuss Post-Kicker, -Byline & -Footer 7 Jun 9, 2011 10:05 AM
[SOLVED] Sub menu not displaying correctly quillik Atahualpa 3 Wordpress theme 11 Apr 1, 2011 01:38 PM
Site Not Displaying Correctly in Opera c12281 New Versions, & Updating 7 Nov 4, 2010 09:54 AM
[SOLVED] blog not displaying correctly in safari pltrace Header configuration & styling 3 Sep 28, 2009 03:41 PM
[SOLVED] Site not displaying correctly in IE martdris Atahualpa 3 Wordpress theme 2 Aug 4, 2009 08:36 AM


All times are GMT -6. The time now is 05:46 PM.


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