View Thread
Post your improvements and modifications to forum_threads_list_panel.php here.
 Print Thread
image locked and hot added in forum_threads_list_panel.php
Fusioneer
The current forum_threads_list_panel.php usually displayed on your front page containing the latest forum entries does not have an image for a locked folderlock or a hot folderhot thread. It can only display an image for new foldernew post/thread or a standard folder image.

Somewhere in the development of php fusion the hot thread functionality was abandoned. Even though all themes still include this image.

How to fix this:
If you want folder hot folderhot as well open up includes/system_images.php
Find "foldernew" => THEME."forum/foldernew.gif",
and add: "folderhot" => THEME."forum/folderhot.gif",
see below.
Download source  GeSHi: PHP
  1.  
  2. $fusion_images = array(
  3. //A
  4. "arrow" => IMAGES."arrow.png",
  5. //B
  6. "blank" => THEME."images/blank.gif",
  7. //C
  8. "calendar" => IMAGES."dl_calendar.png",
  9. //D
  10. "down" => THEME."images/down.gif",
  11. "download" => IMAGES."dl_download.png",
  12. "downloads" => IMAGES."dl_downloads1.png",
  13. //E
  14. "edit" => IMAGES."edit.png",
  15. //F
  16. "folder" => THEME."forum/folder.gif",
  17. "folderlock" => THEME."forum/folderlock.gif",
  18. "foldernew" => THEME."forum/foldernew.gif",
  19. "folderhot" => THEME."forum/folderhot.gif",
  20. "forum_edit" => THEME."forum/edit.gif",
  21. //G
  22. "go_first" => IMAGES."go_first.png",
  23. "go_last" => IMAGES."go_last.png",
  24. "go_next" => IMAGES."go_next.png",
  25. "go_previous" => IMAGES."go_previous.png",
  26. //H
  27. "homepage" => IMAGES."dl_homepage.png",
  28. //I
  29. "info" => IMAGES."dl_info.png",
  30. "imagenotfound" => IMAGES."imagenotfound.jpg",
  31. //J
  32. //K
  33. //L
  34. "left" => THEME."images/left.gif",
  35. //M
  36. //N
  37. "newthread" => THEME."forum/newthread.gif",
  38. "no" => IMAGES."no.png",
  39. "noavatar50" => "noavatar50.png",
  40. "noavatar100" => "noavatar100.png",
  41. "noavatar150" => "noavatar150.png",
  42. //O
  43. //P
  44. "panel_on" => THEME."images/panel_on.gif",
  45. "panel_off" => THEME."images/panel_off.gif",
  46. "pm" => THEME."forum/pm.gif",
  47. "pollbar" => THEME."images/pollbar.gif",
  48. "printer" => IMAGES."printer.png",
  49. //Q
  50. "quote" => THEME."forum/quote.gif",
  51. //R
  52. "reply" => THEME."forum/reply.gif",
  53. "right" => THEME."images/right.gif",
  54. //S
  55. "save" => IMAGES."php-save.png",
  56. "screenshot" => IMAGES."dl_screenshot.png",
  57. "star" => IMAGES."star.png",
  58. "statistics" => IMAGES."dl_stats.png",
  59. "stickythread" => THEME."forum/stickythread.gif",
  60. //T
  61. "tick" => IMAGES."tick.png",
  62. //U
  63. "up" => THEME."images/up.gif",
  64. //V
  65. //W
  66. "web" => THEME."forum/web.gif",
  67. //X
  68. //Y
  69. "yes" => IMAGES."yes.png"
  70. //Z
  71. );
  72.  
Parsed in 0.024 seconds, using GeSHi 1.0.8.10


I want to include the forum locale as well to make use of the alt descriptions I can grab from there.
So open up /infusions/forum_threads_list_panel/forum_threads_list_panel.php and add include LOCALE.LOCALESET."forum/main.php"; like below.

Download source  GeSHi: PHP
  1. <?php
  2. if (!defined("IN_FUSION")) { die("Access Denied"); }
  3. include LOCALE.LOCALESET."forum/main.php";
  4. global $lastvisited;
  5.  
Parsed in 0.008 seconds, using GeSHi 1.0.8.10



Now continue in /infusions/forum_threads_list_panel/forum_threads_list_panel.php:
Find:
  • FROM ".DB_THREADS." tt
  • INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id
  • INNER JOIN ".DB_USERS." tu ON tt.thread_lastuser=tu.user_id
  • WHERE ".groupaccess('tf.forum_access')." AND tt.thread_lastpost >= ".$timeframe." AND tt.thread_hidden='0'
  • ORDER BY tt.thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
  • );
  •  
  • Parsed in 0.010 seconds, using GeSHi 1.0.8.10


    And add tt.thread_locked,
    Like this:
  • FROM ".DB_THREADS." tt
  • INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id
  • INNER JOIN ".DB_USERS." tu ON tt.thread_lastuser=tu.user_id
  • WHERE ".groupaccess('tf.forum_access')." AND tt.thread_lastpost >= ".$timeframe." AND tt.thread_hidden='0'
  • ORDER BY tt.thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
  • );
  •  
  • Parsed in 0.008 seconds, using GeSHi 1.0.8.10


    Now find:

    Download source  GeSHi: PHP
    1. while ($data = dbarray($result)) {
    2. $row_color = ($i % 2 == 0 ? "tbl1" : "tbl2");
    3. echo "<tr>\n<td class='".$row_color."'>";
    4. if ($data['thread_lastpost'] > $lastvisited) {
    5. $thread_match = $data['thread_id']."\|".$data['thread_lastpost']."\|".$data['forum_id'];
    6. if (iMEMBER && ($data['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\.{$thread_match}$|\.{$thread_match}\.|\.{$thread_match}$)", $userdata['user_threads']))) {
    7. echo "<img src='".get_image("folder")."' alt='' />";
    8. } else {
    9. echo "<img src='".get_image("foldernew")."' alt='' />";
    10. }
    11. } else {
    12. echo "<img src='".get_image("folder")."' alt='' />";
    13. }
    14. if ($data['thread_poll']) {
    15. $thread_poll = "<span class='small' style='font-weight:bold'>[".$locale['global_051']."]</span> ";
    16. } else {
    17. $thread_poll = "";
    18. }
    19.  
    Parsed in 0.009 seconds, using GeSHi 1.0.8.10


    And replace with this code:
    Download source  GeSHi: PHP
    1. while ($data = dbarray($result)) {
    2. $row_color = ($i % 2 == 0 ? "tbl1" : "tbl2");
    3. echo "<tr>\n<td class='".$row_color."'>";
    4. if ($data['thread_locked']) {
    5. echo "<img src='".get_image("folderlock")."' alt='".$locale['564']."' />";
    6. } else {
    7. if ($data['thread_lastpost'] > $lastvisited) {
    8. $thread_match = $data['thread_id']."\|".$data['thread_lastpost']."\|".$data['forum_id'];
    9. if (iMEMBER && ($data['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\.{$thread_match}$|\.{$thread_match}\.|\.{$thread_match}$)", $userdata['user_threads']))) {
    10. echo "<img src='".get_image("folder")."' alt='".$locale['561']."' />";
    11. } else {
    12. echo "<img src='".get_image("foldernew")."' alt='".$locale['560']."' />";
    13. }
    14. } elseif ($data['thread_postcount'] > 10) {
    15. echo "<img src='".get_image("folderhot")."' alt='".$locale['562']."' />";
    16. } else {
    17. echo "<img src='".get_image("folder")."' alt='".$locale['561']."' />";
    18. }
    19. if ($data['thread_poll']) {
    20. $thread_poll = "<span class='small' style='font-weight:bold'>[".$locale['global_051']."]</span> ";
    21. } else {
    22. $thread_poll = "";
    23. }
    24. }
    25.  
    Parsed in 0.010 seconds, using GeSHi 1.0.8.10

    Notice the alt locales as well! Better for SEO.

    If the thread_postcount is greater than 10 the thread is considered hot. But you can alter this value to your liking. (perhaps an administration panel setting?) Or you can take thread_views as a measure point for when to consider a thread as hot.
    Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
     
    Jump to Forum
    New Thread Post Reply
    Gebruik BBcode of HTML om naar; 'image locked and hot added in forum_threads_list_panel.php', te verwijzen!
    BBcode:
    HTML: