Structurally, that's real easy if you combine it with Category Roles. Just set the parent category to read-only. Visually/style-wise, getting the sub-categories to show up on the main category page will require some modification of categories.php and/or sub-categories.php.
thanks timfire - do I need another add-on to make a category read only - as far as I know I can only make a category visible/invisible to certain roles and don't the ability to alter to read/write access so further info would be a great help, thanks.
For anyone that is still having problems with SubCategories not showing up because there are special characters in a Category name, the solution is simple:
I don't think this extension is working for me but I want to make sure it does what I think it does before I start troubleshooting.
What I have done... I have made the following categories: CO2 Incubators - Troubleshooting - - The Temperature is Too High - - The Temperature is Too Low Bactron User Group
There are discussions in the Bactron User Group but that does not matter since I don't need subcategories there.
In the CO2 Incubator category only the sub sub categories ("The Temperature is Too High" and "The Temperature is Too Low") have discussions in them.
I have started a discussion in "The Temperature is Too High" titled "Possible Cause is the Controller"
My Issues: In Vanilla, when I click on Categories I only see CO2 Incubators and Bactron User Group. If I click on CO2 Incubators I do not see the sub category. It says "No discussions found". Should I see the subcategory here?
The discussion I started shows up on the front page of "Discussions". When I click on it I see the post. The breadcrumb shows the cat and the sub sub cat but is missing the sub category. It is "CO2 Incubators > The Temperature is Too High » Possible Cause is the Controller". Why is the subcategory "Troubleshooting" missing?
Something is not right, correct?
Any ideas what could be wrong. I have not made any mods to the system. I have added the following themes and extensions.
Theme Blogger
Extensions AjaxQuote Applicant Email Verification Html Formatter Notify Nuggets Preview Post SubCategories
Thanks Peterbp. That worked and I saw that was even in the readme. So shame on me for not reading :).
I wanted to mention this.
As I added Categories and SubCategories they were in the correct order (just by chance). I still could not get this extension to work. I then reordered the categories (took them out of order) and then put them back in the correct order. Then everything started working. It seems (for me) that the reordering of the categories step is necessary even if they happen to be in the correct order upon creation. Might have just been my setup but I thought it might help someone else.
Installed it and worked great.
One feature request: In the categories view, could each parent topic have a listing of the sub-categories in it? A forum listing might look like:
# Support Questions
# Category description Technical help about the XO laptop. Synced with the community-support@lists.laptop.org mailing list.
# Discussions: 280 | Sub-forums: Software, Hardware, Networking
If you give me some insight into *how* to implement that (any similar code samples I could use as a reference?) I would even be willing to try. From there are other neat things we could do form their (have discussion # for each sub-forum being listed, etc), but that is just my daydreaming.
Subcategories has been working fine for me, but for some reason, recently the order of categories and subcategories has changed.
Start a new discussion -> select the category for this discussion.
From the drop down box, the categories are not in the same order as they have been placed.
I have clicked on settings and categories and they are in the original order there.
I have also tried to change the order from there, but they still show in the wrong order.
Can anybody help, please ?
Thanks in advance
Hello everyone,
I have installed the subcategory extension and it seems to be working except for the fact that they will not show up on the parent category page. I have created a test discussion and they show up in the discussions section, when you click on the discussion that was created in that subcategory along the top it shows that it is placed in the correct place. but I am still unable to view them from the parent categories page. I have edited the the categories.php file and that does not seem to wrok. can you please let me know what I can do to resolve this.
Thank you
Jesse
ok can someone fix this: ?
when notify sends an email to my members they get a link
(a private message)
if they are not already logged in
it gives errors
and it ruins the site
cuz it messes everything up
Notice: Trying to get property of non-object in /***/discussions/extensions/SubCategories/default.php on line 389
Notice: Trying to get property of non-object in /***/discussions/extensions/SubCategories/default.php on line 390
help me plz
thank you
ok; I saw in you url it had .../discussions/... in it, and it seemed as if maybe friendly urls was messing it up by adding that in, but I guess your forum must be contained in a folder called discussions?
So I installed this extension and did everything right.
Yet when I make my subcategories they always show in my top Category, and I can not figure out why.
Like so:
General
Computer
Console
- Playstation
The Playstation subcategory would show in the General category.
Another example.
Console
General
Computer
- Playstation
The Playstation sub category again would be showing in Console the top category.
Any ideas that could help me out?
Well I have abandoned the use of Vanilla due to not being able to figure this out, if anyone would like to enlighten me down the road, my aim is steven1022 and msn is justgetoffme22@gmail.com I have went with phpbb unfortunately due to the non responsive community here. Will not be returning most likely, bye.
Thank you very much for this much needed extension!
The following produces an error:
Category 1
- SubCategory 1
- - SubSubCategory 1
- SubCategory 2
- - SubSubCategory 1
Both of the SubSub categories are displayed inside of SubCategory 1, while SubCategory 2 does not contain any subcategories! (subcategory counts are correct though). Thank you.
P.S.: Please see the other discussions that I started, both titled "Subcategories: etc.". I have posted this one here since this seems to be the place where the discussion is really alive :)
To fix the problem with Notice: Trying to get property of non-object in /***/discussions/extensions/SubCategories/default.php on line 389 Notice: Trying to get property of non-object in /***/discussions/extensions/SubCategories/default.php on line 390
add the following code to default.php:389 if ($CommentGrid == null || $CommentGrid->Discussion == null) return;
Yet when I make my subcategories they always show in my top Category, and I can not figure out why. Like so: General Computer Console - Playstation The Playstation subcategory would show in the General category.
I had the same problem, and I think I found out why:
To get the Priority of the current category, default.php uses this sqlbuilder: $s = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder');
However, to find the parent, default.php uses this sqlbuilder: $s = $CategoryManager->GetCategoryBuilder(0, 1);
When you check the code of Categorymanager, you see that its sqlbuilder does not look at priorities: $s->AddSelect(array('CategoryID', 'Name', 'Description'), 'c', '', '', '', 1);
When you change the second sqlbuilder in default.php to $s = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder');
and add $s->SetMainTable('Category','c'); $s->AddSelect(array('Name', 'CategoryID', 'Priority'), 'c');
it works as it should work.
I don't understand that this extension did work as it should for other people.
Comments
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@conradslater: It's a separate add-on.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Add the following: Note that this uses the fix I provided in the comments above, so be sure to check those out too.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •What I have done...
I have made the following categories:
CO2 Incubators
- Troubleshooting
- - The Temperature is Too High
- - The Temperature is Too Low
Bactron User Group
There are discussions in the Bactron User Group but that does not matter since I don't need subcategories there.
In the CO2 Incubator category only the sub sub categories ("The Temperature is Too High" and "The Temperature is Too Low") have discussions in them.
I have started a discussion in "The Temperature is Too High" titled "Possible Cause is the Controller"
My Issues:
In Vanilla, when I click on Categories I only see CO2 Incubators and Bactron User Group. If I click on CO2 Incubators I do not see the sub category. It says "No discussions found". Should I see the subcategory here?
The discussion I started shows up on the front page of "Discussions". When I click on it I see the post. The breadcrumb shows the cat and the sub sub cat but is missing the sub category. It is "CO2 Incubators > The Temperature is Too High » Possible Cause is the Controller". Why is the subcategory "Troubleshooting" missing?
Something is not right, correct?
Any ideas what could be wrong. I have not made any mods to the system. I have added the following themes and extensions.
Theme
Blogger
Extensions
AjaxQuote
Applicant Email Verification
Html Formatter
Notify
Nuggets
Preview Post
SubCategories
Everything is up to date.
Thanks for any help
Jed
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I wanted to mention this.
As I added Categories and SubCategories they were in the correct order (just by chance). I still could not get this extension to work. I then reordered the categories (took them out of order) and then put them back in the correct order. Then everything started working. It seems (for me) that the reordering of the categories step is necessary even if they happen to be in the correct order upon creation. Might have just been my setup but I thought it might help someone else.
Jed
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •http://lussumo.com/community/?CommentID=79553
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Notice: Trying to get property of non-object in /***/discussions/extensions/SubCategories/default.php on line 389
Notice: Trying to get property of non-object in /***/discussions/extensions/SubCategories/default.php on line 390
add the following code to default.php:389
if ($CommentGrid == null || $CommentGrid->Discussion == null)
return;
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Yet when I make my subcategories they always show in my top Category, and I can not figure out why. Like so:
General
Computer
Console
- Playstation
The Playstation subcategory would show in the General category.
I had the same problem, and I think I found out why:
To get the Priority of the current category, default.php uses this sqlbuilder:
$s = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder');
However, to find the parent, default.php uses this sqlbuilder:
$s = $CategoryManager->GetCategoryBuilder(0, 1);
When you check the code of Categorymanager, you see that its sqlbuilder does not look at priorities:
$s->AddSelect(array('CategoryID', 'Name', 'Description'), 'c', '', '', '', 1);
When you change the second sqlbuilder in default.php to
$s = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder');
and add
$s->SetMainTable('Category','c');
$s->AddSelect(array('Name', 'CategoryID', 'Priority'), 'c');
it works as it should work.
I don't understand that this extension did work as it should for other people.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •