Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
[HACK] Forum moderators + global moderators (1 viewing) (1) Guest
Go to bottom Favoured: 2
TOPIC: [HACK] Forum moderators + global moderators
#10877
[HACK] Forum moderators + global moderators 1 Year, 5 Months ago  
I changed the FB moderator way of life
In standard FB, you have first to fill up a list of moderators and then pick in each moderator you want for each individual forum
With the hack provided, there's now 2 classes of moderators: forum moderators and global moderators. The privileges of these 2 classes of moderator are easy to understand: forum moderators are the FB standard moderator and the global moderators can act on any forum like admins (the usual way of other forum systems e.g. phpB.
    Both classes are more than easy to set:
  1. Forum moderators are assigned to forum(s) as usual excepted that you're not anymore restricted to the moderator list (the source list includes every users)
  2. Global moderators are simply the members of the moderator list

The hack
    There's 3 files to touch:
  1. com_fireboard/sources/fb_permissions.php
  2. com_fireboard/template/default/plugin/fbprofile/fbprofile.php *
  3. com_fireboard/template/default/view.php *


File "fb_permissions.php" line #61, replace:[code:1]function fb_has_moderator_permission(&$database,&$obj_fb_cat,$int_fb_uid,$bool_fb_isadmin) {
if ($bool_fb_isadmin)
return 1;
[/code:1]by:[code:1]function fb_has_moderator_permission(&$database,&$obj_fb_cat,$int_fb_uid,$bool_fb_isadmin) {
if ($bool_fb_isadmin)
return 1;
$database->setQuery("SELECT moderator FROM #__fb_users WHERE userid=$int_fb_uid "«»); // #HACK 'SuperModerators' by phKU
if ($database->loadResult()) { // #HACK 'SuperModerators' by phKU
return 1; // #HACK 'SuperModerators' by phKU
} // #HACK 'SuperModerators' by phKU
[/code:1]
File "fbprofile.php", line #110 replace:[code:1] //user type determination
$ugid = $userinfo->gid;
$uIsMod = 0;
$uIsAdm = 0;

[/code:1]by:[code:1] //user type determination
$ugid = $userinfo->gid;
$uIsMod = 0;
$uIsAdm = 0;

$database->setQuery("SELECT userid FROM #__fb_users WHERE moderator=1"«»); // #HACK 'SuperModerators' by phKU (adds evey fb moderators)
$catModerators = $database->loadResultArray(); // #HACK 'SuperModerators' by phKU
$uIsMod = in_array($userid, $catModerators); // #HACK 'SuperModerators' by phKU[/code:1]
File "view.php", line #39 replace:[code:1] $database->setQuery("SELECT userid FROM #__fb_moderation WHERE catid='$catid' and userid='$my->id'"«»);[/code:1]by:[code:1] $database->setQuery("SELECT moderator FROM #__fb_users WHERE userid=$my_id "«»); #HACK 'SuperModerators' by phKU[/code:1]
* [img]http://www.bestofjoomla.com/components/com_fireboard/template/dorona_brown/images/english/emoticons/exclam.gif[/img] each time a template file is referred, be aware that if a same named file exists in the template you've selected, it will override the same file in default template. If it's the case, it will be up to you to find the corresponding line of code to change.

[img]http://www.bestofjoomla.com/components/com_fireboard/template/dorona_brown/images/english/emoticons/exclam.gif[/img] As usual with hacks, ensure you've a backup copy of the modified files. Test at your own risk. Anyway with a backup copy, there's not much to lose. The hacks I provide are not thoroughly tested on different configurations but they run smooth on mine. Another point of importance, keep track of the modified files if you want to be able to copy the hacks to a next FB release.

[img]http://www.bestofjoomla.com/components/com_fireboard/template/dorona_brown/images/english/emoticons/arrow.gif[/img] Alternately, I will soon upload in a new thread the couple of files modified by this hack and a few other hacks with a list of mods/adds in concern. It would be certainly more convenient to download them if you would like to adopt more than one hack.

Cheers :)
phKU (User)
Junior Boarder
Posts: 31
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/06/08 18:16 By phKU.
 
The administrator has disabled public write access.  
#11375
Re:[HACK] Forum moderators + global moderators 1 Year, 5 Months ago  
this is a great hack (though i havent implemented it yet) and would be great if this feature was added inot the next release.
peetree21 (User)
Senior Boarder
Posts: 116
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Australia
Logged Logged
 
Such is Life
 
The administrator has disabled public write access.  
#11453
Re:[HACK] Forum moderators + global moderators 1 Year, 5 Months ago  
Good work! any problem reported after the hack ?
kuato (User)
OpEn YoUr MiNd
Moderator
Posts: 309
graphgraph
User Offline Click here to see the profile of this user
Gender: Male kuato@puntaltenses.com.ar Location: Argentina Birthdate: 1978-07-24
Logged Logged
 
Last Edit: 2007/06/12 14:56 By kuato.
 
OpEn YoUr MiNd ---> Correct my english please! i wish to learn.
 
The administrator has disabled public write access.  
#11467
Re:[HACK] Forum moderators + global moderators 1 Year, 5 Months ago  
kuato wrote:
Good work! any problem reported after the hack ?
nop AFAIK run smooth on my site but not tested en a large scale. The good news is the mods are light (thanks to FB developers team for the wise program architecture ) and doesn't involve any SQL database change. Therefore, no problem to restore back the default usage.

I made the other following hacks as well (some of them already posted here):

  • 'PubAdmin' adds the backend users to the forum public access list - allow to have private forums for manager and beyond too

  • 'UserTypes' display all type of users - not only 'user' and 'admin', but 'author', 'manager', etc.

  • 'ShowAdmin' adds to the CSS class 'whois' for admins '2' = 'whois2' - for showing the online users, originally there's a css class starting with whois and completed by '1' for the moderators. I added the number '2' selector for admins so I can assign a color for moderators and another for admins

  • 'MessageLinks' local message links open now in the same window and external ones in a new window - before, any message links opened in a new window... quite boring for links to the forum

  • 'getPubAccess' there was missing brackets which bugged all the category child group accesses

  • 'DisplayGroups' clears the display of groups since the groups are not yet implemented



With the following files hacked:

  • com_fireboard/admin.fireboard.php

  • com_fireboard/sources/fb_permissions.php

  • com_fireboard/template/default/view.php

  • com_fireboard/template/default/smile.class.php

  • com_fireboard/template/default/plugin/who/whoisonline.php

  • com_fireboard/template/default/plugin/fbprofile/fbprofile.php

  • com_fireboard/langage/english.php



I can upload them if there's an interest. All the hacks were written in respect of the FB programming style, thanks to its open architecture which allows hacking very easily. Though it shouldn't be tested on a production site and there's no warranties (I can't be responsible for any site damage), everything runs fine at my place, no worries, resulting in a FB-plus forum, the one it should have been at my taste
phKU (User)
Junior Boarder
Posts: 31
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/06/12 15:50 By phKU.
 
The administrator has disabled public write access.  
#13065
Re:[HACK] Forum moderators + global moderators 1 Year, 5 Months ago  
Yes please, publish your hacks! share your creations with us
kuato (User)
OpEn YoUr MiNd
Moderator
Posts: 309
graphgraph
User Offline Click here to see the profile of this user
Gender: Male kuato@puntaltenses.com.ar Location: Argentina Birthdate: 1978-07-24
Logged Logged
 
OpEn YoUr MiNd ---> Correct my english please! i wish to learn.
 
The administrator has disabled public write access.  
#13664
Re:[HACK] Forum moderators + global moderators 1 Year, 5 Months ago  
kuato wrote:
Yes please, publish your hacks! share your creations with us
I finally found the time to zip and document all of my hacks. I did post them in the thread A couple of mods/hacks to make FB 1.0.1 +.

Have fun, thank you for your interest
phKU (User)
Junior Boarder
Posts: 31
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#34118
Re:[HACK] Forum moderators + global moderators 11 Months, 3 Weeks ago  
Hi all,

I applied the Global Moderators hack and almost have it working! Hopefully someone can point out how to fix my problem.

When I'm adding a Moderator to a particular board, I still get the old moderator list showing up instead of having all users to pick from. If I set a user's Moderator status to No in Fireboard User Admin then that person will not show up in the list for me to assign them to a board. Everything else seems to be working though.

So right now, I'm having to set a person's status to Yes for Moderator (to include them in the list), then add them to a board and then go back and set the Mod status to No so they don't become a Global Mod in addition to being a Mod for the board.

I have Joomla 1.0.13, CB 1.1, FB 1.01. I am planning to upgrade to 1.0.3 as soon as possible so I want to know if the global moderator feature is included in that release. If so, then I won't have to bother tweaking this hack. If not, then I want to try and get this to work!

Thanks!
Raca (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top