MyBB Community Forums

Full Version: How to add a new link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I would like to add a link back to my main website from the message board (the one at the footer just aint good enough) anyone know how to do this im sure the answers quite simple but how would I add this link to the very top of the message board?


please help (speak amature talk please I no speak tech to well)
hello there,

i still couldn't imagine the place you want to place it in, but anyway this is the script

<a href="http://yursite.com/page.htm">Home</a> 
or

<a href="$settings[homeurl]">$settings[homename]</a>

this should be place in the templates (Admin Cp>add/remove template> expand> then choose the place you prefere to add it, umm i would recommend to put it in the Welcome panel, or index page.



for furthure question regarding the places you want to add it. just reply Smile
Check out the 'header' template. That goes on the header of all pages.
This may be a dumb question/ request but could you tell me the root to the welcome panel i.e Admin Cp>add/remove template> expand>

thanks so much for your help.
Hey there

Admin CP > Template > Modify/ delete > Expand> now you have 2 options

1- header_welcomeblock_guest > This will shows when ur not logged in, or a guest is viewing ur board.
2- header_welcomeblock_member > This will appear for normal users
3- header_welcomeblock_member_admin > This will appear for Admins (In default the only difference between it and the usrers' is the ADMIN CP)

If you wanna add something that appears for all usres, and guests, put ur link in both guest and users' panel.

Regards
If you want a link back to your site next to the other links (Search, Member List, Celendar, Help), then you do this:

Admin CP -> Templates -> Modify/Delete -> Expand -> header

If this template was unedited, it should appear something like this:
Quote: <script language="Javascript" type="text/javascript">
var cookieDomain = "$settings[cookiedomain]";
var cookiePath = "$settings[cookiepath]";
var quickdelete_confirm = "$lang->quickdelete_confirm";
var newpm_prompt = "$lang->newpm_prompt";
var deleteevent_confirm = "$lang->deleteevent_confirm";
var removeattach_confirm = "$lang->removeattach_confirm";
</script>
<div id="container">
<div id="header">
<div class="logo"><a href="$settings[bburl]/index.php" name="top"><img src="$theme[logo]" alt="$settings[bbname]" border="0" /></a></div>
<div class="menu">
<ul>
<li><a href="$settings[bburl]/search.php"><img src="$theme[imgdir]/toplinks/search.gif" border="0" alt="$lang->toplinks_search" />$lang->toplinks_search</a></li>
<li><a href="$settings[bburl]/memberlist.php"><img src="$theme[imgdir]/toplinks/memberlist.gif" border="0" alt="$lang->toplinks_memberlist" />$lang->toplinks_memberlist</a></li>
<li><a href="$settings[bburl]/calendar.php"><img src="$theme[imgdir]/toplinks/calendar.gif" border="0" alt="$lang->toplinks_calendar" />$lang->toplinks_calendar</a></li>
<li><a href="$settings[bburl]/misc.php?action=help"><img src="$theme[imgdir]/toplinks/help.gif" border="0" alt="$lang->toplinks_help" />$lang->toplinks_help</a></li>
</ul>
</div>Etc.
(It goes on longer than that, but this is all I need to shwo you)

If you want it before those links, add the bolded part like so:

Quote: <script language="Javascript" type="text/javascript">
var cookieDomain = "$settings[cookiedomain]";
var cookiePath = "$settings[cookiepath]";
var quickdelete_confirm = "$lang->quickdelete_confirm";
var newpm_prompt = "$lang->newpm_prompt";
var deleteevent_confirm = "$lang->deleteevent_confirm";
var removeattach_confirm = "$lang->removeattach_confirm";
</script>
<div id="container">
<div id="header">
<div class="logo"><a href="$settings[bburl]/index.php" name="top"><img src="$theme[logo]" alt="$settings[bbname]" border="0" /></a></div>
<div class="menu">
<ul>
<li><a href="$settings[homeurl]">$settings[homename]</a></li>
<li><a href="$settings[bburl]/search.php"><img src="$theme[imgdir]/toplinks/search.gif" border="0" alt="$lang->toplinks_search" />$lang->toplinks_search</a></li>
<li><a href="$settings[bburl]/memberlist.php"><img src="$theme[imgdir]/toplinks/memberlist.gif" border="0" alt="$lang->toplinks_memberlist" />$lang->toplinks_memberlist</a></li>
<li><a href="$settings[bburl]/calendar.php"><img src="$theme[imgdir]/toplinks/calendar.gif" border="0" alt="$lang->toplinks_calendar" />$lang->toplinks_calendar</a></li>
<li><a href="$settings[bburl]/misc.php?action=help"><img src="$theme[imgdir]/toplinks/help.gif" border="0" alt="$lang->toplinks_help" />$lang->toplinks_help</a></li>
</ul>
</div>

You set the URL and Site name in the same place you would for the link in the footer.

This seems to be what you wanted Smile

Good luck,
- Belloman

Edit (just pointing this out to Dennis):
Dennis Tsang Wrote:
zaher1988 Wrote:If you wanna add something that appears for all usres, and guests, put ur link in both guest and users' panel.

Regards

Just to clarify that, anyone who does NOT have access to Admin CP will see the header_welcomeblock_member template (regardless of mod/supermod). Users with access to the Admin CP will see the header_welcomeblock_member_admin template. And users not logged in will see the header_welcomeblock_guest

Therefore if you want all admins, users, and guests to see something, you must add it to all 3 templates.
I think you have your facts messed up... the header_welcomeblock_member_admin template only shows the Admin CP link Smile
Belloman Wrote:Edit (just pointing this out to Dennis):
Dennis Tsang Wrote:
zaher1988 Wrote:If you wanna add something that appears for all usres, and guests, put ur link in both guest and users' panel.

Regards

Just to clarify that, anyone who does NOT have access to Admin CP will see the header_welcomeblock_member template (regardless of mod/supermod). Users with access to the Admin CP will see the header_welcomeblock_member_admin template. And users not logged in will see the header_welcomeblock_guest

Therefore if you want all admins, users, and guests to see something, you must add it to all 3 templates.
I think you have your facts messed up... the header_welcomeblock_member_admin template only shows the Admin CP link Smile

Oops. I'm still back in RC4 times Toungue. Thanks for correcting me. (Tells you how much I visit the template manager Toungue)

ive tried adding the script doesnt seem to work here is the code for my header (unmodified)

<script language="Javascript" type="text/javascript">
var cookieDomain = "$settings[cookiedomain]";
var cookiePath = "$settings[cookiepath]";
var quickdelete_confirm = "$lang->quickdelete_confirm";
var newpm_prompt = "$lang->newpm_prompt";
var deleteevent_confirm = "$lang->deleteevent_confirm";
var removeattach_confirm = "$lang->removeattach_confirm";
</script>
<a name="top"></a>
<div id="container">
<div id="header">
<div class="logo"><a href="$settings[bburl]/index.php"><img src="$theme[logo]" alt="$settings[bbname]" border="0" /></a></div>
<div class="menu">
<ul>
<li><a href="$settings[bburl]/search.php"><img src="$theme[imgdir]/toplinks/search.gif" border="0" alt="$lang->toplinks_search" />$lang->toplinks_search</a></li>
<li><a href="$settings[bburl]/memberlist.php"><img src="$theme[imgdir]/toplinks/memberlist.gif" border="0" alt="$lang->toplinks_memberlist" />$lang->toplinks_memberlist</a></li>
<li><a href="$settings[bburl]/calendar.php"><img src="$theme[imgdir]/toplinks/calendar.gif" border="0" alt="$lang->toplinks_calendar" />$lang->toplinks_calendar</a></li>
<li><a href="$settings[bburl]/misc.php?action=help"><img src="$theme[imgdir]/toplinks/help.gif" border="0" alt="$lang->toplinks_help" />$lang->toplinks_help</a></li>
</ul>
</div>
<hr class="hidden" />
<div id="panel">
$welcomeblock
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<div id="content">
$bannedwarning
$bbclosedwarning
$unreadreports
<navigation>
<br class="clear" />
heloo, umm it's ok it's just a little miss what happend with deniss, but his gr8

now regarding the code, just copy and paste this.

<script language="Javascript" type="text/javascript">
var cookieDomain = "$settings[cookiedomain]";
var cookiePath = "$settings[cookiepath]";
var quickdelete_confirm = "$lang->quickdelete_confirm";
var newpm_prompt = "$lang->newpm_prompt";
var deleteevent_confirm = "$lang->deleteevent_confirm";
var removeattach_confirm = "$lang->removeattach_confirm";
</script>
<a name="top"></a>
<div id="container">
<div id="header">
<div class="logo"><a href="$settings[bburl]/index.php"><img src="$theme[logo]" alt="$settings[bbname]" border="0" /></a></div>
<div class="menu">
<ul>
<li><a href="$settings[homeurl]">$settings[homename]</a></li>
<li><a href="$settings[bburl]/search.php"><img src="$theme[imgdir]/toplinks/search.gif" border="0" alt="$lang->toplinks_search" />$lang->toplinks_search</a></li>
<li><a href="$settings[bburl]/memberlist.php"><img src="$theme[imgdir]/toplinks/memberlist.gif" border="0" alt="$lang->toplinks_memberlist" />$lang->toplinks_memberlist</a></li>
<li><a href="$settings[bburl]/calendar.php"><img src="$theme[imgdir]/toplinks/calendar.gif" border="0" alt="$lang->toplinks_calendar" />$lang->toplinks_calendar</a></li>
<li><a href="$settings[bburl]/misc.php?action=help"><img src="$theme[imgdir]/toplinks/help.gif" border="0" alt="$lang->toplinks_help" />$lang->toplinks_help</a></li>
</ul>
</div>
<hr class="hidden" />
<div id="panel">
$welcomeblock
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<div id="content">
$bannedwarning
$bbclosedwarning
$unreadreports
<navigation>
<br class="clear" />

i though u have mentioned that you want it in the welcome panel ?

reagrds
thanks all it seems I didnt add the changes to the global template and thats why I wasn't seeing the change.

1 more question using:

<li><a href="$settings[homeurl]">$settings[homename]</a></li>

is there a way to add a title for a link to conceal the url (without using an image) e.g calling the link "Return to home Page"
Pages: 1 2