[geeklog-devel] FW: Geeklog Caching Template Library Question

Tom websitemaster at cogeco.net
Tue Aug 27 19:33:14 EDT 2013


Hey Ivy,



This will also probably work with template variables ( adding  ‘ and . )
and is a little cleaner:



{!!autotag userbox:attributedatacount templatesetvar:'.{data_code}.' value:4
!!}



Let me know



Tom





From: 今駒哲子 [mailto:komma at ivywe.co.jp]
Sent: August-26-13 11:58 PM
To: Tom
Cc: Geeklog Development; Joe Mucchiello
Subject: Re: FW: Geeklog Caching Template Library Question



Hi Tom,



Thanks!



It works.



<?php echo PLG_replaceTags('[userbox:attributedatacount templatesetvar:' .
$this->get_var('data_code') . ' value:4]'); ?>





2013/8/27 Tom <websitemaster at cogeco.net>

Hi Ivy,



I am also posting this to the Geeklog Dev Mailing list in case anyone else
eventually has the same problem.



As you know with the old Geeklog template class some of the templates
supported autotags. For example you could put [story:welcome] in the header
and when the header was viewed a link to the story would be made. You could
also combine autotags with template variables and they would still also
work. For example in the storytext.thtml file you could put
[story:{story_id}] (I forget the exact template variable name) and the link
of the story would be created. This could be done because autotags were
generate near the end of the process for the template files that supported
it after the template variables were written (expect the footer). The reason
not all template files supported this was because some template variables or
block content, etc… would return autotags usually in the case of offering
help (for example allowed html in the story editor) or even in javascript.



With the caching template library the generation of a template is done
differently. Everything is figured out at once and then it is compiled once.
This gives us a lot of benefits including speed, using autotags in any
templates (including plugins), logic processing, etc.. (http://wiki.geeklog.
net/index.php/Caching_Template_Library). Unfortunately what it doesn’t
allow is the recursive use of template variables and other actions since
there is no order of what is processed first.



This means you cannot combine actions or template variables together within
another action or template variable.



There is a work around though for your autotag problem. You could add some
php to your template instead of using the autotag directly. Instead of doing
this in your template file:



[story:{story_id}]



Replace it with this:



<?php echo PLG_replaceTags('[story: ' . $this->get_var('story_id') . ']'); ?
>



And just like before as long as that template variable exists for that
template file it will be returned and then the autotag will be generated.



I hope this helps.



Tom





From: Tom [mailto:websitemaster at cogeco.net]
Sent: August-26-13 8:02 AM
To: '今駒哲子'
Cc: Joe Mucchiello (joe at throwingdice.com)
Subject: Geeklog Caching Template Library Question



Hi Ivy,



I will have to look into that. It was never tested.



Joe, do you remember if this would be possible? Are the template variables
set first and then the autotags?



Tom



From: 今駒哲子 [mailto:komma at ivywe.co.jp]
Sent: August-26-13 7:30 AM
To: Web Site Master
Subject: Re: Install all plugins when upgrade Geeklog



Hi Tom,



Now I can not use theme variables in autotag by using repository version.

Please tell me the way to use theme variables.

e.g.

{!!autotag story:{XXX} !!}



[story:{XXX}] works well.



thanks.



--

Ivy



2013/8/14 今駒哲子 <komma at ivywe.co.jp>

Hi Tom,

Sorry.
It's our Japanese package problem.


2013/8/13 今駒哲子 <komma at ivywe.co.jp>:

> Hi Tom,
>
> Thank you for reply.
>
> But I tried upgrade to 2.0.1 many times, always all of plugins are
installed.
> Could you please try upgrade?
>
> Thanks.
>
> 2013/8/13 Web Site Master <websitemaster at cogeco.net>:
>> Hi Ivy
>>
>> I haven't changed any of that code so it is working the same as before.
>>
>> I believe on a Geeklog upgrade all plugins (Core or otherwise), if an
>> upgrade exists, will also be upgraded. Any plugins that haven't been
>> installed yet, will also be installed.
>>
>> Tom
>>
>>
>> On 08/13/13, 今駒哲子 <komma at ivywe.co.jp> wrote:
>>
>> Hi Tom,
>>
>> Thank you so much for Geeklog 2.1.0.
>>
>> http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/
>> When Geeklog upgrade to 2.0.1, existing all plugins are automatically
>> installed.
>> Is it bug?
>>
>> Some plugins don't works on Geeklog 2, so the site may be error.
>>
>> Thanks.
>> --
>> http://www.geeklog.jp
>> Ivy
>
>
>
> --















-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20130827/fb954cc4/attachment.html>


More information about the geeklog-devel mailing list