[SOLVED] How to bypass smarty parsing

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
User avatar
barboni
Forum Members
Forum Members
Posts: 68
Joined: Thu Nov 30, 2006 7:56 pm
Location: Serbia

[SOLVED] How to bypass smarty parsing

Post by barboni »

Hello,

I have an issue with something i suppose is related to smarty parsing. Well, I use Wookmark jquery and it requires this tag:

Code: Select all

<li data-filter-class='["some_class"]'>
. I use it inside News summary template by dynamically inserting "some_class", but
the problem is single quotes constantly being translated to double quotes, which i suppose is done by Smarty. The script won't work unless single quotes are outside the brackets and double quotes inside.

Is there anything I can do to make it work?

I have tried using literal, making UDT with php - but nothing changes, the double quotes are inserted even when no quotes are present in thecode.
Last edited by barboni on Mon Mar 10, 2014 4:53 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: How to bypass smarty parsing

Post by Rolf »

{literal}{/literal}?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
barboni
Forum Members
Forum Members
Posts: 68
Joined: Thu Nov 30, 2006 7:56 pm
Location: Serbia

Re: How to bypass smarty parsing

Post by barboni »

Tried it, it doesn't change anything. Double quotes are always there.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1943
Joined: Mon Jan 29, 2007 4:47 pm

Re: How to bypass smarty parsing

Post by Jo Morg »

AFAIK it's not a Smarty parsing issue...
Are you using a WYSISYG? A code highlighter or anything of the sort?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
barboni
Forum Members
Forum Members
Posts: 68
Joined: Thu Nov 30, 2006 7:56 pm
Location: Serbia

Re: How to bypass smarty parsing

Post by barboni »

Nope, I am using News template editor, no WYSIWYG. I said I just suppose it's a Smarty. I really am not sure what else could change the code.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1943
Joined: Mon Jan 29, 2007 4:47 pm

Re: How to bypass smarty parsing

Post by Jo Morg »

Just for testing purposes, try inserting that code in a GCB with the WYSIWYG off and insert the GCB on a normal page template.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
barboni
Forum Members
Forum Members
Posts: 68
Joined: Thu Nov 30, 2006 7:56 pm
Location: Serbia

Re: How to bypass smarty parsing

Post by barboni »

Well, again single qoutes changed to double...
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1943
Joined: Mon Jan 29, 2007 4:47 pm

Re: How to bypass smarty parsing

Post by Jo Morg »

Ok on my tests I ended up being able to reproduce, somewhat, that behavior. It seems that CMSMS or Smarty HTML encodes to

Code: Select all

<li data-filter-class="["some_class"]"></li>
I believe it's a CMSMS issue not a Smarty issue... but I'm doing a few more tests.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3492
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: How to bypass smarty parsing

Post by velden »

cmsms 1.11.9
News 2.14.1

In News summary template:

Code: Select all

<li data-filter-class='["some_class"]'>test</li>
Result (page source):

Code: Select all

<li data-filter-class='["some_class"]'>test</li>
So I don't think the data is changed somewhere in cmsms.

However, in Firebug:

Code: Select all

<li data-filter-class="["some_class"]">test</li>
I assume that doens't matter as that's interpretation of Firebug. But maybe, if Firebug interprets it this way, the browser/js does it too...
User avatar
barboni
Forum Members
Forum Members
Posts: 68
Joined: Thu Nov 30, 2006 7:56 pm
Location: Serbia

Re: How to bypass smarty parsing

Post by barboni »

Yes, you're right, it's Firebug! But strange, I tested this outside CMSMS and it works only when quotes are correctly set, then again, it won't work inside CMSMS.

Well, thanks anyway, I'll keep on searching for solution.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3492
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: How to bypass smarty parsing

Post by velden »

barboni wrote:...then again, it won't work inside CMSMS.
Impossible.

Can you post a link to the page and describe the problem (what do you expect and what do you get)?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1943
Joined: Mon Jan 29, 2007 4:47 pm

Re: How to bypass smarty parsing

Post by Jo Morg »

Ok.... Tested on a different browser and there was no encoding whatsoever, meaning that my initial thoughts were wrong.
On IE all my tests, including a CGB, an UDT, directly on a template, and on a content etc worked as expected.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
zaidcrowe
Forum Members
Forum Members
Posts: 109
Joined: Wed Jun 10, 2009 3:43 pm

Re: How to bypass smarty parsing

Post by zaidcrowe »

this may, or may not be helpful - but have you tried the isotope plugin for jquery? If i understand what wookmark does that is i think it's very similar and ive used it within cmsms no problems :)

http://isotope.metafizzy.co/
User avatar
barboni
Forum Members
Forum Members
Posts: 68
Joined: Thu Nov 30, 2006 7:56 pm
Location: Serbia

Re: How to bypass smarty parsing

Post by barboni »

OK, I've found it! The issue with quotes confused me, so I thought that was the problem. Actually there was a tiny, almost invisible typo inside JS.

Sorry for false alarm, and thanks to everyone of you that tried to help. It's been 8 years since I started using CMSMS and I must tell that it really rocks, and no other system has so great and helpful community. Since I always find all the answers here I rarely use forum to post questions and now I'm a little embarrased :-[

THANKS AGAIN!
Locked

Return to “[locked] Installation, Setup and Upgrade”