extension for automatically summary and thumbnail

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

extension for automatically summary and thumbnail

Postby wmzhu2004 » Sun Apr 07, 2013 8:54 am

• Is there any extension for automatically summary and thumbnail from entry?

thanks.
wmzhu2004
 
Posts: 14
Joined: Tue Jun 08, 2010 7:01 am

Re: extension for automatically summary and thumbnail

Postby Harm10 » Mon Apr 08, 2013 10:33 am

What do you mean by an automatic summary? Part on the introduction or body? Or the tags?
And thumbnails can be added in several different ways to the content. You could try extension http://extensions.pivotx.net/entry/30/imagetools to get a list.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: extension for automatically summary and thumbnail

Postby wmzhu2004 » Tue Apr 09, 2013 1:48 am

part of body, then automatically put in the introduction.
Don't need to put contents in the introduction manually.
wmzhu2004
 
Posts: 14
Joined: Tue Jun 08, 2010 7:01 am

Re: extension for automatically summary and thumbnail

Postby Harm10 » Tue Apr 09, 2013 4:23 am

Something like this for the first 10 characters of the body text:
Code: Select all
[[assign var=bodypart value=$entry.body|truncate:10]][[$bodypart]]
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: extension for automatically summary and thumbnail

Postby hansfn » Tue Apr 09, 2013 6:38 am

Almost, Harm, but 1) there is no reason to assign it to a new variable and 2) you need to parse the body.

So, in the templates replace [[introduction]] with [[$entry.body|parse|trimlen:80:"something appended when the text is trimmed"]]

PS! truncate and trimlen isn't HTML aware so you might get unexpected results when doing this.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway


Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 4 guests

cron