Page 1 of 1

staticpage list sidebar truncation

Posted: Thu Jun 16, 2011 8:12 pm
by Timbalu
After realizing there is no smarty template used for the staticpage sidebar list and wondering why my headlines were to long and how to solve this, I recently added a cut function based on two new config vars (length and etc) to the staticpage sidebar plugin, ... until one day someone will rewrite the staticpages and put them into core! ;-)

Edit: added capability to use the permalinks name instead.
Edit: added truncate utf-8 combat, if mb_* available

[The extension php has been deactivated and can no longer be displayed.]


Re: staticpage list sidebar truncation

Posted: Wed Jun 22, 2011 11:45 pm
by garvinhicking
Hi!

Instead of hotfixing this with a cluttered config option, wouldn't you maybe like to add a "Use smarty template" option? :-))

Regards,
Garvin

Re: staticpage list sidebar truncation

Posted: Thu Jun 23, 2011 8:31 am
by Timbalu
Well, yes.., but this was easier for the moment.
I think this is getting neccessary in future somehow, when Smarty3+ ships with Serendipity, including utf8 substr.

Re: staticpage list sidebar truncation

Posted: Fri Jun 24, 2011 3:50 pm
by Timbalu
Ok, here it is, using a "Use smarty template" option ...,
but is has no utf8 mb_substr support, as we are with smarty 2.6.x, and the js node string option is still done in the plugin, which hasn't have truncation support at all. But you can use it within the tpl file also and in there is some CSS magic to have something (nearly) similar. Just copy the files right into the serendipity_event_staticpage folder.

Maybe Garvin, you could just have a look if this is ready to update ... ;-)
plugin_staticpage_sidebar.zip
(3.64 KiB) Downloaded 258 times