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.

SubCategories

SubCategories
«134567

Comments

  • I get these errors.

    In the main category view:
    Notice: Undefined index: CategoryID in /home/pushing1/public_html/forum/extensions/SubCategories/default.php on line 46

    In a category with sub-categories:
    Notice: Undefined variable: SessionPostBackKey in /home/pushing1/public_html/forum/extensions/SubCategories/default.php on line 75

    ---

    This is what I was looking for to... Sweet, thanks!
  • Notice: Undefined index: CategoryID in C:\AppServ\www\vanilla-test\extensions\SubCategories\default.php on line 46 This is what i get...
  • Uploaded version 0.1.0b of SubCategories.
  • Thanks for pointing that out. I have set some initialisers for these undefined variables, so they should be gone now.
  • Uploaded version 0.1.0 of SubCategories.
  • I have been checking and altering it all morning, and have finally removed the beta status. So this is the first release of SubCategories. I have added links to parent categories in the title of sub-categories and their associated discussion topics (unfortunately I had to add a database query to achieve this... but it is the only one, so it shouldn't hurt too much).

    I also managed to clear up the last of the dashes that seems to get in the way, though I am quite sure more dashes will appear in inappropriate places (extensions will be the main culprits). I may rethink the way I remove these dashes if it is a major problem for lots of people.

    Please continue to give me your feedback on this first release.

    Thanks,

    Adam.
  • On enabling the extention all categories suddently have 0 posts on the counter. (before ordering the categories in any sub-category order)

    I'm not sure if this a problem or not.
    edit: - parent category says 0 discussions despite subcategory having posts in it. perhaps that needs to change?
    also, how many levels of sub categorys can you have? is this possible :

    Subjects
    -science
    --biology
    -technology
    --gaphics
  • I can replicate this, it is an error derived from a change to the database query which pulls the categories so that sub-categories would not show on the main categories page. I will fix it ASAP and will release 0.1.1.

    As I said in the description. I have no plans at the moment to extend to nesting categories, though I can conceive of a way that it would work quite nicely (though the coding would be complex in the background).

    Cheers,

    Adam.
  • Another little bug. When sub-categories are enabled & I try to edit/view a blog post (using the blog addon) I get the following:

    Fatal error: Cannot redeclare class CategoryManager in /home/.pilar/xxxx/xxxxxxxxxxx.com/forums/library/Vanilla/Vanilla.Class.CategoryManager.php on line 14

    seems to be some sort of a conflict.
  • I can probably fix that little problem too, (but cannot test it, so please test it in the next release).

    Adam.
  • Uploaded version 0.1.1 of SubCategories.
  • Version History:
    • 0.1.0b - First Beta
    • 0.1.0 - First Release: Added parent categories links, finished removal of redundant dashes.
    • 0.1.1 - Fixed one bug with categories beginning with only "-" and showing up as sub-categories in some places and another with category counts. General tidy up. Extrapolated SubCategories definition, and added a message to the Categories List Settings page. Also fixed a conflict with the Blog add-on (checks whether CategoryManager class exists before trying to include it).
    Okay, unless something major comes up, I think I will call it a day, and will look into this again tomorrow. (*angelic venus goes back to working on his Drupal/Vanilla integration extensions*)

    Adam.
  • Yep, seems to be working great. Is it possible however to replace 'Discussions X' on the main category page with perhaps number of subforums? Or remove that from the main page all together? Great job.
  • I may provide the ability to do this by theming in a next release (but I will not force any more theming changes on you guys), you will be able to remove the 'Discussions X' by editing the discussion.php file in your theme folder (and I will provide that variable for number of sub-forums in due course).

    Thanks for your help so far!

    Adam.
  • Thank you. Also just noticed after enabling the extension 'Announcements' stops working. No error is given. I'm not sure if this is just my forum playing up or if it's happening to everyones. Anybody want to confirm?
  • This may be a clash between the way Announcements and SubCategories are placing their content. I will investigate. (though I am not sure how exactly)

    Edit:
    It is just as I suspected... they both add their content at $Configuration["CONTROL_POSITION_BODY_ITEM"]-1, and are pushing each other's content around (it -shouldn't- disappear entirely). Exactly how it displays will probably depend on which extension was enabled first.

    You could change either Announcements or SubCategory's default.php to set $Configuration["CONTROL_POSITION_BODY_ITEM"]-1 to $Configuration["CONTROL_POSITION_BODY_ITEM"]-2 which will raise the one you edit's position above the other (do a search and replace). This is a temporary fix, whilst I work out a more elegant way to fix the problem. (*looks at the "AddRenderControl" method in more detail*)

    Adam.
  • Sweet, works pretty good now. No errors as of yet, but I'll let you know.

    Thanks.
  • Works great except this:

    "parent category says 0 discussions despite subcategory having posts in it. perhaps that needs to change?"

    Thanks.
  • sjeeps, parent categories are completely independent of sub-categories. Personally, that was my intention from the outset, I will think about it. I might make it an option (something about inheriting children categories statistics) but I quite like the idea of each category being independent (whether a sub-category or not) of each other. To me it seems illogical to have this happen:

    Main Category (with 0 posts)

    Another Category (with 20 posts)

    Now if "Another Category" were to be a sub-category of "Main Category" it would be confusing to have in the details on the main list of categories under "Main Category" a label saying that it has 20 discussions... when really it is empty... I think that having a list of sub-forums a parent category contains (or just a number) makes more sense.

    Anyways, just my $0.02.

    I will add the option in a future version, if there is enough interest?

    Adam.
  • Adam, thank you. To me it seems more illogical if it looks like this: Parent Category 20 posts (Total posts in all sub-categories) Sub Category 1 10 posts Sub Category 2 10 posts
Sign In or Register to comment.