Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-29-2007, 07:24 AM
Mum Mum is offline
 
Join Date: Jun 2006
Location: New Zealand
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Please help URGENTLY

My whole forum is down I tried to install https://vborg.vbsupport.ru/showthrea...=111870&page=4 and now i can't access my forum AT ALL, not the admin panel nothing, how can i remove this?

I went to vB AdminCP, go to Plugin System > Add New Plugin.

Under Hook Location, scroll down to select 'global_start'.

In the 'Plugin PHP Code' field, copy/paste your edited control
script from Part I.

// Place user in/out of single usergroup
// according to yes/no selection made in profile, via
// custom radio button field. ver 1.04

// Enter values in the strings below for your forum
// custom field containing your radio button
$radio_field = 'field10';
// Text returned for 'yes' choice
$join = 'Female';
// Usergroup to enter/exit
$ug = '33';
// You don't need to enter anything below here.

// Derive additional needed variables
// userid of user
$userid = ($vbulletin->userinfo['userid']);
// current usergroups as array
$ugarr = explode(',' , (''.$vbulletin->userinfo['membergroupids']));
// current radio button setting
$fieldval = $vbulletin->userinfo[$radio_field];

// Do the work
// Proceed only if there is a user choice
if ($fieldval != '')
{
// If yes, add to usergroups
if ($fieldval == $join)
{
$ugarr = IntoGroup($ugarr, $ug, $userid);
}
// Else no, remove from usergroups
else
{
$ugarr = OutOfGroup($ugarr, $ug, $userid);
}
}
// End of Control Code


// Define functions used in plug-in
// ***************** Function IntoGroup() **************

Function IntoGroup($ugarr, $ugnum, $usrid)
{
global $vbulletin;
// only proceed if not trying to put into current primary usergroup
if ($ugnum != $vbulletin->userinfo['usergroupid'])
{
// check for empty usergroup array
if($ugarr[0] == '')
{
// set veriables
$uglist = $ugnum;
$ugarr[0] = $ugnum;
$doit = true;
}
// usergroup array not empty
else
{
// If not in usergroup already
if(!in_array($ugnum, $ugarr))
{
$doit = true;
// add group to end of array
array_push($ugarr, $ugnum);
// sort numerically
sort($ugarr, SORT_NUMERIC);
// if only one group in array
if (count($ugarr) == 1)
{
// simple group list string with no commas
$uglist = $ugnum;
}
// else more groups in array than one
else
{
// group list string with comma delimiters
$uglist = implode(',' , $ugarr); // convert array to string
}
}
}
if ($doit)
{
// Put updated usergroup list into database
$updatefields = $vbulletin->db->query("
UPDATE user
SET membergroupids='$uglist'
WHERE userid=$usrid
");
}
}
return $ugarr;
}

// ***************** Function OutOfGroup() **************
Function OutOfGroup($ugarr, $ugnum, $usrid)
{
global $vbulletin;
// only proceed if not trying to remove from current primary usergroup
if ($ugnum != $vbulletin->userinfo['usergroupid'])
{
// Proceed only if usergroup array not empty
if($ugarr[0] != '')
{
// Check for target usergroup in existing array
if(in_array($ugnum, $ugarr))
{
// Rebuild array without target usergroup
$iii = 0;
foreach ($ugarr as $value)
{
if ($value != $ugnum)
{
$new_gparr[$iii] = $value;
$iii++;
}
}
$ugarr = $new_gparr;
if (count($ugarr) == 0)
{
$uglist = '';
}
else
{
$uglist = implode(',' , $new_gparr);
}
// Put updated usergroup list into database
$updatefields = $vbulletin->db->query("
UPDATE user
SET membergroupids='$uglist'
WHERE userid=$usrid
");
}
}
}
return $ugarr;
}
// End of function code
Reply With Quote
  #2  
Old 05-29-2007, 07:35 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In your includes/config.php, add (before ?>):
PHP Code:
define('DISABLE_HOOKS'true); 
Reply With Quote
  #3  
Old 05-29-2007, 07:51 AM
Mum Mum is offline
 
Join Date: Jun 2006
Location: New Zealand
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
Reply With Quote
Reply


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 07:41 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.08155 seconds
  • Memory Usage 2,194KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete