MyBB Community Forums

Full Version: i want to create a button in menu bar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Experts, i want to create MY Threads Button In Menu Bar. from which when users click my threads button they see their threads. is there any way to do this? if yes, then please please tell me because i am new to mybb.
Hi,

download and install plugin "Template Conditionals".

Go to ACP >> Templates & Styles >> Templates >> YOUR THEME Templates >> Header Templates and open "header" to edit.

Search for:
{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>

Replace this part with:
{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
<if ($mybb->user['uid'] != 0) then><li><a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$mybb->user['uid']}" class="mythreads">MyThreads</a></li></if>

Save changes and try it... Wink
(2015-01-18, 02:32 PM)SvePu Wrote: [ -> ]Hi,

download and install plugin "Template Conditionals".

Go to ACP >> Templates & Styles >> Templates >> YOUR THEME Templates >> Header Templates and open "header" to edit.

Search for:

{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>

Replace this part with:

{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
<if ($mybb->user['uid'] != 0) then><li><a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$mybb->user['uid']}" class="mythreads">MyThreads</a></li></if>

Save changes and try it... Wink

brother i don't know how to download & install plugins please help me
Install Template Conditionals
  • Download the plugin package from link and unzip it.
  • Copy content of plugin folder to FORUM ROOT on server. 
  • Go to ACP > Plugins and activate "Template Conditionals"
go to Templates > [YOUR THEME TEMPLATES] > Header templates > header_welcomeblock_member

then add this code:
<li><a href="search.php?action=finduserthreads&uid={$mybb->user['uid']}">View my threads</a></li>
anywhere between  :
	<ul class="menu user_links">
			<li><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', null, true); return false;">{$lang->welcome_open_buddy_list}</a></li>
			<li><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a></li>
			<li><a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a></li>
			<li><a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}</li>
		</ul>

it may look something like that :

		<ul class="menu user_links">
			<li><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', null, true); return false;">{$lang->welcome_open_buddy_list}</a></li>
			<li><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a></li>
          <a href="search.php?action=finduserthreads&uid={$mybb->user['uid']}">View my threads</a>
			<li><a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a></li>
			<li><a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}</li>
		</ul>
(2015-01-18, 02:32 PM)SvePu Wrote: [ -> ]Hi,

download and install plugin "Template Conditionals".

Go to ACP >> Templates & Styles >> Templates >> YOUR THEME Templates >> Header Templates and open "header" to edit.

Search for:

{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>

Replace this part with:

{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
<if ($mybb->user['uid'] != 0) then><li><a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$mybb->user['uid']}" class="mythreads">MyThreads</a></li></if>

Save changes and try it... Wink

Great Man Your That code worked for me. you are a genious. Thanks Man. one thing i need a who is online button also. Thanks IN ADVANCE
Is the same way as above...

Go to ACP >> Templates & Styles >> Templates >> YOUR THEME Templates >> Header Templates and open "header" to edit.

Now search for:
{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
<if ($mybb->user['uid'] != 0) then><li><a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$mybb->user['uid']}" class="mythreads">MyThreads</a></li></if> 

Replace this part with:
{$menu_calendar}
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
<if ($mybb->user['uid'] != 0) then><li><a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$mybb->user['uid']}" class="mythreads">MyThreads</a></li></if> 
<li><a href="{$mybb->settings['bburl']}/online.php" class="online">Who is Online</a></li>