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: 1.00, by Stretchr Stretchr is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-17-2002 Last Update: Never Installs: 22
 
No support by the author.

This is a simple hack designed to address what may be merely an oversight in the Forumpermission Table. When you're editing a forum, the name of that forum appears in the table head, but when you're editing the permissions, it doesn't. When you're modifying a long string of forum permissions, it's easy to forget which one you're currently doing. This hack addresses that issue and only requires 3 lines of code to the admin/forumpermission.php file. I couldn't have completed this hack without the help of MrLister, who showed me the variable I'd been fruitlessly searching for.

Here's my first hack:

In admin/forumpermission.php, find:

PHP Code:
  if (isset($forumpermissionid)) {
    
$forumpermission=$DB_site->query_first("SELECT * FROM forumpermission WHERE forumpermissionid=$forumpermissionid");
    
makehiddencode("forumpermissionid","$forumpermissionid"); 
Replace with:
PHP Code:
  if (isset($forumpermissionid)) {
    
$forumpermission=$DB_site->query_first("SELECT * FROM forumpermission WHERE forumpermissionid=$forumpermissionid");
    
makehiddencode("forumpermissionid","$forumpermissionid");
$foruminfo=$DB_site->query_first("SELECT title FROM forum WHERE forumid='$forumpermission[forumid]'"); 
Note the line that is not indented must stay that way!

Next Find:
PHP Code:
  } else {
    
$forumpermission getpermissions($forumid1intval($usergroupid));
    
makehiddencode("forumid",$forumid); 
Replace with:
PHP Code:
  } else {
    
$forumpermission getpermissions($forumid1intval($usergroupid));
    
makehiddencode("forumid",$forumid);
$foruminfo=$DB_site->query_first("SELECT title FROM forum WHERE forumid='$forumid'"); 

Still in admin/forumpermission.php,
Find:
PHP Code:
  echo "<tr class='tblhead'><td colspan=2><b><input type=\"radio\" name=\"useusergroup\" value=\"1\" ".iif (!isset($forumpermissionid),"checked","")."><span class='tblhead'>Use usergroup default</b> (Note: this will delete any previous custom settings)</span></td></tr>\n"
and Replace with:
PHP Code:
  echo "<tr class='tblhead'><td colspan=2><b><input type=\"radio\" name=\"useusergroup\" value=\"1\" ".iif (!isset($forumpermissionid),"checked","")."><span class='tblhead'>Use usergroup default</b> (Note: this will delete any previous custom settings)<br>Forum: <b>$foruminfo[title]</b></span></td></tr>\n"
Finally, still in admin/forumpermission.php
Find:
PHP Code:
  echo "<tr class='tblhead'><td colspan=2><b><input type=\"radio\" name=\"useusergroup\" value=\"0\" ".iif(isset($forumpermissionid),"checked","")."><span class='tblhead'>Use custom settings:</span></b></td></tr>\n"
Replace with:
PHP Code:
  echo "<tr class='tblhead'><td colspan=2><b><input type=\"radio\" name=\"useusergroup\" value=\"0\" ".iif(isset($forumpermissionid),"checked","")."><span class='tblhead'>Use custom settings:</b><br>Group: <b><i>$forumpermission[title]<i></b></span></td></tr>\n"
Save and upload the file to your admin directory and that's it! Enjoy the hack.

If you have any problems with this hack, please do not email or PM me. Post them to this board so that others can benefit from our experiences.

Show Your Support

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

Comments
  #12  
Old 01-25-2002, 05:28 PM
Stretchr's Avatar
Stretchr Stretchr is offline
 
Join Date: Dec 2001
Location: Georgia, USA
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it's working well for you. If anyone runs into a bug or a problem, please feel free to post it here so I can get you fixed up!

Quote:
Originally posted by Shenlong
Installed it and my hackers (not real hackers, just ppl who do stuff on my forum) are jumping for joy! thanks so much and i really enjoy the hack..well...they do
Reply With Quote
  #13  
Old 02-01-2002, 05:05 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack...wish I would have seen this earlier.
Reply With Quote
  #14  
Old 02-04-2002, 07:04 AM
Stretchr's Avatar
Stretchr Stretchr is offline
 
Join Date: Dec 2001
Location: Georgia, USA
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FYI, this hack has also been tested and works as written on vB 2.2.2 final.
Reply With Quote
  #15  
Old 05-23-2002, 03:35 AM
rstark rstark is offline
 
Join Date: May 2002
Location: Honolulu, HI
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For VB version 2.2.5, it doesn't show the (COPPA) Users Awaiting Moderation group in the table.
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 02: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.04077 seconds
  • Memory Usage 2,265KB
  • 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
  • (8)bbcode_php
  • (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
  • (1)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