1 (edited by Audiofeeline 2015-07-09 16:06)

Topic: [PunBB 1.4.3] SEO home title

/!\ Only this post is up to date /!\

Hi all,
I'm actually optimizing my PunBB, I'll use this post to share with you what I change.

First thing, the TITLE...
I made this to use board description on home page.

./header.php (Line ~87)

After

// Should we output feed links?
if (FORUM_PAGE == 'index')
{

Add

$forum_head['title'] = '<title>'.htmlentities($forum_config['o_board_desc']).'</title>';
$forum_head['meta'] = '<meta name="description" content="TYPE YOUR BOARD DESCRIPTION HERE">';

Re: [PunBB 1.4.3] SEO home title

Nice. Thanks...

Re: [PunBB 1.4.3] SEO home title

thx
it work's
http://forum.pinang.or.id/topic21-sejarah-fonang.html

Re: [PunBB 1.4.3] SEO home title

thank you for sharing, Audiofeeline. I will implement it and will let you know how it goes  smile

would you please share how you made the share and the retweet buttons in every post? I like it and would like to use it  smile
http://content.screencast.com/users/FaithJaya/folders/Snagit/media/bbe647d5-aadb-4c04-8222-805a5d178e2a/07.03.2010-23.28.39.png

Re: [PunBB 1.4.3] SEO home title

Faith Jaya wrote:

would you please share how you made the share and the retweet buttons in every post? I like it and would like to use it  smile

here http://punbb.informer.com/forums/topic/ … ost-share/

6 (edited by rs324 2010-08-30 15:28)

Re: [PunBB 1.4.3] SEO home title

Audiofeeline wrote:

$audio_title = generate_crumbs(true); $audio_title = str_replace("(Page 1)", "", $audio_title); if (FORUM_PAGE == 'index') {$forum_head['title'] = '<title>'.$forum_config['o_board_desc'].'</title>';} else {$forum_head['title'] = '<title>'.$audio_title.'</title>';}

what about Page 2 ? Page 3 ? etc...
also you have problem with multi lang support

i have written quick edit supporting all other stuff

if (FORUM_PAGE == 'index') 
{
    $forum_head['title'] = '<title>'.$forum_config['o_board_desc'].'</title>';
}
else 
{
         if (isset($forum_page['page']))
    {
        $pageNum = ' ('.$lang_common['Page'].' '.forum_number_format($forum_page['page']).')' ;
    }
    else
    {
        $pageNum ='';
    }
    $Seotitle = str_replace($pageNum,'',generate_crumbs(true));
    $forum_head['title'] = '<title>'.$Seotitle.'</title>';
}

enjoy.

7 (edited by Audiofeeline 2010-08-30 22:04)

Re: [PunBB 1.4.3] SEO home title

I kept other pagination cause i think that's useful and avoid duplicate titles. smile

Re: [PunBB 1.4.3] SEO home title

Audiofeeline wrote:

I kept other pagination cause i think that's useful and avoid duplicate titles. smile

+1

Personally, I just add && ($forum_page['page'] > 1) in file FORUM_ROOT.'include/functions.php' at line 519

=>

$crumbs .= (is_array($forum_page['crumbs'][$i]) ? forum_htmlencode($forum_page['crumbs'][$i][0]) : forum_htmlencode($forum_page['crumbs'][$i])).((isset($forum_page['page']) && $i == ($num_crumbs - 1)) ? ' ('.$lang_common['Page'].' '.forum_number_format($forum_page['page']).')' : '').($i > 0 ? $lang_common['Title separator'] : '');

to

$crumbs .= (is_array($forum_page['crumbs'][$i]) ? forum_htmlencode($forum_page['crumbs'][$i][0]) : forum_htmlencode($forum_page['crumbs'][$i])).((isset($forum_page['page']) && $i == ($num_crumbs - 1) && ($forum_page['page'] > 1)) ? ' ('.$lang_common['Page'].' '.forum_number_format($forum_page['page']).')' : '').($i > 0 ? $lang_common['Title separator'] : '');

I don't speak English, but Google Translate is doing pretty good.

Re: [PunBB 1.4.3] SEO home title

Nice shot. Well done.

Re: [PunBB 1.4.3] SEO home title

Hello !
I've just updated my first post.
I hope it could help some webmasters here.
Feel free to improve that short code and share with others ! smile