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

y2kbgy2kbg New
edited November 2006 in Vanilla 1.0 Help
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.

Comments

  • I am guessing you want categories that can be read, but not posted to except by certian roles (i.e. administrators).

    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?
  • y2kbgy2kbg New
    edited November 2006
    wait, was yours able to select whitch roles were blocked, if so that is all i needed, but yes just the oppsite of what yours does now,visible by selected roles in the grid but only postable by the admin.
  • Permissions are fairly easy to set up in an extension: $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.
  • wallphone did you ever complete your hiding categories extension you were making for me? Becuase I tried the code you have in my discussion and it still has the categories I want hidden show up on the discussion Overview page. Pretty much all it did was hide showing the discussions underneath the categories on the discussion overview page, but still has the category visible and if you click on the category it displays all the topics. I need all of that hidden with still allowing people to reply to topics I make in them.
  • edited November 2006
    I haven't tested it with discussion overview, but my guess is it needs overview to be modified a bit. (I.E. adding something like CategoryID NOT IN ('3','5') to SQl somewhere)

    I will take a look sometime.
  • ok thanks I appreciate it, I really want this extension to work with discussion overview. ^.^
  • all i need is the ability to block certain catagories from appearing in the pick whitch catagory drop down box on the new dissusion page for all roles but admin. so how to i bnlock it from that menu.
  • edited November 2006
    Crazy: Discussion overview is easily enough modded, add these lines (with your blocked category IDs of course) after the end where group on line 50: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 and CB 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.
  • No way that i could qrite a custom extension?
  • hmm when I tried that it just blocked everything on the discussion overview page lol.
  • tryed what making extension or what wallphone said?
  • what wallphone said.
  • y2kbgy2kbg New
    edited November 2006
    so
  • OK i think i will hardcode the 3 catagorys i want into a custom theme. any other sugesstions?
This discussion has been closed.