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
Admin / Mod CP links for qualified Usergroups Details »»
Admin / Mod CP links for qualified Usergroups
Version: 1.00, by Sc0rp Sc0rp is offline
Developer Last Online: May 2012 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 08-19-2004 Last Update: Never Installs: 5
 
No support by the author.

What this basically do is add an 'admin cp' link to the bottom $logincode bit if the user has admin control panel access (cancontrolpanel) and add a 'mod cp' link if the user is a moderator (ismoderator).

so your $logincode would basically look like this if your an admin:

"Log Out | Mark All Forums Read | Forum Leaders | Admin CP | Mod CP"

(moderators would of course lack the admin link)

of course thats only the way ive done it, you can add your admin/mod links anywhere you want anyway you want.

Now I know this can be done easily by adding a short bit of code to the phpinclude template in which case it wouldnt even be called a hack, but then you'd have to edit the phpinclude template every time you'd want to add another usergroup to the 'allow list'. And since I like doing things the easy way I made a very small code modification so the script would detect the qualified usergroups by itself

Now imo this shouldnt even be called a hack cuz its so small but the fact is that it qualifies the hack posting rules so if I'd post it somewhere else but here it would be moved here anyway right? ^_^ Either way, doesnt really matter to me, I just wanted this little feature for myself and im sure some other ppl might appreciate it too..

Show Your Support

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

Comments
  #2  
Old 08-20-2004, 01:15 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, thanks for sharing...

Do you have any screenshots?
Reply With Quote
  #3  
Old 08-20-2004, 01:59 PM
Sc0rp Sc0rp is offline
 
Join Date: Jul 2002
Location: Netherlands
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

a screenshot wouldnt really add any information

just look at the bottom of your forum for this line:

Log Out | Mark All Forums Read | Forum Leaders

and imagen that with the hack installed it would look like this for an admin:

Log Out | Mark All Forums Read | Forum Leaders | Admin CP | Mod Cp

or this for a mod:

Log Out | Mark All Forums Read | Forum Leaders | Mod CP

basically usegroups that have access to the admin control panel (you can define this option when editing a usergroup, I think its the last or second last option) will see the admin cp and mod cp links and usergroups that are defined as moderators will see the mod cp link.

the only difference with this 'hack' compared to the template modification posted on vbulletintemplates.com is that in this hack the script automatically detects a usergroups permissions and with the template modification you have to define the usergroups manually.
Reply With Quote
  #4  
Old 08-20-2004, 02:30 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, i see... yeah you are right... thanks
Reply With Quote
  #5  
Old 09-23-2004, 11:59 PM
Mr.Z Mr.Z is offline
 
Join Date: Sep 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't do this. I can't find

Quote:
$usercache["$userid"]=$DB_site->query_first("SELECT user.*,userfield.* FROM user LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.userid='$userid'");
In adminfunctions.php, but I did find something close....

Quote:
// ###################### Start adminlog #######################
function adminlog ($extrainfo="",$userid=-1,$script="",$scriptaction="") {
global $DB_site,$bbuserinfo,$PHP_SELF,$action,$REMOTE_ADD R;

if ($userid==-1) {
$userid=$bbuserinfo[userid];
}
if ($script=="") {
$script=basename($PHP_SELF);
}
if ($scriptaction=="") {
$scriptaction=$action;
}
I'm using a vdeck, webhost is IPW, and the version is vBulletin Version 2.3.5 Help me....
Reply With Quote
  #6  
Old 09-24-2004, 02:04 PM
Sc0rp Sc0rp is offline
 
Join Date: Jul 2002
Location: Netherlands
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have to edit the functions.php file in your admin folder.. not adminfunctions.php
Reply With Quote
  #7  
Old 10-25-2004, 01:01 AM
Riot-Boards Riot-Boards is offline
 
Join Date: Jan 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you possibly tell us which sub division the first part of the code is in... since admin/functions.php is one of the larger vBulletin coding files, its a pain to prune through the whole big file... if you could specify what the code is under (I.E. ###################### Start getpagenav #######################) it would really be a huge help!

Thanks!
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 12:22 AM.


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.04086 seconds
  • Memory Usage 2,259KB
  • 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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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