Dates in permalink pages (Andreas00)

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Lynoure
Regular
Posts: 21
Joined: Tue Sep 05, 2006 4:37 pm

Dates in permalink pages (Andreas00)

Post by Lynoure »

I am using a variant heavily based on Andreas00, and I have a weird problem with the dates.

If I go to
http://www.lynoure.org/blog/index.php?/ ... 11/02.html I get the date in front of the title of the entry.

If instead I go to http://www.lynoure.org/blog/index.php?/ ... lack!.html no date

I have tried to find the cause for this, as I would very much want the permalink pages too to show the date of the entry. Can any of you help me?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Dates in permalink pages (Andreas00)

Post by garvinhicking »

Hi!

Check the 'entries.tpl' template file and search for the use of "$is_single_entry". This variable is queried to indicate, where a date is shown and where not.

More exactly, look for this:

Code: Select all

                {if not $is_single_entry}{if $dategroup.is_sticky}
        {$CONST.STICKY_POST}
        {else}
        {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY_ANDREAS}
        {/if}{/if} 
and remove the first if so that it looks like:

Code: Select all

                {if $dategroup.is_sticky}
        {$CONST.STICKY_POST}
        {else}
        {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY_ANDREAS}
        {/if}
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

That was actually a design feature of the andreas00 template.

To get it working again the way you want it to, you need to open the andreas00 entries.tpl in your favorite text editor and change this

Code: Select all

{if not $is_single_entry}{if $dategroup.is_sticky}
        {$CONST.STICKY_POST}
{else}
        {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY_ANDREAS}
{/if}{/if}
to this

Code: Select all

{if $dategroup.is_sticky}
        {$CONST.STICKY_POST}
{else}
        {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY_ANDREAS}
{/if}
[/code]
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

dang, you beat me to it :lol:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Carl!

*gg*. I was already wondering you'd surely reply, but since I was here, I took my chances... ;-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Lynoure
Regular
Posts: 21
Joined: Tue Sep 05, 2006 4:37 pm

Post by Lynoure »

Thank you all for a very fast advice!

I was looking at that {if not $is_single_entry} but then though "that cannot be it, it's only putting in the sticky stuff if the entry is not a single entry and is sticky".

I still don't quite grasp it, but it does work. I guess I'll need to read a bit more code some day when I have my brain acting better. :)

Edit: Grasped it now, by some mental re-indentation:

Code: Select all

                
{if not $is_single_entry}
        {if $dategroup.is_sticky}
                {$CONST.STICKY_POST}
        {else}
                {$entry.timestamp @formatTime:DATE_FORMAT_ENTRY_ANDREAS}
        {/if}
{/if}
[/code]
Post Reply