vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Moderator management system (https://vborg.vbsupport.ru/showthread.php?t=70850)

Kentaurus 10-22-2004 07:32 PM

Quote:

Originally Posted by sv1cec
As I said, great hack. However, I would prefer if I call it "Moderator Statistics" instead of "Moderators Management". I've searched the files and the templates, and I can't find where that phrase comes from. I am talking about the phrase that appears in the welcome box, as shown in the attached picture.

Any ideas would be greatly appreciated.

Rgds
-----------
John

It is in the phrases :)

AdminCP
Languages & Phrases -> Search in Phrases -> mod_management (phrase variable name)

Kentaurus 10-22-2004 07:38 PM

Quote:

Originally Posted by Lionel
This is crazy. I just reuploaded (same size). I tried to change the template name to another one, yet still empty!!!

Ah! Forgot to say I am using 3.01

That might be the problem.... I have only tested this hack with vb3.0.3, it might not work with 3.0.1. Depending on your server configuration you can get a blank page if you have a php error, like calling a function that didn't exist... can you get the detailed error from the server log or something like that? maybe it is a simple fix. Did you remembered to upload functions_modmanagement.php in the includes directory? You can also try adding something like "Hello" at the very end of the file, if it doesn't print then it is a php error and nothing with the template.

Lionel 10-22-2004 07:42 PM

echo "hello";
?>

does not print.

functions_modmanagement.php was uploaded. I did get the alerts PM

Lionel 10-22-2004 07:49 PM

Nothing in error log. Access log shows this:

xx.xxx.xxx.xxx - - [22/Oct/2004:16:45:40 -0400] "GET /forums/modmanagement.php HTTP/1.1" 200 6992 "http://site.com/forums/admincp/index.php?do=nav" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"

Dean C 10-22-2004 07:54 PM

This is an absolutely superb idea - well done :)!

Lionel 10-22-2004 07:55 PM

Hear this! When I put echo "hello"; at the top, it prints, AND it also prints template

When I remove it, blank page...

mtha 10-22-2004 08:20 PM

Quote:

Originally Posted by Kentaurus
What can I say? I am really sorry. I was hoping there was a cache for moderator permissions... there is not. 12293 queries is not acceptable. In my defense 12293 queries in only 3.6 seconds? Those must be light-speed queries.

Please use the modified version in this post (reupload it in your includes/ directory), I wrote a custom fetch_permissions and it uses A LOT less queries. Please let me know if it helped, I know it will.

I feel much better now: Page generated in 1.09987 seconds with 11 queries

However, the sorting by lastvisit still doesnt work very well:

here's the order I get with modmanagement.php?sortby=lastvisit :)

22-10-2004 03:34 PM
22-10-2004 01:26 PM
22-10-2004 03:51 PM

...
22-10-2004 02:34 AM
21-10-2004 10:52 PM
22-10-2004 03:46 AM
22-10-2004 12:11 PM
21-10-2004 09:45 PM
....



Quote:

Only the admin can see it. Other people get a nopermission screen.
If you want to allow some other group to access the code too, you can just modify the condition in modmanagement.php, right?
says

PHP Code:

// only administrators can see this page
if (($bbuserinfo['usergroupid'] != 6) AND ($bbuserinfo['usergroupid'] != 5))
{
    
print_no_permission();



Kentaurus 10-23-2004 02:55 AM

Quote:

Originally Posted by mtha
I feel much better now: Page generated in 1.09987 seconds with 11 queries

However, the sorting by lastvisit still doesnt work very well:

here's the order I get with modmanagement.php?sortby=lastvisit :)

22-10-2004 03:34 PM
22-10-2004 01:26 PM
22-10-2004 03:51 PM

...
22-10-2004 02:34 AM
21-10-2004 10:52 PM
22-10-2004 03:46 AM
22-10-2004 12:11 PM
21-10-2004 09:45 PM
....




If you want to allow some other group to access the code too, you can just modify the condition in modmanagement.php, right?
says

PHP Code:

// only administrators can see this page
if (($bbuserinfo['usergroupid'] != 6) AND ($bbuserinfo['usergroupid'] != 5))
{
    
print_no_permission();



Please reupload the includes/functions_modmanagement.php file in the zip, there was a bug with the ordering by lastvisit, it was showing the lastactivity and ordering by the last visit.

Yes, you can just modify the condition in the modmanagement.php in that way. In your example that would give access to the supermoderators also.

Kentaurus 10-23-2004 02:59 AM

Quote:

Originally Posted by Lionel
Hear this! When I put echo "hello"; at the top, it prints, AND it also prints template

When I remove it, blank page...

That doesn't make any sense... but you already know that :) Maybe you can just leave that hello at the top? ;)

Lionel 10-23-2004 03:41 AM

No that does not make sense. I wish someone could explain. I am sure there is a reason for it. Anyway, I just placed a non breaking space as echo. The only annoyance is that it drops the header table from topmargin=0

Lionel 10-23-2004 03:55 AM

Now, you want to hear the best? I am at home on a different PC, and it tells me unable to add cookies headers already sent on the echo line. When I remove the echo line, the page simply takes forever to load.... or perhaps does not load at all (closed brpwser after 5 minutes)

SaN-DeeP 10-23-2004 04:35 AM

Page generated in 0.51729 seconds with 13 queries [Server Loads: 0.49 0.55 : 0.47]awesome hack :)

sv1cec 10-23-2004 05:00 AM

Quote:

Originally Posted by Kentaurus
That might be the problem.... I have only tested this hack with vb3.0.3, it might not work with 3.0.1. Depending on your server configuration you can get a blank page if you have a php error, like calling a function that didn't exist... can you get the detailed error from the server log or something like that? maybe it is a simple fix. Did you remembered to upload functions_modmanagement.php in the includes directory? You can also try adding something like "Hello" at the very end of the file, if it doesn't print then it is a php error and nothing with the template.

It works fine with 3.0.1, I can assure you.

And again, thanks for a lovely hack. Now, I am awaiting for the alerts to see what they are about, haven't seen one yet.

Rgds

Makador 10-23-2004 12:01 PM

This hack has a major bug. If your Admins dont have the groupid 6 you cant access the page...

/edit:
Hm and changing to this doesn't work:

if (!can_administer('whatever'))
{
print_cp_no_permission();
}

/edit2:
Anybody knows a way to change it in that way, that all people who have access to the admin panel can view it? Because in my case, they are all in a lot of different usergroups.

mtha 10-23-2004 01:33 PM

Quote:

Originally Posted by Makador
This hack has a major bug. If your Admins dont have the groupid 6 you cant access the page...

/edit:
Hm and changing to this doesn't work:

if (!can_administer('whatever'))
{
print_cp_no_permission();
}

/edit2:
Anybody knows a way to change it in that way, that all people who have access to the admin panel can view it? Because in my case, they are all in a lot of different usergroups.

// only administrators can see this page
if (($bbuserinfo['usergroupid'] != 6) AND ($bbuserinfo['usergroupid'] != 5))
{
print_no_permission();
}

Add any group that you want to included in the above IF condition, same way I add
"AND ($bbuserinfo['usergroupid'] != 5)"

Makador 10-23-2004 01:52 PM

Hm I could do that, but I dont want to put everyone who can access the admin panel in one group and especially not as primary group, because they all need different acess to forums and different titles. We got around 400+ Forums, so it is a bit complex ;)

GamerJunk.net 10-23-2004 05:10 PM

Awesome! Great Job!

trackpads 10-23-2004 05:38 PM

Great Hack!!!

Kentaurus 10-23-2004 06:17 PM

Quote:

Originally Posted by Makador
This hack has a major bug. If your Admins dont have the groupid 6 you cant access the page...

/edit:
Hm and changing to this doesn't work:

if (!can_administer('whatever'))
{
print_cp_no_permission();
}

/edit2:
Anybody knows a way to change it in that way, that all people who have access to the admin panel can view it? Because in my case, they are all in a lot of different usergroups.

First of all I would appreciate if you didn't call that a "major bug" because you are going to frighten someone, after reading it I thought it was a security issue, performance issue or something like that :)

Certainly yours is a special setup, by default most people use the 6 as the administrator group and it is also the default. I agree with you that it should be fixed. here it is.

In modmanagement.php change
PHP Code:

if ($bbuserinfo['usergroupid'] != 6)
{
    
print_no_permission();


To this
PHP Code:

if (!($permissions['adminpermissions'] & CANCONTROLPANEL))
{
    
print_no_permission();



Makador 10-23-2004 06:38 PM

Hehe sorry for calling it a major bug and thanks for your help :)
But I also need to change the modmanagement_cron.php. Same here: All users, who can see the adminpanel should get the pm's.

DrkFusion 10-23-2004 07:42 PM

This is a very nice hack, I have actually noticed my Moderators are doing so much more work than I expected, and a couple of the other moderators are going to be getting my nice aldo boot :)

Nice hack!

billywiz 10-23-2004 08:06 PM

very nice hack :)

Kentaurus 10-23-2004 10:08 PM

Quote:

Originally Posted by Makador
Hehe sorry for calling it a major bug and thanks for your help :)
But I also need to change the modmanagement_cron.php. Same here: All users, who can see the adminpanel should get the pm's.

I uploaded a new zip with some fixes

.fixed the cron job and the access to the main page in case you have several admin groups and not only group 6
.added a log to the cron job
.fixed a bug where the "unread pm's" in the navbar wasn't updated

If any of these bugs bother you then just re-download the zip and replace the files.

Kentaurus 10-23-2004 10:13 PM

By default only admins can view the modmanagement.php page, if you want your supermoderators to be able to access the page.

In modmanagement.php search for:
PHP Code:

if (!($permissions['adminpermissions'] & CANCONTROLPANEL)) 

replace it with:
PHP Code:

if (!($permissions['adminpermissions'] & CANCONTROLPANEL) && !($permissions['adminpermissions'] & ISMODERATOR)) 

By default only admins can view the modmanagement.php page, if you want all moderators to be able to access the page.

In modmanagement.php search for:
PHP Code:

if (!($permissions['adminpermissions'] & CANCONTROLPANEL)) 

replace it with:
PHP Code:

if (!($permissions['adminpermissions'] & CANCONTROLPANEL) && !can_moderate()) 


Aurous 10-23-2004 10:45 PM

Quote:

Originally Posted by Lionel
I get the pm alerts, but I get a blank page for the modmanagement.php and templates are there

Same problem on 3.0.1

If there is no fix to this, an uninstaller will be very nice to see here or I'll have to waste time manually deleting everything :(

Kentaurus 10-23-2004 10:56 PM

Quote:

Originally Posted by Aurous
Same problem on 3.0.1

If there is no fix to this, an uninstaller will be very nice to see here or I'll have to waste time manually deleting everything :(

I am trying to provide a fix, but I cannot identify where the problem is.

Some people have installed it in 3.0.1 succesfully, but Lionel has the weirdest behaviour I have seen or read, and I installed a copy of vb3.0.1 in my local machine to test it and it ran without problems. Unless there is another conflicting hack or server setting that I am not aware of there is no good reason for it not to work.... maybe I can check your website or test site to see if I can identify what the problem is?

Aurous 10-23-2004 11:07 PM

Well, I was bored and deleted all the phrases and settings manually. Its possible its conflicting with other hacks I have installed, not sure which one as I have many. Maybe Lionel can be of some help.

Loki12 10-24-2004 11:10 AM

I like this, and I'm going to install it soon. ;)

Makador 10-24-2004 11:38 AM

Thanks again for your help. Now everything works fine for me!

mtha 10-24-2004 01:56 PM

Quote:

Originally Posted by Kentaurus
I uploaded a new zip with some fixes

.fixed the cron job and the access to the main page in case you have several admin groups and not only group 6
.added a log to the cron job
.fixed a bug where the "unread pm's" in the navbar wasn't updated

If any of these bugs bother you then just re-download the zip and replace the files.

Please provide versions and update time/date (and upgrade instruction if posible). Thank you :)

sv1cec 10-25-2004 04:49 AM

Today, I received the first PMs from this hack. All fine and well, except that they didn't increase the admins unread PM's number, not did they trigger the fact that there were unread PMs.

Any ideas???

Tnx and rgds
-------------
John

Kentaurus 10-25-2004 11:30 AM

Quote:

Originally Posted by sv1cec
Today, I received the first PMs from this hack. All fine and well, except that they didn't increase the admins unread PM's number, not did they trigger the fact that there were unread PMs.

Any ideas???

Tnx and rgds
-------------
John

I fixed that a couple of days ago, you'll need to redownload the zip and replace the .php files except the installation file :)

SaN-DeeP 10-25-2004 07:24 PM

Quote:

Originally Posted by Kentaurus
I fixed that a couple of days ago, you'll need to redownload the zip and replace the .php files except the installation file :)

i have the newest version but have this problem :), i have around 25+ unread PMs in my box but my private messages shows 0 new

Regards,

sv1cec 10-26-2004 03:32 AM

Quote:

Originally Posted by SaN-DeeP
i have the newest version but have this problem :), i have around 25+ unread PMs in my box but my private messages shows 0 new

Regards,

Maybe they were send before you installed the latest version? That's what happened with me too, but I have to assume they were send before, because next day I received about 40 of them and got warned all right. I'll have a more ... concrete opinion next Sunday!! LoL

Rgds
--------------
John

Reef 10-26-2004 05:46 PM

Quote:

Originally Posted by Kentaurus
I am trying to provide a fix, but I cannot identify where the problem is.

Some people have installed it in 3.0.1 succesfully, but Lionel has the weirdest behaviour I have seen or read, and I installed a copy of vb3.0.1 in my local machine to test it and it ran without problems. Unless there is another conflicting hack or server setting that I am not aware of there is no good reason for it not to work.... maybe I can check your website or test site to see if I can identify what the problem is?


I also had the white page problem but found a fix for my board (not sure if it will work for all)

Open modmanagement.php

Search for:
PHP Code:

$globaltemplates = array(
    
'MODMANAGEMENT',
        
'modmanagement_bit'
); 


Replace with:
PHP Code:

$globaltemplates = array(
     
'modmanagement_bit'
); 

Hope this will help someone else

This a great Mod,, Thanks for your efforts Kentaurus

The Realist 10-26-2004 08:15 PM

One this thats annoying me is when it sends a PM informing the admin what a mod or mods have been up to, the email says "Blah Blah has not posted in his forum in the last 30 days"

Now I have moderators that mod more than one forum so how would I know from this what forum its refuring to?

Can this hack be changed so the PM's state what forums its on about.

Laters

Kentaurus 10-27-2004 02:09 AM

Quote:

Originally Posted by The Realist
One this thats annoying me is when it sends a PM informing the admin what a mod or mods have been up to, the email says "Blah Blah has not posted in his forum in the last 30 days"

Now I have moderators that mod more than one forum so how would I know from this what forum its refuring to?

Can this hack be changed so the PM's state what forums its on about.

Laters

Right now, it can't. But I'll take the suggestion for improvements in a future version :) As it is now it monitors all forums as a whole. If the pm says that he hasn't posted in the last 30 days it means he hasn't posted in ANY of his forums in the last 30 days. Sounds pretty bad to me.

sv1cec 11-02-2004 03:52 AM

Quote:

Originally Posted by Kentaurus
Right now, it can't. But I'll take the suggestion for improvements in a future version :) As it is now it monitors all forums as a whole. If the pm says that he hasn't posted in the last 30 days it means he hasn't posted in ANY of his forums in the last 30 days. Sounds pretty bad to me.

This PM function needs improvement. This morning, it reported to me that ... I was inactive. I am the admin (and act as moderator as well) and I've done several mod work the last few days. However, as someone pointed out, if a mod has more than one forums, the PM gets send even if he has moderated all of them but one. What's worst, is that it does not tell you, for which forum the PM was issued.

I am keeping the statistics, but removing the cron job.

Rgds

Kaitou 11-08-2004 05:43 PM

Great hack!
This certanly makes it a lot easier to see if a mod isn't around for some reason.
I have also modified it slightly, to show in the percent read column:
"25 of 76, 33%" or "12 of 13, 92%" because the pure percent can be a bit misleading, and it helps to see if the mod is just not paying attention, of if they are swamped, and a co-mod may be needed.

68 Z-28 11-08-2004 06:57 PM

You are WONDERFUL. I've been having these sort of problems with the mods on my site, and this will work wonders. Will be great for removing moderators as well :D


All times are GMT. The time now is 04:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01500 seconds
  • Memory Usage 1,864KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete