Adding a link only to the homepage footer

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Adding a link only to the homepage footer

Postby tybi » Mon Feb 11, 2008 6:39 pm

Hi,

is there a nice way (or any way :D ) 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.
tybi
 
Posts: 28
Joined: Sun Nov 04, 2007 3:41 pm

Advertisement

Postby SeO » Tue Feb 12, 2008 8:59 am

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: Select all
      } else {
         $user->lang['TRANSLATION_INFO'] .= $output;
      }


With :
Code: Select all
      } elseif ($this->seo_opt['req_file'] == 'index') {
         $user->lang['TRANSLATION_INFO'] .= $output;
      }


;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby tybi » Wed Feb 13, 2008 10:53 am

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: Select all
      } else {
         $user->lang['TRANSLATION_INFO'] .= $output;
      }


With :
Code: Select all
      } elseif ($this->seo_opt['req_file'] == 'index') {
         $user->lang['TRANSLATION_INFO'] .= $output;
      }


;)
tybi
 
Posts: 28
Joined: Sun Nov 04, 2007 3:41 pm

Postby SeO » Wed Feb 13, 2008 5:59 pm

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).
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby HB » Thu Feb 14, 2008 1:23 am

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
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1504
Joined: Mon Oct 16, 2006 2:25 am

Postby SeO » Thu Feb 14, 2008 10:34 am

Code: Select all
<!-- 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).
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby tybi » Thu Feb 14, 2008 3:57 pm

SeO wrote:
Code: Select all
<!-- 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. :D
tybi
 
Posts: 28
Joined: Sun Nov 04, 2007 3:41 pm


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Baidu [Spider] and 40 guests