2015-08-07, 07:05 PM
(2015-08-07, 06:11 PM)eNvy Wrote: It's the tipsy script. By default, it doesn't work on the latest activity, also, I'm gonna remove the script, because one team member of MyBB told me that script runs all the querys from the portal into the index (and that's bad).
Give me a few seconds, I will show you how to remove the script and after you can use a plugin to show the latest activity of your forum.
To remove manually the script:
ACP > Templates & Styles > Templates > Square Templates
Ungrouped templates > headerinclude
Search and remove this code
<script type="text/javascript"> jQuery(function($) { $(".clickedbuttons").hide(); $(".buttons").click(function() { $(".sidebar").animate({height: "hide", opacity: 0}, 500, function() { $(".forums").animate({width: "984px"}, 500); }); $(this).hide(); $(".clickedbuttons").show(); $.cookie("sidebar","collapsed", {expires: 365}); return false; }); $(".clickedbuttons").click(function() { $(".forums").animate({width: "724px"}, 500, function() { $(".sidebar").animate({height: "show", opacity: 1}, 500); }); $(this).hide(); $(".buttons").show(); $.cookie("sidebar","expanded", {expires: 365}); return false; }); if($.cookie("sidebar") == "collapsed") { $(".buttons").hide(); $(".clickedbuttons").show(); $(".forums").css("width","984px"); $(".sidebar").hide(); }; }); </script>
Index Page Templates > index template
Replace your current index template with this new code
<html> <head> <title>{$mybb->settings['bbname']}</title> {$headerinclude} <script type="text/javascript"> <!-- lang.no_new_posts = "{$lang->no_new_posts}"; lang.click_mark_read = "{$lang->click_mark_read}"; // --> </script> </head> <body> {$header} {$forums} <br class="clear" /><br /> {$boardstats} {$footer} </body> </html>
Portal Templates > portal_latestthreads_thread
Click into the options button and then select "revert to the original".
If (for any reason you can't), the original MyBB code is this:
<tr> <td class="{$altbg}"> <strong><a href="{$mybb->settings['bburl']}/{$thread['threadlink']}">{$thread['subject']}</a></strong> <span class="smalltext"><br /> {$lang->forum} <a href="{$thread['forumlink']}">{$thread['forumname']}</a><br /> <a href="{$thread['lastpostlink']}">{$lang->latest_threads_lastpost}</a> {$lastposterlink}<br /> {$lastpostdate}<br /> <strong>» </strong>{$lang->latest_threads_replies} {$thread['replies']}<br /> <strong>» </strong>{$lang->latest_threads_views} {$thread['views']} </span> </td> </tr>
Navigation templates > nav template
Remove this code
<a class="buttons" title="{$lang->xstyled_hidesidebar}" style="float: right;"><i style="font-size: 14px;" class="fa fa-compress fa-fw"></i></a> <a class="clickedbuttons" title="{$lang->xstyled_showsidebar}" style="float: right;"><i style="font-size: 14px;" class="fa fa-expand fa-fw"></i></a>
To finish this, go to ACP > Templates & Styles > Styles > Square.css
Search and delete this classes
.buttons { cursor: pointer; color: #FFFFFF; width: 44px; height: 29px; padding-top: 15px; text-align: center; background: #005ea7; transition: all 0.5s ease; } .buttons:hover { cursor: pointer; color: #FFFFFF; background: #0076D1; transition: all 0.5s ease; } .clickedbuttons { cursor: pointer; color: #FFFFFF; width: 44px; height: 29px; padding-top: 15px; text-align: center; background: #005ea7; transition: all 0.5s ease; } .clickedbuttons:hover { cursor: pointer; color: #FFFFFF; background: #0076D1; transition: all 0.5s ease; }
You can use this plugin made by dragonexpert to display the latest activity or post/threads on the index page.
-------------------------
Square theme updated to 1.8.5, and removed the sidebar with the latest activity script.
Thank you. It works. But i wonder, may i install plugin for sidebar lastest activity?