Topic: Hot Topic Mod assistance.

There is a mod that allows you to make a topic "HOT" located at: http://www.punres.org/viewtopic.php?id=2131

I would like to know if someone (MattF or Smartys..uh um...) can assist me? What I am trying to do is to add an option in the Admin > Options area so that you can set it to whatever you wish to. For example the default setting is 50, but I want to be able to set it lower is I choose to. I would really appreciate any help here.

Thanks guys!
Bingiman

Re: Hot Topic Mod assistance.

all you will need to do, is create it as a config option in the database, if you want add a field on the admin config part, then do the pun_cofig varibale. And clear the catch

Sorry. Unactive due to personal life.

Re: Hot Topic Mod assistance.

I guess it would be easy if I knew how to code. Unfortunately I can't so this is why I am asking. sad

Re: Hot Topic Mod assistance.

I would help, but .. im too tired lol... ( happy new year wink ) and im sure you can do it, if a 15 year old can

Sorry. Unactive due to personal life.

5

Re: Hot Topic Mod assistance.

in admin_options.php:

                        </div>
                    </fieldset>
                </div>
-----------------start----------------------
                <div class="inform">
                    <fieldset>
                        <legend>Hot Topic Settings</legend>
                        <div class="infldset">
                            <table class="aligntop" cellspacing="0">
                                <tr>
                                    <th scope="row">Hot topic post count</th>
                                    <td>
                                        <input type="text" name="form[hot_count]" size="5" maxlength="5" value="<?php echo $pun_config['o_hot_count'] ?>"/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </fieldset>
                </div>
----------------------end-------------------------
                <div class="inform">
                    <fieldset>

Start and end are so you know what tags to shimmy the code between. smile Placement exactly where in the admin_options file is upto you. Then, run this against the db:

INSERT INTO [db_prefix]config (conf_name, conf_value) VALUES ('o_hot_count', '50');

Make sure to exchange [db_prefix] for your db prefix. big_smile

Re: Hot Topic Mod assistance.

Hi Matt,

I installed it but I am lost as to the code in the viewforum.php file.

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

This is always set at 50 so it will never change even if I change it in the admin options. Any ideas?

Thanks

Re: Hot Topic Mod assistance.

I think I got it. I added this:

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

8

Re: Hot Topic Mod assistance.

Aye, that's correct. smile I thought I had forgotten to mention something. big_smile

Re: Hot Topic Mod assistance.

Thanks Matt,

It works like a charm. Such a great addition for pun in my opinion. big_smile

Re: Hot Topic Mod assistance.

matt1298 wrote:

I would help, but .. im too tired lol... ( happy new year wink ) and im sure you can do it, if a 15 year old can

Since when does age play any part in programming?

Re: Hot Topic Mod assistance.

I took offense to it as a matter of fact, but I choose not to start my new year off in a bad way. I am 40 yrs old and can't code, so this obviously makes me stupid. I will probably have to ask my 16 year old son next time. big_smile

12

Re: Hot Topic Mod assistance.

orlandu63 wrote:
matt1298 wrote:

I would help, but .. im too tired lol... ( happy new year wink ) and im sure you can do it, if a 15 year old can

Since when does age play any part in programming?

Apologies bingiman, i must admit i was a drunk and want thinking clearly...Apologies agen

Sorry. Unactive due to personal life.