We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to make new tab member? [Solution available] | Forum

ben
ben Oct 20 '13
Hello, how to make new tab for user after latest, online, search? I want to add new other tab and add some some user to that tab. Is that possible?

thanks
The Forum post is edited by Alia Jul 9 '14
Kieron H Leader
Kieron H Oct 21 '13
you can add users as featured on there profile page and then a tab comes up saying featured you could then change what it says by changing language 
ben
ben Oct 21 '13
thanks a lot kieron,never crossed my mind :)
Duncan
Duncan Oct 21 '13
I'd like to find out how to do this too, as I have a couple of external pages sorting members
dave Leader
dave Oct 21 '13

Just add it to the html file.. and then you can use the link to that file.. easy peasy...

 

Tested and works..

 

ow_system_plugins/base/views/components/content_menu.html

 

 

<div class="ow_content_menu_wrap">
<ul class="ow_content_menu clearfix">
  {foreach from=$data item='item' name='contentMenu'}
    <li class="{$item.class} {if $item.active} active{/if}"><a href="{$item.url}"><span{if $item.iconClass} class="{$item.iconClass}"{/if}>{$item.label}</span></a></li>
 {/foreach}

 

<!-- now that all the normal tab items is loaded on the menu add my special tab -->

  <li class="_search"><a href="http://www.mysite.com"><span class="ow_ic_push_pin">newbutton</span></a></li>

 <!-- end of my secial mod -->

</ul>
</div>

 

just add the mod, the rest of the code is there already.

The Forum post is edited by dave Oct 21 '13
dave Leader
dave Oct 21 '13
hope that helps   the only thing is it will show up on every menu, so just know that..
The Forum post is edited by dave Oct 21 '13
Duncan
Duncan Oct 21 '13
Quote from dave hope that helps   the only thing is it will show up on every menu, so just know that..

That's my issue, for example I have the tabbed menu on profiles, so adding it there will cause "top members" to show up as a tab on everyone's profile.


Thanks for the code though dave!

dave Leader
dave Oct 21 '13

ok so lets work on that...

 

so we know that item class _online is only on the members page

 

so we can set a switch using that..

 

<div class="ow_content_menu_wrap">
< ul class="ow_content_menu clearfix">
{foreach from=$data item='item' name='contentMenu'}

 

<!--  add switch -->

{if $bflag != 1}  <!-- check the switch only if unset -->

      {if $item.class == "_online"}

      <!-- we know now that we are on the members page so set the switch on -->

      {$bflag = 1}

      {/if}

 {/if}

<!-- end of switch -->


    <li class="{$item.class} {if $item.active} active{/if}"><a href="{$item.url}"><span{if $item.iconClass} class="{$item.iconClass}"{/if}>{$item.label}</span></a></li>
{/foreach}

 

<!-- begin mod -->

<!-- now the foreach is done and that all the normal tab items are loaded we can load the new tab -->

{if $bflag}  <!-- if switch is set then show the button -->

<li class="_search"><a href="http://www.mysite.com"><span class="ow_ic_push_pin">newbutton</span></a></li>

{/if}

<!--  end mod -->

< /ul>
< /div>

try this...

The Forum post is edited by dave Oct 22 '13
Duncan
Duncan Oct 21 '13
Works a treat.


Thanks dave!

dave Leader
dave Oct 22 '13
your welcome im glad i worked, i was dog tired and half asleep... excellent..
H. H. Nguyen
H. H. Nguyen Jul 6 '14
Hey Dave,


can u tell how I can insert the content in the new tab member?

I want to create my own table sorter member list on the new tab member.


Best regrads,

Hung