1
ianez
some questions about editors in CBB 3.07
  • 2006/12/16 16:59

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


Hi there,
would like to know if in this version of CBB the custom config in plugin.php for allowed editors is working.

if I put something like
// Set allowed editors 
// Should set from module preferences?
$customConfig["editor_allowed"] = array("dhtmltextarea","FCKeditor");

I always get all available editors in the select menu when allowing html in forum settings..

how can I get this working?
and has someone tried applying kind of permission filter on that code or in forumform.inc.ph like 'if $xoopsUserIsAdmin' to have editor list displyed only for administrators?

thanx

Ian

2
ianez
Re: some questions about editors in CBB 3.07
  • 2006/12/16 17:24

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


well I just solved the last question,
you can filter the select menu to show only to users wich have admin permision on CBB.

I simply added a line in forumform.inc.php around line 119 change this:
$forum_form->addElement(new XoopsFormSelectEditor($forum_form"editor"$editor$nohtml));

with
if ($xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
$forum_form->addElement(new XoopsFormSelectEditor($forum_form"editor"$editor$nohtml));    
}


now normal users won't have a select menu fot editor's choice, they'll have default editor setted in plugin.php;
admin users will have the select menu with all editors available (I stil can't filter them.. any idea?)
Only remember to activate html tags in forum settings and make a backup of the files you modifiy

Ian

ps Iv'e tried to have only select menu for forum tools in user side commenting related part in plugin.php like this
// MENU handler
/* You could remove anyone by commenting out in order to disable it */
$valid_menumodes = array(
    
=> _MD_MENU_SELECT,    // for selectbox
    //1 => _MD_MENU_CLICK,    // for "click to expand"
    //2 => _MD_MENU_HOVER        // for "mouse hover to expand"
    
);

but with no effect...

3
slyss
Re: some questions about editors in CBB 3.07
  • 2007/1/4 10:43

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


this is a great hack!!!!

why is not by default? ?!?!

question: how i can disable html tags for registered users? and Enable html tags for admin?
[size=x-large]2008 Xoops Book[/size]

4
irmtfan
Re: some questions about editors in CBB 3.07
  • 2007/1/4 11:01

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Quote:
how i can disable html tags for registered users? and Enable html tags for admin?


it needs a group permission for html allowed in each forum.
great feature maybe we'll see it in cbb 4.0
send it to feature request in cbb project

5
phppp
Re: some questions about editors in CBB 3.07
  • 2007/1/4 15:10

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


group permission for html is already available in CBB 4.0

Login

Who's Online

156 user(s) are online (103 user(s) are browsing Support Forums)


Members: 0


Guests: 156


more...

Donat-O-Meter

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

Latest GitHub Commits