Oh, I'm really sorry. I now looked up the code, and this functionality only exists in Serendipity 1.1 versions. There you have a new dropdown option "Current Author" for the dropdown.
You should be able to just use that categories plugin from the 1.1 base and replace it with the code you have in your 1.0 version. Just replace the whole serendipity_categories_plugin class in your include/plugins_internal.inc.php with this code:
If that's too complicated (which I'm sorry for...), I suggest you to go with the HTML nugget approach. :-/
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
But unfortunately this does not seem to be the solution for this problem. As you can see in the following link I now have the option »CURRENT_AUTHOR« but the categories are still visible on the frontpage.
if ($which_category === "login") {
$which_category = (int)$serendipity['authorid'];
if ($which_category === 0) {
$which_category = -1; // Set to -1 for anonymous authors to get a proper match.
}
}
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
that is a step forward. Now I can only see the categories when I'm logged in. If I'm not logged I cannot see any category although I can see the entries from a category which everyone can read. The entries from a category which Administrators can access only are hidden correctly.
Best regards and thanks for your quick replies
Lumpy
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I think there is a misunderstanding. Although it is a step forward I don't think it is the final solution. The problem is that when I'm not logged in I cannot see any category although I should see the category which everyone should see.
Example:
Category
IT permissions: read:everyone write:Administrators
Super permissions: read:Administrators write:Administrators
--Unter1 permissions: read:Administrators write:Administrators
When I'm not logged in I cannot see any category but I can read the entries from »IT«. Logged in I can see all categories and all entries.
Oh, okay, then it was indeed a misunderstanding. Do you have phpMYAdmin access? Could you give me the dump of your serendipity_categories table? I'D like to see what the "authorid" is set to in your categories...
regards,
garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hm, strange. The authorids of the categories that are for "All authors" should be "0" instead of "1".
I'll try to investigate the code why this is so.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Your conclusion is absolutely correct. I simply changed the »authorid« for the category which should be visible to »All Authors« from »1« to »0« and then all categories and entries were displayed as expected.
I had a look in the code; the "authorid" is set to "0" only if the "Write" permission to a category includes the "All Authors" information. Does your public category have that, or did it only set the read-access to "All Authors"?
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
No, that's exactly what I mean! If you set both to "All Authors" it should show up like you wanted in the category section there.
However of course it might not be what you want, that all authors can write into that category, so I consider this not to be a final solution. The problem is that the category fetching code is also used when we fetch the list of categories one can write into - this is why the "authorid" of a category is set of the "owner" of a category. It is only set to "0" if all authors can write into that category.
It seems that the only way to show a read-based category list on the frontend is to make a manual plugin or modify the plugin code some more to make a distinction between the different category fetch happenings.
Will try to do that now.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/