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.

Discussions Catagory black-list

edited August 2008 in Vanilla 1.0 Help
I created a very simple plugin based on David (removed unnecessary stuff and kept stuff that I didn't know what it did) and one large internal-error later, I got something reasonably useful. Basically here's the gist of it: My forum doubles as a blog for the website (one category is dedicated to it) and I display the latest post somewhere else on the website. However, I didn't want it to show up on the discussions tab of the forum. So I made a plugin based on David to make sure that all posts from category 8 don't show up. I think that with some help from someone more versed in creating plugins, this could be turned into a plugin that can prevent any category (based on name, not id-number) from appearing in the discussions tab (or maybe even support multiple categories). The preferences could show checkboxes for all categories and those checked are "blacklisted". - Art


  • Options
    edited August 2008
    Package up what you've got and post it up here then :D (this isn't an offer of help, I don't have time, but if you have something for others to look at, they might be more willing to assist ;))
  • Options
    Been there, I understand. :) (not really temp, it'll be there until this thread gets somewhere) What the current one does is remove any posts from category 8 from displaying on the discussions page. The problem is that if (for whatever reason) that ID changes, it's broke again. Also, I commented out the DB connection lines because they were in David, but I found them unnecessary. Also, I don't know what the loop in the middle does, so I left it ... there was a lot of unused code in David! (no offense meant to the author) If I knew more about what was available, I could probably do this ... but basically there needs to be a hook in that when the preferences are called for this plugin, it shows checkboxes for each current category (this is assuming you don't have loads of categories) and then when the discussions page is called, not show any of the checked categorys' posts (so basically morph the AddWhere calls to find the Category name and pair it with the Category ID, and "remove" things with that ID). - Art
  • Options
    Oh, I named it BlogBeGone because that's what I used it for ... removing the blog category. However if this were to handle more than just one category, it should be named something like DiscussionsCategoryBlacklist or whatever feels best, it doesn't even have to relate to what it does (been there too :) ...
This discussion has been closed.