PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2006-10-11 22:34:39

choward82
New member
Registered: 2006-09-27
Posts: 3

How can I make a hot topic (flaming folder) option?

How can I make a hot topic (flaming folder) option? like once a thread reaches 20 replies i want the folder icon to show a different (flaminf folder) icon.

Thanks!

Offline

 

#2 2006-10-12 19:46:46

thegleek
Member
Registered: 2006-08-21
Posts: 54
Website

Re: How can I make a hot topic (flaming folder) option?

Ok. just to challenge myself (not much of one) and to see how easy this mod would be to do.. it took me less that 5 minutes.

here's the stuff i added to the viewforum.php:

not sure of line #'s cuz my code is highly modded in comparison to the original code.. but either way, search for last_visit in
the entire file of viewforum.php, and you'll only come up with 2 lines, as such:

Code:

if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)

BEFORE each of those lines, insert this code:

Code:

                        // gleek edit
                        if ($cur_topic['num_replies'] >= 50)
                        {
                                $item_status .= ' ihot';
                                $icon_type = 'icon ihot';
                        }

AFTER this chunck of code:

Code:

                        if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
                        {
                                $icon_text .= ' '.$lang_common['New icon'];
                                $item_status .= ' inew';
                                $icon_type = 'icon inew';

ADD this to both instances:

Code:

                                // gleek edit
                                if ($cur_topic['num_replies'] >= 50)
                                {
                                        $item_status .= ' nhot';
                                        $icon_type = 'icon nhot';
                                }

thats all thats needed for the code portion of this mod.

next you'll need to add some stuff to your .css files:

css file 1: style/Lithium.css

FIND:

Code:

DIV.icon {
        FLOAT: left;
        MARGIN-TOP: 0.1em;
        MARGIN-LEFT: 0.2em;
        DISPLAY: block;
        BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em;
        BORDER-STYLE: solid
}

(it's at the bottom), and just copy that same code and paste it after that, as such:

Code:

DIV.ihot {
        FLOAT: left;
        MARGIN-TOP: 0.1em;
        MARGIN-LEFT: 0.2em;
        DISPLAY: block;
        BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em;
        BORDER-STYLE: solid
}

BUT be sure to rename the .icon to .ihot

finally the color stuff, change this file: style/imports/Lithium_cs.css

find (at the bottom once again):

Code:

DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2}
TR.iredirect DIV.icon {BORDER-COLOR: #F1F1F1 #F1F1F1 #F1F1F1 #F1F1F1}
DIV.inew {BORDER-COLOR: #8BB453 #7A9E48 #709142 #799C47}

and ADD this code to the bottom of that:

Code:

DIV.ihot {BORDER-COLOR: #FFF0F5 #FFE4E1 #FFB6C1 #FFC0CB}
DIV.nhot {BORDER-COLOR: #FF0000 #B22222 #800000 #8B0000}

DONE. simple eh?


~thegleek <-- (my site is NSFW)

Offline

 

#3 2006-11-23 17:19:41

Emancipator
New member
Registered: 2006-11-23
Posts: 3

Re: How can I make a hot topic (flaming folder) option?

well done method gleek. simple always works best.

Offline

 

#4 2008-09-07 05:01:23

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: How can I make a hot topic (flaming folder) option?

I have really modified this mod to allow the admin to set the amount of posts before the topic is considered as "Hot" - Sweet mod.

Crusader.

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.