entries and mycalendar - with a timestamp?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
ewehdemeyer
Regular
Posts: 62
Joined: Fri Jan 19, 2007 6:59 pm
Location: Hamburg

entries and mycalendar - with a timestamp?

Post by ewehdemeyer »

is there a possibility to get the date in the head of an entry an additional time designation / timestamp? I use bulletproof, there are some dateformats included, but I found none with a time - maybe I overlooked it? I even surched the smarty-files, but I couldn't decide, where an how often the dateformat (strftime) where to specify or alterated.
Even the very useful mycalendar speaks in month - day - year. In spite of that- the output on the frontend-output allows a time designation, if the plugin is told to do so (%e %B %Y um %H:%M) . But its always 00:00 because there is no place to submit the time.

any hint would be appreciated
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi

I guess you could edit your entries.tpl.

Look for this

Code: Select all

<h3 class="serendipity_date"><abbr class="published" title="{$dategroup.date|@formatTime:'%Y-%m-%dT%H:%M:%S%Z'}">
{$dategroup.date|@formatTime:$template_option.date_format}</abbr></h3>
and change it to this

Code: Select all

<h3 class="serendipity_date"><abbr class="published" title="{$dategroup.date|@formatTime:'%Y-%m-%dT%H:%M:%S%Z'}">
{$dategroup.date|@formatTime:$template_option.date_format} at {$entry.timestamp|@formatTime:'%H:%M %P'}</abbr></h3>
that would do it

HTH
DAve
ewehdemeyer
Regular
Posts: 62
Joined: Fri Jan 19, 2007 6:59 pm
Location: Hamburg

Post by ewehdemeyer »

Hi

that does it. But its placing the wrong time there (seems to bee the actual time). There must be some additional dependences.

I use a modification of the bulletproof theme, which allows to specify the date format in admin-area. A format with a timestamp is not included. Maybe I have to change something else?

But thx for showing the direction

eva
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

hmm

I guess the $timestamp hasn't been set yet.

Well why not edit your bulletproof/config.inc.php.

Look for date_format and change the format for your chosen style.

ie: If I change

'%a, %e. %B %Y' => '%a, %e. %B %Y',
to
%a, %e. %B %Y at %H:%M' => '%a, %e. %B %Y at %H:%M',

that would change
'Wed, 30. April 2008'
to
Wed, 30. April 2008 at 15:54

so you should then go and select your new date format in admin/manage styles

HTH

Dave
ewehdemeyer
Regular
Posts: 62
Joined: Fri Jan 19, 2007 6:59 pm
Location: Hamburg

solved: date_format problem in headline of entries

Post by ewehdemeyer »

It is working now - via an intermediate stage, when there were two different times in the headline, it's now exactly what I wanted to have.
Thx
eva
Post Reply