Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
wallphone made a catagory hider but i need help changing it
y2kbg
New
Wall phone made a catagory hide thats does the same thing as blocking it but i need one that can apply to only certain roles and allow them to see the post in the disscusstion grid(but still have that catagory hidden in th dropdown list so they cannot post to that catagory.
0
This discussion has been closed.
Comments
This seems opposite to what my category hider extension was written to do--It hides but allows posting.
I guess you want more specific permissions per role category... Maybe multi-roles could fit the bill?
$Context->Dictionary['PERMISSION_BLOCK_CATEGORY'] = 'Block hidden categories'; $Context->Configuration['PERMISSION_BLOCK_CATEGORY'] = '0'; // Default permissions if ( $Context->Session->UserID > 0 && $Context->Session->User->Permission('PERMISSION_BLOCK_CATEGORY') ) { // rest of extension code goes here }
Then if you go into settings, you will see a 'block hidden categories' check box. Check that box and the extension should only run for that role.
CategoryID NOT IN ('3','5')
to SQl somewhere)I will take a look sometime.
foreach ( array('5', '6') as $CurrentBlock ) { $S->AddWhere('cb', 'CategoryID', '', $CurrentBlock, '<>', 'and', '', 0, 0); }
If you copy directly from my code on your server, note that
$S
is used instead of$SB
andCB
instead of't'
y2k:
Go into your settings tab, click on the role name you want to change permission for, and uncheck the 'start discussions' box. If you want to keep that person from commenting in that discussion, remove the 'add comments' check also.
Problem is this will work across all categories... I suspect you can give back permission to post in other categories with Jazzman's multi-roles extension, but I haven't used it personally to know for sure.
EDIT: Sorry, it looks like this ability is waiting for the next version of multi-roles.