redbullmarky Posted October 12, 2006 Share Posted October 12, 2006 chaps - please take note of the original question. whilst this is all good, and i'm picking stuff up from the argument that i didnt know before, the arguments of hex vs dec, encapsulation vs constants, etc are not gonna help the OP.you both know your stuff - that's pretty obvious - but can you possibly stick to the topic and present a solution rather than a "best practice" argument?cheers Quote Link to comment https://forums.phpfreaks.com/topic/23364-usergroup-permissions/page/2/#findComment-108082 Share on other sites More sharing options...
roopurt18 Posted October 12, 2006 Share Posted October 12, 2006 [quote author=Jenk link=topic=110890.msg450740#msg450740 date=1160615509]Don't have to use hex, can stick with decimal..[code]<?phpif (!($perm ^ 2)){ $perm = $perm | 2;}?>[/code][/quote]2 looks like a literal to me.redbull, it would appear that the original question has been answered and that the topic has been changed to, "How do we design a system that can handle not only permissions for a forums module, but any other module we decide to add in the future?" Quote Link to comment https://forums.phpfreaks.com/topic/23364-usergroup-permissions/page/2/#findComment-108088 Share on other sites More sharing options...
Barand Posted October 12, 2006 Share Posted October 12, 2006 @Roopurt & JenkI agree with redbull. Cut out the irrelevant arguments, as far as the topic concerned, or I'll knock you heads together and close the thread. If you want to argue the point ad nauseam, do it in the miscellaneous forum. Quote Link to comment https://forums.phpfreaks.com/topic/23364-usergroup-permissions/page/2/#findComment-108089 Share on other sites More sharing options...
Jenk Posted October 13, 2006 Share Posted October 13, 2006 [quote author=roopurt18 link=topic=110890.msg451135#msg451135 date=1160688339][quote author=Jenk link=topic=110890.msg450740#msg450740 date=1160615509]Don't have to use hex, can stick with decimal..[code]<?phpif (!($perm ^ 2)){ $perm = $perm | 2;}?>[/code][/quote]2 looks like a literal to me.redbull, it would appear that the original question has been answered and that the topic has been changed to, "How do we design a system that can handle not only permissions for a forums module, but any other module we decide to add in the future?"[/quote]Nice of you to ignore my reply after that ;)I'm done. Quote Link to comment https://forums.phpfreaks.com/topic/23364-usergroup-permissions/page/2/#findComment-108220 Share on other sites More sharing options...
VBAssassin Posted December 3, 2008 Share Posted December 3, 2008 [quote author=Jenk link=topic=110890.msg450747#msg450747 date=1160616785]Constants break encapsulation.[/quote]Not always...[code]<?php class messages { const TYPE_ERROR = 1; const TYPE_CONFIRM = 2; function add_message($message, $type = TYPE_ERROR) { } } //normal use $message = new messages(); $message->add_message("Well done!", messages::TYPE_CONFIRM); $message->add_message("Warning though, don't do this again", messages::TYPE_ERROR); ?>[/code]Source: http://www.coderprofile.com/networks/discussion-forum/1694/is-there-a-name-for-thisKind regards,Scott Quote Link to comment https://forums.phpfreaks.com/topic/23364-usergroup-permissions/page/2/#findComment-704966 Share on other sites More sharing options...
Daniel0 Posted December 3, 2008 Share Posted December 3, 2008 Kind of old topic to bump to make a point... Quote Link to comment https://forums.phpfreaks.com/topic/23364-usergroup-permissions/page/2/#findComment-704983 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.