PDA

View Full Version : Admin permission convention.


Carnage
07-25-2008, 04:15 PM
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.