help cmsms changes my code

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
SolsWebdesign

help cmsms changes my code

Post by SolsWebdesign »

Hi everyone,
I have looked everywhere but I can't seem to find the solution so I'll post my problem. Usually I use the following to stop Smarty from parsing my code:
{literal}
...
{/literal}
But does not seem to work in this case. I have a page containing the following code:

Code: Select all

{literal}
<p align="center">
  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="958" height="650" id="animatie1" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="animatie1.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <embed src="animatie1.swf" quality="high" bgcolor="#ffffff" width="958" height="650" name="animatie1" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
  </object>
</p>
{/literal}
As you can see a (flash) animation is included in the page. When I save this it works fine. However if I open the page again, cmsms suddenly shows the following:

Code: Select all

{literal}
<p align="center"><object id="animatie1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="958" height="650" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="animatie1.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /></object></p>
{/literal}
Note that the "embed src" tag has gone missing. When saving again my (flash) animation will stop working. Now I know not to touch that page again but unfortunately my client will surely forget!
What am I missing here? Shouldn't CMSms leave my stuff withing the {literal} tags untouched?
I don't really want to use the (marked as stale) swfobject because my code works just fine without it. That is if CMSmadeSimple doesn't change my code within literals.... Anybody any idea how to keep CMSms from changing my code?
;D
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: help cmsms changes my code

Post by Rolf »

Where is this code? Page, template...?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
SolsWebdesign

Re: help cmsms changes my code - solved I think

Post by SolsWebdesign »

Hi Rolf,

Hmmm that is a good idea... if only I could put it in a template... It is actually in a page right now... I tried putting it in a UDT but that was stupid (incorrect code error - not surprisingly).

Thank you for making me think! I put it in an html block, it is save there from my client! It also has a note: don't change and don't save!
;)
the test page:
http://www.solswebdesign.nl/cmsmadesimp ... a-animatie
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: help cmsms changes my code

Post by Wishbone »

It's the WYSIWYG editor that's modifying the code. If you don't need WYSIWYG for this page, go to the Options tab and disable WYSIWYG.
eden
New Member
New Member
Posts: 6
Joined: Tue Oct 14, 2008 12:05 pm

Re: help cmsms changes my code

Post by eden »

Ok, so what if you need wysiwyg?
A new stab at making a minimum footprint wysiwyg editor out of the tinymce core. Including no (non-essential) plugins and only behaving "well" and simple.
Seems like she can be a naughty girl if provoked :) Here's my case:

Code: Select all

<img src="myimage.jpg" width="200" style='{rotate amount='20'}' />
after saving it works fine until you come back only to find:

Code: Select all

<img src="myurl" width="200" />
So the whole style tag has been edited away :( Sure JQuery could do that in runtime but this would be so much simpler. Is there a way to turn off error correction from microtiny?

Edit: after posting I noticed that removing nested 'single quotes?' solved my problem.

Now I still think that really really well behaved editor would just ignore everything between and around {} tags no matter where those might be... For a really ridiculous example:

Code: Select all

<{RandomTag} {RandomStyle}='{RandomValue}'>{RandomThing}</{GetRandomTag}>
would be interesting :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: help cmsms changes my code

Post by Dr.CSS »

If you are trying to put things in the Content: box of a page and use a wysiwyg you are better off using a global content block where you can turn the wysiwyg off then you can add the GCB to the Content:...
Locked

Return to “CMSMS Core”