logo       

Re: Two problems: msg#00050

php.drupal.support

Subject: Re: Two problems


> It is as Gordon described. In the .theme file for your theme, find the
> _node function and, using a static variable, keep track of the date. If
> the date changes, output the date.

Can you paste here that bit of code? I don't know PHP and I need to look at
an example to adapt it to my template.

--

> I thought a bit about it and this is the algorithm that should work:
>
> $date -> $temp-date
>
> If $temp-date != $current-date then
> - print $date
> - $date -> $current-date
>
> Now I don't know PHP so I need help to translate that into working code.
The
> other problem is to define how to initialize $current-date before it's
used
> for the first time. Or perhaps there's no need for $temp-date and I only
> need $current-date to be set to the value of the "last" node.
>
> Then I don't also know how to compare those values considering just the
day
> number and the month and not the hour.
>
> I need help on this precise part.

Abalieno

--
[ Drupal support list | http://list.drupal.org/ ]



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise