Page 2 of 2
Re: Forum Made Simple 0.9.3
Posted: Thu Jul 16, 2009 8:16 pm
by alby
Sonya wrote:
One question: is there any reason for not having XML installation file? So that the last version of the module can not be installed from Module Manager?
Too many changes in DB from 0.9.2
I preferred a solution where the user have more control
However I have not report for DB ALTER problem, next release coming with xml installation
Alby
Re: Forum Made Simple 0.9.3
Posted: Fri Sep 18, 2009 10:43 am
by mcDavid
I've made some changes tot the function "AlbyBBParser()".
one is for better looking quotes, using the html-tag.
The other is for smiley-support using the smileys-module (
http://dev.cmsmadesimple.org/projects/smileys )
I also changed the last line, In my oppinion a forum post should be a paragraph, not a div.
Maybe it's nice to add this to the next version of Forum Made Simlpe
Code: Select all
function AlbyBBParser( $text )
{
$bb = array(
'/</','/>/',
'/\[color=(.*?)\](.*?)\[\/color\]/ism', #color
'/\[center\](.*?)\[\/center\]/ism', #center
'/\[quote\](.*?)\[\/quote\]/ism', #blockquote 1
'/\[quote="(.*?)\"](.*?)\[\/quote\]/ism', #blockquote 2
'/\[img\](http:\/\/)(.*?)\[\/img\]/ism', #img
'/\[url\](.*?)\[\/url\]/ism', #link 1
'/\[url=(http:\/\/)(.*?)\](.*?)\[\/url\]/ism', #link 2
'/\[b\](.*?)\[\/b\]/ism', #bold
'/\[i\](.*?)\[\/i\]/ism', #italics
'/\[u\](.*?)\[\/u\]/ism', #underline
'/\[sup\](.*?)\[\/sup\]/ism', #superscript
'/\[sub\](.*?)\[\/sub\]/ism', #supscript
'/\r\n/', #new line
// '/[\s]{2}/i' #space
);
$html = array(
'<','>',
'<span style="color:\1;">\2</span>', #color
'<div class="forum_center">\1</div>', #center
//quote layout changed
'<blockquote><span>Quote</span><br /><div class="forum_quote">\1 </div></blockquote>', #blockquote 1
'<blockquote><span>Quote from: \1</span><br /><div class="forum_quote">\2 </div></blockquote>', #blockquote 2
'<a href="" onmouseover="SMR_setLink(this);" rel="nofollow external" target="_blank"><img src="http://\2" alt="forum image" onload="SMR_resize(this);" /></a>', #img
#'<img src="http://\2" alt="forum image" />', #img
'<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
'<sup>\1</sup>', #superscript
'<sub>\1</sub>', #subscript
' <br />', #new line
//' ' #space
);
$text = preg_replace($bb, $html, $text);
// Smiley support using smiley module
$smileys = $this->GetModuleInstance("Smileys");
if ($smileys!=false) {
$text = $smileys->ReplaceSmileys($text);
}
return '<p>'.$text.'</p>';
}
I've also made a function to displays a list of (clickable) smileys, but this required some changes in the smileys module too. I'll get back to that.
Re: Forum Made Simple 0.9.3
Posted: Tue Sep 22, 2009 9:45 pm
by mcDavid
Made some changes and now I don't need the changes in the smileys module anymore.
I added this function to forum.module.php:
Code: Select all
function InsertSmileyList($theme='default')
{
$i=0;
$output='<div class="smileytable">';
$smileys = $this->GetModuleInstance("Smileys");
if ($smileys!=false) {
$list = $smileys->GetSmileyList($theme, true);
foreach ($list as $smiley=>$url)
{
$i++;
$jsparam = str_replace("'","\'", $smiley); // escape ' for proper JS call
$smiley = htmlentities($smiley); // escape " for proper HTML
$output .= '<div style="float:left;cursor:pointer" onclick="addSmiley(\''.$jsparam.'\') ">';
$output .= $url;
$output .= "<br /> $smiley </div>";
if ($i == 10)
{
$output .= "<button onclick=\"this.nextSibling.style.display='block';this.style.display='none';return false;\">".$this->lang('more')."...</button><span style='display:none'>";
}
}
if ($i >= 10) {$output.= '</span>';}
$output .= '<br style="clear:both;" /></div>';
return $output;
}
else {return;}
}
I also added a javascript function to the bbcode_toolbar.php (basically a stripped down version of the storeCaret() function)
Code: Select all
function addSmiley(smiley)
{
smiley = ' ' + smiley + ' ';
if (isMozilla)
{
oField=document.forms['{$_FormId}'].elements['{$_TextareaId}'];
objectValue=oField.value;
deb=oField.selectionStart;
fin=oField.selectionEnd;
objectValueDeb=objectValue.substring(0,oField.selectionStart);
objectValueFin=objectValue.substring(oField.selectionEnd,oField.textLength);
oField.value=objectValueDeb + smiley + objectValueFin;
oField.selectionStart=strlen(objectValueDeb);
oField.selectionEnd=strlen(objectValueDeb + selec_start );
oField.focus();
oField.setSelectionRange(objectValueDeb.length + selec_start.length + 2,objectValueDeb.length + selec_end.length + 2);
}
else
{
oField=document.forms['{$_FormId}'].elements['{$_TextareaId}'];
oField.focus(oField.caretPos);
oField.focus(oField.value.length);
oField.caretPos=document.selection.createRange().duplicate();
var bidon = "%~%";
var orig=oField.value;
oField.caretPos.text=bidon;
var i=oField.value.search(bidon);
oField.value=orig.substr(0,i) + smiley + orig.substr(i, oField.value.length);
var r=0;
for(n=0; n<i; n++) {if(regexp.test(oField.value.substr(n,2)) == true){r++;}};
pos = i + 2 + selec.length - r;
var r=oField.createTextRange();
r.moveStart('character',pos);
r.collapse();
r.select();
}
}
I think this javascript can be shorter but it works. Maybe it should be included in the insertSmileyList() function instead of the BBCode-toolbar, to make it independent (and the bbcode-toolbar less bloated for people that don't want smileys). Or maybe the whole smiley-thing should be part of the bbcode-toolbar...
Re: Forum Made Simple 0.9.3
Posted: Mon Oct 19, 2009 7:52 pm
by aibreanstudio
BUG
It took me forever to figure out why my client was having issues creating a topic with Forum Made Simple. It turns out the forum is visible EXCEPT for the "New Topic" link when using Internet Explorer. Anyone have this issue or could direct me how to fix it so I don't have to install something else?
I am using the latest release. If I make a new topic (through a different browser) the new topic created is visible in IE, but not the icon to make a new topic.
Re: Forum Made Simple 0.9.3
Posted: Mon Oct 19, 2009 8:35 pm
by Peciura
Re: Forum Made Simple 0.9.3
Posted: Tue Nov 10, 2009 10:17 am
by steph60
Hi Alby
I have a problem with the TreeManager module, when i would install, i have this error :
Error create: cms_module_tree_transaction
So i can't install FMS 0.9.3 on my CMSMS 1.6.6
Do you know where is the problem ?
Thanks
Steph
Re: Forum Made Simple 0.9.3
Posted: Tue Nov 10, 2009 1:40 pm
by alby
steph60 wrote:
Error create: cms_module_tree_transaction
Check if you have already that sql table with a sql tools
Alby
Re: Forum Made Simple 0.9.3
Posted: Fri Nov 13, 2009 8:42 am
by steph60
I have this table but empty
I must delete this table ?
Re: Forum Made Simple 0.9.3
Posted: Mon Jan 04, 2010 3:53 pm
by dave21p
Any thoughts on an update via xml? Still on 0.9.2 and itching for an upgrade version

Happy New Year by the way.
Re: Forum Made Simple 0.9.3
Posted: Wed Jan 20, 2010 10:06 pm
by mcDavid
How are things going with the Forum module?
I guess everybody is busy working on CMSMS 2.0 (

), but still I'm really looking forward to have some improvements in the forum module!
Some users of my forum discovered quite a big bug (0.9.3): If you open a topic from the "new messages" page, all buttons (like: new reply, edit, quote, etc.) are malfunctioning.
I'll try to find a solution to this, without messing up half the module like I usually do :-[
-edit-
I made some changes to the regular expressions, to make it easyer to post an URL:
Code: Select all
//snap
'/\[url\](http:\/\/|https:\/\/|ftp:\/\/|mailto:)(.*?)\[\/url\]/ism', #link 1
'/\[url\](.*?)\[\/url\]/ism', #link 1 -> add HTTP
'/\[url=(http:\/\/|https:\/\/|ftp:\/\/|mailto:)(.*?)\](.*?)\[\/url\]/ism', #link 2
'/\[url=(.*?)\](.*?)\[\/url\]/ism', #link 2 -> add HTTP
'/\s(http:\/\/|https:\/\/|ftp:\/\/|mailto:)([^\s]+)/', #link 3
//snap
'<a href="\1\2" rel="nofollow" target="_blank">\2</a>', #link 1
'<a href="http://\1" rel="nofollow" target="_blank">\1</a>', #link 1 -> add HTTP
'<a href="\1\2" rel="nofollow" target="_blank">\3</a>', #link 2
'<a href="http://\1" rel="nofollow" target="_blank">\2</a>', #link 2 -> add HTTP
'<a href="\1\2" rel="nofollow" target="_blank">\2</a>', #link 3