It's possible to have an image next to your date which seperates your posts.
Example:
[bar with <image> <date>]
post 1
post 2
[bar with <image> <date>]
post 1
But, is it possible to have this image to be 'linked' to a certain day?
For example.
Monday shows an ape
Tuesday shows a banane
Wednesday shows a canary
Thursday shows a dragon
Friday shows an egg
Saterday shows a frog
Sunday shows a gremlin
I hope you get my point
Image for each dayname
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Image for each dayname
Hi!
Yes, you can edit the entries.tpl file, and inside each {foreach} entry loop, you can use the entry's post date to get the actual image, like:
then you create the files /images/1.jpg (Monday) to /images/7.jpg (Sunday).
HTH,
Garvin
Yes, you can edit the entries.tpl file, and inside each {foreach} entry loop, you can use the entry's post date to get the actual image, like:
Code: Select all
<img src="/images/{$entry.timestamp|@formatTime:'%u'}.jpg" />
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/
# 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/
Re: Image for each dayname
Hi Garvin,garvinhicking wrote: Yes, you can edit the entries.tpl file, and inside each {foreach} entry loop, you can use the entry's post date to get the actual image, like:
then you create the files /images/1.jpg (Monday) to /images/7.jpg (Sunday).Code: Select all
<img src="/images/{$entry.timestamp|@formatTime:'%u'}.jpg" />
Thanks for your quick response, but..
Is this correct?
Code: Select all
{foreach from=$entries item="dategroup"}
<div class="serendipity_Entry_Date">
{if $dategroup.is_sticky}
<h3 class="serendipity_date">{$CONST.STICKY_POSTINGS}</h3>
{else}
<h3 class="serendipity_date">{$dategroup.date|@formatTime:DATE_FORMAT_ENTRY}<img src="/dagboek/templates/xarno-2/images/{$entry.timestamp|@formatTime:'%u'}.jpg" /></h3>
{/if}
</div>
Zaterdag, 5 december 2009 -> 1 (Saturday)
Zaterdag, 28 november 2009 -> 6 (Saturday)
Dinsdag, 24 november 2009 -> 6 (Tuesday)
Dinsdag, 10 november 2009 -> 2 (Tuesday)
Woensdag, 4 november 2009 -> 2 (Wednesday)
Maandag, 2 november 2009 -> 3 (Monday)
Zaterdag, 24 oktober 2009 -> 1 (Saturday)
See http://www.xarno.nl/dagboek/
---edit---
I changed
Code: Select all
$entry.timestamp
Code: Select all
$dategroup.date
Please tell me that I'm doing this correctly so I can close this thread
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Image for each dayname
Hi!
Yes, you can do it per each dategroup. I initially thought you wanted that line after each blog entry, so if you have multiple blog entries on the same day, you get multiple day lines. If oyu want it only once, the place you put it is perfectly fine.
Regards,
Garvin
Yes, you can do it per each dategroup. I initially thought you wanted that line after each blog entry, so if you have multiple blog entries on the same day, you get multiple day lines. If oyu want it only once, the place you put it is perfectly fine.
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/
# 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/
Re: Image for each dayname
Got to brush up my Englishgarvinhicking wrote: Yes, you can do it per each dategroup. I initially thought you wanted that line after each blog entry, so if you have multiple blog entries on the same day, you get multiple day lines. If oyu want it only once, the place you put it is perfectly fine.
Thank you very much.
Case closed
Re: Image for each dayname
We also have a German forum, you knowFF wrote:Got to brush up my English
YL
Re: Image for each dayname
Unfortunately my German is worse.yellowled wrote:We also have a German forum, you knowFF wrote:Got to brush up my English
I'm living a few km's to the west of Germany About 200 of them.
Greetings from The Netherlands
Re: Image for each dayname
I was just assuming. In 8 out of 10 hypothetical cases, you would've been GermanFF wrote:Greetings from The Netherlands
YL