Page 5 of 12

Re: Add Homepage link in header

Posted: Thu Aug 13, 2009 10:04 pm
by Enormity
Hi, I've never installed a mod before, and don't know how to do it. The post that explains how to install a mod says to follow the instructions in the install_mod.xml, but the instructions do not display correctly for me, and I don't actually see anywhere where it says to do something. Can you tell me what I am supposed to do for this? Thanks~

Re: Add Homepage link in header

Posted: Thu Aug 13, 2009 10:48 pm
by ChriZathens
After downloading the zip which contains this mod, you extract it . After the extraction you get a folder with a contrib directory and 3 other files. You need to open install_mod.xml in your web browser (IE, FF, Opera, Safari, or whatever you use) Then you follow the instructions which are written there... :)

Re: Add Homepage link in header

Posted: Thu Aug 13, 2009 11:08 pm
by Enormity
Ok, I was to clarify something... lol~ When I was doing this before, I was opening it directly from the zip file and not extracting it. Doing this is no good. It wasn't displaying it correctly. I had extracted it before I wrote my last message, but had not tried opening it again. Anyway, it is displaying right, now.

Re: Add Homepage link in header

Posted: Fri Aug 14, 2009 8:58 am
by relaxed4u
I just wanna say thanX for author, this mod working fine :mrgreen:

(tested phpbb ver. 3.0.5 on CA_black style)

Re: Add Homepage link in header

Posted: Fri Aug 14, 2009 7:57 pm
by ChriZathens
You are welcome ;)

Add Homepage link to Style "etechgreen"

Posted: Sat Aug 15, 2009 7:26 am
by barricademan41
I would like to use this mod with the style (etechgreen).

Are you familiar with that style?

Here is the link to the style in question... http://www.phpbb.com/community/viewtopi ... &t=1341625

Sincerely,
Barricademan

Re: Add Homepage link in header

Posted: Sat Aug 15, 2009 11:43 am
by ChriZathens
You should have no problems.
You use subsilver2 instructions. If you need further assistance I'm right here... ;)

Re: Add Homepage link in header

Posted: Mon Aug 17, 2009 10:44 pm
by makris
ChriZathens wrote:You should have no problems.
You use subsilver2 instructions. If you need further assistance I'm right here... ;)
I use this instructions on my forum (also on eTech theme) but looks like mod doesn't work.

Re: Add Homepage link in header

Posted: Tue Aug 18, 2009 7:19 am
by ChriZathens
This mod does work, otherwise it wouldn't have been validated by the mod team in the first place... ;)
If it does not work for you, then there must be an error in your installation,
For starters, re-check all your edits and make sure that they are all correct. Also you can post here (in code tags) your overall_header.html so that I can take a look. A link to your style would be nice, too, so that perhaps I can install it and test it..

Re: Add Homepage link in header

Posted: Tue Aug 18, 2009 7:45 am
by makris
I know it works with subsubsilver theme ;)

That's eTech overal_header code:

Code: Select all

<!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" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<!-- INCLUDE ca_config.html -->
<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2002-2006 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} - <!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}</title>

<!-- IF T_STYLESHEET_LINK -->
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
<!-- ELSE -->
<style type="text/css">
{T_THEME_DATA}
</style>
<!-- ENDIF -->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{T_THEME_PATH}/ie7.css" />
<![endif]-->

<script type="text/javascript">
// <![CDATA[

<!-- IF S_USER_PM_POPUP -->
	if ({S_NEW_PM})
	{
		popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
	}
<!-- ENDIF -->

function popup(url, width, height, name)
{
	if (!name)
	{
		name = '_popup';
	}

	window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
	return false;
}

function jumpto()
{
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var perpage = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';

	if (page !== null && !isNaN(page) && page > 0)
	{
		document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * perpage);
	}
}

/**
* Find a member
*/
function find_username(url)
{
	popup(url, 760, 570, '_usersearch');
	return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
	var parent = document.getElementById(id);
	if (!parent)
	{
		eval('parent = document.' + id);
	}

	if (!parent)
	{
		return;
	}

	var rb = parent.getElementsByTagName('input');
	
	for (var r = 0; r < rb.length; r++)
	{
		if (rb[r].name.substr(0, name.length) == name)
		{
			rb[r].checked = state;
		}
	}
}

<!-- IF ._file -->

	/**
	* Play quicktime file by determining it's width/height
	* from the displayed rectangle area
	*
	* Only defined if there is a file block present.
	*/
	function play_qt_file(obj)
	{
		var rectangle = obj.GetRectangle();

		if (rectangle)
		{
			rectangle = rectangle.split(',')
			var x1 = parseInt(rectangle[0]);
			var x2 = parseInt(rectangle[2]);
			var y1 = parseInt(rectangle[1]);
			var y2 = parseInt(rectangle[3]);

			var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
			var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
		}
		else
		{
			var width = 200;
			var height = 0;
		}

		obj.width = width;
		obj.height = height + 16;

		obj.SetControllerVisible(true);

		obj.Play();
	}
<!-- ENDIF -->

if(navigator.userAgent && navigator.userAgent.indexOf('Mac OS X') > 0)
{
	document.write('<link rel="stylesheet" href="{T_THEME_PATH}/mac.css" type="text/css" />');
}

// ]]>
</script>
</head>
<body class="{S_CONTENT_DIRECTION}">

<a name="top"></a>

<table border="0" cellspacing="0" cellpadding="0" width="{$CA_WIDTH}" id="maintable" align="center">
<tr>
	<td id="logorow" align="center"><div id="logotop">
		<a href="{U_INDEX}">{SITE_LOGO_IMG}</a>
	</div></td>
</tr>
<tr>
	<td class="navrow">
		<!-- IF not S_IS_BOT -->
			<!-- IF S_USER_LOGGED_IN --><a href="{U_PROFILE}">{L_PROFILE}</a> &#8226; <!-- ENDIF -->
			<!-- IF S_USER_LOGGED_IN -->
				<!-- IF S_DISPLAY_PM --><a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a> &#8226; <!-- ENDIF -->
			<!-- ELSEIF S_REGISTER_ENABLED --><a href="{U_REGISTER}">{L_REGISTER}</a> &#8226; <!-- ENDIF -->
		<!-- ENDIF -->
		<!-- IF U_RESTORE_PERMISSIONS --><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a> &#8226; <!-- ENDIF -->
		<a href="{U_FAQ}">{L_FAQ}</a>
		<!-- IF S_DISPLAY_SEARCH --> &#8226; <a href="{U_SEARCH}">{L_SEARCH}</a><!-- ENDIF -->
		<!-- IF not S_IS_BOT -->
			<!-- IF S_DISPLAY_MEMBERLIST --> &#8226; <a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a><!-- ENDIF -->
		<!-- ENDIF -->
		<!-- IF not S_IS_BOT --> &#8226; <a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- ENDIF -->
	</td>
</tr>
<tr>
	<td id="contentrow">

<!-- IF not S_IS_BOT && not $CA_SKIP_PM_NOTIFY && S_USER_LOGGED_IN && S_DISPLAY_PM -->
	<!-- IF S_USER_NEW_PRIVMSG -->
		<div class="pm-notify-new"><div class="pm-notify-header">{L_PRIVATE_MESSAGES}</div><a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a></div>
	<!-- ELSEIF S_USER_UNREAD_PRIVMSG -->
		<div class="pm-notify-unread"><div class="pm-notify-header">{L_PRIVATE_MESSAGES}</div><a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a></div>
	<!-- ENDIF -->
<!-- ENDIF -->  

<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
	<div class="pm-notify-new"><div class="pm-notify-header">{L_INFORMATION}</div>{L_BOARD_DISABLED}</div>
<!-- ENDIF -->

<table width="100%" cellspacing="0">
<tr>
	<td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
	<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
</tr>
</table>

	<!-- IF S_DISPLAY_SEARCH -->
	<p class="searchbar">
		<span style="float: {S_CONTENT_FLOW_BEGIN};"><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a> | <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></span>
		<!-- IF S_USER_LOGGED_IN -->
		<span style="float: {S_CONTENT_FLOW_END};"><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></span>
		<!-- ENDIF -->
	</p>
	<!-- ENDIF -->

Re: Add Homepage link in header

Posted: Tue Aug 18, 2009 8:26 am
by ChriZathens
Well, there are minor differences in etech template. So:
Open styles/etech/template/overall_header.html
find

Code: Select all

	<td class="navrow">
after, add:

Code: Select all

		<!-- IF S_SHOW_HOMEPAGE and U_HOMEPAGE --><a href="{U_HOMEPAGE}" <!-- IF U_HOMEPAGE_TITLE -->title="{U_HOMEPAGE_TITLE}"<!-- ENDIF --><!-- IF S_SHOW_HOMEPAGE_IN_NEW -->onclick="window.open(this.href); return false;"<!-- ENDIF -->>{L_HOMEPAGE}</a> &#8226; <!-- ENDIF -->
This should do it..
After applying the edits don't forget to refresh your templates and clear your cache.. :)
Let me know if you're good..

Re: Add Homepage link in header

Posted: Thu Aug 20, 2009 11:08 am
by robgib
hi chriz

thanks for the mod ....can you advise please

i tested in my xammp testsite

works ok in prosilver....but not in subsilver or another theme i have aerored

i moved this board for someone away from an iis host....so your mod is ideal to link back to the main website

do i have to do the file edits on overall_header.html for each style?


i am trying again as i have had trouble with file edits when using wordpad...
i

Re: Add Homepage link in header

Posted: Thu Aug 20, 2009 12:43 pm
by ChriZathens
I would use notepad++ for any file edits regarding phpbb. I don't think you'll have a problem in template files, but still recommend it.
As for the homepage link:
  1. Do you also have prosilver in your forum and does it work when you change to prosilver?
    (If you do have prosilver and it works with prosilver them we can be sure that all non-template edits are OK..)
  2. Do you have a link to the style you are using so that I can take a look in the html files?
  3. If you have other mods installed that have made changes to overall_header.html I would also need you to paste here your overall_header.html (in code tags)

Re: Add Homepage link in header

Posted: Thu Aug 20, 2009 1:11 pm
by robgib

Code: Select all

<!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" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />

<script type="text/javascript">
// <![CDATA[
<!-- IF S_USER_PM_POPUP -->
	if ({S_NEW_PM})
	{
		popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
	}
<!-- ENDIF -->

function popup(url, width, height, name)
{
	if (!name)
	{
		name = '_popup';
	}

	window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
	return false;
}

function jumpto()
{
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var perpage = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';

	if (page !== null && !isNaN(page) && page > 0)
	{
		document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * perpage);
	}
}

/**
* Find a member
*/
function find_username(url)
{
	popup(url, 850, 570, '_usersearch');
	return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
	var parent = document.getElementById(id);
	if (!parent)
	{
		eval('parent = document.' + id);
	}

	if (!parent)
	{
		return;
	}

	var rb = parent.getElementsByTagName('input');
	
	for (var r = 0; r < rb.length; r++)
	{
		if (rb[r].name.substr(0, name.length) == name)
		{
			rb[r].checked = state;
		}
	}
}

<!-- IF ._file -->

	/**
	* Play quicktime file by determining it's width/height
	* from the displayed rectangle area
	*
	* Only defined if there is a file block present.
	*/
	function play_qt_file(obj)
	{
		var rectangle = obj.GetRectangle();

		if (rectangle)
		{
			rectangle = rectangle.split(',')
			var x1 = parseInt(rectangle[0]);
			var x2 = parseInt(rectangle[2]);
			var y1 = parseInt(rectangle[1]);
			var y2 = parseInt(rectangle[3]);

			var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
			var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
		}
		else
		{
			var width = 200;
			var height = 0;
		}

		obj.width = width;
		obj.height = height + 16;

		obj.SetControllerVisible(true);

		obj.Play();
	}
<!-- ENDIF -->

// ]]>
</script>
</head>
<body class="{S_CONTENT_DIRECTION}">

<a name="top"></a>

<div id="wrapheader">

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="background:url('{T_THEME_PATH}/images/top.png');">
          <tr>
          <td height="42">
<div class="toplink">
<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->
<!-- IF S_DISPLAY_PM -->
<span class="genmedw"><a class="genmedw" href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a></span>
<!-- ENDIF -->
<!-- ENDIF -->
</div></td>
    <td height="32" align="right">
<div class="toplink">
<!-- IF not S_USER_LOGGED_IN --><span class="genmedw"><a class="genmedw" href="{U_REGISTER}">{L_REGISTER}</a> &bull; </span><!-- ENDIF -->
<span class="genmedw"><a class="genmedw" href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></span>
<!-- ENDIF -->
</div>
</td>
  </tr>
  </table>  
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="background:url('{T_THEME_PATH}/images/mid.png');">
  <tr>
    <td height="80"><div class="midlink"><span class="headw"><img src="{T_THEME_PATH}/site_logo.jpg"></span><br /><span class="genmedw">{SITE_DESCRIPTION}</span></div></td>
      <td height="80" align="right">
<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
<div class="midlink">
<div id="search-box">
<form action="{U_SEARCH}" method="post" id="search">
            <fieldset class="nb">
               <input name="keywords" style="opacity:0.7;filter:alpha(opacity=70)" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" onmouseout="this.style.opacity=0.7;this.filters.alpha.opacity=70" type="text" class="inputbox search" id="keywords" title="{L_SEARCH_KEYWORDS}" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" maxlength="50" />
               <input class="nb" name="submit" type="image" src="{T_THEME_PATH}/images/search.png" align="absmiddle" /><br />
{S_SEARCH_HIDDEN_FIELDS}
            </fieldset>
</form>
</div>
</div>
      <!-- ENDIF -->
      </td>
  </tr>
  </table>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="background:url('{T_THEME_PATH}/images/bottom.png');">
    <tr>
      <td class="genmedw" height="42" align="left">
<div class="bottomlink">
      			<!-- IF S_USER_LOGGED_IN --><a class="genmedw" href="{U_PROFILE}">{L_PROFILE}</a><!-- ENDIF -->
				<!-- IF U_RESTORE_PERMISSIONS --> <a class="genmedw" href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
				<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &bull; <span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
</div>
</td>
<td class="genmedw" align="{S_CONTENT_FLOW_END}">
<div class="bottomlink"><span class="genmedw">
				<a class="genmedw" href="{U_FAQ}">{L_FAQ}</a><!-- IF not S_IS_BOT --><!-- IF S_DISPLAY_MEMBERLIST --> &bull; <a class="genmedw" href="{U_MEMBERLIST}">{L_MEMBERLIST}</a><!-- ENDIF --><!-- IF S_DISPLAY_SEARCH --> &bull; <a class="genmedw" href="{U_SEARCH}">{L_SEARCH}</a><!-- ENDIF --><!-- ENDIF -->
</span>
</div>
			</td>
    </tr>
  </table>

	<div id="datebar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
			<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
		</tr>
		</table>
	</div>

</div>

<div id="wrapcentre">

	<!-- IF S_DISPLAY_SEARCH -->
	<p class="searchbar">
		<span style="float: {S_CONTENT_FLOW_BEGIN};"><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a> | <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></span>
		<!-- IF S_USER_LOGGED_IN -->
		<span style="float: {S_CONTENT_FLOW_END};"><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></span>
		<!-- ENDIF -->
	</p>
	<!-- ENDIF -->

	<br style="clear: both;" />
	
	<!-- INCLUDE breadcrumbs.html -->

	<br />

that is the code from the overall_header.html file

there are no other mods installed

prosilver works fine......and subsilver is ok also
( i didnt see the subsilver modx file before!)

site is at http://www.kennythomasforum.co.uk/forum/index.php

thanks chriz

Re: Add Homepage link in header

Posted: Thu Aug 20, 2009 1:24 pm
by ChriZathens
The link to your forum does not work..
It would also be easier for me to give a link where I could download the style and test the changes myself.
Never mind, try this:
In overall_header.html find:

Code: Select all

<!-- IF not S_USER_LOGGED_IN --><span class="genmedw"><a class="genmedw" href="{U_REGISTER}">{L_REGISTER}</a> &bull; </span><!-- ENDIF -->
Add before:

Code: Select all

<!-- IF S_SHOW_HOMEPAGE and U_HOMEPAGE --><span class="genmedw"><a class="genmedw" href="{U_HOMEPAGE}" <!-- IF U_HOMEPAGE_TITLE -->title="{U_HOMEPAGE_TITLE}"<!-- ENDIF --><!-- IF S_SHOW_HOMEPAGE_IN_NEW -->onclick="window.open(this.href); return false;"<!-- ENDIF -->>{L_HOMEPAGE}</a> &bull; </span><!-- ENDIF -->
Let me know if it is OK..