ForumMadeSimple feature request

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
brxdesign

ForumMadeSimple feature request

Post by brxdesign »

Hi there,

I've successfully installed FMS 0.9.2 and so far the new features are great !
However, I wish I could use TinyMCE (FrontEnd) instead of the BBcode editor.

Would that be possible in the next version ?


Cheers,


BRX
alby

Re: ForumMadeSimple feature request

Post by alby »

brxdesign wrote: I've successfully installed FMS 0.9.2 and so far the new features are great !
However, I wish I could use TinyMCE (FrontEnd) instead of the BBcode editor.
This can be very dangerous, required a very cleaning code before submit to

Alby
Teme
New Member
New Member
Posts: 8
Joined: Sat Oct 25, 2008 5:10 pm

Re: ForumMadeSimple feature request

Post by Teme »

alby is righ. When the software gets html-tags from unknown sources, it has to have good "whitelist" and tag parser has to be 100% correct. Otherwise the system becomes vulnerable to cross site scripting bug. Much better practice is to translate non-html tags to html and ignore unknown tags. Let's take an example:

(replace     { with [ and } with ] please... I couldn't escape those properly with url)
  is legal way to execute javasctipt. This is easy for filter, because javascript can be tagged illegal by whitelisting only http and https-protocols. But then:   is much harder to parse correctly. BB {url=http://...} is simple to parse, because everything between = and } are part of url and they can safely be translated to url-encoding. No hassling with " nor ' nor any other strange way to hack the system.

Hopefully this prevents some to try to implement the html-handling to forum software.

Teme
brxdesign

Re: ForumMadeSimple feature request

Post by brxdesign »

Thanks Alby and Teme for pointing that to me.

Indeed it doesn't seem to be a good request anymore :)

Then how could I improve the BBcode editor so that users have more options like inserting images, etc. ?

An editor such the ones on these forums would be nice.



BRX
alby

Re: ForumMadeSimple feature request

Post by alby »

brxdesign wrote: Then how could I improve the BBcode editor so that users have more options like inserting images, etc. ?
It's simple but I remember of drop this because for avoid messing presentation because someone posted image very very big

Alby
raynoch
New Member
New Member
Posts: 6
Joined: Fri Nov 23, 2007 6:34 pm

Re: ForumMadeSimple feature request

Post by raynoch »

Wouldn't you just be able to have limitations on the upload.  Max file size and pixel size?
raynoch
New Member
New Member
Posts: 6
Joined: Fri Nov 23, 2007 6:34 pm

Re: ForumMadeSimple feature request

Post by raynoch »

Seriously it would be a killer module with that small feature.
alby

Re: ForumMadeSimple feature request

Post by alby »

raynoch wrote: Seriously it would be a killer module with that small feature.
I seem exaggerated, it is a small forum for small communities  :)

I had not notice the double post, please no double post

For other ppl: I think to add img bbcode in next release, upload I think is beyond the scope of FMS

Alby
rayrayray
Forum Members
Forum Members
Posts: 14
Joined: Mon Sep 22, 2008 8:40 pm

Re: ForumMadeSimple feature request

Post by rayrayray »

It wasn't a double post.  I searched for quite a while trying to find something on this.  After I posted my thread, I found this thread and commented on it.  Therefore being two post on two threads.

Thanks for noticing.

One point.  If the FMS works so well and is very functional compared to other Forum solutions.  Wouldn't it make sense to add this small feature??  Just a thought.  It's really all it lacks.
Allyfied
Forum Members
Forum Members
Posts: 15
Joined: Mon May 05, 2008 8:45 am

Re: ForumMadeSimple feature request

Post by Allyfied »

Hi

this is a simple way to provide an "image-button":

Edit Forum.module.php at line 892

Code: Select all

	// Modify by AdvancedBBParser ch424.net
	function AlbyBBParser( $text )
	{
		$bb = array(
			'/</','/>/',
			'/\[color=(.*?)\](.*?)\[\/color\]/ism', //color
			'/\[center\](.*?)\[\/center\]/ism', //center
			'/\[quote\](.*?)\[\/quote\]/ism', //blockquote
			'/\[url\](.*?)\[\/url\]/ism', //link 1
			'/\[url=(http:\/\/)(.*?)\](.*?)\[\/url\]/ism', //link 2
			'/\[b\](.*?)\[\/b\]/ism', //bold
			'/\[i\](.*?)\[\/i\]/ism', //italics
			'/\[u\](.*?)\[\/u\]/ism', //underline
			'/\[img\](.*?)\[\/img\]/ism', //insert image
			'/\r\n/', //new line
			'/[\s]{2}/i' //space
		);
an then at line 909:

Code: Select all

$html = array(
			'<','>',
			'<span style="color:\1;">\2</span>', //color
			'<div class="forum_center">\1</div>', //center
			'<div class="forum_quote">\1</div>', //blockquote
			'<a href="\1" rel="nofollow">\1</a>', //link 1
			'<a href="http://\2" rel="nofollow">\3</a>', //link 2
			'<b>\1</b>', //bold
			'<i>\1</i>', //italics
			'<u>\1</u>', //underline
			'<img src="\1" />', //insert image
			'<br />', //new line
			'  ' //space
		);
After this save the file and edit bbcode_toolbar.php after line 69. Insert this code:

Code: Select all

<a href="javascript:void(0);" onclick="storeCaret('img','img');return false;"><img src="{$_ModulePath}toobar_image.gif" alt="Bild" title="Bild" style="margin:1px; background-image:url({$_ModulePath}bbc_bg.gif);" /></a>
Design an image (toolbar_image.gif) and use it as botton. Done!

A merry merry christmas to all!

cu
Allyfied
Locked

Return to “Modules/Add-Ons”