MyBB Community Forums

Full Version: [Tutorial] Thread Options Dropdown
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Because I don't like how the Subscribe, Print, and Send to Friend are all the way on the bottom I went ahead and made use of the mybb dropdown javascript and created a quick tutorial on how you can do it too.

This will replace the "Threaded Mode | Linear Mode" that's in thead for showthread pages with a dropdown giving 5 links. You can of course alter this to suit your own needs.

Edit showthread Template
===========================

Find:
				<div style="float: right;">
					<span class="smalltext"><strong><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
				</div>
				

Replace:
								<div class="float_right">
<a href="#top" id="thread_options_{$tid}" class="smalltext"><strong>Thread Options</strong></a>
<div id="thread_options_{$tid}_popup" class="popup_menu" style="display: none;">
<div class="popup_item_container thread_options"><a href="printthread.php?tid={$tid}" class="popup_item">{$lang->view_printable}</a></div>
<div class="popup_item_container thread_options"><a href="sendthread.php?tid={$tid}" class="popup_item">{$lang->send_thread}</a></div>
<div class="popup_item_container thread_options"><a href="usercp2.php?action={$add_remove_subscription}subscription&amp;tid={$tid}" class="popup_item">{$add_remove_subscription_text}</a></div>
					<div class="popup_item_container thread_options"><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" class="popup_item">{$lang->threaded}</a></div>
					<div class="popup_item_container thread_options"><a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" class="popup_item">{$lang->linear}</a></div>


</div>
<script type="text/javascript">
<!--
	new PopupMenu("thread_options_{$tid}");
// -->
</script>
</div>


Edit showthread.css add in advanced mode to the bottom:


.thread_options a:link {
	color: #026CB1;
	text-decoration: none;
}

.thread_options a:visited {
	color: #026CB1;
	text-decoration: none;
}

.thread_options a:hover, a:active {
	color: #000;
	text-decoration: underline;
}

Demo: http://www.supportforums.net/showthread.php?tid=63

Sample Image:
[Image: 4qnk57lxbam2p4onv5t_thumb.jpg]

Enjoy.
Thank you!
Awesome work.
I added this to my site and it is so great.
Much better than the other one...
Yeah I never liked the current links for threaded mode there. I hope in 1.6 they ditch that mode entirely. No one uses it that I know about.

I might make one also for usercp quick links. I know some tuts for that have been made though so I am not sure if I could even improve upon them.
thanks men
That's weird, it don't work for me.
=D I missed this place!

Thanks for the tut Labrocca ^_^
Nice, thanks! Smile
Working here.

Thank You Sir Smile
Nice, pretty easy though. It's the same code for the edit dropdown. Thanks for sharing.
This worked great, I would like to know if you could help me use this same concept for the username isntead of going to the profile, It would look like the image I attached.

Thank you
Pages: 1 2 3