Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Article Gallery
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #21
RE: Article Gallery
Glad it works, RocketFoot Smile

07-30-2010 07:10 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #22
RE: Article Gallery
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).

08-04-2010 02:28 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #23
RE: Article Gallery
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
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    <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:
   

10-19-2010 02:32 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #24
RE: Article Gallery
Thanks for the update Smile

My Blog
10-19-2010 07:54 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #25
RE: Article Gallery
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?


[Image: leelink.gif]
MYBB1.6 & XThreads
10-20-2010 04:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #26
RE: Article Gallery
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.

10-20-2010 04:53 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #27
RE: Article Gallery
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.


[Image: leelink.gif]
MYBB1.6 & XThreads
10-20-2010 05:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #28
RE: Article Gallery
I think like that.

10-20-2010 05:57 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #29
RE: Article Gallery
You can also change the name of the class, eg

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


My Blog
10-20-2010 08:56 AM
Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #30
RE: Article Gallery
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!
(This post was last modified: 11-23-2010 07:14 AM by RocketFoot.)
11-23-2010 07:09 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: