HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.

dl class for hidden discussions?

edited October 2005 in Vanilla 1.0 Help
trying to style the listing of a hidden discussion, but im having trouble (i dont like the text prefixes, so i am adding images based on discussion status).

other discussion status lables will add another class to the dl of the thread, but this doesnt happen for hidden discussions.

bug?
workarounds?

Comments

  • Does seem like a bug but my best suggestion would be to just wait for the extra theming capabilities of the next revision. I'm pretty sure there should be a workaround..somewhere..though
  • MarkMark Vanilla Staff
    edited October 2005
    I wouldn't call it a bug - more like a feature request. But either way, you can add that to your installation by doing this:

    Open up library/Vanilla.Discussion.class.php

    Changes lines 131 to 133 from this:
    function GetStatus() {
    	$sReturn = "";
    	if ($this->Closed) $sReturn = " Closed";
    To this:
    function GetStatus() {
    	$sReturn = "";
    	if (!$this->Active) $sReturn = " Hidden";
    	if ($this->Closed) $sReturn .= " Closed";
  • Yeah i was considering it a bug on the basis that other discussion status' behaved in a different way and therefore it was a little perculiar. *strokes mark and his endless usefulness
  • NickENickE New
    edited October 2005
    By the way, mark, if you have time in your next revision could you replace the functions in Vanilla.Functions.php with a class? Because at the moment you can't change anything in them without hacking the actual files, and if someone wanted to write an extension to manipulate the way a discussion was displayed, then, well, they'd have a lot of problems. EDIT: Nevermind, just saw your post on the new template system.
  • MarkMark Vanilla Staff
    SirNot: yeah, that was a major shortcoming of 0.9.2. The template system will remove that problem - I've also made some great improvements to the extensions which will allow all kinds of funky new stuff to be done.
  • NickENickE New
    edited October 2005
    Besides the few odd functions here and there, I actually find the extension system quite adequite at the moment; pretty much anything can be changed without too much trouble. What kind of funky stuff will this new system encompass?
  • MarkMark Vanilla Staff
    One thing that bugged me was the fact that you can't just insert something into the page at any old place without going through a few headaches. I came up with a new method where events are fired at various places on the page, allowing you to attach new functions to those events and do just about anything just about anywhere. I've already rewritten a few extensions and saved myself tons of code.
  • mark, that fix applies another class to all the regular visible discussions, i want the class to just be applied to hidden discussions.
  • MarkMark Vanilla Staff
    Well, it should only put the class name on "inactive" (aka hidden) discussions. I didn't actually test it, but you could also try this:

    if ($this->Active === 0) $sReturn = " Hidden";
  • sweet dude, that works perfectly.

    man, i am modding the core files of this release so much, the next rev is gonna kill me.
This discussion has been closed.