Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Remove Category Drop Down Box

akapopeakapope New
edited September 2012 in Vanilla 2.0 - 2.8

I need to remove the category Drop Down Box in the 'Start a New Discussion' page. I've been looking at the /applications/vanilla/views/post/discussion.php file but I can't figure out how to alter the little code that handles this drop down box.

I'm trying to allow anonymous posting in a certain category, with users actually being able to view the contents of the category. I am embeded in WP, and trying to remove any link back traces of other categories, as well as cleaning up the "new discussion page" in order to make it look like more of a 'fill in the form' sort of page. But, with the drop box removed, I am either not selecting a category at all, or the discussions just get posted in 'General'

Thoughts?

Comments

  • Options

    Essentially you are saying you want guests only to view one ccategory and only post in one category.

    Have you tried

    e.g.

    1) create a category in dashboard called Guest Posting with custom permissions give permissions for guests to post.

    2) change all the other categories to custom permissions not allowing guests to post or view.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    You cant give guests permission to post not in 2.0 or 2.1

  • Options

    right you are.

    From your first comment it seems that you have got a way for anonymous user to post. You just haven't figured out out to prevent them from posting in certain categories. In that case change all the other categories to custom permissions so they require a certain role to post or view.

    if my reading of what you have is wrong - maybe a combination of anonymouse plugin and custom permissions in categories.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    That would work to deter posting where its unwanted. The next problem though is that my boss wants that drop down gone because of the way it looks.

    If you only have permission to post in a single category, does the drop box disappear?

  • Options
    peregrineperegrine MVP
    edited September 2012

    Best I can say is try it. Sorry I don't know off hand. You could always try to hide it via jquery - if the page is on the particular category where only one category is available, assuming the category option select default is that category.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    akapopeakapope New
    edited September 2012

    Alright, thanks. When I get home I will post the code I'm looking at in order to delve deeper into this

  • Options
    akapopeakapope New
    edited September 2012

    echo $this->Form->CategoryDropDown('CategoryID', array('Value' => GetValue('CategoryID', $this->Category)));

    if I remove 'echo', it doesn't. Actually, the only change I can make is to write it as
    echo $this->Form->CategoryDropDown('CategoryID')

    so....how do I remove it, and the form still "automagically" select the proper discussion?

    I have the form embed in wordpress using 'window.location.hash = "/post/discussion/2";'

  • Options
    peregrineperegrine MVP
    edited September 2012

    final answer....

    Once again hide it (commenting out echo is not the same as hiding).

    write yourself a plugin that calls the .css

    div.Category {
               display:none
              }
    

    or use jquery to hide div.Category based on the CATEGORY you are viewing and/or permissions

    download a few plugins and study them and then write one.

    Find someone to write the plugin for you, if you want to sponsor it.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Sorry, I didn't see your edited post.

    Hiding it makes sense. I will study up on jquery and see what I can work out.

    Thanks for all your help peregrine, when the site is up and running, I will send you the link.

    -Ben

  • Options

    Glad it wan insightful.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.