Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases

Reply
 
Thread Tools
Usergroups moderate forums Details »»
Usergroups moderate forums
Version: 1.00, by JohnWoo JohnWoo is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 05-08-2004 Last Update: Never Installs: 6
Is in Beta Stage  
No support by the author.

Hello all!

Not sure - may se something like it exists already, but i was not able to find
- To add whole usegroup as forum moderator leave username field blank and select usergroup from list below
-To add normal mod leave that select in "Selected by username" position
While editing group mod still leave username field blank

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-10-2004, 02:27 AM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JohnWoo
Hello all!

Not sure - may se something like it exists already, but i was not able to find
- To add whole usegroup as forum moderator leave username field blank and select usergroup from list below
-To add normal mod leave that select in "Selected by username" position
While editing group mod still leave username field blank

your instructions say to find :

Code:
	globalize($_POST, array(
		'moderator',
		'moderatorid' => INT,
		'modusername' => STR_NOHTML,
		'usergroupid' => INT,
		'membergroupids'
	));		
	
	if ($modusername == '')
	{
		print_stop_message('invalid_user_specified');
	}

	$userinfo = $DB_site->query_first("
		SELECT userid, username, usergroupid, membergroupids
		FROM " . TABLE_PREFIX . "user
		WHERE username = '" . addslashes($modusername) . "'
	");
	$foruminfo = $DB_site->query_first("
		SELECT forumid,title
		FROM " . TABLE_PREFIX . "forum
		WHERE forumid = $moderator[forumid]
	");

	if ($userinfo['userid'] AND $foruminfo['forumid'])
	{ // no errors

		require_once('./includes/functions_misc.php');

		$moderator['userid'] = $userinfo['userid'];
		
		$noalter = explode(',', $undeletableusers);
		if (!in_array($userinfo['userid'], $noalter))

however my code looks like this :


Code:
	globalize($_POST, array(
		'moderator',
		'moderatorid' => INT,
		'modusername' => STR_NOHTML,
		'usergroupid' => INT,
		'membergroupids'
	));

	if ($modusername == '')
	{
		print_stop_message('invalid_user_specified');
	}

	$userinfo = $DB_site->query_first("
		SELECT userid, username, usergroupid, membergroupids
		FROM " . TABLE_PREFIX . "user
		WHERE username = '" . addslashes($modusername) . "'
	");
	$foruminfo = $DB_site->query_first("
		SELECT forumid,title
		FROM " . TABLE_PREFIX . "forum
		WHERE forumid = $moderator[forumid]
	");

	if ($userinfo['userid'] AND $foruminfo['forumid'])
	{ // no errors

		require_once('./includes/functions_misc.php');

		$moderator['userid'] = $userinfo['userid'];
		$moderator['permissions'] = convert_array_to_bits($moderator, $_BITFIELD['moderatorpermissions'],1);
		if (!empty($moderatorid))
		{
			// update
			$DB_site->query(fetch_query_sql($moderator, 'moderator', "WHERE moderatorid = $moderatorid"));
		}
		else
		{
			// insert
			$newusergroupid = $userinfo['usergroupid'];
			$newmembergroupids = $userinfo['membergroupids'];

			$noalter = explode(',', $undeletableusers);
			if (!in_array($userinfo['userid'], $noalter))
Reply With Quote
  #13  
Old 05-10-2004, 09:31 AM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my fault
sorry
fixed txt uploaded
Reply With Quote
  #14  
Old 05-10-2004, 01:53 PM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JohnWoo
my fault
sorry
fixed txt uploaded


my forums are now getting database errors .


Quote:
Database error in vBulletin 3.0.0:

Invalid SQL:
SELECT permissions, FIND_IN_SET(forumid, '64,15,-1') AS pos
FROM moderator
WHERE modgroupid = 2 AND forumid IN (64,15,-1)
ORDER BY pos ASC
LIMIT 1

mysql error: Unknown column 'modgroupid' in 'where clause'

mysql error number: 1054


you must have added a few fields to the database tables and forgot about them .
Reply With Quote
  #15  
Old 05-10-2004, 02:01 PM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what about sql request in the beginning of .txt ?

ALTER TABLE moderator ADD modgroupid SMALLINT(4) DEFAULT '0' NOT NULL
Reply With Quote
  #16  
Old 05-10-2004, 02:06 PM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JohnWoo
what about sql request in the beginning of .txt ?

ALTER TABLE moderator ADD modgroupid SMALLINT(4) DEFAULT '0' NOT NULL

opps

works now ....

thank you !


i click install
Reply With Quote
  #17  
Old 05-10-2004, 02:14 PM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when viewing my forums it does not show my moderators in the moderator
box near the end like before ....

now it shows [-Moderators-]

and is a link ....

when clicked it gives errors that no such user exist....

can you make this display the moderators like before ....
Reply With Quote
  #18  
Old 05-11-2004, 03:56 PM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by teksigns
when viewing my forums it does not show my moderators in the moderator
box near the end like before ....


now it shows [-Moderators-]

and is a link ....

when clicked it gives errors that no such user exist....


can you make this display the moderators like before ....

any ideas?
Reply With Quote
  #19  
Old 10-31-2004, 01:42 PM
nexialys
Guest
 
Posts: n/a
Default

hum... never updated, and good feature ...
Reply With Quote
  #20  
Old 04-17-2008, 09:16 AM
fulviods fulviods is offline
 
Join Date: Jan 2005
Posts: 150
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice mod does it work on a 3.7 RC1?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04671 seconds
  • Memory Usage 2,293KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete