1 (edited by Audiofeeline 2010-07-03 19:30)

Topic: SEO modifications

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 ~84)

$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>';}

==> This will remove "(Page 1)" in title too but it keep pagination for other pages.

Breakeo.com : What's The Buzz?! :)

Re: SEO modifications

Nice. Thanks...

Re: SEO modifications

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

Re: SEO modifications

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: SEO modifications

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: SEO modifications

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: SEO modifications

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

Breakeo.com : What's The Buzz?! :)

Re: SEO modifications

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.
Just my PunBB playground.

Re: SEO modifications

Nice shot. Well done.

Breakeo.com : What's The Buzz?! :)