With this extension enabled, when I sign out I get this at the top of my forum,
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Notice: Undefined index: Blocked in /home/hudson/misc/dcb8www/public_html/forum/extensions/PanelCategories/default.php on line 27
Thought I'd let you know.
Alex
I have the same problem. It doesn't happen when I'm logged in. It happens when I go to my test forum and am not logged in. It only seems to happen on the Discussions tab and on any Page tab I created in PageManager. I am testing locally.
if anyone has a better idea for how the HTML output or CSS should be formatted in this extension, let me know. i'm all ears.
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.
ok, add-on is updated. looks great in firefox 1.5 and ie6. thanks again pbear!
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?
@Xandi: You have to add some rules to the .htaccess file. Check this post:
http://lussumo.com/community/discussion/2803/search-engine-friendly-urls-breaks-extension-manager/#Item_10
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!
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!