hot topics

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators

hot topics

Postby euroman » Sat Feb 10, 2007 7:21 pm

I have moded another mod showing last active topics on index. You can see it on the bottom of my page www.thegame-online.dk (the box saying 10 seneste indlæg)

The code that controls the icons is:

Code: Select all
for($i = 0; $i < $topics; $i++)
{
   $mar_title = $row[$i]["topic_title"];
   $mar_url = $phpbb_root_path . 'viewtopic.'.$phpEx.'?'.POST_TOPIC_URL.'='.$row[$i]["topic_id"];
   $mar_user = $row[$i]["username"];
   $topic_unread = ($row[$i]['post_time'] > topic_last_read($row[$i]['forum_id'], $row[$i]['topic_id']));
    $new = $topic_unread ? "_new" : "";
    if ( $row[$i]["topic_status"] == TOPIC_LOCKED )
   {
     $pic = $images["folder_locked$new"];
   }
   else
   {
      switch ($row[$i]["topic_type"])
         {
         case POST_GLOBAL_ANNOUNCE:
        $pic = $images["folder_global_announce$new"];
        break;
      case POST_ANNOUNCE:
        $pic = $images["folder_announce$new"];
        break;
         case POST_STICKY:
        $pic = $images["folder_sticky$new"];
        break;
         default:
        $pic = $images["folder$new"];
      }
    }


I am trying to get it to show icons for hot topics also:

like this:

Code: Select all
   case POST_HOT:
        $pic = $images["folder_hot$new"];
        break;


But it has no effect and I cant se why?

The icons in subsilver/images is called:

folder_hot
folder_new_hot

I also created a new icon folder_hot_new but it didnt help

Suggestions much appreciated...
euroman
PR0
PR0
 
Posts: 81
Joined: Sat Oct 21, 2006 10:18 pm

Advertisement

Postby dcz » Sat Feb 10, 2007 7:35 pm

well, the hot threshold is not a topic type, so you need to calculate it.

In viewforum.php, look for:

Code: Select all
if($replies >= $board_config['hot_threshold'])


;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby euroman » Sat Feb 10, 2007 7:47 pm

Brilliant! Thanks for the tip I got it to work :D
euroman
PR0
PR0
 
Posts: 81
Joined: Sat Oct 21, 2006 10:18 pm


Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 64 guests