[SEO URL] phpBB3 portal

phpBB SEO mods by phpBB SEO.

Moderator: Moderators

[SEO URL] phpBB3 portal

Postby dcz » Thu Jun 18, 2009 3:46 pm

Hello,
here is a thread to tweak the phpBB3 portal v1.2.2 from here : http://www.phpbb3portal.com/download/

The goal is to have the various blocks to output rewritten URLs with the Ultimate SEO URL mod (all modes).

Open :
Code: Select all
portal/includes/functions.php

Find :
Code: Select all
function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $type)
{
   global $db, $phpbb_root_path, $auth, $bbcode_bitfield, $user, $forum_id;

After add:
Code: Select all
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   global $phpbb_seo;
   // www.phpBB-SEO.com SEO TOOLKIT END

Find :
Code: Select all
   $sql = 'SELECT
         t.forum_id,
         t.topic_id,
         t.topic_last_post_id,
         t.topic_time,
         t.topic_title,
         t.topic_attachment,
         t.topic_views,
         t.poll_title,
         t.topic_replies,
         t.forum_id,
         t.topic_poster,

Replace with :
Code: Select all
   $sql = 'SELECT
         t.*,

Find :
Code: Select all
      if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
      {

After add :
Code: Select all
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $row['topic_title'] = censor_text($row['topic_title']);
         if (!empty($row['topic_url']) || $row['topic_type'] == POST_GLOBAL || !empty($phpbb_seo->seo_url['forum'][$row['forum_id']])) {
            $phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$row['forum_id']]);
         }
         // www.phpBB-SEO.com SEO TOOLKIT END

Open :
Code: Select all
portal/block/recent.php

Find :
Code: Select all
//
// Recent announcements
//
$sql = 'SELECT topic_title, forum_id, topic_id

Replace with :
Code: Select all
//
// Recent announcements
//
$sql = 'SELECT *

Find :
Code: Select all
   // auto auth
   if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
   {

After add:
Code: Select all
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $row['topic_title'] = censor_text($row['topic_title']);
      $phpbb_seo->prepare_iurl($row, 'topic', $phpbb_seo->seo_static['global_announce']);
      // www.phpBB-SEO.com SEO TOOLKIT END

Find :
Code: Select all
//
// Recent hot topics
//
$sql = 'SELECT topic_title, forum_id, topic_id

Replace with :
Code: Select all
//
// Recent hot topics
//
$sql = 'SELECT *

Find :
Code: Select all
   // auto auth
   if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
   {

After add :
Code: Select all
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $row['topic_title'] = censor_text($row['topic_title']);
      // Since we don't have the forum_name available here, we need to make sure that we can rewrite
      if (!empty($row['topic_url']) || $row['topic_type'] == POST_GLOBAL || !empty($phpbb_seo->seo_url['forum'][$row['forum_id']])) {
         $phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$row['forum_id']]);
      }
      // www.phpBB-SEO.com SEO TOOLKIT END

Find :
Code: Select all
//
// Recent topic (only show normal topic)
//
$sql = 'SELECT topic_title, forum_id, topic_id

Replace with :
Code: Select all
//
// Recent topic (only show normal topic)
//
$sql = 'SELECT *

Find :
Code: Select all
   // auto auth
   if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
   {

After add :
Code: Select all
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $row['topic_title'] = censor_text($row['topic_title']);
      // Since we don't have the forum_name available here, we need to make sure that we can rewrite
      if (!empty($row['topic_url']) || !empty($phpbb_seo->seo_url['forum'][$row['forum_id']])) {
         $phpbb_seo->prepare_iurl($row, 'topic', $phpbb_seo->seo_url['forum'][$row['forum_id']]);
      }
      // www.phpBB-SEO.com SEO TOOLKIT END

Note :
  • you can additionnaly replace all :
    Code: Select all
             'FULL_TITLE'   => censor_text($row['topic_title']),
  • with :
    Code: Select all
             'FULL_TITLE'   => $row['topic_title'],

    since we already censored topic titles, and by the way did censor the shorten title too (which was not the case).


Enjoy ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Re: [SEO URL] phpBB3 portal

Postby Dr.MOON » Mon Apr 19, 2010 5:24 am

Can you help with adding into phpBB3 portal full filtration incoming GET-parameters same as for main engine of phpBB_3_SEO, for example if I wrote in address bar
Code: Select all
http://topsecret.org.ua/portal.html?
it will be
Code: Select all
http://topsecret.org.ua/portal.html
?

P.S. Sorry for my English.
User avatar
Dr.MOON
 
Posts: 7
Joined: Mon Apr 19, 2010 5:15 am
Location: Ukraine

Re: [SEO URL] phpBB3 portal

Postby rein08 » Mon Jul 12, 2010 5:29 am

You got good links here.
Thanks for posting them. :)
I'll be very helpful.
rein08
 
Posts: 6
Joined: Fri Jul 09, 2010 4:33 am

Re: [SEO URL] phpBB3 portal

Postby thezodiac » Mon Sep 20, 2010 4:15 pm

Very usefull guide Dcz thanks!
thezodiac
 
Posts: 34
Joined: Mon Sep 20, 2010 10:43 am

Re: [SEO URL] phpBB3 portal

Postby koimaster » Tue Feb 22, 2011 5:42 pm

hi i just get mysql errors when i make these changes to my script
koimaster
 
Posts: 20
Joined: Tue Feb 01, 2011 6:32 pm
Location: devon uk

Re: [SEO URL] phpBB3 portal

Postby seobounty » Thu Oct 06, 2011 7:45 pm

Great post, thanks for the info.
seobounty
 
Posts: 2
Joined: Wed Oct 05, 2011 5:29 pm

Re: [SEO URL] phpBB3 portal

Postby Dr.MOON » Mon Nov 07, 2011 9:40 pm

Mmm.. and there is some problem in the U_USER_PROFILE - I've add in portal/includes/functions.php this line:
Code: Select all
$phpbb_seo->set_user_url( $row['username'], $row['user_id'] );

before:
Code: Select all
}
// www.phpBB-SEO.com SEO TOOLKIT END
         if ($row['user_id'] != ANONYMOUS && $row['user_colour'])
,
but it's working so-so: some user profile links are transforming in the seo format, some nothing...
How to do it correctly?

DEMO: http://topsecret.org.ua/
User avatar
Dr.MOON
 
Posts: 7
Joined: Mon Apr 19, 2010 5:15 am
Location: Ukraine

Re: [SEO URL] phpBB3 portal

Postby SeLoRe28 » Sun Dec 18, 2011 12:18 am

dcz wrote:Note :
  • you can additionnaly replace all :
    Code: Select all
             'FULL_TITLE'   => censor_text($row['topic_title']),
  • with :
    Code: Select all
             'FULL_TITLE'   => $row['topic_title'],

    since we already censored topic titles, and by the way did censor the shorten title too (which was not the case).




where ?
SeLoRe28
 
Posts: 4
Joined: Mon Apr 11, 2011 8:35 am

Re: [SEO URL] phpBB3 portal

Postby Wizzy » Fri Jan 06, 2012 11:26 pm

Does the seo for viewtopicxxx.hmtl work for portals based on 2.0.0.1b?
Wizzy
 
Posts: 6
Joined: Tue Dec 13, 2011 6:56 pm

Re: [SEO URL] phpBB3 portal

Postby SuzanOrtega » Mon Jun 03, 2013 1:29 pm

While a lot of technicalities can be seen here in this thread, it is quite useful and handy for many who are into optimization. There are also many cheap Cheap SEO Service India agencies which aid in optimizing a website which leads of further business.
SuzanOrtega
 
Posts: 1
Joined: Mon Jun 03, 2013 12:50 pm


Return to phpBB SEO TooLKit

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests


 
cron