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.
Categories In Sidebar
... asked this a while back, just wondering if anything had ever come of it??
0
This discussion has been closed.
Comments
great extensions, but it just works if i am on the startingpage.
If i'm on http://www.xy.de/board/discussions/ and then click on a new category it links me to http://www.xy.de/board/discussions/3/ , which just shows site three of the discussions site.
Would be nice if you can fix the Bug.
Greez
Here's some revisions for the Panel Categories (0.1) extension.
I replaced the appropriate section with the following. Modeled after Legends. It gets rid of the enclosing ul/li and now includes (!) the PanelCategory id, and a few other hooks:
$PanelCategoryList = "\n\t<h2>" . $Context->GetDefinition('CategoryList') . "</h2>\n\t\t<ul id=\"PanelCategories\">\n"; $CategoryManager = $Context->ObjectFactory->NewContextObject($Context, 'CategoryManager'); $CategoryData = $CategoryManager->GetCategories(0, 1); while ($Row = $Context->Database->GetRow($CategoryData)) { $thisURL = ""; if (!isset($Row['Blocked']) || $Row['Blocked'] == 0) { if ($Context->Configuration['URL_BUILDING_METHOD'] == 'mod_rewrite') { $thisURL = $Context->Configuration['WEB_ROOT']. ($Row['CategoryID'] > 0) ? $Row['CategoryID'] . '/' : 'discussions/'; } else { $thisURL = $Context->Configuration['WEB_ROOT']. ($Row['CategoryID'] > 0) ? '?CategoryID=' . $Row['CategoryID'] : ''; } $PanelCategoryList .= "\t\t\t<li class=\"PanelCatName\"><a href=\"$thisURL\">{$Row['Name']}</a></li>\n"; if ($ShowCatDescriptions) { $PanelCategoryList .= "\t\t\t<li class=\"PanelCatList\">" . nicetrim($Row['Description'], $MaxDescriptionLength) . "</li>\n"; } } } $PanelCategoryList .= "\t\t</ul>\n"; return $PanelCategoryList; }
Here's the CSS. I wanted to remove some of the !importants but it doesn't want to work (?). This imitates the default vanilla.css for Categories. Probably could be condensed a bit more (i.e. do I need the PanelCatName class?). This works in Firefox 1.5:
#PanelCategories { margin:-3px 0 0 0 !important; width:180px; list-style:none; background:#f5f9ff; } #PanelCategories li { margin:0px !important; font-size:11px !important; color:#3354aa; } .PanelCatName { margin-left:5px !important; padding:3px 5px 1px 5px !important; font-weight:bold; } .PanelCatList { margin-left:10px !important; padding:0px 5px 3px 5px !important; font-size:10px !important; color:#062971 !important; border-bottom:1px solid #ccc; } .PanelCatName a { color: #3354aa !important; text-decoration: underline !important; } .PanelCatName a:hover { text-decoration:none !important; }
Do I understand the code that this extension never bothers to show blocked categories in the side (if so, I agree with the decision) ? Just there's no CSS for "blocked".
So give 'er a spin and someone update it if it works right.
Edit: picture!
xandi, i'll take a look at that bug too.
xandi, i don't have friendly urls installed so it's hard for me to track that bug. i don't see why it should be doing that. i'll keep looking, though.
anybody with mod_rewrite and friendly urls care to take a look?
Thanks for the fast support. I tested the new .htaccess file, but it didn't work either. I seems to me that it just add the new things of the link to the old link
if i am on http://www.xy.de/board/1 and click on the category 2 the link is http://www.xy.de/board/1/2/.
Then there is the second page of category 1.
hmm don't know why, but its suck
@pbear: nice css!