vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Admin permission convention. (https://vborg.vbsupport.ru/showthread.php?t=186351)

Carnage 07-25-2008 04:15 PM

Admin permission convention.
 
What the convention on creating new admin permissions?

Two mods i've written/am writing will need admin permissions. I was wondering what the convention for adding them was. (i've read the post found by searching custom admin permissions on here however it didn't really answer my questions...)

Opserty 07-25-2008 05:46 PM

What do you mean by "convention"?

Here is the article: https://vborg.vbsupport.ru/showthread.php?t=95918

Carnage 07-25-2008 09:59 PM

bleh. Re-read the article, makes a bit more sense now.

I'd misunderstood it as it had used the field name customadminpermissions. Thought this was what you /had/ to use, this could obviously cause clashes between mods... ergo i was wondering what the convention for assigning the permissions was.

Now as i understand it, you can use any custom var name to store your admin perms in.

Opserty 07-25-2008 10:49 PM

Pretty much.

Marco van Herwaarden 07-26-2008 08:10 AM

It is always good practise to prefix all your variables etc.. with a modification specific prefix. This will avoid clashes between modifications (or future versions of the core vBulletin).

Personally i always use 'mh_XXX_'.

'mh' to make it unique to me.
'XXX' identification of the modification

Carnage 07-26-2008 05:31 PM

i've gone and used the product id for the fields. Seemed logical.


All times are GMT. The time now is 05:09 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.01044 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete