Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Help Lost Details »»
Help Lost
Version: , by Almax Almax is offline
Developer Last Online: Nov 2005 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-13-2003 Last Update: Never Installs: 0
 
No support by the author.

I implemented a small hack but want to change the code so that super mods and mods can access it

the start of the hack goes like so
======================================

<?
require("global.php");

if ($bbuserinfo[usergroupid] !="6") {
show_nopermission();
exit;
}
======================================
I think it's here i change the code can somebody help me to insert usergroups 5,6,42,44 to access it

thanx 4 any help

Sorry should have posted this in support

Show Your Support

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

Comments
  #2  
Old 05-13-2003, 08:42 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a cleaned-up (no offense) version that allows those specific ugids:
PHP Code:
require("./global.php");
if (
in_array($bbuserinfo['usergroupid'], array(5674244)))
{
    
show_nopermission();

The exit isn't needed because show_nopermission() exits itself.
Reply With Quote
  #3  
Old 05-13-2003, 08:46 PM
Almax Almax is offline
 
Join Date: May 2002
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanx filburt1 for the prompt reply
Reply With Quote
  #4  
Old 05-13-2003, 08:54 PM
Almax Almax is offline
 
Join Date: May 2002
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no didnt work m8 here is the whole code it will work with 1 but i'd like it to work with all these usergroups
==============
<?
require("./global.php");
if (in_array($bbuserinfo['usergroupid'], array(5, 6, 7, 42, 44)))
{
show_nopermission();
}

if (!isSet($threadid)) {
header("Location: index.php");
exit;
}

if ($action == "change") {
$threadintro = addslashes($threadintro);
if ($changeall) {
$DB_site->query("UPDATE thread SET threadintro = '$threadintro'");
} else {
$DB_site->query("UPDATE thread SET threadintro = '$threadintro' WHERE threadid = '$threadid'");
}
eval("standardredirect(\"".gettemplate("redirect_t hreadintro")."\",\"showthread. php?s=".$session[sessionhash]."&threadid=\$threadid\");");
exit;
}

$current = $DB_site->fetch_array($DB_site->query("SELECT threadintro FROM thread WHERE threadid = '$threadid'"));
eval("dooutput(\"".gettemplate("threadintro")."\") ;");
?>
Reply With Quote
  #5  
Old 05-13-2003, 09:05 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should be:

PHP Code:
require("./global.php");
if (!
in_array($bbuserinfo['usergroupid'], array(5674244)))
{
    
show_nopermission();

Reply With Quote
  #6  
Old 05-13-2003, 09:14 PM
Almax Almax is offline
 
Join Date: May 2002
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That seems to have worked thank you Boofo & thanx
very speedy service
Reply With Quote
  #7  
Old 05-13-2003, 09:18 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're very welcome.
Reply With Quote
  #8  
Old 05-13-2003, 09:36 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What did I do wrong?
Reply With Quote
  #9  
Old 05-13-2003, 09:40 PM
Almax Almax is offline
 
Join Date: May 2002
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

exclamation mark before in array
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 11:53 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.04355 seconds
  • Memory Usage 2,278KB
  • Queries Executed 22 (?)
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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete