Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-30-2001 Last Update: Never Installs: 14
 
No support by the author.

This hack allows you to set the style for a given user group.

You can choose to ovveride forum styles, or not. I have written another hack that allows premium users to have a set of reserved styles. It can be found here:

https://vborg.vbsupport.ru/showthrea...threadid=48953

This seems to work for 2.2.1 and higher.

Amy

Show Your Support

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

Comments
  #32  
Old 06-17-2003, 07:03 AM
Gizmo99 Gizmo99 is offline
 
Join Date: Feb 2002
Location: London
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just Whot we needed :rambo:

First Class

Giz
Reply With Quote
  #33  
Old 07-14-2003, 01:31 AM
allfather allfather is offline
 
Join Date: May 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cant find the lines of codes in global.php

Code:
<?php
error_reporting(7);

if (isset($HTTP_GET_VARS['explain']) OR isset($HTTP_POST_VARS['explain'])) {
  $showqueries = 1;
  $explain = 1;
}
if (isset($HTTP_GET_VARS['showqueries']) OR isset($HTTP_POST_VARS['showqueries']) or isset($showqueries)) {
  $showqueries = 1;
  $pagestarttime = microtime();
} else {
  $pagestarttime = 0;
}

$incp=1;

// allow script to work with registerglobals off
if ( function_exists('ini_get') ) {
	$onoff = ini_get('register_globals');
} else {
	$onoff = get_cfg_var('register_globals');
}
if ($onoff != 1) {
	@extract($HTTP_SERVER_VARS, EXTR_SKIP);
	@extract($HTTP_COOKIE_VARS, EXTR_SKIP);
	@extract($HTTP_POST_FILES, EXTR_SKIP);
	@extract($HTTP_POST_VARS, EXTR_SKIP);
	@extract($HTTP_GET_VARS, EXTR_SKIP);
	@extract($HTTP_ENV_VARS, EXTR_SKIP);
}

// get rid of slashes in get / post / cookie data
function stripslashesarray (&$arr) {
  while (list($key,$val)=each($arr)) {
    if ((strtoupper($key)!=$key or "".intval($key)=="$key") and $key!="templatesused" and $key!="argc" and $key!="argv") {
			if (is_string($val)) {
				$arr[$key]=stripslashes($val);
			}
			if (is_array($val)) {
				$arr[$key]=stripslashesarray($val);
			}
	  }
  }
  return $arr;
}
if (get_magic_quotes_gpc() and is_array($GLOBALS)) {
  // variables created from attachments aren't escaped properly it seems...
  if (isset($attachment)) $GLOBALS['attachment'] = addslashes($GLOBALS['attachment']);
  if (isset($avatarfile)) $GLOBALS['avatarfile'] = addslashes($GLOBALS['avatarfile']);
  if (isset($iconfile)) $GLOBALS['iconfile'] = addslashes($GLOBALS['iconfile']);
  if (isset($smiliefile)) $GLOBALS['smiliefile'] = addslashes($GLOBALS['smiliefile']);
  if (isset($stylefile)) $GLOBALS['stylefile'] = addslashes($GLOBALS['stylefile']);

  $GLOBALS = stripslashesarray($GLOBALS);
}
set_magic_quotes_runtime(0);

// version numbers:
$codeversionnumber="2.3.0";
$codeinfo="";

// initialise variables
unset($forumcache);
unset($threadcache);
unset($postcache);
unset($urlSearchArray);
unset($urlReplaceArray);
unset($emailSearchArray);
unset($emailReplaceArray);
unset($iforumcache);
unset($ipermcache);
unset($iaccesscache);
unset($usergroupdef);
unset($noperms);
unset($usergroupcache);
unset($vars);
unset($usercache);
unset($forumarraycache);
unset($permscache);
unset($foruminfo);

if ($HTTP_GET_VARS['HTTP_POST_VARS']['action'] == $HTTP_POST_VARS['action']) {
  unset($HTTP_POST_VARS['action']);
}
$HTTP_POST_VARS['action'] = trim($HTTP_POST_VARS['action']);

if ($HTTP_GET_VARS['HTTP_COOKIE_VARS']['bbadminon'] == $HTTP_COOKIE_VARS['bbadminon']) {
  unset($HTTP_POST_VARS['action']);
}

// ###################### Start init #######################

unset($dbservertype);
unset($debug);
//load config
require("./config.php");
if ($debug != 1) {
	unset($showqueries);
	unset($explain);
}

// init db **********************
// load db class
$dbservertype = strtolower($dbservertype);
$dbclassname="./db_$dbservertype.php";
require($dbclassname);

$DB_site=new DB_Sql_vb;

$DB_site->appname="vBulletin Control Panel";
$DB_site->appshortname="vBulletin (cp)";
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;

$DB_site->connect();

$dbpassword="";
$DB_site->password="";
// end init db

// load options
$optionstemp=$DB_site->query_first("SELECT template FROM template WHERE title='options'");
eval($optionstemp[template]);
$versionnumber=$templateversion;

// ###################### Start headers #######################
/*
$noheader=1;
if ($addheaders and !$noheader) {
  // default headers
  header("HTTP/1.0 200 OK");
  header("HTTP/1.1 200 OK");
  header("Content-type: text/html");
}
*/

if ($nocacheheaders and !$noheader) {
  // no caching
  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");             // Date in the past
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); // always modified
  header("Cache-Control: no-cache, must-revalidate");           // HTTP/1.1
  header("Pragma: no-cache");                                   // HTTP/1.0
}

// ###################### Start functions #######################
require("./functions.php");
require("./adminfunctions.php");

// ###################### Start sessions #######################
/*if (!isset($bbadminon) and !$bbadminon) {
  $sessionhash="";
  $bbuserinfo[userid]="";
  $bbuserinfo[password]="";
}*/

require("./sessions.php");

/*
if (isset($loginusername)) {
  if ($user=$DB_site->query_first("SELECT userid,password FROM user WHERE username='".addslashes($loginusername)."'")) {
    if ($user[password]==$password) {
      $userid=$user[userid];
      $bbuserinfo=getuserinfo($userid);
      $DB_site->query("UPDATE session SET userid='$userid' WHERE sessionhash='$session[dbsessionhash]'");
    }
  }
}
*/

if ( isset( $redirect ) ) {
	$redirect = htmlspecialchars(str_replace('javascript', 'java script', $redirect));
}

$getperms=$DB_site->query_first("SELECT cancontrolpanel FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND user.userid='$bbuserinfo[userid]'");
if ($getperms[cancontrolpanel]!=1) {
  $bbuserinfo[userid]=0;
}

if ($bbuserinfo[userid]!=0 and $loginusername and !$createanonsession) {
  vbsetcookie('bbadminon', 1, 0);
  $HTTP_COOKIE_VARS['bbadminon']=1;
} else {
  if ($bbuserinfo[userid]==0) {
    $HTTP_COOKIE_VARS['bbadminon']=0;
  }
}

if ($debug!=1) {
  // check for files existance. Potential security risks!
	if (file_exists("install.php")==1) {
		echo "<html><body><p>Security alert! install.php still remains in the admin directory. This poses a security risk, so please delete that file immediately. You cannot access the control panel until you do.</p></body></html>";
		exit;
	}

	if (file_exists("upgrade1.php")==1 and substr($PHP_SELF,-strlen("upgrade1.php"))!="upgrade1.php") {
		echo "<html><body><p><a href=\"upgrade1.php?s=$session[sessionhash]\">upgrade1.php</a> exists. If you have already upgraded fully, please delete it. Otherwise, run it now.</p></body></html>";
		exit;
	}
}

$checkpwd=1;
if ($HTTP_COOKIE_VARS['bbadminon']==0 and substr($PHP_SELF,-strlen("upgrade1.php"))!="upgrade1.php" and $checkpwd) {
  $bbuserinfo[userid]=0;
} else {
  if ($bbuserinfo['userid']!=0  and $loginusername and !$createanonsession) {
    setcookie("bbadminon",1,0,'/');
    $HTTP_COOKIE_VARS['bbadminon']=1;
  }
}

if ($bbuserinfo[userid]==0 and $checkpwd) {

  cpheader("<title>Forums admin</title>");
?><br><br><br>
<table cellpadding="1" cellspacing="0" border="0" class="tblborder" align="center" width="450"><tr><td>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<?php maketableheader("Please Log in:","login",0,1); ?>
<tr class="firstalt" id="submitrow"><td align="center" nowrap><p>You are either not a valid administrator or have not logged in.</p>
<form action="../admin/index.php" method="post" id="submitrow">
<input type="hidden" name="s" value="<?php echo $session[sessionhash]; ?>">
<input type="hidden" name="action" value="login">
<!-- <input type="hidden" name="explain" value="1"> -->
<input type="hidden" name="redirect" value="<?php

if ($HTTP_SERVER_VARS['REQUEST_URI']!="") {
  $url = $HTTP_SERVER_VARS['REQUEST_URI'];
} else {
  if ($PATH_INFO) {
    $url = $PATH_INFO;
  } else {
    $url = $PHP_SELF;
  }

  if ($QUERY_STRING) {
    $url .= "?$QUERY_STRING";
  }
}

  $url=ereg_replace("sessionhash=[a-z0-9]{32}&","",$url);
  $url=ereg_replace("\\?sessionhash=[a-z0-9]{32}","",$url);
  $url=ereg_replace("s=[a-z0-9]{32}&","",$url);
  $url=ereg_replace("\\?s=[a-z0-9]{32}","",$url);

echo htmlspecialchars(str_replace('javascript', 'java script', $url));

?>">
<table cellpadding="0" cellspacing="1" border="0">
<tr>
	<td><input type="text" name="loginusername"></td>
	<td><input type="password" name="loginpassword"></td>
	<td><input type="submit" value="   Log in   " accesskey="s"></td>
</tr>
<tr>
	<td><font size="1">Username</font></td>
	<td colspan="2"><font size="1">Password</font></td>
</tr>
</table>
</form>
</td></tr></table>
</td></tr></table>
<p align="center"><font size="1">vBulletin v<?php echo $templateversion ?> Administrator Control Panel</font></p>
<?php
  cpfooter();
  exit;
}

?>
is my global.php :s
(will delete if someone tells me what to do,or if someone says "WTF, WIERDEST GLOBAL.PHP EVER !!!" :banana:
Reply With Quote
  #34  
Old 09-06-2003, 11:34 PM
\ \ - Speedy - / /'s Avatar
\ \ - Speedy - / / \ \ - Speedy - / / is offline
 
Join Date: Nov 2001
Location: Speedy's World
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can someone update this for 2.3.2 (i can't get global.php to work ether.

- Speedy
Reply With Quote
  #35  
Old 03-05-2004, 05:19 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting errors from this emailed to me at certain times during the day. On some days they come in hundreds at a time. Here's the erro

Quote:
Database error in vBulletin 2.2.8:

Invalid SQL: Select styleid, styleoverride from usergroup where usergroupid=
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

mysql error number: 1064

Date: Tuesday 24th of February 2004 03:07:45 PM
Script: http://www.powwows.com/gathering/ga...hp?postid=88010
Referer: http://www.powwows.com/gathering/sh...20&pagenumber=2
Anyone seen this?
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 01:17 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.04022 seconds
  • Memory Usage 2,259KB
  • Queries Executed 19 (?)
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)bbcode_code
  • (1)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
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_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