Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 13

CurtisOdenconnectrgarygaryleafmonsterx00422 +7 guests

dl class for hidden discussions?

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

  • Posts: 5,574
    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
  • Posts: 4,883
    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";
  • Posts: 5,574
    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
  • Posts: 921
    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.
  • Posts: 4,883
    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.
  • Posts: 921
    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?
  • Posts: 4,883
    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.
  • Posts: 8
    mark, that fix applies another class to all the regular visible discussions, i want the class to just be applied to hidden discussions.
  • Posts: 4,883
    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";
  • Posts: 8
    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.