Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #16  
Old 21 Feb 2006, 02:38
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Real name: Fillip
This thing doesn't actually work. (3.5.3)
After the first check of permissions, the static $adminpermissions; takes over, to which the custom permissions are not added.

Therefore an alternative solution is required.
I will look deeper into it tomorrow.
Reply With Quote
  #17  
Old 21 Feb 2006, 07:36
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
You're right. Must have missed that issue as I only had one custom navgroup - and it was the first one.

I tweaked the code a bit to get around this.
Reply With Quote
  #18  
Old 21 Feb 2006, 11:59
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Real name: Fillip
Allow me to point out two facts:
  1. static doesn't work through eval(). Believe me, I tried. I worked with this for 3 hours straight yesterday XD
  2. You might not actually have to run a new query:

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

    I tested this code on localhost yesterday, and it works like a charm, no extra queries involved unless for some reason it won't work like it should without

EDIT: This randomly doesn't seem to work for OLD administrators, and only in the ACP menu.
In my custom menu it works fine, it just doesn't work in the cpnav_ menu.
EDIT #2: I fixed it now. Made it so it doesn't query unless for some reason it didn't fetch the permissions properly. Also I replaced the * in the query for a slight load decrease =P

Last edited by Revan; 21 Feb 2006 at 12:36.
Reply With Quote
  #19  
Old 21 Feb 2006, 16:58
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Well ... as of vBulletin 3.5.4 $admin is there by default

The following code might work cross-version?


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


Last edited by Andreas; 21 Feb 2006 at 17:03.
Reply With Quote
  #20  
Old 21 Feb 2006, 18:27
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Real name: Fillip
It might, but due to the fact that I don't actually use the $admin variable, I don't know if I need to change the code.
I don't really see how changing the variable name would help in solving the original problem, though. I just tested the new plugin with some slight alterations and it works.
I cba to "remake" it into your "customadminperms" format so Ill just give it like I use it:

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

Tested to work on 3.5.3 and 3.5.4.
I think that's a pretty efficient way of doing it, as it only runs 1 additional query for ONE admin (out of the ~10 I tested it on, non-superadmins that is).
So yeah, tis odd, but meh =P
Reply With Quote
  #21  
Old 21 Feb 2006, 18:29
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Yeah, that should work without causing any additional queries in 3.5.4 as $admin contains the full row.

Last edited by Andreas; 21 Feb 2006 at 18:34.
Reply With Quote
  #22  
Old 21 Feb 2006, 18:33
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Real name: Fillip
Edit: didnt see your edit
Reply With Quote
  #23  
Old 21 Feb 2006, 18:36
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
So, that means?
Reply With Quote
  #24  
Old 21 Feb 2006, 18:43
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Real name: Fillip
That means its all good, lol.
Not only will that not cause any extra queries on 3.5.4 in general, it will only cause one extra query for the rare occurrence where for some reason it won't work without re-querying

Thanks for going through this with me and for releasing 3.5.4 4h after I had spent ages testing the old code you see in a few posts back (*kicks*)


//peace
Reply With Quote
  #25  
Old 21 Feb 2006, 19:19
Luggruff's Avatar
Luggruff Luggruff is offline
 
Join Date: May 2005
Nice!
You look like you know your stuff

would you be able to make a guide on [How-To] create custom admin or mod type of usergroups

so that we can like make a seperate moderator usergroup that is used for the moderators that are only moderators by forums, and not by usergroup.. and so on?
__________________
In need of a forumspace? Click here!
Reply With Quote
  #26  
Old 27 Feb 2006, 04:28
xlguy's Avatar
xlguy xlguy is offline
 
Join Date: Feb 2004
Hi, does anyone know how you can have better control over the AdminCP functions for users that are co-admins? For example I want to disable them from the User Ranks area but there is no option for this in Adminstrator Permissions table.
Reply With Quote
  #27  
Old 12 Mar 2006, 20:55
cRaZy-BoY cRaZy-BoY is offline
 
Join Date: Feb 2005
how can i make a new bitfield xml file?
Reply With Quote
  #28  
Old 07 Jul 2006, 16:33
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Real name: Jeremy
Install and Uninstall for the product code?
__________________
Do not request support through any other means except the forums.

Useful Post With Links on Learning How To Develop vBulletin Plugins

Latest Modification: Stop Forum Spam Integration
Reply With Quote
  #29  
Old 08 Jul 2006, 06:03
KuJoe KuJoe is offline
 
Join Date: May 2006
I'm sorry but I don't understand this:

customadminperms[canadminmyhack] must the Name of the Bit(field) you want to use, $vbulletin->bf_misc_customadminperms['canadminmyhack'] the Value of the Bit
I'm also confused about the Bit Field XML...

Nevermind, I'll just wait around for a guide made for a newbie.

Last edited by KuJoe; 08 Jul 2006 at 06:22. Reason: Automerged Doublepost
Reply With Quote
  #30  
Old 28 Jul 2006, 18:08
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Real name: Jeremy
can_administer I can't seem to find in my hooks for vB 3.5.4! What header is it under?
__________________
Do not request support through any other means except the forums.

Useful Post With Links on Learning How To Develop vBulletin Plugins

Latest Modification: Stop Forum Spam Integration
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
Forum Jump


New To Site? Need Help?

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

Layout Options | Width: Wide Color: