[SEO URL] Board3 portal

phpBB SEO mods by phpBB SEO.

Moderator: Moderators

[SEO URL] Board3 portal

Postby dcz » Thu Jun 18, 2009 7:57 am

Hello,
here is a thread to tweak the Board3 portal v1.0.3 from here : http://www.board3.de/viewtopic.php?f=40&t=1977

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

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

Find :
Code: Select all
function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_length, $time, $type, $start = 0)
{
   global $db, $phpbb_root_path, $auth, $user, $bbcode_bitfield, $bbcode, $portal_config, $config;

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
      'SELECT' => 't.forum_id,
         t.topic_id,
         t.topic_last_post_id,
         t.topic_last_post_time,
         t.topic_time,
         t.topic_title,
         t.topic_attachment,
         t.topic_views,
         t.poll_title,
         t.topic_replies,
         t.topic_replies_real,
         t.topic_poster,
         t.topic_type,
         t.topic_status,
         t.topic_last_poster_name,
         t.topic_last_poster_id,
         t.topic_last_poster_colour,
         t.icon_id,

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

Find :
Code: Select all
   while ( $row = $db->sql_fetchrow($result) )
   {

After add :
Code: Select all
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $row['topic_title'] = censor_text($row['topic_title']);
      $phpbb_seo->set_url($row['forum_name'], $row['forum_id'], $phpbb_seo->seo_static['forum']);
      $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


This modification is untested since I do not run any board3 install, so please try it on a local server first and report about it in this thread, it should work ok though ;)

++
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Re: [SEO URL] Board3 portal

Postby eoinzy » Thu Jun 18, 2009 10:41 am

hmm, im getting:

Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/mysite/public_html/phpBB3/portal/includes/functions.php on line 189
eoinzy
 
Posts: 28
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Re: [SEO URL] Board3 portal

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

Could you post here the line 189 of your file, because in the one I modded line 189 is :
Code: Select all
         u.user_colour,
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Re: [SEO URL] Board3 portal

Postby eoinzy » Sat Jun 20, 2009 4:07 am

ye sorry, I have a few mods.

MY line 189 is below:

Code: Select all
   $sql_array = array(
             'SELECT' => 't.*,
         
:189      'FROM' => array(
         TOPICS_TABLE => 't',),
      
      'LEFT_JOIN' => array(
         array(
            'FROM' => array(USERS_TABLE => 'u'),
            'ON' => $user_link,
eoinzy
 
Posts: 28
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Re: [SEO URL] Board3 portal

Postby Professional » Sat Jun 20, 2009 5:21 am

owwwwwww,nice topic :)
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: [SEO URL] Board3 portal

Postby eoinzy » Sat Jun 20, 2009 6:26 am

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

Find :
Code: Select all
      'SELECT' => 't.forum_id,
         t.topic_id,
         t.topic_last_post_id,
         t.topic_last_post_time,
         t.topic_time,
         t.topic_title,
         t.topic_attachment,
         t.topic_views,
         t.poll_title,
         t.topic_replies,
         t.topic_replies_real,
         t.topic_poster,
         t.topic_type,
         t.topic_status,
         t.topic_last_poster_name,
         t.topic_last_poster_id,
         t.topic_last_poster_colour,
         t.icon_id,

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



There should be a ' after the t.* so u should replace with 'SELECT' => 't.*',
eoinzy
 
Posts: 28
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Re: [SEO URL] Board3 portal

Postby dcz » Sat Jun 20, 2009 9:26 am

eoinzy wrote:There should be a ' after the t.* so u should replace with 'SELECT' => 't.*',


Not with the original code, since there are other fields selected.

If you want me to check, please post here the full original :
Code: Select all
   $sql_array = array(


you have.

++
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Re: [SEO URL] Board3 portal

Postby eoinzy » Sat Jun 20, 2009 2:23 pm

from ./phpBB3/portal/includes/functions.php

Code: Select all
   $sql_array = array(
      'SELECT' => 't.forum_id,
         t.topic_id,
         t.topic_last_post_id,
         t.topic_last_post_time,
         t.topic_time,
         t.topic_title,
         t.topic_attachment,
         t.topic_views,
         t.poll_title,
         t.topic_replies,
         t.topic_replies_real,
         t.topic_poster,
         t.topic_type,
         t.topic_status,
         t.topic_last_poster_name,
         t.topic_last_poster_id,
         t.topic_last_poster_colour,
         t.icon_id,
         u.username,
         u.user_id,
         u.user_type,
         u.user_colour,
         p.post_id,
         p.poster_id,
         p.post_time,
         p.post_text,
         p.post_attachment,
         p.post_username,
         p.enable_smilies,
         p.enable_bbcode,
         p.enable_magic_url,
         p.bbcode_bitfield,
         p.bbcode_uid,
         f.forum_name,
         f.enable_icons',
         
      'FROM' => array(
         TOPICS_TABLE => 't',
      ),
      
      'LEFT_JOIN' => array(
         array(
            'FROM' => array(USERS_TABLE => 'u'),
            'ON' => $user_link,
         ),
         array(
            'FROM' => array(FORUMS_TABLE => 'f'),
            'ON' => 't.forum_id=f.forum_id',
         ),
         array(
            'FROM' => array(POSTS_TABLE => 'p'),
            'ON' => $post_link,
         ),
      ),
      
      'WHERE' => $topic_type . '
            ' . $post_time . '
            AND t.topic_status <> ' . ITEM_MOVED . '
            AND t.topic_approved = 1
            AND t.topic_moved_id = 0
            ' . $str_where,
            
      'ORDER_BY' => $topic_order,   
   );


Is that what ur lookin for? I put in the extra ' and its working now, except all the latest posts in news.php are from "Guest" as opposed to the correct poster. weird!
eoinzy
 
Posts: 28
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Re: [SEO URL] Board3 portal

Postby GrayGhost » Sat Jun 20, 2009 9:30 pm

Within the recent topic block, the Recent announcements (// Recent announcements) worked fine. However, the Recent popular topics (// Recent hot topics), and Recent topics (// Recent topic (only show normal topic)), did not seem to work correctly.

I had to replace the given code in the recent.php for hot and normal topics with this to get it to work:

Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$cur_forum_id = ($row['forum_id']) ? (int) $row['forum_id'] : $forum_id;
$phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$cur_forum_id]);
// www.phpBB-SEO.com SEO TOOLKIT END


The view topic link for the poll does not work.
GrayGhost
 
Posts: 19
Joined: Thu Oct 12, 2006 9:49 pm

Re: [SEO URL] Board3 portal

Postby eoinzy » Mon Jun 22, 2009 10:52 am

What was the difference between that and the original code, so we can see what part is causing the issues?
eoinzy
 
Posts: 28
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Re: [SEO URL] Board3 portal

Postby dcz » Tue Jun 23, 2009 7:51 am

eoinzy wrote:What was the difference between that and the original code, so we can see what part is causing the issues?

No, there was not, so I assume that you did something wrong while editing, just perform the replace exactly as advised.

@GrayGhost : What file did you mod please ?
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Re: [SEO URL] Board3 portal

Postby eoinzy » Sun Jul 05, 2009 4:04 am

OK, I know what i done.

That piece of code edit where u have the SQL statement and u change a list of "t.xxx" value to jsut "Select *". Thats where i went wrong.

I assumed the whole list there was every item in the SQL statement, not just the "t" values so i removed all the u.variables and the p.variables.

Now everything is working fine! so happy!! :D
eoinzy
 
Posts: 28
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Re: [SEO URL] Board3 portal

Postby Gisher » Thu Oct 08, 2009 9:58 am

Any updates for 1.0.4 version?
Gisher
PR0
PR0
 
Posts: 83
Joined: Sat Sep 27, 2008 8:54 am

Re: [SEO URL] Board3 portal

Postby xtesterx » Fri Oct 09, 2009 2:14 pm

hi :)

links: http://demo.urbanwave.info
phpbb 3.0.5 ru + board3portal 1.0.4 + phpBB3 Ultimate SEO URL last versions.

recent,news,announcements topic not work correctly.
edit this post: [SEO URL] Board3 portal
and this : http://www.board3.de/knowledge/kb_show.php?id=46
I have fulfilled all the editing, but does not work + clean cashe ACP and styles.
Before changes show only:announcements and recent topic.

How edit to works ?
thx :)
xtesterx
 
Posts: 10
Joined: Fri Oct 09, 2009 1:35 pm

Re: [SEO URL] Board3 portal

Postby dcz » Sun Oct 18, 2009 8:33 am

The board3 links is outdated, it's for an older version of our SEO URL mod.
So only use the code changes from this topic.

From what I see on your portal, things looks ok, could you tell us more about the issue ?
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Next

Return to phpBB SEO TooLKit

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Google Adsense [Bot] and 5 guests