2011-02-12, 04:52 PM
Intro
Thread Tools is Mybb template modification that adds set of thread tools under post list in showthread.Thread tools are divied into four categories:
a)Thread info (basic info about thread)
b)Thread Tools
c)Thread Sharing (seven links and more options link divied into two blocks)
d)Thread links
Installation
Unzip the content of thread_tools.zip file (included as attachment in first post) and copy image folder in your forum root (If You are asked to overwrite existing files / folder with another one then click yes).
Open the showthread.css that is used by your current forum theme (ACP -> Templates & Style -> Themes -> <your theme> -> showthread.css / Edit Stylesheet: Advanced Mode and replace all content inside with following one
Save it.
Go to your theme template set (ACP -> Templates & Style -> Templates -> <your theme template set> -> Showthread template ->showthread template) and open showthread template.
Find following code:
And remove it.
In head tag find
and add below
Find:
and add
Output:
After that find:
And remove it.
Under
add
Output:
Few informations:
You can place content from <!--Thread tools--> anywhere in showthread template (on top,after post list,in bottom)
If you don't want toogle function (show / hide) then remove
from header
and replace href="javascript: toggle()" with href="#tools"
Thread Tools is Mybb template modification that adds set of thread tools under post list in showthread.Thread tools are divied into four categories:
a)Thread info (basic info about thread)
- thread title
- Author
- Number of replies
- Views
- Last poster
b)Thread Tools
- Link to printable version
- Send thread
- Subscribe/ unsubscribe link
- New post link
- Threaded or linear view mode
c)Thread Sharing (seven links and more options link divied into two blocks)
- Facebook
- Twitter
- Google
- Reddit
- Digg
- Linkedin
- Stumbleupon
d)Thread links
- Thread url - plain link
- Thread BBcode link for forums
Installation
Unzip the content of thread_tools.zip file (included as attachment in first post) and copy image folder in your forum root (If You are asked to overwrite existing files / folder with another one then click yes).
Open the showthread.css that is used by your current forum theme (ACP -> Templates & Style -> Themes -> <your theme> -> showthread.css / Edit Stylesheet: Advanced Mode and replace all content inside with following one
ul.thread_tools, ul.thread_tools li {
list-style: none;
padding: 0;
margin: 0;
}
ul.thread_tools li {
padding-left: 26px;
padding-bottom: 2px;
margin-bottom: 2px;
font-size: 11px;
}
ul.thread_tools li.printable {
background: url(images/printable.gif) no-repeat 0px 0px;
}
ul.thread_tools li.sendthread {
background: url(images/send.gif) no-repeat 0px 0px;
}
ul.thread_tools li.subscription_add {
background: url(images/subscribe.gif) no-repeat 0px 0px;
}
ul.thread_tools li.subscription_remove {
background: url(images/unsubscribe.gif) no-repeat 0px 0px;
}
ul.thread_tools li.new_post {
background: url(images/new_post.png) no-repeat 0px 0px;
}
ul.thread_tools li.view {
background: url(images/view.png) no-repeat 0px 0px;
}
img.vmiddle {
vertical-align:middle;
}
.inline-block {
display:inline-block;
width:120px;
}
table#tools td {
vertical-align:top;
}
.links_title {
display:inline-block;
width:120px;
}
.links_field {
display:inline-block;
}
Save it.
Go to your theme template set (ACP -> Templates & Style -> Templates -> <your theme template set> -> Showthread template ->showthread template) and open showthread template.
Find following code:
<div style="float: right;">
<span class="smalltext"><strong><a href="showthread.php?mode=threaded&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
</div>
And remove it.
In head tag find
<script type="text/javascript" src="jscripts/thread.js?ver=1603"></script>
and add below
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
<script type="text/javascript">
function toggle(){
var div1 = document.getElementById('tools')
if (div1.style.display == 'none') {
tools.style.display = 'block'
} else {
tools.style.display = 'none'
}
}
</script>
Find:
<div class="float_right">
{$newreply}
</div>
and add
<a href="javascript: toggle()"><img src="{$theme['imgdir']}/thread_tools.png" alt="tools" /></a>
Output:
After that find:
<div class="float_left">
<ul class="thread_tools">
<li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
<li class="sendthread"><a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a></li>
<li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&tid={$tid}&my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
</ul>
</div>
And remove it.
Under
<div style="padding-top: 4px;" class="float_right">
{$newreply}
</div>
<br style="clear: both;" />
add
<!--start: Thread tools-->
<div id="tools" style="display:none">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="3">
<strong>Thread tools</strong>
</td>
</tr>
<tr>
<td class="tcat" width="33%">
<strong>Thread info</strong>
</td>
<td class="tcat" width="33%">
<strong>Thread tools</strong>
</td>
<td class="tcat" width="33%">
<strong>Thread Sharing</strong>
</td>
</tr>
<tr>
<td class="trow1" width="33%">
<ul class="thread_tools">
<li>
<strong>Thread Title:</strong>{$thread['threadprefix']}{$thread['subject']}</li>
<li>
<strong>{$lang->author}:</strong>
<a href="member.php?action=profile&uid={$thread['uid']}">{$thread['username']}</a>
</li>
<li>
<strong>Number of replies:</strong>
<a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</li>
<li class="{$thread_type_class}">
<strong>Number of views:</strong>{$thread['views']}</li>
<li>
<strong>{$lang->lastpost}:</strong>
<a href="member.php?action=profile&uid={$thread['lastposteruid']}">{$thread['lastposter']}</a>
</li>
</ul>
</td>
<td class="trow1" width="33%">
<ul class="thread_tools">
<li class="printable">
<a href="printthread.php?tid={$tid}">{$lang->view_printable}</a>
</li>
<li class="sendthread">
<a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a>
</li>
<li class="subscription_{$add_remove_subscription}">
<a href="usercp2.php?action={$add_remove_subscription}subscription&tid={$tid}&my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>
</li>
<li class="new_post">
<a href="showthread.php?tid={$thread['tid']}&action=newpost">Go to new post</a>
</li>
<li class="view">
<a href="showthread.php?mode=threaded&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->threaded}</a>|
<a href="showthread.php?mode=linear&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->linear}</a>
</li>
</ul>
</td>
<td class="trow1" width="33%">
<div>
<ul class="thread_tools inline-block">
<li>
<a class="share addthis_button_preferred_1"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/facebook.png" alt="facebook" /> Facebook</a>
</li>
<li>
<a class="share addthis_button_preferred_2"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/twitter.png" alt="twitter" /> Twitter</a>
</li>
<li class="trow1 smalltext">
<a class="share addthis_button_google"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/google.png" alt="google" /> Google</a>
</li>
<li>
<a class="share addthis_button_preferred_5"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/reddit.png" alt="reddit" /> Reddit</a>
</li>
</ul>
<ul class="thread_tools inline-block">
<li>
<a class="share addthis_button_digg"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/digg.png" alt="digg" /> digg</a>
</li>
<li>
<a class="share addthis_button_linkedin"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/linkedin.png" alt="linkedin" /> Linkedin</a>
</li>
<li>
<a class="share addthis_button_preferred_6"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/stumbleupon.png" alt="stumbleupon" /> Stumbleupon</a>
</li>
<li>
<a class="share addthis_button"><img class="vmiddle" src="{$theme['imgdir']}/share_buttons/more.png" alt="more" /> More options</a>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td class="tcat" colspan="3">
<strong>Thread links</strong>
</td>
</tr>
<tr>
<td class="trow1" colspan="3">
<div style="padding:2px;">
<div class="links_title">Thread url</div>
<div class="links_field">
<form name="url_select_all" action="">
<input size="50" class="small" onclick="this.form.url.focus();this.form.url.select();"
readonly="readonly" name="url" value="{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}"
/>
</form>
</div>
</div>
<div style="padding:2px;">
<div class="links_title">Thread BBCode</div>
<div class="links_field">
<form name="bbcode_select_all" action="">
<input size="50" type="text" class="small" onclick="this.form.bbcode.focus();this.form.bbcode.select();"
readonly="readonly" name="bbcode" value="[url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}]{$thread['threadprefix']}{$thread['subject']}[/url]"
/>
</form>
</div>
</div>
</td>
</tr>
</table>
</div>
<br />
<!--end: Thread tools-->
Output:
Few informations:
You can place content from <!--Thread tools--> anywhere in showthread template (on top,after post list,in bottom)
If you don't want toogle function (show / hide) then remove
<script type="text/javascript">
function toggle(){
var div1 = document.getElementById('tools')
if (div1.style.display == 'none') {
tools.style.display = 'block'
} else {
tools.style.display = 'none'
}
}
</script>
from header
and replace href="javascript: toggle()" with href="#tools"