Previous Thread
Next Thread
Print Thread
Hop To
#217343 09/26/2008 2:38 PM
Joined: May 2008
Posts: 1
C
stranger
stranger
C Offline
Joined: May 2008
Posts: 1
I want to add a link that is visible only to users who are logged in.

I want to add the link to the main menu at the top.

What is the correct syntax which file do I edit?

chug #217367 09/27/2008 1:11 AM
Joined: Dec 2003
Posts: 1,798
Likes: 2
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,798
Likes: 2
If you want to keep it simple and your userlist is set to only be seen by logged in users, then edit header.tpl:

find:
Code
{if $user_list}
<a href="{ubb url="ubb=showmembers"}">{$lang.USER_LIST}</a> 
&nbsp;&nbsp;&nbsp;
{/if}
change to:
Code
{if $user_list}
<a href="{ubb url="ubb=showmembers"}">{$lang.USER_LIST}</a> 
&nbsp;&nbsp;&nbsp;
<a href="/mynewpage.html">My New Page</a> 
&nbsp;&nbsp;&nbsp;
{/if}


- Allen
- ThreadsDev | PraiseCafe
chug #217373 09/27/2008 1:21 AM
Joined: Jun 2006
Posts: 16,536
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,536
Likes: 150
Look at the link section where the "my stuff" link is, you'll see an if/else clause there; you'd simply copy that to another area dn put your "member only" link within it


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Gizmo #217374 09/27/2008 1:21 AM
Joined: Jun 2006
Posts: 16,536
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,536
Likes: 150
allen beat me to it lol... busy night had so mmany tabs up :x


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Having issues going from 7.5.5. to 8X
by Mors - 10/22/2026 1:32 PM
Slow Queries - Any Ideas?
by BellaOnline - 10/16/2026 4:34 PM
Selling a Forum?
by ECNet - 10/10/2026 10:54 AM
Who's Online Now
2 members (Mors, 1 invisible), 584 guests, and 119 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)