Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Read or change Custom Forum Permission
TitanKing
Join Date: Mar 2005
Posts: 19

by TitanKing TitanKing is offline 12 Jul 2005

Well after a HELL of a strugle I figured this out, im sure itl help many more writing or trying to write a mod...

You can also change permission with this simple script...

First you need this set of Functions:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now lets see what permission a specific user has with this :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You will get a return Value of say : 917503, this is actually a bitfield that when converted to Binary you get a bunch of switches 110111111111111111111, which controlls the permission of the Forum...

Now lets continue... things will start to make sense now...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Notice the bits at next to each setting, this is the actual bit you will use with the defined variables in the function above, say you need to know if a specific user has "can_upload_attachments" permission for say ForumID = 3, you will do the following :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

a Return value of 0 for false and 1 for true will be returned, the rest of the functions is to change permission the same way as above example...

An here is a little sample script how this can be used in practise...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Cheers :squareeyed:

You may also need to know how to use the functions :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by TitanKing; 13 Jul 2005 at 08:45.. Reason: Automerged Doublepost
Views: 2255
Reply With Quote
Comments
  #2  
Old 10 Oct 2005, 23:56
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
Where exactly can I use this?
These functions are not defined in vBulletin. Also, why would you want to create a new set of bitfields for forum permissions if vBulletin already has its own set?
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 08:20.

Layout Options | Width: Wide Color: