Pasting HTML code from other web sites

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.
Post Reply
ITistic
Forum Members
Forum Members
Posts: 25
Joined: Tue Jun 27, 2006 9:28 pm

Pasting HTML code from other web sites

Post by ITistic »

Hi everyone,

We integrate CMSMS with a lot of our client's web sites are are huge proponents of the software. We've recently integrated CMSMS 1.4.1 for a new client's site and have noticed a slight issue. This particular client needs the ability to paste code from other web sites (PollDaddy.com code, particularly) into their web site. PollDaddy.com allows them to create a poll and gives them HTML code to paste into their site. We've setup a Global Content Block for them to paste the poll into. Doing this, however, reformats the code and it doesn't work properly. We've tried pasting in WYSIWYG and HTML views with similar results.

How have the rest of you accomplished this? I can't imagine I'm the first person to come across this issue.

Thanks in advance for your time and support.
User avatar
Augustas
Forum Members
Forum Members
Posts: 241
Joined: Wed Oct 17, 2007 6:09 pm
Location: the world

Re: Pasting HTML code from other web sites

Post by Augustas »

Hello,

How does it reformat the code?

Maybe tag {literal} would help?
{literal}
your HTLM code
{/literal}
http://FollowTheRoad.com/ - living on the road...
http://www.kligys.com/ - asmeninis blog'as...
ITistic
Forum Members
Forum Members
Posts: 25
Joined: Tue Jun 27, 2006 9:28 pm

Re: Pasting HTML code from other web sites

Post by ITistic »

Here is the code I need to paste:

Code: Select all

<__script__ type="text/javascript" language="javascript" src="http://s3.polldaddy.com/p/964287.js"></__script><noscript> <a href ="http://answers.polldaddy.com/poll/964287/" >What do you think of WOW Online's new look?</a>  <br/> <span style="font-size:9px;"> (<a href ="http://www.polldaddy.com">  polls</a>)</span></noscript>
When I paste it into the HTML view of TinyMCE and click Update it gets changed to the following:

Code: Select all

<__script__ src="http://s3.polldaddy.com/p/964287.js" type="text/javascript"></__script>
<noscript> <a href ="http://answers.polldaddy.com/poll/964287/" >What do you think of WOW Online's new look?</a>  <br/> <span style="font-size:9px;" mce_style="font-size:9px;"> (<a href ="http://www.polldaddy.com">  polls</a>)</span></noscript>
Placing {literal}{/literal} tags around it before pasting has no effect.
User avatar
Augustas
Forum Members
Forum Members
Posts: 241
Joined: Wed Oct 17, 2007 6:09 pm
Location: the world

Re: Pasting HTML code from other web sites

Post by Augustas »

If WYSIWYG is necessary to be active, then I would create a new Content Block without WYSIWYG and let the user put his Poll HTML Code inside that.

Code: Select all

{content block="Poll HTML Code" wysiwyg='false'}
You could even assign this block to a variable first and then use it wherever it is needed.

Hopefully this will help.
http://FollowTheRoad.com/ - living on the road...
http://www.kligys.com/ - asmeninis blog'as...
User avatar
snafu
Forum Members
Forum Members
Posts: 29
Joined: Mon Oct 29, 2007 5:56 pm
Location: Kawartha Lakes, Ontario, Canada

Re: Pasting HTML code from other web sites

Post by snafu »

Thanks Augustas!!

I was recently trying to paste code for an image map in a Global Content Block and TinyMCE always added , which made the code W3C invalid :(

As you suggested, creating a content block with wysiwyg='false' worked P-E-R-F-E-C-T and is much cleaner/easier than turning TinyMCE off as I was doing.

Thank-you very much and hope this helps ITistic and others!!
"Catch a man a fish and he'll have fish for a day, teach a man to fish and he'll have fish for a lifetime"-Chinese Proverb
ITistic
Forum Members
Forum Members
Posts: 25
Joined: Tue Jun 27, 2006 9:28 pm

Re: Pasting HTML code from other web sites

Post by ITistic »

Augustas wrote: If WYSIWYG is necessary to be active, then I would create a new Content Block without WYSIWYG and let the user put his Poll HTML Code inside that.

Code: Select all

{content block="Poll HTML Code" wysiwyg='false'}
You could even assign this block to a variable first and then use it wherever it is needed.

Hopefully this will help.
When editing the content block, unchecking the Turn WYSIWYG on/off checkbox and pasting the code worked! The only thing that is unfortunate is that the next time you edit the same content block the WYSIWYG editor is on again. It'd be nice if CMSMS saved that selection to the database so it would persist.
User avatar
Augustas
Forum Members
Forum Members
Posts: 241
Joined: Wed Oct 17, 2007 6:09 pm
Location: the world

Re: Pasting HTML code from other web sites

Post by Augustas »

ITistic wrote: The only thing that is unfortunate is that the next time you edit the same content block the WYSIWYG editor is on again. It'd be nice if CMSMS saved that selection to the database so it would persist.
Yes, currently you can only disable it globally in the Global Settings.
http://FollowTheRoad.com/ - living on the road...
http://www.kligys.com/ - asmeninis blog'as...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Pasting HTML code from other web sites

Post by Dr.CSS »

Do you know there is a Polls module for CMS Made Simple?...
ITistic
Forum Members
Forum Members
Posts: 25
Joined: Tue Jun 27, 2006 9:28 pm

Re: Pasting HTML code from other web sites

Post by ITistic »

mark wrote: Do you know there is a Polls module for CMS Made Simple?...
I'm pretty sure I looked into it and wasn't impressed. I see now that it requires the FrontEndUsers module. We wanted visitors to be able to vote without registering for or logging into an account.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Pasting HTML code from other web sites

Post by Dr.CSS »

I have used it on sites and it has no problem of where visitors have to be registered to see/use it...
Post Reply

Return to “CMSMS Core”