MyBB Hacks

Full Version: Article Gallery
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Glad it works, RocketFoot Smile
I'm sorry for bumping this thread.

@ RocketFoot: I think you should update your XThreads to the last XThreads version (v 1.7), so, your Category will not hide when you hide the forum (if you didn't change the forum order yet).
Update:
Using active class for article category:
  1. atcgal_forumdisplay_threadlist template:
    Find (around line#20 - #22):

    HTML Code
    <tr><td class="trow1"><a href="{$forumurl_q}filtertf_atcgal=Music"><span><strong>Music</strong></span></a></td></tr>
    <tr><td class="trow1"><a href="{$forumurl_q}filtertf_atcgal=Games"><span><strong>Games</strong></span></a></td></tr>
    <tr><td class="trow1"><a href="{$forumurl_q}filtertf_atcgal=Other"><span><strong>Other</strong></span></a></td></tr>


    Replace with:

    HTML Code
    <tr><td class="trow1 {$filters_set['atcgal']['active']['Music']}"><a href="{$forumurl_q}filtertf_atcgal=Music"><span><strong>Music</strong></span></a></td></tr>
    <tr><td class="trow1 {$filters_set['atcgal']['active']['Games']}"><a href="{$forumurl_q}filtertf_atcgal=Games"><span><strong>Games</strong></span></a></td></tr>
    <tr><td class="trow1 {$filters_set['atcgal']['active']['Other']}"><a href="{$forumurl_q}filtertf_atcgal=Other"><span><strong>Other</strong></span></a></td></tr>

    Basically, we need to add {$filters_set['key']['active']['value_of_the_field']} for each <td> tags, depends on what filter we use in it.

  2. Create a new template:
    atcgal_forumdisplay

    HTML Code
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
    {$headerinclude}
    {$rssdiscovery}
    <script type="text/javascript">
    <!--
    	lang.no_new_posts = "{$lang->no_new_posts}";
    	lang.click_mark_read = "{$lang->click_mark_read}";
    // -->
    </script>
    <style type="text/css">
    .filtertf_active {
    	background: #FFF6BF;
    }
    </style>
    </head>
    <body>
    {$header}
    {$moderatedby}
    {$usersbrowsing}
    {$subforums}
    {$threadslist}
    {$footer}
    </body>
    </html>

    Modify the style (line #14) as our needs.



Screenshot:
When clicking a category:
[attachment=248]
Thanks for the update Smile
This is very cool RteU - but I have many themes on my forum - is there a way to add the colour of the active filter to the style sheets rather than hard coding to the template?
Yep. But it means, all filtertf_active class in all templates that use the same theme will use the same style.

Depends on our needs. If we don't need it specific for each forum that use the class, I think it is better to add it in stylesheet.
Yes, but I have a forum that can be viewed in any one of four styles....

So what you are saying is, if I add

.filtertf_active {
    background: blabla whatever I want for this theme;
}

To my style sheet for theme x then wherever I have class active set for that theme then it will use that class? That is what I want indeed.
I think like that.
You can also change the name of the class, eg

HTML Code
<td class="trow1 atcgal_{$filters_set['atcgal']['active']['Music']}">

Hopefully, this is my last upgrade problem!

I was trying to add a new thread image button but I noticed that my category selection is missing in the new post editor!  Take a look:

http://www.7173mustangs.com/newthread.php?fid=33

Any idea on what I screwed up?  LOL!  

Many thanks!

ETA:  I just checked my Video Gallery and the same thing is happening!  The category selection is missing!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Reference URL's