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

Read CSS class and Discussions button

edited December 2011 in Vanilla 2.0 - 2.8

Hey! I'm trying to make Vanilla look more like other forum scripts. I've done almost everything on categories/all page. I still need to fix one functionality - if there's an unread post in category, theme has to show file "on.png", and if there isn't, it has to show "off.png". Unfortunately, I can't make it work. I'm using "Read" property as the base. Code looks like that:

$Read = $Category -> Read ? 'off' : 'on';
echo 'image';

Unfortunately, it sometimes works, but sometimes doesn't. Forums are here: http://forums.mtasa.pl/. Can someone help me? I can't really find other property which would give the result I want.

Also, is there a way of changing link of Discussions button? So it will point to categories/all instead of discussions

Best Answer

  • Options
    dfoxxdfoxx New
    Answer ✓

    pzduniak said:
    Also, is there a way of changing link of Discussions button? So it will point to categories/all instead of discussions

    you can find out more about routes here: vanillaforums.org/page/routes

    i'm not 100% on how this is supposed to work, but you can try to change the value of DefaultForumRoot and DefaultController to internally target 'categories/all'. if that doesn't work just add your own route where the route expression 'discussions' targets 'categories/all'.

Answers

  • Options
    dfoxxdfoxx New
    Answer ✓

    pzduniak said:
    Also, is there a way of changing link of Discussions button? So it will point to categories/all instead of discussions

    you can find out more about routes here: vanillaforums.org/page/routes

    i'm not 100% on how this is supposed to work, but you can try to change the value of DefaultForumRoot and DefaultController to internally target 'categories/all'. if that doesn't work just add your own route where the route expression 'discussions' targets 'categories/all'.

  • Options

    Thanks. What about read icon then? I don't really want to modify core classes in order to fix it

Sign In or Register to comment.