|
Joined: May 2009
Posts: 53
journeyman
|
journeyman
Joined: May 2009
Posts: 53 |
On another forum, the header.tpl code is an almost exact mirror to the one I have currently on my new forum {different admin/owner, showing me the ropes}, but they have an older UBB version. I tried to match the coding to add a link to the header {between 'my stuff' and 'user list'} but it just messes up the entire forum and I'm not sure if there's any way to do this without causing an issue.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
It really depends on what you have in your header. If you can give a link or even post what you're putting in your header here, we can probably help.
|
|
|
|
Joined: May 2009
Posts: 53
journeyman
|
journeyman
Joined: May 2009
Posts: 53 |
code given as an example from admin friend on other board:
{* Script Version 7.2.2 *}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="{$lang.READ_DIRECTION}">
<head>
<meta name="generator" content="UBB.threads {$version}" />
{literal}
<style type="text/css">
.popup_menu a,
.popup_menu label { display: block; padding: 2px; cursor: pointer; }
.ubbcode-pre {
font-family: monospace;
white-space: pre;
}
pre {
margin: 0px;
}
</style>
{/literal}
{$headerinsert}
{$refresh}
<meta http-equiv="Content-Type" content="text/html; charset={$lang.CHARSET}" />
<link rel="stylesheet" href="{$stylesheet}" type="text/css" />
<link rel="shortcut icon" href="{$config.BASE_URL}/images/{$style_array.general}/favicon.ico" />
{$rss_feed}
{foreach from=$javascript item=script}
<script type="text/javascript" src="{$config.BASE_URL}/ubb_js/{$script}"></script>
{/foreach}
<script language="javascript" type="text/javascript">
var baseurl = "{$config.BASE_URL}";
var fullurl = "{$config.FULL_URL}";
var imagedir = "{$style_array.general}";
var myUid = '{$myid}'; // Don't get excited, you can't exploit this :D
var submitClicked = "{$lang.SUBMIT_CLICKED}";
var open_block = new Image();
open_block.src = "{$config.BASE_URL}/images/{$style_array.general}/toggle_open.gif";
var closed_block = new Image();
closed_block.src = "{$config.BASE_URL}/images/{$style_array.general}/toggle_closed.gif";
var loadingpreview = "{$lang.LOADING_PREVIEW}";
var today = '{$today}';
</script>
<title>{if $inputTitle}{$inputTitle|strip_tags} - {/if}{$config.COMMUNITY_TITLE}{if $powered} - {$powered} UBB.threads™{/if}</title>
</head>
<body onload="{$onload}" onclick="{literal}if(event.which!=3){clearMenus(event)}{/literal}" {$onunload}>
<a name="top"></a>
{$headerfile}
{if $search_link}
<div id="active_popup" style="display: none;">
<table class="popup_menu">
<tr><td nowrap='nowrap' class="popup_menu_header">
{$lang.ACTIVE_TOPICS}
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}activetopics{$var_sep}range{$var_eq}1{$var_sep}type{$var_eq}t">{$lang.ACTIVE_24}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}activetopics{$var_sep}range{$var_eq}2{$var_sep}type{$var_eq}t">{$lang.ACTIVE_48}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}activetopics{$var_sep}range{$var_eq}7{$var_sep}type{$var_eq}t">{$lang.ACTIVE_7}</a>
</td></tr>
<tr><td nowrap='nowrap' class="popup_menu_header">
{$lang.ACTIVE_POSTS}
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}activetopics{$var_sep}range{$var_eq}1{$var_sep}type{$var_eq}p">{$lang.ACTIVE_24}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}activetopics{$var_sep}range{$var_eq}2{$var_sep}type{$var_eq}p">{$lang.ACTIVE_48}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}activetopics{$var_sep}range{$var_eq}7{$var_sep}type{$var_eq}p">{$lang.ACTIVE_7}</a>
</td></tr>
</table></div>
<script type="text/javascript">registerPopup("active_popup");</script>
{/if}
{if $myspace_link}
<div id="myspace_popup" style="display: none;">
<table class="popup_menu">
<tr><td nowrap='nowrap' class="popup_menu_header">
{$lang.MY_SPACE}
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}viewmessages">{$lang.MY_PRIVATES}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}editbasic">{$lang.EDIT_PROF}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}editdisplay">{$lang.EDIT_DISPLAY}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}myhome{$var_sep}n{$var_eq}1">{$lang.VIEW_WATCH}</a>
</td></tr>
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}userposts{$var_sep}id{$var_eq}{$myid}">{$lang.MY_POSTS}</a>
</td></tr>
</table></div>
<script type="text/javascript">registerPopup("myspace_popup");</script>
{/if}
<table border="0" align="center" width="{$config.TABLE_WIDTH}" cellpadding="0" cellspacing="0">
<tr>
<td>
{$tbopen}
<tr>
<td class="breadcrumbs">
<span style="float:right">{$welcome}
{if $mood && $config.ENABLE_MOODS}
<a title="{$lang.CHANGE_MOOD}" style="text-decoration: none" href="javascript: void(0);" onclick="javascript: window.open('{$config.BASE_URL}/ubbthreads.php?ubb=changemood','mood','toolbar=no,directories=no,location=no,scrollbars=yes,menubar=no,width=300,height=200')">
<img name="mood" src="{$config.BASE_URL}/images/{$style_array.mood}/{$mood}" style="vertical-align:middle" border="0" alt="{$lang.CHANGE_MOOD}" /> ↓
</a>
{/if}
</span>
<span style="float:left">
{if $config.ENABLE_MAIN_PORTAL}
<a href="{$config.BASE_URL}/ubbthreads.php">{$config.COMMUNITY_TITLE}</a>
{else}
<a href="{$config.HOMEPAGE_URL}">{$config.HOMEPAGE_TITLE}</a>
{/if}
{if $breadcrumb}
» {$breadcrumb}
{/if}
</span>
</td>
</tr>
<tr>
<td class="navigation">
{if $new_user_link}
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}newuser">{$lang.NEW_USER}</a>
{/if}
{if $cp_link}
<a href="{$config.BASE_URL}/admin/index.php">{$lang.ADMIN_MENU}</a>
{/if}
{if $config.ENABLE_MAIN_PORTAL}
<a href="{$config.BASE_URL}/ubbthreads.php">{$lang.PORTAL}</a>
{/if}
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}cfrm">{$lang.FORUM_LIST}</a>
{if $myspace_link}
<span style="cursor: pointer;" id="myspace_control" onclick="showHideMenu('myspace_control','myspace_popup')">
<a href="javascript:void(0);">{$lang.MY_SPACE}</a>
<img style="vertical-align: middle" src="{$config.BASE_URL}/images/{$style_array.general}/toggle_open.gif" alt="" />
</span>
{$new_flasher}
{/if}
<a href="/pmwiki/pmwiki.php">Site Wiki</a>
<a href="http://www.lightsideofdarkness.com/pmwiki/pmwiki.php?n=Start.CharacterApplications">Character Applications</a>
{if $user_list}
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showmembers">{$lang.USER_LIST}</a>
{/if}
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}calendar">{$lang.CALENDAR}</a>
{if $search_link}
<span style="cursor: pointer;" id="active_control" onclick="showHideMenu('active_control','active_popup')">
<a href="javascript:void(0);">{$lang.ACTIVE_TOPICS}</a>
<img style="vertical-align: middle" src="{$config.BASE_URL}/images/{$style_array.general}/toggle_open.gif" alt="" />
</span>
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}search">{$lang.TEXT_SEARCH}</a>
{/if}
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}faq">{$lang.FAQ_TEXT}</a>
</td>
</tr>
{$tbclose}
</td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellpadding="0" cellspacing="0" style="margin-top: -5px">
code in the present board:
{* Script Version 7.5.3 *}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang.XML_LANG}" lang="{$lang.XML_LANG}" dir="{$lang.READ_DIRECTION}">
<head>
<title>{if $inputTitle}{$inputTitle|strip_tags} - {/if}{if $powered}{$powered} UBB.threads™{else}{$config.COMMUNITY_TITLE}{/if}</title>
<meta name="generator" content="UBB.threads {$version}" />
{$headerinsert}
{$refresh}
<meta http-equiv="Content-Type" content="text/html; charset={$lang.CHARSET}" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" href="{$config.BASE_URL}/styles/common.css?v={$version}" type="text/css" />
<link rel="stylesheet" href="{$stylesheet}?v={$version}" type="text/css" />
<link rel="shortcut icon" href="{$config.BASE_URL}/images/{$style_array.general}/favicon.ico" />
{$rss_feed}
<script type="text/javascript">
// <![CDATA[
var baseurl = "{$config.BASE_URL}";
var fullurl = "{$config.FULL_URL}";
var script = "{ubb url="" full="true"}";
var imagedir = "{$style_array.general}";
var myUid = '{$myid}';
var submitClicked = "{$lang.SUBMIT_CLICKED}";
var open_block = new Image();
open_block.src = baseurl + "/images/{$style_array.general}/toggle_open.gif";
var closed_block = new Image();
closed_block.src = baseurl + "/images/{$style_array.general}/toggle_closed.gif";
var loadingpreview = "{$lang.LOADING_PREVIEW}";
var today = '{$today}';
var s_priv = '{$s_priv}';
// ]]>
</script>
{foreach from=$javascript item=script}
<script type="text/javascript" src="{$config.BASE_URL}/ubb_js/{$script}?v={$version}"></script>
{/foreach}
{if $config.MAX_WIDTH_IMAGE}
<style type="text/css">
.post_inner img {literal}{{/literal}
max-width: {$config.MAX_WIDTH_IMAGE}px;
{literal}}{/literal}
</style>
{/if}
</head>
<body{if $onload} onload="{$onload}"{/if} onclick="{literal}if(event.which!=3){clearMenus(event)}{/literal}"{if $onunload} {$onunload}{/if}>
<a id="top"></a>
{if $admin_closed_message}
{$tbopen}
<tr><td bgcolor="red" align="center">
<span style="font-size: 12pt; font-weight: bold;">
FORUM IS CURRENTLY CLOSED!
</span>
</td></tr>
<tr>
<td class="alt-1">
{$closed_message}
</td>
</tr>
{$tbclose}
{/if}
<div id="content">
{$headerfile}
<div id="active_popup" style="display: none;">
<table class="popup_menu">
<tr>
<td class="popup_menu_content"><a href="{ubb url="ubb=activetopics&range=7&type=t"}">{$lang.ACTIVE_TOPICS}</a></td>
</tr>
<tr>
<td class="popup_menu_content"><a href="{ubb url="ubb=activetopics&range=7&type=p"}">{$lang.ACTIVE_POSTS}</a></td>
</tr>
<tr>
<td class="popup_menu_content"><a href="{ubb url="ubb=activetopics&range=7&type=u"}">{$lang.ACTIVE_NO_ANSWERS}</a></td>
</tr>
</table>
</div>
<script type="text/javascript">
registerPopup("active_popup");
</script>
{if $search_link}
<div id="search_popup" style="display: none">
<form method="post" action="{ubb url=""}">
<input type="hidden" name="ubb" value="dosearch" />
<input type="hidden" name="daterange" value="0" />
<input type="hidden" name="where" value="bodysub" />
<input type="hidden" name="fromsearch" value="1" />
<input type="hidden" name="checkwords" value="1" />
<table class="popup_menu">
<tr>
<td nowrap='nowrap' class="popup_menu_header">{$lang.SEARCH_HEADER}</td>
</tr>
<tr>
<td class="popup_menu_content noclose">
<label>
<input type="text" name="Words" class="form-input" />
<input type="submit" name="textsearch" value="{$lang.GO_BUTTON}" class="form-button" />
</label>
</td>
</tr>
<tr>
<td class="popup_menu_content"><a href="{ubb url="ubb=search"}">{$lang.ADVANCED_BUTTON}</a></td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
registerPopup("search_popup");
</script>
{/if}
{if $myspace_link == 1}
<div id="myspace_popup" style="display: none;">
<table class="popup_menu">
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=viewmessages"}">{$lang.MY_PRIVATES}</a></td></tr>
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=editbasic"}">{$lang.EDIT_PROF}</a></td></tr>
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=editdisplay"}">{$lang.EDIT_DISPLAY}</a></td></tr>
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=myhome&n=1"}">{$lang.VIEW_WATCH}</a></td></tr>
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=showprofile&User=`$myid`"}">{$lang.VIEW_PROF}</a></td></tr>
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=userposts&id=`$myid`"}">{$lang.MY_POSTS}</a></td></tr>
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=mybuddies"}">{$lang.MY_BUDDIES}</a></td></tr>
{if $config.MY_FEEDS}
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=myfeeds&show=1"}">{$lang.MY_FEEDS}</a></td></tr>
{/if}
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=subscriptions"}">{$lang.MY_SUBS}</a></td></tr>
<tr><td class="popup_menu_content"><a href="{ubb url="ubb=mycookies"}">{$lang.MYCOOKIES}</a></td></tr>
</table></div>
<script type="text/javascript">registerPopup("myspace_popup");</script>
{/if}
<table align="center" width="{$config.TABLE_WIDTH}" cellpadding="0" cellspacing="0">
<tr>
<td>
{$tbopen}
<tr>
<td class="breadcrumbs">
<span style="float:right">{$welcome}
{if $mood && $config.ENABLE_MOODS}
<span title="{$lang.CHANGE_MOOD}" style="cursor: pointer" onclick="showChromeless('{ubb url="ubb=changemood"}','mood',400,300);">
<img name="mood" src="{$config.BASE_URL}/images/{$style_array.mood}/{$mood}" style="vertical-align:middle" alt="{$lang.CHANGE_MOOD}" /> ↓
</span>
{/if}
</span>
<span style="float:left">
{if $config.ENABLE_MAIN_PORTAL}
<a href="{ubb url=""}">{$config.COMMUNITY_TITLE}</a>
{else}
<a href="{$config.HOMEPAGE_URL}">{$config.HOMEPAGE_TITLE}</a>
{/if}
{if $breadcrumb}
» {$breadcrumb}
{/if}
</span>
</td>
</tr>
<tr>
<td class="navigation">
{if $new_user_link}
<a href="{ubb url="ubb=newuser"}">{$lang.NEW_USER}</a>
{/if}
{if $cp_link}
<a href="{$config.BASE_URL}/admin/index.php">{$lang.ADMIN_MENU}</a>
{/if}
{if $config.ENABLE_MAIN_PORTAL}
<a href="{ubb url=""}">{$lang.PORTAL}</a>
{/if}
<a href="{ubb url="ubb=cfrm"}">{$lang.FORUM_LIST}</a>
{if $myspace_link == 1}
<span style="cursor: pointer;" id="myspace_control" onclick="showHideMenu('myspace_control','myspace_popup')">
<a href="javascript:void(0);">{$lang.MY_SPACE}</a>
<img style="vertical-align: middle" src="{$config.BASE_URL}/images/{$style_array.general}/toggle_open.gif" alt="" />
</span>
{elseif $myspace_link == 2}
<a href="{ubb url="ubb=viewmessages"}">{$lang.MY_SPACE}</a>
{/if}
{$new_flasher}
{if $user_list}
<a href="{ubb url="ubb=showmembers"}">{$lang.USER_LIST}</a>
{/if}
{if $config.CALENDAR}
<a href="{ubb url="ubb=calendar"}">{$lang.CALENDAR}</a>
{/if}
<span style="cursor: pointer;" id="active_control" onclick="showHideMenu('active_control','active_popup')">
<a href="javascript:void(0);">{$lang.ACTIVE_TOPICS}</a>
<img style="vertical-align: middle" src="{$config.BASE_URL}/images/{$style_array.general}/toggle_open.gif" alt="" />
</span>
{if $search_link}
<span style="cursor: pointer;" id="search_control" onclick="showHideMenu('search_control','search_popup')">
<a href="javascript:void(0);">{$lang.TEXT_SEARCH}</a>
<img style="vertical-align: middle" src="{$config.BASE_URL}/images/{$style_array.general}/toggle_open.gif" alt="" />
</span>
{/if}
<a href="{ubb url="ubb=faq"}">{$lang.FAQ_TEXT}</a>
</td>
</tr>
{$tbclose}
</td>
</tr>
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0" style="margin-top: -5px">
links/URLs desired for inclusion: Site Wiki {directly to the right of 'my stuff' preferably} http://illusionarylabyrinth.net/pmwiki/pmwiki.phpCharacter Applications {directly to the right of 'site wiki', directly to the left of 'user list' preferably} http://illusionarylabyrinth.net/pmwiki/pmwiki.php?n=Start.CharacterApplications
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
HERE is a post that may help you get started
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
Actually it is fairy simple using the post I referenced. In Template: header.tpl Just above and below {$new_flasher} Insert <a href="http://illusionarylabyrinth.net/pmwiki/pmwiki.php">Site WIKI</a>
<a href="http://illusionarylabyrinth.net/pmwiki/pmwiki.php?n=Start.CharacterApplications">Applications</a> Of course I don't know what version you are using but that should be fairly close.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: May 2009
Posts: 53
journeyman
|
journeyman
Joined: May 2009
Posts: 53 |
You're a DOLL. I feel rather... foolish now that I look at it because it is really simple. But thank you for the help!
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
No problem. If you use absolute paths to do this it will reference the default paths, So you were probably not including http://www.blabla
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Oct 2009
Posts: 260
enthusiast
|
enthusiast
Joined: Oct 2009
Posts: 260 |
It really depends on what you have in your header. If you can give a link or even post what you're putting in your header here, we can probably help. Rick, I want to create a script called: selfsearch.inc.php And throw it in the scripts directory of the server And make: 'Self Search' appear in the Header pointing to that script Between the User List and Calendar And how I can have this Self Search link appear only to a user that is logged in?
|
|
|
|
Joined: Jan 2005
Posts: 186
member
|
member
Joined: Jan 2005
Posts: 186 |
There is a more complete way to do this but I'll give you my easy way to do it. First off I only have the User List available to people that are logged in. So if that works for you then just disable guests from viewing it. Then put the new link in the {if $user_list} section before the {/if} line.
|
|
|
|
Joined: Oct 2009
Posts: 260
enthusiast
|
enthusiast
Joined: Oct 2009
Posts: 260 |
There is a more complete way to do this but I'll give you my easy way to do it. First off I only have the User List available to people that are logged in. So if that works for you then just disable guests from viewing it. Then put the new link in the {if $user_list} section before the {/if} line. Thank you, but I don't even know how to do the first part To make a 'Self Search' link appear in the Header, pointing to that (new) script Between the User List and Calendar ?
|
|
|
|
Joined: Jan 2005
Posts: 186
member
|
member
Joined: Jan 2005
Posts: 186 |
I think the user list is only viewable to logged in used as default, but if not here is how to get there. First, go to your control panel. Click "Group Management" under "Forums" section in the left nav. Then on the line that is for "Guests" click "Site". Make sure that the first box "Can view the Member List" is set to 0. If not, then change it and hit the "Update this Group's Permissions" button at the bottom. Now to edit the header click "Templates" under the "Display Options" section in the left nav. Once you are on the template editor page scroll down the list until you see header.tpl. Select it and then hit the "Edit Selected Template" button. Copy the contents of the original template into notepad so that you'll have it in case something goes wrong. I have one header that is already edited so this may not be the exact thing to look for but try searching for a line that has the following on it: <a href="{ubb url="ubb=showmembers"}">{$lang.USER_LIST}</a> Then add your link on a new line below it. Does that help? Feel free to ask more questions. Also, realize that any changes you make to the templates will have to be reapplied whenever version 8 comes out. Make sure you keep a list of things to change whenever you upgrade.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
whenever you make a modification (suggestion here), add a comment to the file..
for me in .tpl (templates), i add {* SD:Mod - reason for modification *}
for php files, i add // SD:Mod - reason for modification
this allows for a utility like grep (free) to just search for any file with "SD:Mod" in it as a reminder.
of course Beyond Compare (not a free utility) will also note any differences as well..
it's just good to put in an indicator of sorts in any file that you touched it and for what reason and where.. :2cents:
|
|
|
|
Joined: Oct 2009
Posts: 260
enthusiast
|
enthusiast
Joined: Oct 2009
Posts: 260 |
Thanks guys. It didn't work though Nothing happened. It's blank I added this in the header.tpl {if $user_list}
<a href="{ubb url="ubb=showmembers"}">{$lang.USER_LIST}</a>
{/if}
{* LR:Mod - reason for modification - self search link *}
<a href="{ubb url="ubb=selfsearch"}">{$lang.SELF_SEARCH}</a>
{if $config.CALENDAR}
<a href="{ubb url="ubb=calendar"}">{$lang.CALENDAR}</a>
{/if} I copied activetopics.inc.php and renamed it selfsearch.inc.php and uploaded it into the scripts directory on the server
|
|
|
|
Joined: Jan 2005
Posts: 186
member
|
member
Joined: Jan 2005
Posts: 186 |
First thing is that it will show up for anyone if you have it in that spot. If you only want it to show up put it before the {/if} after the User List link.
In your link you have it as {$lang.SELF_SEARCH}. This would work if you created an entry in the language editor. The easy way is to just use "Self Search" instead of {$lang.SELF_SEARCH}.
If you want to add it to your language file you would need to go to "Languages" under "Display Options." Then click the "Language Editor" tab. To the right of 'Choose Specific Language File:" scroll down until you see generic.php. Select that and hit go. Scroll down to the bottom of the page and enter a new key which will be key = SELF_SEARCH string = Self Search
That is a lot of extra work just to get the name in there though if you are only going to use it in the one place.
That will get the link to show up, but I don't think the script will work as is. I guess how to set that up would work better at ubbdev, which I see you already have a couple threads about.
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
Well to start with if you only want registered users to see it it needs to be moved up a bit. {if $user_list}
<a href="{ubb url="ubb=showmembers"}">{$lang.USER_LIST}</a>
{/if}
{* LR:Mod - reason for modification - self search link *}
<a href="{ubb url="ubb=selfsearch"}">{$lang.SELF_SEARCH}</a>
Move it above the (/if) to: {if $user_list}
<a href="{ubb url="ubb=showmembers"}">{$lang.USER_LIST}</a>
{* LR:Mod - reason for modification - self search link *}
<a href="{ubb url="ubb=selfsearch"}">{$lang.SELF_SEARCH}</a>
{/if}
Why is it blank could be several items. Such as does the language file key self_search have any text in it so at least something shows. Should have been added to the generic.php file Key: SELF_SEARCH String: Self Search. Then the question is does the actual script work.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Oct 2009
Posts: 260
enthusiast
|
enthusiast
Joined: Oct 2009
Posts: 260 |
Thanks guys, I did exactly what you said here
It still shows up when I log out (but that is not a major problem for me)
But there is a weird space between Forum List and User List
?
Ok, that space between Forum List and User List is only there when I'm logged out
Ok nevermind, maybe it's because My_Stuff disappears when I log out, and I never noticed that space in between before
Last edited by lightningrod; 03/11/2010 3:43 PM.
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
It will show because you allow guests to see the user list. Control Panel » Group Management » Guests Site Permissions First option is Can view the Member List set it to 0 for guests. Then both the user list and self search will only be visible when logged in as a user.
BTW that space may be due to a reserved spot for the message indicator.
Last edited by Ruben; 03/11/2010 3:50 PM. Reason: added BTW
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Oct 2009
Posts: 260
enthusiast
|
enthusiast
Joined: Oct 2009
Posts: 260 |
It will show because you allow guests to see the user list. Control Panel » Group Management » Guests Site Permissions First option is Can view the Member List set it to 0 for guests. Then both the user list and self search will only be visible when logged in as a user. Thanks. I want Guests to see the User List How can I put it between My_Stuff and User List, instead? Or between Calender and Active_Topics? Can I make the Calender disappear for Guests?
Last edited by lightningrod; 03/11/2010 3:58 PM.
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
move it above the: {if $user_list}
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Oct 2009
Posts: 260
enthusiast
|
enthusiast
Joined: Oct 2009
Posts: 260 |
move it above the: {if $user_list} It didn't work between My_Stuff and User List It disappeared I can try between Calender and Active Topics But where can I make the Calender disappear for Guests? Ok I'm going to leave it like this for now. There is no other way. If I ever want it to disappear for Guests I'll just put it before the User List and make the User List disappear for Guests thanks
Last edited by lightningrod; 03/11/2010 4:08 PM.
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (1 invisible),
756
guests, and
178
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|