MyBB Community Forums

Full Version: show the icons of threads beside their subjects in main page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I agree with the last two posters above.
I done this exact mod for older mybb long time ago.
it should be made into a plugin for latest mybb.
anyway,
I tested this same mod again on latest mybb version (1.4.4) and it is working 100% Smile

you need to change 25 to 11 for subject length so your tables wont be screwed up.


				elseif($hideinfo != true)
				{
				
          // GET THREAD ICON
          $lastpost_icon = "";
          $thread = get_thread($lastpost_data['lastposttid']);
          $icon_cache = $cache->read("posticons");
          if($thread['icon'] > 0 && $icon_cache[$thread['icon']])
          {
          $icon = $icon_cache[$thread['icon']];
          $lastpost_icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />&nbsp;";
          }

				
					// Format lastpost date and time
					$lastpost_date = my_date($mybb->settings['dateformat'], $lastpost_data['lastpost']);
					$lastpost_time = my_date($mybb->settings['timeformat'], $lastpost_data['lastpost']);

					// Set up the last poster, last post thread id, last post subject and format appropriately
					$lastpost_profilelink = build_profile_link($lastpost_data['lastposter'], $lastpost_data['lastposteruid']);
					$lastpost_link = get_thread_link($lastpost_data['lastposttid'], 0, "lastpost");
					$lastpost_subject = $full_lastpost_subject = $parser->parse_badwords($lastpost_data['lastpostsubject']);
					if(my_strlen($lastpost_subject) > 11) //was 25
					{
						$lastpost_subject = my_substr($lastpost_subject, 0, 11)."..."; //was 25
					}
					$lastpost_subject = htmlspecialchars_uni($lastpost_subject);
					$full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);
					
					// Call lastpost template
					if($depth != 1)
					{						
						eval("\$lastpost = \"".$templates->get("forumbit_depth{$depth}_forum_lastpost")."\";");
					}
				}

I Added it

But it still doesnt work Sad

Can you attatch your version of functions_forumlist
Pages: 1 2