Current time: 05-23-2012, 02:42 AM Hello There, Guest! (LoginRegister)


Post Reply 
show the icons of threads beside their subjects in main page
02-06-2009, 07:48 PM (This post was last modified: 02-06-2009 08:35 PM by ELY_M.)
Post: #11
RE: show the icons of threads beside their subjects in main page
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.


Code:
                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")."\";");
                    }
                }

My MyBB plugins: http://mods.mybb.com/profile/19/downloads
Find all posts by this user
Quote this message in a reply
02-06-2009, 09:40 PM (This post was last modified: 02-06-2009 09:40 PM by WaheedI.)
Post: #12
RE: show the icons of threads beside their subjects in main page
I Added it

But it still doesnt work Sad

Can you attatch your version of functions_forumlist
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication