assign images to latest posts plugin

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

assign images to latest posts plugin

Post by MySchizoBuddy »

we have this sidebar lugin that shows us the latest 10 posts.
Is it possible to assign thumbnails to them
just like on this template (http://www.templatemonster.com/flash-te ... /8286.html) on the left side you see under the menu these thumbnails. it will look good for the car blog, where i can show the picture of the car rather than the title of the post.
Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: assign images to latest posts plugin

Post by garvinhicking »

You would first need a place where you assign icons for entries, as else serendipity wouldn't know which image to display.

You could use the customfields feature of the entryproperties plugin for that. Create a customfield "ep_icon" for that, for example.

I've then just committed version 1.1 of the "showentries" sidebar plugin, that gives you smarty flexibilites. You can then edit the plugin_showentries.tpl file and insert "{$entry.properties.ep_icon}" as an img src element to show the url. Or you create entry icons called the same as your entry title, and use the {$entry.title|makeFilename} call to use that, if you don't want to assign seperate icons.

Best 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/
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

ok that version is posting the whole body entry on my sidebar, totally destroying my layout. :?

I didn't do the suggested alterations. just installed the plugin.

btw shouldn't you change the "recent entries" plugin rather than "show entries" plugin :?
Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, you can change the smarty template to not show the whole body entry...

I created a new plugin for it, because...well, because I didn't think that it would come near recent entries functionality. I didn't think about it. Well, nobody is perfect :)

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/
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

garvinhicking wrote:I created a new plugin for it, because...well, because I didn't think that it would come near recent entries functionality.
Its perfect. I got it working on localhost. this customfields thingy is super cool. weee haaaa
Image

is there away to extent this functionality to any generic list
Top commented list
Top viewed list
Top rated list
Last weeks posts
etc.

one more thing. any hints on how to display it in a grid. like 2x2 grid rather than all vertical
Image
Post Reply