WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: [Tiki-devel] {list} plugin Smarty templates

Re: [Tiki-devel] {list} plugin Smarty templates

by Nelson Ko :: Rate this Message:

| View in Thread

Yes I had noticed this before and had to resort to what is written in
http://doc.tiki.org/pluginlist#Example_TPL_File

Nelson.

On Mon, May 28, 2012 at 10:34 AM, Jonny Bradley <jonny@...> wrote:

>
> Thanks LP, yes that crossed my mind. Or assigning a "raw" version of the results to a separate array in smarty. Per tpl hacks will do me for now though :)
>
> jb
>
> On 28 May 2012, at 14:33, Louis-Philippe Huberdeau wrote:
>
>> Yes Jonny, that is the logic behind it.
>>
>> I kind of feel passing in the raw values would lead to a lot of situations where the values would not get wiki parsed as expected. On the other hand, comparison is an issue too. Wouldn't be making it easier to strip the values a good option? Perhaps a really simple smarty modifier?
>>
>> --
>> LP
>>
>> On Mon, May 28, 2012 at 8:45 AM, Jonny Bradley <jonny@...> wrote:
>>
>> This happens before or inside the parser (during parse_first probably), and the np's get wrapped around the search results (backwards), so when it is finally wiki parsed the stuff that's come out of the template is not parsed, but the values returned in the result set, for instance tracker values, are...
>>
>> I think!
>>
>> jb
>>
>>
>> On 28 May 2012, at 13:10, Robert Plummer wrote:
>>
>> > Shouldn't np not leave the parser once sent to it?  Are these unparsed values in the first place in templates?
>> >
>> > On May 28, 2012 8:06 AM, "Jonny Bradley" <jonny@...> wrote:
>> >
>> > Hi Luci! :)
>> >
>> > Yes, this only affects Smarty templates used in {list} or {custom_search} plugins, so you'd be fine.
>> >
>> > jb
>> >
>> > On 28 May 2012, at 12:51, luciash wrote:
>> >
>> > > yell !
>> > >
>> > > (in 8.x, but we do not use any templates yet)
>> > >
>> > > luci
>> > >
>> > >
>> > > On 28.5.2012 13:27, Jonny Bradley wrote:
>> > >> Hi All,
>> > >>
>> > >> It may only be me and Nelson really using the {list} and {custom_search} in production sites so far i think (do yell if there are others!), but i've been battling with a problem with ~np~ tags in the results in smarty tpls.
>> > >>
>> > >> It seems that most kinds of tracker field values you need to do $row.fieldname|regex_replace:'/~[\/]?np~/':'' to get to the real value (for comparison etc). This has taken me quite a while to work out and has ended up in some very messy workarounds to get the site to work.
>> > >>
>> > >> It seems to happen in Search_Formatter_Plugin_SmartyTemplate, or rather not happen, and it would seem to make life so much easier if the values in $entries were presented to the template "clean". The only effect i can foresee in doing this would mean that the values of the results would then not get wiki parsed later by default, which i would have thought would be the most likely scenario usually.
>> > >>
>> > >> Anyway, i think this needs fixing or changing as soon as we can before it's being too widely used (might be too late to change anyway) so i thought i'd ask what people think - possibly only Nelson and LP following this far i guess?
>> > >>
>> > >> It also seems the Smarty used here is a different one from the usual Tiki Smarty object, so you don't get the usual $user, $page etc vars - would this be a good thing do you think, or just add extra overhead?
>> > >>
>> > >> Anyway, back to my regex hacks! :)
>> > >>
>> > >> TIA
>> > >>
>> > >> jb
>> > >>
>> > >>
>> > >>
>> > >> ------------------------------------------------------------------------------
>> > >> Live Security Virtual Conference
>> > >> Exclusive live event will cover all the ways today's security and
>> > >> threat landscape has changed and how IT managers can respond. Discussions
>> > >> will include endpoint security, mobile security and the latest in malware
>> > >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> > >> _______________________________________________
>> > >> TikiWiki-devel mailing list
>> > >> TikiWiki-devel@...
>> > >> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> > >
>> > > ------------------------------------------------------------------------------
>> > > Live Security Virtual Conference
>> > > Exclusive live event will cover all the ways today's security and
>> > > threat landscape has changed and how IT managers can respond. Discussions
>> > > will include endpoint security, mobile security and the latest in malware
>> > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> > > _______________________________________________
>> > > TikiWiki-devel mailing list
>> > > TikiWiki-devel@...
>> > > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> > >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Live Security Virtual Conference
>> > Exclusive live event will cover all the ways today's security and
>> > threat landscape has changed and how IT managers can respond. Discussions
>> > will include endpoint security, mobile security and the latest in malware
>> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> > _______________________________________________
>> > TikiWiki-devel mailing list
>> > TikiWiki-devel@...
>> > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> > ------------------------------------------------------------------------------
>> > Live Security Virtual Conference
>> > Exclusive live event will cover all the ways today's security and
>> > threat landscape has changed and how IT managers can respond. Discussions
>> > will include endpoint security, mobile security and the latest in malware
>> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
>> > TikiWiki-devel mailing list
>> > TikiWiki-devel@...
>> > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> TikiWiki-devel mailing list
>> TikiWiki-devel@...
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
>> TikiWiki-devel mailing list
>> TikiWiki-devel@...
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> TikiWiki-devel mailing list
> TikiWiki-devel@...
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
TikiWiki-devel mailing list
TikiWiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

 « Return to Thread: [Tiki-devel] {list} plugin Smarty templates