phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Adding a link only to the homepage footer

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 Forum
::  
Author Message
tybi



Joined: 04 Nov 2007
Posts: 28

Adding a link only to the homepage footerPosted: 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 Very Happy ) 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
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3987

Adding a link only to the homepage footerPosted: 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;
      }


Wink

_________________
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

Adding a link only to the homepage footerPosted: 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;
      }


Wink
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3987

Adding a link only to the homepage footerPosted: 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
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 829

Adding a link only to the homepage footerPosted: 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
Visit poster's website
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3987

Adding a link only to the homepage footerPosted: Thu Feb 14, 2008 10:34 am    Post subject: Re: Adding a link only to the homepage footer

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).

_________________
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

Adding a link only to the homepage footerPosted: 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. Very Happy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 Forum
Page 1 of 1

Navigation Similar Topics

Jump to: