UBB.Dev
Posted By: scroungr Finished-[6.5] More Mod Powers - 06/03/2004 4:44 AM
Mod Name / Version: More Mod Powers

Description: With the advent of 6.5b1 they left out alot of the mod powers that a mod should or shouldn;t have. this is a totally personal choice.

This mod includes

* Adding the Control Panel Link for Moderators
* Full Member Management
* Forum Settings for the forums they are Moderators of
* Approve Posts
* Move Topics
* Prune Topics
* Lock Topic
* Unlock Topic
* Send PMs to Groups

All from the Moderators Control Panel

**NOT FOR THE INEXPERIENCED**


Working Under: UBB.Threads 6.5

Mod Status: Finished

Any pre-requisites:

Author(s): scroungr

Date: 06/02/04

Credits: JoshPet for the original PM to groups coding which I adapted to 6.5

Files Altered: ubbt.inc.php, /admin/login.php, /templates/default/admin/login.tmpl, /admin/membermanage.php, /admin/membersearch.php, /templates/default/admin/showuser.tmpl, /admin/doapprovedn.php, /admin/doupdatebanlists.php, /admin/doapproveusers.php, /admin/memberaction.php, /admin/dochangeusergroups.php, /admin/doemailusers.php, /admin/doexportemails.php, /admin/dosendemails.php, /templates/default/admin/admin_modmenu.tmpl, /admin/forummanage.php, /templates/default/admin/forummanage.tmpl, /admin/viewboard.php, /templates/default/admin/viewboard.tmpl, /admin/doeditboard.php, /templates/default/admin/admin_modmenu.tmpl, /languages/english/admin/generic.php, /admin/approveposts.php, /admin/login.php, , /admin/doapproveposts.php, /admin/movethreads.php, /admin/selectmovethreads.php, /admin/selectmovethreads.php, /admin/savemovethreads.php, /admin/domovethreads.php, , /admin/prunethreads.php, /admin/saveprunethreads.php, /admin/selectprunethreads.php, /admin/doprunethreads.php, donotifymod.php, languages/english/donotifymod.php, online.php, /templates/default/admin/admin_adminmenu.tmpl

New Files: viewcthreads.php
doopenthreads.php
viewothreads.php
doclosedthreads.php
viewcthreads.php
viewothreads.php
viewcthreads.tmpl
viewothreads.tmpl
sendgrouppm.php
dosendgrouppm.php
sendgrouppm.tmpl
dosendgrouppm.tmpl
dosendgrouppm_confirm.tmpl



Database Altered: No

Info/Instructions:

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


updated for 6.5br4

Attached File
114638-[6.5]MoreModPowers.zip  (111 downloads)
Posted By: smilesforu Re: Finished-[6.5] More Mod Powers - 06/03/2004 10:06 AM
Nice... Hope to get this one added.
how about IP searching stuff for them? I know this is a major draw back for me moving to the new board right now. (besides that pesky greamlin hack)
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 06/03/2004 2:37 PM
sure smiles go for it you can see the instructions it would be easy enough so adpat one of the ip mods here to your install
Posted By: smilesforu Re: Finished-[6.5] More Mod Powers - 06/03/2004 11:00 PM
Cool I will have a peak at it perhaps this weekend... I hope
Posted By: AKD96 Re: Finished-[6.5] More Mod Powers - 07/15/2004 3:32 AM
I've noticed and reported an error in the admin_modmenu.tmpl file.

They have:
Code
<div class="cpanel-menu-block"><br /><div class="cpanel-menu-block-one">

while it should be:
Code
<div class="cpanel-menu-block"><br /><span class="cpanel-menu-block-one">

Corrections to your mod need to be made by adding:
Code
<div class="cpanel-menu-block"><br /><span class="cpanel-menu-block-one">

at the beginning of every chunk added to this file followed by a:
Code
</div>

at the end of the chunk.
Posted By: slayer60 Re: Finished-[6.5] More Mod Powers - 08/09/2004 11:02 PM
[]scroungr said:
**NOT FOR THE INEXPERIENCED**
[/]
Poppycock, a mere 38 files to modify is a trifle. A TRIFLE I SAY.

Nice mod. I'll have to give this baby a whirl.
Posted By: Gardener Re: Finished-[6.5] More Mod Powers - 08/09/2004 11:15 PM
It's nothing, nothing I say! My Admin Logger mod required 46 files to be altered! =] I was very happy to see that included in the main distribution so I won't need to keep it updated. =]
Posted By: JoshPet Re: Finished-[6.5] More Mod Powers - 08/10/2004 12:08 AM
This is a great mod. I installed this last night for someone. Crikey alot of files to mod. But good instructions.
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 08/10/2004 1:11 AM
yeah hope it helps
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 09/27/2004 6:00 PM
I encounter a little problem and dont know this is a hack problem or a design problem from Infopop.

After installingf this hack I log on as existing mod. Then select a random user (no mod, no admin) and try to put him in my moderated group to give him access. I klick an his name, say edit user and see the boxes for the groups where I be mod. I put the checkmark on one group and submit it.

The Page returns, the checkmark is gone and the user still have no access to this group.

Now I find a other way: Search user over the controlpanel, put the checkmark in the select box in front of hgis name and selct edit groups from the combo box down below. This bring up an other group access list and I can still give him the proper right and save it.

Can you verify this ?
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 09/27/2004 6:45 PM
in changeuser.php find this

Code
<br />// New groups?<br />if (!isset($HTTP_POST_VARS['group'])) {<br />	$HTTP_POST_VARS['group'] = array();<br />}<br />for($i=0;$i<$grouparr_size;$i++) {<br />	if ($HTTP_POST_VARS['group'][$i]) {<br />		$newgroups .= "{$HTTP_POST_VARS['group'][$i]}-";<br />	}<br />}<br /><br />change to<br /><br />// Get Total Groups<br />$query = "<br />	SELECT count(*)<br />	FROM {$config['tbprefix']}Groups<br />";<br />$sth = $dbh->do_query($query,__LINE__,__FILE__);<br />list($totalgroups) = $dbh->fetch_array($sth);<br /><br />// New groups?<br />if (!isset($HTTP_POST_VARS['group'])) {<br />	$HTTP_POST_VARS['group'] = array();<br />}<br />for($i=0;$i<$totalgroups;$i++) {<br />	if ($HTTP_POST_VARS['group'][$i]) {<br />		$newgroups .= "{$HTTP_POST_VARS['group'][$i]}-";<br />	}<br />}<br />
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 09/27/2004 6:58 PM
THANKS, works excellent. :top:
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 09/27/2004 9:30 PM
missing button label in forummanage.php (2nd try )

##search for:
if ($user[U_Status] == "Administrator")
{
$bottomtabs = array(
"{$config['phpurl']}/admin/createforum.php"
);
$admin->createBottomTabs($bottomtabs,0);
}


##replace with:
if ($user[U_Status] == "Administrator")
{
$bottomtabs = array(
"{$ubbt_lang['ADD_NEW']}" => "{$config['phpurl']}/admin/createforum.php"
);
$admin->createBottomTabs($bottomtabs,0);
}

this should work.
Posted By: AKD96 Re: Finished-[6.5] More Mod Powers - 11/03/2004 2:58 PM
I just wanted to note that this mod is not really in the "Finished" stage yet, since the changes I noted still need to be made to the instructions.
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 11/03/2004 6:05 PM
Hmmm I don't even mention those lines in the admin_modmenu.tmpl.. is it a UBBT bug? cause I can't find it in instructions.
Posted By: ChAoS_dup1 Re: Finished-[6.5] More Mod Powers - 11/04/2004 12:23 AM
Holy cow thats quite the list of altered files

Nice disclaimer btw
Posted By: AKD96 Re: Finished-[6.5] More Mod Powers - 11/04/2004 8:38 PM
It was a bug in one of the Beta releases of 6.5 that I pointed out to Infopop. As I stated above, they incorrectly used 2 div classes in a row when it should have been a div class followed by a span class. Since you wrote this mod using the bugged version of admin_modmenu.tmpl, you will need to adjust your instructions accordingly.

Here is an example of a corrected step from your instructions:
[]
#####
### find the following in /templates/default/admin/admin_modmenu.tmpl
#####

<div class="cpanel-menu-block">
<span class="cpanel-menu-block-one">
<img src="{$config['phpurl']}/images/cp/cp_left_nav_head_top.png" width="125" height="3" alt="" /><span class="cpanel-menu-block-two">{$ubbt_lang['MEMBERSHIP']}</span><img src="{$config['phpurl']}/images/cp/cp_left_nav_head_bottom.png" width="125" height="2" alt="" /></span>
<ul>
<li><a {$current_menu[$ubbt_lang['MEM_MAN']]}" href="{$config['phpurl']}/admin/membermanage.php">{$ubbt_lang['MEM_MAN']}</a></li>
</ul>
</div>

#
# Add below this
#

<div class="cpanel-menu-block">
<span class="cpanel-menu-block-one">
<img src="{$config['phpurl']}/images/cp/cp_left_nav_head_top.png" width="125" height="3" alt="" /><span class="cpanel-menu-block-two">{$ubbt_lang['FORUMS']}</span><img src="{$config['phpurl']}/images/cp/cp_left_nav_head_bottom.png" width="125" height="2" alt="" /></span>
<ul>
<li><a {$current_menu[$ubbt_lang['FORUM_SET']]}" href="{$config['phpurl']}/admin/forummanage.php">{$ubbt_lang['FORUM_SET']}</a></li>
</ul>
</div>
[/]

The buggy beta had this block of code instead:
[]
<div class="cpanel-menu-block">
<div class="cpanel-menu-block-one">
<img src="{$config['phpurl']}/images/cp/cp_left_nav_head_top.png" width="125" height="3" alt="" /><span class="cpanel-menu-block-two">{$ubbt_lang['MEMBERSHIP']}</span><img src="{$config['phpurl']}/images/cp/cp_left_nav_head_bottom.png" width="125" height="2" alt="" /></span>
<ul>
<li><a {$current_menu[$ubbt_lang['MEM_MAN']]}" href="{$config['phpurl']}/admin/membermanage.php">{$ubbt_lang['MEM_MAN']}</a></li>
</ul>
[/]
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 11/04/2004 9:26 PM
OK I see what you saying but I can't find that part of the instructions where I call admin_modmenu.tmpl with those strings.. I do see the part where I call it just not as it is above?

now I do see where I call that type of line in admin_adminmenu.tmpl
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 12/27/2004 8:58 PM
this hack must be a little bit improved for 6.5.1
I see some problems with admin/movethreads.php and admin/prunethreads.php. I dont know how to adapt the query in the section
// Get the list of forums

The beta code:
// Get the list of forums
$query = "
SELECT t1.Bo_Title,t1.Bo_Number,t1.Bo_Cat,t1.Bo_Sorter,t1.Bo_CatName,t1.Bo_Keyword
FROM {$config['tbprefix']}Boards AS t1,
{$config['tbprefix']}Category AS t2
WHERE t1.Bo_Cat = t2.Cat_Entry
ORDER BY t2.Cat_Number,t1.Bo_Sorter
";

your code from this hack:
// Get the list of forums
if ( $user['U_Status'] == "Administrator" ) {
$query = "
SELECT Bo_Title,Bo_Number,Bo_Cat,Bo_Sorter,Bo_CatName,Bo_Keyword
FROM {$config['tbprefix']}Boards
ORDER BY Bo_Cat,Bo_Sorter
";
}
else {
$query = "
SELECT Bo_Title,Bo_Number,Bo_Cat,Bo_Sorter,Bo_CatName,Bo_Keyword
FROM {$config['tbprefix']}Boards AS t1,
{$config['tbprefix']}Moderators AS t2
WHERE t2.Mod_Uid = '$user[U_Number]'
AND t2.Mod_Board = t1.Bo_Keyword
ORDER BY Bo_Cat,Bo_Sorter
";
}
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 12/28/2004 10:34 PM
There is a bug in admin/sendgrouppm.php

after you fill out the form, select preview and press the button you see the preview for 3 seconds. The pm notifyer email is generated and then after 3 seconds you will return to the input form witch is empty again. The pm is not gerated.
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 01/08/2005 12:19 AM
Bug: in UBB 6.5.1B4 a mod is no longer can give user access to a group. The checkmark doesnt be set after updating the user.

/Edit: Mods can remove the access from groups but cant give it back.
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 01/08/2005 8:00 PM
I would look into the code difference between the 6.5.1 and 6.5 member access pages and see what Infoplop did.. unfortunately I am not upgrading to 6.5.1 at this time so can't..
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 01/12/2005 5:59 PM
I found the bug. It's a bug from Infopop. I will post a bugreport. Nasty one
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 01/12/2005 7:51 PM
Hmm good to know
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 01/12/2005 8:36 PM
if you like look at this
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 01/14/2005 7:54 AM
Ahh so they have to be a member of the last group? thats not how it was in 6.5?
Posted By: Zarzal Re: Finished-[6.5] More Mod Powers - 01/14/2005 10:43 AM
I create a dummy group for fix this. This group has no access to all. I put all mods in this group. So are my mod's able to set all needet groups

It seems that the select in changegroups is wrong or something is counted wrong. I hope Infopop can verify this and do a bugfix.

This comes ot first time with 6.5.1b4. In 6.5 works all correct. There are some changes in changegroups.php and one of them do this mistake but I cant find out witch one. I have no php-skill
Posted By: BryanDS Re: Finished-[6.5] More Mod Powers - 03/01/2005 7:37 PM
So, Im not sure, is this working ok for the newest update yet?
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 03/02/2005 12:46 AM
not sure.. Im not running 6.5.1 I hear there are too many bugs with it... But it DOES work in 6.5
Posted By: BryanDS Re: Finished-[6.5] More Mod Powers - 04/01/2005 1:13 AM
So after installing this, all works fine except lock and unlock posts..

I get this error on both...

Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /raid/home/dancesafe/dancesafe/ubbthreads/ubbt.inc.php on line 141

Fatal error: Cannot redeclare class mailer in /raid/home/dancesafe/dancesafe/ubbthreads/ubbt.inc.php on line 223

Any ideas?
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 04/01/2005 7:15 AM
yeah looks like you are actually the scripts are trying to declare the mailer class twice.. I saw that error before just forgot where onder: for the lock and unlock posts all ya did was change that php file to 1 for mods also right?
Posted By: BerkWood Re: Finished-[6.5] More Mod Powers - 04/09/2005 9:52 PM
Some changes in the sql queries in v6.5.1.1
When I figure out the differences, I will post
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 04/10/2005 1:37 AM
k thanx
Posted By: Jim Gagne Re: Finished-[6.5] More Mod Powers - 05/20/2005 2:26 PM
I installed this hack into southcoastresponse.com and it is working great, except one flaw...

the last post field on the main index page does not update. what's the deal with that? any help is appreciated. thanks!
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 05/20/2005 4:09 PM
Hmmm your main index page your speaking of is the categories.php which ya didn't even mod with this modification? nor does it touch the addpost.php or the newpost.php so while there is a slim chance its this modification.. did you add any other modifications that altered those pages?
Posted By: Jim Gagne Re: Finished-[6.5] More Mod Powers - 05/25/2005 8:44 PM
I only made the modifications given to make the board approved by moderators and admins. I did however alter that code to allow moderators to only approve, delete, edit and not have any involvement with members and whatnot. I basically just change some of the zeros to ones so moderators can only see certain menus in the control panel. Not sure what's going on.
Posted By: Jim Gagne Re: Finished-[6.5] More Mod Powers - 05/27/2005 11:38 PM
Come to think of it though, I did install another mod for forcing users to login without using Anonymous or something like that....not sure, but index page still doesn't update on southcoastresponse.com
Posted By: Jim Gagne Re: Finished-[6.5] More Mod Powers - 05/31/2005 9:23 PM
Anyone know how about the bug with this mod where the index page doesn't refresh the topics?

Check out www.southcoastresponse.com

There you can see what I'm talking about. I've got the moderator approve MOD installed and it's working fine, but the index page doesn't refresh. I also installed a MOD to disallow the use of 'Anonymous' user or something, but I don't think that has any bearing on it. Can someone help me?
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 06/01/2005 12:22 AM
restore to the original files and just add the other mod and see if still does it...I don't think it's this mod but that way we can do process of elimination...
Posted By: Jim Gagne Re: Finished-[6.5] More Mod Powers - 06/08/2005 4:47 PM
That didn't work...
Posted By: scroungr Re: Finished-[6.5] More Mod Powers - 06/08/2005 5:16 PM
what didn't work? you removed this mod and it still does it on your board? then its not this mod gotta be something else..
© UBB.Developers