Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > General Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Short tips: Remove the method "save it wether you don't change anything"
deathemperor's Avatar
deathemperor
Join Date: Jul 2003
Posts: 1,270

 

HOL
Show Printable Version Email this Page Subscription
deathemperor deathemperor is offline 03-21-2005, 10:00 PM

As everyone knows hacks released using Vbulletin Options and Usergroup permissions mostly ask people to go to edit its vboptions and/or usergroup permission and then save it wether you make change or not so that it will cache. This is usually problematic, because the end-users don't know what it really does (saving no changes is just saving nothing) and so they forgot hence problem occurs. I believe there's at least 10% of questions asked in the hack thread is about this.


SOLUTION: *apply for install scripts only*

This method can be removed if the coder insert just 2 simple functions:

build_forum_permissions()

Location: adminfunctions.php

This function rebuild the usergroup permission, it's called whenever you edit a usergroup. In the coders side, when they insert new permission by running a sql query this isn't called thus the new permissions are not built.

So then whenever you make a new permission for usergroups, just add a line below and life will be easier:

PHP Code:
build_forum_permissions(); 
build_options()

Location: adminfunctions.php

this is what vb staffs commented for this functions:

PHP Code:
// reads options from the setting table and serialises them from the $vboptions[] array
// then saves data back into DB 
This function runs 2 queries, one SELECT and one UPDATE.

as above, after inserting new value to the table 'setting' manually just add this line below

PHP Code:
build_options(); 
If you're getting error telling that cannot find build_options() function, place this line above:

PHP Code:
require_once('./includes/adminfunctions.php'); 

I hope I won't see hacks that have this line: "Go to your ACP and edit any usergroup then just press 'save' even you change nothing for the hack to work." ^^

That's all.
Reply With Quote
  #2  
Old 03-30-2005, 11:20 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, this is very usefull
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:51 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.03659 seconds
  • Memory Usage 2,200KB
  • Queries Executed 15 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)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