Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: timned88 on December 28, 2009, 09:15:23 AM

Title: how to parse raw html in post
Post by: timned88 on December 28, 2009, 09:15:23 AM
is there a way to have smf 2.0 rc1.2 (havent upgraded to rc2 yet) parse raw html in a post, via a bbc tag or mod? 

specifically, i want to post the following code:
<!-- QOOF WIDGET BEGIN Generated: Mon Dec 28 2009 09:06:25 GMT-0500 (Eastern Standard Time)-->
<script type='text/javascript' src='http://flash.qoof.com/widget.js.aspx?v=3.0.1.10'></script>
<script type='text/javascript'>
  var Qoof_AC = '1824';
  var Qoof_AID = '2466';
  var Qoof_WidgetId = 'e129a4cf-9a50-4d64-ae8d-f760ab7683ee';
  var Qoof_widgetWidth = '300';
  var Qoof_widgetHeight = '250';
  QoofWriteWidget();</script>


which will embed a video product review along with an inbound link to the site selling the item.  the person viewing would see a video box, similar to that of the youtube embed mod, which is clickable.  thanks for your help.
Title: Re: how to parse raw html in post
Post by: searchgr on December 28, 2009, 09:21:00 AM
use the html tags
Title: Re: how to parse raw html in post
Post by: timned88 on December 28, 2009, 09:23:45 AM
what html tags?  regular arrow brackets or bbc brackets?
do i just wrap the code that i supplied with html and /html?  could you be a bit more specific?  thanks!
Title: Re: how to parse raw html in post
Post by: timned88 on December 28, 2009, 09:29:47 AM
i tried this 2 different ways... 
way #1 (arrow brackets) rendered nothing.

<html>
<!-- QOOF WIDGET BEGIN Generated: Mon Dec 28 2009 09:06:25 GMT-0500 (Eastern Standard Time)-->
<script type='text/javascript' src='http://flash.qoof.com/widget.js.aspx?v=3.0.1.10'></script>
<script type='text/javascript'>
  var Qoof_AC = '1824';
  var Qoof_AID = '2466';
  var Qoof_WidgetId = 'e129a4cf-9a50-4d64-ae8d-f760ab7683ee';
  var Qoof_widgetWidth = '300';
  var Qoof_widgetHeight = '250';
  QoofWriteWidget();</script>
</html>


way #2 (square brackets) echoed the code back onto the screen

[html]
<!-- QOOF WIDGET BEGIN Generated: Mon Dec 28 2009 09:06:25 GMT-0500 (Eastern Standard Time)-->
<script type='text/javascript' src='http://flash.qoof.com/widget.js.aspx?v=3.0.1.10'></script>
<script type='text/javascript'>
  var Qoof_AC = '1824';
  var Qoof_AID = '2466';
  var Qoof_WidgetId = 'e129a4cf-9a50-4d64-ae8d-f760ab7683ee';
  var Qoof_widgetWidth = '300';
  var Qoof_widgetHeight = '250';
  QoofWriteWidget();</script>
[/html]

Title: Re: how to parse raw html in post
Post by: Kays on December 28, 2009, 09:37:28 AM
Use the square brackets.

In the admin CP > Posts and Topics > Bulletin Board Code > Enable basic HTML in posts

Is this checked?
Title: Re: how to parse raw html in post
Post by: timned88 on December 28, 2009, 09:40:54 AM
yes, it was already checked.  if you note my post above, wrapping my html code inside of square html and /html only rendered a blank post.  thanks for the help but it didn't seem to help.
Title: Re: how to parse raw html in post
Post by: timned88 on December 28, 2009, 09:42:22 AM
do i need to add <script> to the list of allowed tags?  how would i do that?
Title: Re: how to parse raw html in post
Post by: Kays on December 28, 2009, 09:51:30 AM
Hmm, I've never used it before but just noticed that won't allow Javascript. 

Quote
This will allow the posting of some basic HTML tags:
<b>, <u>, <i>, <s>, <em>, <ins>, <del>
<a href="">
<img src="" alt="" />
<br />, <hr />
<pre>, <blockquote>

What is it that you are trying to do/add?
Title: Re: how to parse raw html in post
Post by: timned88 on December 28, 2009, 09:54:41 AM
it will embed a video product review box (300x200) along with an inbound link to the site selling the item.  the person viewing would see a video box, similar to that of the youtube embed mod, which is clickable.  its for affiliate clickthru's....

i am trying to see how to add the script tag to the allowed list.  anyone?
Title: Re: how to parse raw html in post
Post by: Kays on December 28, 2009, 10:13:45 AM
Have you looked at the AEVA mod? Apparently you can add sites to it.

http://custom.simplemachines.org/mods/index.php?mod=977
Title: Re: how to parse raw html in post
Post by: timned88 on December 28, 2009, 10:28:11 AM
aeva didn't work either.
Title: Re: how to parse raw html in post
Post by: Kays on December 28, 2009, 10:57:37 AM
In looking at it further, I can get it to work if there's no spaces at the begining of each line.


[html]
<!-- QOOF WIDGET BEGIN Generated: Mon Dec 28 2009 09:06:25 GMT-0500 (Eastern Standard Time)-->
<script type='text/javascript' src='http://flash.qoof.com/widget.js.aspx?v=3.0.1.10'></script>
<script type='text/javascript'>
var Qoof_AC = '1824';
var Qoof_AID = '2466';
var Qoof_WidgetId = 'e129a4cf-9a50-4d64-ae8d-f760ab7683ee';
var Qoof_widgetWidth = '300';
var Qoof_widgetHeight = '250';
QoofWriteWidget();</script>
[/html]

Title: Re: how to parse raw html in post
Post by: timned88 on December 28, 2009, 11:01:38 AM
me too!  that was easy! 

THANKS
Title: Re: how to parse raw html in post
Post by: Kays on December 28, 2009, 11:03:59 AM
That is strange since I thought that <script> wasn't allowed.
Title: Re: how to parse raw html in post
Post by: Inv_Trdr on April 15, 2010, 08:49:42 AM
I realized that I had not checked the HTML box in my admin area. What about embedding a link to the video? Or embed an image to the video. That might work too.