| :: |
| Author |
Message |
tybi
Joined: 04 Nov 2007 Posts: 28
|
Posted: Mon Feb 11, 2008 6:39 pm Post subject: Adding a link only to the homepage footer |
|
|
Hi,
is there a nice way (or any way ) to add a link (or whatever) in the footer of the homepage, but the link (or whatever) will not appear on the other subpages?
Thanks. |
|
|
| Back to top |
|
 |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
Posted: Tue Feb 12, 2008 8:59 am Post subject: Re: Adding a link only to the homepage footer |
|
|
Yes, you can if you want only link-back on one page, preferably the home or forum index.
Do only output the link on the forum index, you could replace :
| Code: | } else {
$user->lang['TRANSLATION_INFO'] .= $output;
} |
With :
| Code: | } elseif ($this->seo_opt['req_file'] == 'index') {
$user->lang['TRANSLATION_INFO'] .= $output;
} |
 |
_________________ phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible ! |
|
| Back to top |
|
 |
tybi
Joined: 04 Nov 2007 Posts: 28
|
Posted: Wed Feb 13, 2008 10:53 am Post subject: Re: Adding a link only to the homepage footer |
|
|
Thanks, but it was not a question about the phpbb-seo.com link. It was a general question about how to add anything to the overall_footer.html so it will appear only on the homepage.
Thanks.
| SeO wrote: | Yes, you can if you want only link-back on one page, preferably the home or forum index.
Do only output the link on the forum index, you could replace :
| Code: | } else {
$user->lang['TRANSLATION_INFO'] .= $output;
} |
With :
| Code: | } elseif ($this->seo_opt['req_file'] == 'index') {
$user->lang['TRANSLATION_INFO'] .= $output;
} |
 |
|
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
Posted: Wed Feb 13, 2008 5:59 pm Post subject: Re: Adding a link only to the homepage footer |
|
|
Oh I see.
So you can either use the $phpbb_seo->seo_opt['req_file'] var to match a file like I suggested in php, (if equal to index, viewtopic, viewforump) or do the same in the templates using the {SCRIPT_NAME} tpl var (with the template if syntax). |
_________________ phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible ! |
|
| Back to top |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 829
|
Posted: Thu Feb 14, 2008 1:23 am Post subject: Re: Adding a link only to the homepage footer |
|
|
| SeO wrote: | | ...do the same in the templates using the {SCRIPT_NAME} tpl var (with the template if syntax). |
Oddly enough, it appears that S_VIEWTOPIC and S_VIEWFORUM are predefined, but not S_INDEX? Anyway, like dcz, it's easy enough to add a template variable and the usual <!-- IF S_BLAH_BLAH -->xyz xyz<!-- ELSEIF ... --> syntax. |
_________________ Dan Kehn |
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
|
| Back to top |
|
 |
tybi
Joined: 04 Nov 2007 Posts: 28
|
Posted: Thu Feb 14, 2008 3:57 pm Post subject: Re: Adding a link only to the homepage footer |
|
|
| SeO wrote: | | Code: | | <!-- IF SCRIPT_NAME eq index --> | should do the trick too, the SCRIPT_NAME tpl vars holds the current script name (used in the body tag id building). |
Thanks, this was exactly what I was looking for.  |
|
|
| Back to top |
|
 |
|
|