Smartyfication of existing plugins mini-HowTo, pls
-
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Smartyfication of existing plugins mini-HowTo, pls
Using part of serendipity_smarty_init() from serendipity_event_relatedlinks (or any other templated plugin) as live example
Quis custodiet ipsos custodes?
Re: Smartyfication of existing plugins mini-HowTo, pls
Dear LazyBadger
I can't follow you!
You are posting/talking like the Delphi Oracle... is it spam, is it a question, is it a reminder for yourself, is it ...
I can't follow you!
You are posting/talking like the Delphi Oracle... is it spam, is it a question, is it a reminder for yourself, is it ...
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
It's easy
I
- ask
- some hints
- in the area of converting hardcoded front-end output of plugin into templated output, as it was done with serendipity_event_relatedlinks
- for existing plugin (namely - event_freetag)
I
- ask
- some hints
- in the area of converting hardcoded front-end output of plugin into templated output, as it was done with serendipity_event_relatedlinks
- for existing plugin (namely - event_freetag)
Quis custodiet ipsos custodes?
Re: Smartyfication of existing plugins mini-HowTo, pls
event_freetag is already smartified. Or: which area of it?
-
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
Less than wanted. This part drive me nutsonli wrote:event_freetag is already smartified.
Code: Select all
function displayTagCloud($tag)
{
$tags = $this->getTagCloudTags($tag);
echo '<div class="serendipity_Entry_Date freetag_cloud">';
echo '<h2 class="serendipity_date">';
$tagTitle = is_array($this->displayTag) ? implode(' + ',$this->displayTag) : $this->displayTag;
printf (PLUGIN_EVENT_FREETAG_USING, htmlspecialchars($tagTitle));
echo '</h2>';
echo '<div class="serendipity_freetag_taglist">';
echo '<p class="serendipity_freetag_taglist_related">' . PLUGIN_EVENT_FREETAG_RELATED_TAGS . '</p>' . "\n";
Quis custodiet ipsos custodes?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
Hi!
We really appreciate your input and feedback, and work on Serendipity. But it's really, really hard to understand your postings. You seem to have a good english vocabulary, but you really need to write longer sentences that better explain what you are thinking/talking about.
As for the code of your related tags - there's a configuration option in the plugin that toggle if the cloud should be displayed or not. So if you want to remove that part from the html output of your bloig, you can disable the option...
Regards,
Garvin
We really appreciate your input and feedback, and work on Serendipity. But it's really, really hard to understand your postings. You seem to have a good english vocabulary, but you really need to write longer sentences that better explain what you are thinking/talking about.
As for the code of your related tags - there's a configuration option in the plugin that toggle if the cloud should be displayed or not. So if you want to remove that part from the html output of your bloig, you can disable the option...
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/
-
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
I'll try to make my English better - I haven't live practice rather long and here I have to fight with English-German mix in my head on writing. About output of related tags - no, I don't want suppress it totally, I just think about easy implementation of different design solutions (which now can be done only by editing code, it's uncommon solution for s9y)garvinhicking wrote:if you want to remove that part from the html output of your bloig, you can disable the option...
Quis custodiet ipsos custodes?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
Hi!
If you prefer german, feel free to head over to the german section of this forums. But if you prefer to brush up on your english, that's fine as well.
I think I understand what you want. Even though adding smarty output to that section is not really that hard, the performance impact of doing that would be a huge overhead. Do you have any specific modifications in mind? Because much can be solved with CSS.
The first step would be to simply edit the plugin file and use $serendipity['smarty']->assign to pass through the variables needed in that HTML to simply the core of s9y, without rendering a .tpl file. Instead, editing your base index.tpl template would then make it possible to use those variables. The overhead of this would be neglectible...?
Regards,
Garvin
If you prefer german, feel free to head over to the german section of this forums. But if you prefer to brush up on your english, that's fine as well.
I think I understand what you want. Even though adding smarty output to that section is not really that hard, the performance impact of doing that would be a huge overhead. Do you have any specific modifications in mind? Because much can be solved with CSS.
The first step would be to simply edit the plugin file and use $serendipity['smarty']->assign to pass through the variables needed in that HTML to simply the core of s9y, without rendering a .tpl file. Instead, editing your base index.tpl template would then make it possible to use those variables. The overhead of this would be neglectible...?
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/
-
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
Ich wähle Englisch, weil mein gebrochenes Deutsch-Russischen (wie ich sie verstehe) noch schrecklich ruinen des Englischengarvinhicking wrote: If you prefer german, feel free to head over to the german section of this forums.
[/quote]I think I understand what you want. Even though adding smarty output to that section is not really that hard, the performance impact of doing that would be a huge overhead. Do you have any specific modifications in mind? Because much can be solved with CSS.[/quote]
Well, sometimes I see as a must a modification in a logic too. Just an example of my small changes (pure for aesthetic purposes)
/* echo '<h2 class="serendipity_date">';
...
echo '</h2>'; */
(only because a/ topic title are h4 b/ if theme have {$head_subtitle|@default:$blogDescription}
Code: Select all
printf (PLUGIN_EVENT_FREETAG_USING
And every changer have to repeat this step, yes? I can't see big difference this editing pure HTML and, also, these changes will stay a targets of future plugin updates, that I want to eliminate but give a possibility of flexible outputThe first step would be to simply edit the plugin file and use $serendipity['smarty']->assign to pass through the variables needed in that HTML to simply the core of s9y, without rendering a .tpl file.
If it possible, repeat this part in detail, please, for the "slowpoke-rhino" - I see nothing, that I do in index.tpl (checked default theme, saw one bigInstead, editing your base index.tpl template would then make it possible to use those variables. The overhead of this would be neglectible...?
Code: Select all
<td id="content" valign="top">{$CONTENT}</td>
Quis custodiet ipsos custodes?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
Hi!
First I wanted to add an option to use a smarty template file to the plugni as an example, but I found out the plugin already has way too many options.
So I decided to add the smarty template by default, and simply hope everyone can take the small performance penalty. Version 3.20 now contains that change, you can get it via CVS and see how I implemented it. Hope that helps!
Regards,
Garvin
First I wanted to add an option to use a smarty template file to the plugni as an example, but I found out the plugin already has way too many options.
So I decided to add the smarty template by default, and simply hope everyone can take the small performance penalty. Version 3.20 now contains that change, you can get it via CVS and see how I implemented it. Hope that helps!
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/
-
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Re: Smartyfication of existing plugins mini-HowTo, pls
Thanks! It's excellent solution - and I hope to learn something new from comparing old and new codegarvinhicking wrote:I decided to add the smarty template by default, and simply hope everyone can take the small performance penalty.
Quis custodiet ipsos custodes?