{if count($category_info) > 0}
You are in category restriction mode
{else}
You are browsing this page without category restrictions.
{/if}
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/
I didn't have a look at your *.tpl files at all yet, so I can't comment on where you actually need to put that.
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/
Sorry for bumping this thread, but i've a question related to it.
If i select multiple categories via the categories plugin, it shows them correct with the url http://myblog/index.php?frontpage
But i would like to get an url like: http://myblog/index.php?serendipity[category]=1;2;3
The reason is that the users are able to create a bookmark to the categories they want.
Is there any way to do this?
For that, you can enable the "Smarty templating" option of the categories plugin, then edit your plugin_categories.tpl and change the POST method to GET; this should put everything into the URL bar to be able to bookmark that.
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/
Thanks for your answer.
It indeed shows the categorys in the link, but after that, content of all categorys is shown, even if only some are selected: http://myblog/index.php?serendipity[mul ... ltiCat]=Go!
In other words, the filter doesn't work anymore after changing to GET
Hm, okay. Seems the serendipity code then checks on POST and not on GET.
Since usual FORM checkboxes only work as arrays and cannot append to a single variable, I think what you want to do is now possible this way.
You can do more tricky coding by writing smarty code that iterates the $categories arrays and create a link that users can bookmark; bookmarking the resulting page won't really work, as with all POSTed forms.
Another way would be to write a small event plugin that listens on the frontend_configure event hook, accepts the incoming GET data and autoconvert it to POST, so that s9y can operate on it.
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/
An URL like http://myblog/index.php?serendipity[category]=1;2;3 would work, i have to try whether i can edit the plugin_categories.tpl in a way that it returns the URL like that.
But i am not sure about to have success, since i'm not familiar with php.
But thanks anyway for your help.