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.


This discussion is related to the CategoryRoles addon.
Max_BMax_B New
edited June 2008 in Vanilla 1.0 Help


  • I'm getting an error with the latest version of vanilla on pretty much all my pages: Notice: unserialize(): Argument is not an string in /var/www/vhosts/ on line 78
  • Did you add the required delegate, as explained in the readme?
  • was the delegate eventually added to vanilla
  • Nope.
    Mark never commented this delegate request and I don't know if he forgot to add it or what…
    Anyway, I'm planning to rewrite part of this extension to use the object factory instead of delegate, mostly because this would allow a much better database optimization, but I don't know when I'll have time for.
  • How will object factory solve ur problem. can u explain.
    I'm trying to make a blog extension and i really need this functionality, Ability to be commented and read by all, but posted by just one role
  • see the doc about it:
  • About your need: use CategoryRoles, adding the delegate is only a single line edit.

    About the object factory: by overloading the standard class by a custom one, I'd be able to add the required database join and save the delegate need. Also a single database request is much better than 2 or 3.
  • how will overloading a class affect future changes in the class. if mark adds some additional stuff to the class?
  • …the custom class must be updated accordingly. Every feature has a cost.
  • could this work?
    if ($Context->SelfUrl == "post.php") { function discussionform_hidecategory($DiscussionForm) { unset($cs->aOptions[$Configuration['APPLICATION_PATH']]); } $Context->AddToDelegate('DiscussionForm','DiscussionForm_PreCategoryRender','discussionform_hidecategory'); }

    well i obviously tried and it doesnt. probably because i dont get the $cs object. is this why you didnt use delegate?
  • $cs is a select box. in this case its a categoryselect box <select> $cs->aOptions are the options <option> plus its a 2D array aOptions = array (0 => array( idValue => "ID", DisplayValue => "Display", Attributes => ""), 1=>.......... you should start using a php debugger.
  • Great add-on - greatly needed! I'm having a bit of a problem, tho - I am getting the same error messages as quoo above. I've added the delegate, as instructed, and am using the theme included with the package. I've cmod all CategoryRoles files/folder to 777 "just in case", and I'm still having the error messages thrown in the manage Categories pages, and where you actually read the discussions inside the Categories. I'm a bit stumped... any insight? I'd greatly appreciate it! Thanks in advance, drw
  • @drweyant: Its probably because setting are not initialized. Did you see this post?
    Anyway, I MUST correct this for long now. I'll try to do it today.
  • Uploaded version 0.6 of CategoryRoles.
  • The 0.6 version correct the initialization bug and merge with Vanilla 1.1.2 theme file.
  • Uploaded version 0.6 of CategoryRoles.
  • edit: <oops, didn't add the delegate>
  • I'd love to get this working on my installation if someone could give me a hand? I've installed the pseudotheme, but the delegate keeps giving me errors when I add it.

    There's also a post by MySchizoBuddy in the other discussion thread that says the delegate was added into the Vanilla core? I can't see the new role based controls at all.

    Any ideas?
  • @Alty: The delegate is already there in 1.1.4 (since ?) you do not need add it.
    Did you enable the extension?
  • Yep, the extension is enabled. I am running 1.1.4 and I've removed the delegate so the forums still run. Where should I be looking for the category roles options? I assumed within the Categories page, and then clicking on a specific category. But the only options in there are Read only access // Read & Write access // No access.
Sign In or Register to comment.