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/myurl.com/subdomains/forum/httpdocs/extensions/CategoryRoles/default.php on line 78
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
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.
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
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.
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.
Comments
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.
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
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.
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?
Anyway, I MUST correct this for long now. I'll try to do it today.
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?
Did you enable the extension?