Page 2 of 2
Re: Security Advice needed, re: Group vs Category
Posted: Thu Nov 12, 2009 10:15 pm
by garvinhicking
Don Chambers wrote:Did you activate the smarty option in the category plugin? It is the last option for the plugin labeled "Enable Smarty-Templates? "
Oh Don. You're surely absolutely right. Glad you thought about this one!
Regards,
Garvin
Re: Security Advice needed, re: Group vs Category
Posted: Fri Nov 13, 2009 3:48 am
by Stosh
Garvin, Don...
It worked !
I had Smarty templates shut off, turned it back on... That's all it took.
The catdepth variable, turns out to be origin-0 (php, apparently is inspired by perl

)
Here's the code
Code: Select all
<ul id="serendipity_categories_list" style="list-style: none; margin: 0px; padding: 0px">
<li> What is this now?</li>
{foreach from=$categories item="plugin_category"}
{if $plugin_category.catdepth < 1 }
<li class="category_depth{$plugin_category.catdepth} category_{$plugin_category.categoryid}" style="display: block;">
{if $is_form}
<input style="width: 15px" type="checkbox" name="serendipity[multiCat][]" value="{$plugin_category.categoryid}" />
{/if}
{if !empty($category_image)}
<a class="serendipity_xml_icon" href="{$plugin_category.feedCategoryURL}"><img src="{$category_image}" alt="XML" style="border: 0px" /></a>
{/if}
<a href="{$plugin_category.categoryURL}" title="{$plugin_category.category_description|escape}" style="padding-left: {$plugin_category.paddingPx}px">{$plugin_category.category_name|escape}</a>
</li>
{/if}
{/foreach}
</ul>
This include my debug line (what is this now). The test for < 1 gives just the top-level categories.
THANK YOU !
-stosh
Re: Security Advice needed, re: Group vs Category
Posted: Fri Nov 13, 2009 4:47 am
by Don Chambers
@ John - glad to hear it worked out. The symptoms just sounded to me like the option was not enabled. Lucky for you, I actually did a custom category template once upon a time or I would have never thought about it.
@ Garvin - does this mean I won a t-shirt? Coffee cup? Pen? Round trip ticket to DE so I can meet some of the EU S9Y developers? I have never done Rock Band, but I think I can handle it if I have to! I'll have Judebert on bass!!

Re: Security Advice needed, re: Group vs Category
Posted: Fri Nov 13, 2009 8:01 am
by garvinhicking
Hi Don!
Well, if you can arrange a sleepover in the same room like our cat, there's always a place if you happen to visit cologne!
Regards,
Garvin
Re: Security Advice needed, re: Group vs Category
Posted: Fri Nov 13, 2009 3:18 pm
by Don Chambers
garvinhicking wrote:Hi Don!
Well, if you can arrange a sleepover in the same room like our cat, there's always a place if you happen to visit cologne!
Regards,
Garvin
I love cats..... they taste like chicken!!!

Re: Security Advice needed, re: Group vs Category
Posted: Fri Nov 13, 2009 4:25 pm
by Stosh
re: "I love cats..... they taste like chicken!!!"
True cat-lovers know that they're often thinking the same thing when they look at their masters.
-stosh
Tags for content, Categories for security?
Posted: Tue Jun 15, 2010 5:13 pm
by Stosh
Hello again.
Just to bring this older topic up to date. I was wondering how to use the categories for both context and for security, and was having trouble coming up with a security-strategy in the face of the overloaded category (responsible for both security and context).
With a lot of help from you, we came up with a strategy that works fine: Use the top-level categories for context, and the next level down for access. i.e.,
- Red things (open to all access)
- L0010-Red things (restricted access)
- L0100-Red things (more restricted access)
- etc.
- Blue things
So, this works fine. But now I've started messing with the tag thingy. I'm thinking it may work even better to use the categories for access categories, and use the tags for context categories. If this works I can even get rid of the special-code that only displays the top-level categories in the index.
Couple of questions:
1. I'm just getting started with the tag plugin. Do you see any pitfalls or unintended consequences to using Categories exclusively for security access groups, while using tags for context categories?
2. What is a leaf tag? As far as I can tell, it's just a tag that only has one entry at the present moment? No?
Thanks for your help.
-stosh
Re: Tags for content, Categories for security?
Posted: Wed Jun 16, 2010 9:25 am
by garvinhicking
Hi!
That should work, I think. Categories make it a bit easier to use with Template coding; the output of the freetag plugin is a bit harder to manipulate. But I would definitely check it out in your setup.
2. What is a leaf tag? As far as I can tell, it's just a tag that only has one entry at the present moment? No?
Exactly.
Regards,
Garvin