News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

how to parse raw html in post

Started by timned88, December 28, 2009, 09:15:23 AM

Previous topic - Next topic

timned88

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.

searchgr


timned88

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!

timned88

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]


Kays

Use the square brackets.

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

Is this checked?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

timned88

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.

timned88

do i need to add <script> to the list of allowed tags?  how would i do that?

Kays

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?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

timned88

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?

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods


Kays

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]


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods


Kays

That is strange since I thought that <script> wasn't allowed.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Inv_Trdr

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.
Passion for Trading

Advertisement: