GraphiXtreme
|
NAVBAR / NAVBARLIST helpForum: GFXtreme
I'm trying to create a good-looking, easy-to-use portal forum, and was wondering if it's possible to create a portal on the left-hand side of my forum with the NavBar links (FAQ, Search, Memberlist etc.)
When I try using the {MYFF.NAVBAR} or {MYFF.NAVBARLINKS} in the overall_header.tpl where the code for my current portals is, I just get an unformatted list of links which stretches the table.
I would like the list to look like the MYFF.LINKSMENU (Friend Sites) portal, if possible. I tried doing this by just creating another LINKSMENU-type portal (with a different name, obviously) but was unable to achieve the effect that the code below does: changing which NavBar links are visible depending on whether the user is logged in or not.
| Code: | <!-- BEGIN switch_user_logged_out -->
<!-- END switch_user_logged_out --> |
So, could anyone help me achieve the desired effect of a portal like "Friend Sites" but for NavBar links, if it is at all possible?
Thanks, Jack (GFXtreme Admin)
|
Symon
|
First off make a backup template.
Now goto admin panel -- 3 styles -- Portal Settings
click on the blank one and title it NAV save and leave
Now goto
admin panel -- 3 styles -- Edit Templates/Logos
Look at the bottom in the area marked
Choose Portal template File to Edit
Look for cms_nav.tpl now open it up and delete all text in there and replace with code below
| Code: | <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<!--BEGIN switch_nav_title -->
<tr>
<th colspan="1" height="25" class="thCornerL" nowrap="nowrap">Nav Links</th>
</tr>
<!--END switch_nav_title -->
<tr>
<td align="left" valign="bottom" nowrap="nowrap"
class="row1"><span class="mainmenu"><a href="{U_INDEX}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_register.gif" border="0" alt="{L_INDEX}" hspace="3" />Home</a><br /><a href="{U_FAQ}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_faq.gif" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a><br /><a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_members.gif" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a><br /><a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_groups.gif" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a><br />
<!-- BEGIN switch_user_logged_out -->
<a href="{U_REGISTER}" class="mainmenu"><img src="templates/mmyff_gfxtreme1/images/icon_mini_register.gif" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a><br />
<!-- END switch_user_logged_out -->
<a href="{U_PROFILE}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_profile.gif" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a><br /><a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_message.gif" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />Messages</a></span>
</td>
</tr>
</table> |
Now Open up the overall_header.tpl put in {MYFF.NAV} where you wish it to appear.
Note you may have to change each
myff_gfxtreme1 to which ever number template you are editing
|
Symon
|
Once all that is done and you are happy , then you can remove the extra nav links at the top by goto overall_header.tpl
And removing the following code which is found under {SITE_DESCRIPTION} towards the middle of the file
| Code: | <table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>
<!-- BEGIN switch_user_logged_out -->
<a href="{U_REGISTER}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a>>
<!-- END switch_user_logged_out -->
</span></td>
</tr>
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a> <a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a> <a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/myfs_testhtml2/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a> </span></td>
</tr>
</table> |
|
GraphiXtreme
|
Thank you very much Symon, especially considering the time
It was the Code in your first post that I needed; I just couldn't find it anywhere when searching for keywords such as nav, navbar, portal.
I think Admin has previously said somewhere about improving keyword-searching, maybe this could be an instance of that?
Edit: Do you know of any way to replicate the grid-type effect seen in the Friend Sites portal, i.e. the white horizontal lines separating the items in the list?
|
Nick(NR)
|
Hang around I'll re-write it as symons gets put onto the next line rather than their own cell.
|
Nick(NR)
|
Ok, give this a bash:
What I've done is place each forum navigation link into it's own cell and the registered link should only show when logged out and the private msg and profile edit links will only show when logged in.
| Code: | <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<!--BEGIN switch_nav_title -->
<tr>
<th colspan="1" height="25" class="thCornerL" nowrap="nowrap">Nav Links</th>
</tr>
<!--END switch_nav_title -->
<tr>
<td class="row2"><a href="{U_INDEX}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_register.gif" alt="{L_INDEX}" width="12" height="13" hspace="3" border="0" />Home</a></td>
</tr>
<tr>
<td class="row2"><a href="{U_FAQ}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_faq.gif" alt="{L_FAQ}" width="12" height="13" hspace="3" border="0" />{L_FAQ}</a></td>
</tr>
<tr>
<td class="row2"><a href="{U_SEARCH}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a></td>
</tr>
<tr>
<td class="row2"><a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_members.gif" alt="{L_MEMBERLIST}" width="12" height="13" hspace="3" border="0" />{L_MEMBERLIST}</a></td>
</tr>
<tr>
<td class="row2"><a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_groups.gif" alt="{L_USERGROUPS}" width="12" height="13" hspace="3" border="0" />{L_USERGROUPS}</a></td>
</tr>
<!-- BEGIN switch_user_logged_in -->
<tr>
<td class="row2"><a href="{U_PROFILE}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_profile.gif" alt="{L_PROFILE}" width="12" height="13" hspace="3" border="0" />{L_PROFILE}</a></td>
</tr>
<tr>
<td class="row2"><a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_message.gif" alt="{PRIVATE_MESSAGE_INFO}" width="12" height="13" hspace="3" border="0" />Messages</a></td>
</tr>
<!-- END switch_user_logged_in -->
<tr>
<td class="row2"><a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/myff_gfxtreme1/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a></td>
</tr>
<!-- BEGIN switch_user_logged_out -->
<tr>
<td class="row2"><a href="{U_REGISTER}" class="mainmenu"><img src="templates/mmyff_gfxtreme1/images/icon_mini_register.gif" alt="{L_REGISTER}" width="12" height="13" hspace="3" border="0" />{L_REGISTER}</a></td>
</tr>
<!-- END switch_user_logged_out -->
</table> |
|
Symon
|
Cheers nick mine was the basic rush job at 1am .
Might be an idea to write this as a guide so we can link to it in the future
|
Nick(NR)
|
http://portalogy.myfastforum.org/Forum_navigation_links_about81.html
|
GraphiXtreme
|
Wow, thank you both so much
Just one question though: why does the icon for "Join!" always display as a red cross? I've remedied it by changing the img src to the full URL of the image, I was just wondering why it didn't work without the http://gfxtreme.myfreeforum.org prefix.
|
Nick(NR)
|
just spotted the typo, you'll need to edit the image code there's two m's
<img src="templates/mmyff_gfxtreme1/images/icon_mini_register.gif" alt="{L_REGISTER}" width="12" height="13" hspace="3" border="0" />
mmyff_gfxtreme1 should be myff_gfxtreme1
my bad
|
Hardcoregamer
|
Thanks guys...I will use this too...looks cool.
|
Nick(NR)
|
| Hardcoregamer wrote: | | Thanks guys...I will use this too...looks cool. |
Don't forget to change the links to the images so yours have the name of your template slot
|
|
|