Quote:
Originally Posted by cellarius
First and foremost: Performance. Why run the whole file, go through the whole variable/template registering and rendering process etc. just to show nothing in the end?
Next, you break UI consistency by not using the usual way of handling such errors: You need to code your error message yourself instead of using the standard no permissions message, which is phrased and thus works with multi language environments.
Last, but not least: There is a standard procedure in vB to do this, and that's the way I did it. Just look at the original files. And if there is a standard way, it should be used.
Anyway, I really don't follow your argumentation - how often do your Admins need to change which usergroups get access to a custom page? This does not seem like a weekly operation to me, does it? This is a set it and forget it decision, is it not?
|
Cellarius, don't get me wrong, i'm no coder by any means, it's just thats the way i have always (not too many times) done it. As for the whole admin's....etc changing things, i was purely talking from ease of operation for myself, i have used a similar conditional to allow certain usergroups to view some content, then when i have added usergroups it made it ease for me to find and change. I wasn't questioning your method & capability, just asking for information as to why, now that i know i would implement that, but it does make it difficult for adding or removing usergroups access.
--------------- Added [DATE]1274003452[/DATE] at [TIME]1274003452[/TIME] ---------------
Could it be incorporated in a pluggin where you can state which templates cannot be accessed?
Could you also tell me how to do this in a php statement?
<if condition="is_member_of($vbulletin->userinfo, array(1, 2, 3))">.