Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 - 0 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: HTML Signature. Possible ?
by Cesagonchu on 2014/1/30 20:25:10

Thank you iHackCode and geekwright!
Re: HTML Signature. Possible ?
by geekwright on 2014/1/30 3:30:43

I've got a soft spot for DJ's and Musicians.

Just added your soundcloud tags to 2.5.7.

As to why straight HTML gets filtered out, it is possible to cause all sorts of mischief with that. It has to be limited to use safely, otherwise a site can be hacked fairly easily. It should be possible to apply HTMLPurifier to make accepting HTML safe, but currently, XOOPS relies on BB Code to keep things under control.
Re: HTML Signature. Possible ?
by iHackCode on 2014/1/29 9:20:54

XOOPS BBCode for SoundCloud. (parts were taken from http://blog.soundcloud.com/2009/07/28/soundcloud-player-in-forums-5-step-guide-for-soundcloud-bb-code/)

*Download the soundcloud image for the text editor.

download http://bit.ly/tV7mm (from step 3 in the soundcloud blog) save it as soundcloud.png and upload it to yourdomain.com/images/form

*Go to your site and create a folder called soundcloud in:
yourdomain.com/class/textsanitizer

so it looks like
yourdomain.com/class/textsanitizer/soundcloud


* add two files to it

index.html
le="color: #000000"><?php <script>history.go(-1);</script>


soundcloud.php
<?php class MytsSoundcloud extends MyTextSanitizerExtension { function encode($textarea_id) { $config = parent::loadConfig( dirname(__FILE__) ); $code = "<img src='{$this->image_path}/soundcloud.png' alt='SoundCloud' onclick='xoopsCodeSoundCloud("{$textarea_id}","" . htmlspecialchars('Enter SoundCloud Profile URL', ENT_QUOTES) . "");' onmouseover='style.cursor="hand"'/>&nbsp;"; $javascript = <<<EOH  function xoopsCodeSoundCloud(id, enterSoundCloud) { var selection = xoopsGetSelect(id); if (selection.length > 0) { var text = selection; } else { var text = prompt(enterSoundCloud, ""); } var domobj = xoopsGetElementById(id); xoopsInsertText(domobj, "[soundcloud]"+text+"[/soundcloud]"); domobj.focus(); } EOH; return array($code, $javascript); } function load(&$ts) { $ts->patterns[] = "/[soundcloud](http[s]?://[^"'<>]*)(.*)[/soundcloud]/esU"; $ts->replacements[] = __CLASS__ . "::decode('\1\2')"; } function decode($url) { $config = parent::loadConfig(dirname(__FILE__)); if (!preg_match("/^http://(www.)?soundcloud.com/(.*)/i", $url, $matches)) { trigger_error("Not matched: {$url}", E_USER_WARNING); return ""; } $code = '<object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url='.$url.'&g=bb">'; $code .= '</param><param name="allowscriptaccess" value="always"></param>'; $code .= '<embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url='.$url.'&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object>'; $code .= '<a href="'.$url.'">'.$url.'</a>'; return $code; } } ?>


I also included the soundcloud.php file here ->> https://gist.github.com/ihackcode/d46633276fe128d1ffc0

*edit this file yourdomain.com/class/textsanitizer/config.php

enable the soundcloud bbcode in the extensions array by adding this line

"soundcloud" => 1,

Example of including the element in the array
le="color: #000000"><?php "extensions" => array( "iframe" => 0, "image" => 1, "flash" => 1, "youtube" => 1, "mp3" => 0, "wmp" => 0, // If other module is used, please modify the following detection and 'link' in /wiki/config.php "wiki" => is_dir(XOOPS_ROOT_PATH . '/modules/mediawiki/'), "mms" => 0, "rtsp" => 0, "soundcloud" => 1, "ul" => 1, "li" => 1),



now you should be able to use the SoundCloud bbcode.

Re: HTML Signature. Possible ?
by redheadedrod on 2014/1/8 22:14:06

A solution will require modifying the current code. Without looking at it I believe it is "sanitized" which means all HTML code is stripped out before saving it to the database.

I was supposed to do some major work with Profiile but due to a variety of issues I have not been able to do what I have planned. Once I have my computers back up and running properly I will see what I can do but I can't promise anything at this stage. When I look at it I can see what I can do with these fields.

Rodney
Re: HTML Signature. Possible ?
by RamteamJax on 2014/1/8 12:55:11

hmm yah, ok.
We've never had any issue on an 'underground' (meaning: private) tech site running legal vBulletin software. Barely everyone uses html signatures over there.

Who's Online

202 user(s) are online (163 user(s) are browsing Support Forums)


Members: 0


Guests: 202


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits