Board3 Portal again

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

Re: Board3 Portal again

Postby eoinzy » Sun Jun 14, 2009 7:01 am

Ye, going by my experience, the edits seem to be different. My site works perfect except for the portal.

The urls are like phpbb3/topic-name.html, where they should be phpbb3/topic-name-t324.html. I'm getting lots of "Forum not found" errors. Possibly related to the recent.php block.

I might ask around on the board3 forum, since they made the portal.
eoinzy
 
Posts: 21
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Advertisement

Re: Board3 Portal again

Postby dcz » Mon Jun 15, 2009 7:29 am

These code change should work :
Board3 Portal again
and this :
Board3 Portal again

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

Re: Board3 Portal again

Postby GrayGhost » Tue Jun 16, 2009 3:14 am

dcz wrote:These code change should work :
Board3 Portal again
and this :
Board3 Portal again

++


These seem to work fantastic for the recent.php. Thank you!

However, unless I am mistaken, updated code for the news.php and poll.php has not been posted. If someone could provide that, I would be very grateful.
GrayGhost
 
Posts: 19
Joined: Thu Oct 12, 2006 9:49 pm

Re: Board3 Portal again

Postby eoinzy » Tue Jun 16, 2009 3:44 am

so both of the code snippets are for recent.php?

EDIT: I have a big problem! I tried the edits above and nothing happens! The URLs are actually rewritten, but instead of the correct format, ie .../phpBB3/hello-world-t234.html, they are being rewritten as ...phpBB3/hellow-world.html without the topic id appended on the end. This is only happenin in the portal, and only with topics. The forum links and profile links are perfect! The rest of the site is OK too, outside of the portal.

I have no option but to turn off the portal until this is fixed! :(
Actually, probably just the recent and news blocks.
eoinzy
 
Posts: 21
Joined: Thu Jan 22, 2009 2:07 am
Location: Perth, Australia

Re: Board3 Portal again

Postby wolkenkrieger » Tue Jun 16, 2009 4:40 pm

After an update from premod 3.0.4 to premod 3.0.5 and an update from board3-portal 1.0.2 to 1.0.3 i've got some problems with url-rewriting at the portal.

I does all the changes to poll.php, recent.php and news.php - like shown here in this threat. But i've run in trouble with the urls of my announcements (please look at http://www.bulldogboard.eu).

The shown url is -www.bulldogboard.eu/offene-frage-an-zuchter-und-junghundebesitzer-calcium.html
but it should be
-www.bulldogboard.eu/announces/offene-frage-an-zuchter-und-junghundebesitzer-calcium-t10440.html

The other urls are in format topixXXX.html ... :?: :?:

I activated advanced mod, with sql-rewrite, virtual folder ...
wolkenkrieger
PR0
PR0
 
Posts: 77
Joined: Sat Nov 03, 2007 4:49 pm

Re: Board3 Portal again

Postby GrayGhost » Tue Jun 16, 2009 10:20 pm

wolkenkrieger and eoinzy,

This this updated code in the recent.php instead to fix the problem with Recent and Global Announcement blocks after the update to 3.0.5.

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


Updated code for news.php and poll.php hasn't been posted yet. I am guessing there is a hint in the code above, but I cannot figure it out.
GrayGhost
 
Posts: 19
Joined: Thu Oct 12, 2006 9:49 pm

Re: Board3 Portal again

Postby dcz » Wed Jun 17, 2009 8:57 am

@wolkenkrieger : it looks like an issue in phpbb_seo_class.php, make sure you properly updated it.

For the other scripts, could any one provide with the link to the last version of the portal for me to have a look at it ?

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

Re: Board3 Portal again

Postby wolkenkrieger » Wed Jun 17, 2009 10:09 am

dcz wrote:@wolkenkrieger : it looks like an issue in phpbb_seo_class.php, make sure you properly updated it.


What did you mean? *sorry*

dcz wrote:For the other scripts, could any one provide with the link to the last version of the portal for me to have a look at it ?

++


http://www.board3.de/viewforum.php?f=40
wolkenkrieger
PR0
PR0
 
Posts: 77
Joined: Sat Nov 03, 2007 4:49 pm

Re: Board3 Portal again

Postby wolkenkrieger » Wed Jun 17, 2009 6:18 pm

Ok, here is my recent.php:

Code: Select all
<?php

/**
*
* @package - Board3portal
* @version $Id: recent.php 325 2008-08-17 18:59:40Z kevin74 $
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

if (!defined('IN_PHPBB'))
{
   exit;
}

if (!defined('IN_PORTAL'))
{
   exit;
}

//
// Exclude forums
//
$sql_where = '';
if ($portal_config['portal_exclude_forums'])
{
   $exclude_forums = explode(',', $portal_config['portal_exclude_forums']);
   foreach ($exclude_forums as $i => $id)
   {
      if ($id > 0)
      {
         $sql_where .= ' AND t.forum_id <> ' . trim($id);
      }
   }
}

// Get a list of forums the user cannot read
$forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true)));

// Determine first forum the user is able to read (must not be a category)
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST;

if (sizeof($forum_ary))
{
$sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
}

$result = $db->sql_query_limit($sql, 1);
$g_forum_id = (int) $db->sql_fetchfield('forum_id');

//
// Recent announcements
//
$sql = 'SELECT t.topic_title, t.forum_id, t.topic_id, t.topic_type, f.forum_name
   FROM ' . TOPICS_TABLE . ' AS t
    LEFT JOIN '.FORUMS_TABLE.' AS f
    ON (f.forum_id = t.forum_id)
   WHERE t.topic_status <> ' . FORUM_LINK . '
      AND t.topic_approved = 1
      AND ( t.topic_type = ' . POST_ANNOUNCE . ' OR t.topic_type = ' . POST_GLOBAL . ' )
      AND t.topic_moved_id = 0
        AND t.topic_deleted_time = 0
      ' . $sql_where . '
   ORDER BY t.topic_time DESC';

$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);

while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
{
   // auto auth
   if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
   {
    // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> no dupe
      if (@$phpbb_seo->seo_opt['no_dupe']['on']) {   
         $phpbb_seo->prepare_iurl($row, 'topic', (($row['topic_type'] == POST_GLOBAL) || ($row['topic_type'] == POST_ANNOUNCE)) ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$row['forum_id']]);
         $phpbb_seo->seo_opt['topic_forum_name'][$row['topic_id']] = $row['forum_name'];
      }
    // www.phpBB-SEO.com SEO TOOLKIT END -> no dupe
      $template->assign_block_vars('latest_announcements', array(
         'TITLE'          => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
         'FULL_TITLE'   => censor_text($row['topic_title']),
         'U_VIEW_TOPIC'   => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . ( ($row['forum_id'] == 0) ? $g_forum_id : $row['forum_id'] ) . '&amp;t=' . $row['topic_id'])
      ));
   }
}
$db->sql_freeresult($result);

//
// Recent hot topics
//
$sql = 'SELECT t.topic_title, t.forum_id, t.topic_id, t.topic_type, f.forum_name
   FROM ' . TOPICS_TABLE . ' AS t
    LEFT JOIN '.FORUMS_TABLE.' AS f
    ON (f.forum_id = t.forum_id)
   WHERE t.topic_approved = 1
      AND t.topic_replies >=' . $config['hot_threshold'] . '
      AND t.topic_moved_id = 0
        AND t.topic_deleted_time = 0
      ' . $sql_where . '
   ORDER BY t.topic_time DESC';

$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);

while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
{
   // auto auth
   if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
   {
        // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> no dupe
      if (@$phpbb_seo->seo_opt['no_dupe']['on']) {   
         $phpbb_seo->prepare_iurl($row, 'topic', (($row['topic_type'] == POST_GLOBAL) || ($row['topic_type'] == POST_ANNOUNCE)) ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$row['forum_id']]);
         $phpbb_seo->seo_opt['topic_forum_name'][$row['topic_id']] = $row['forum_name'];
      }
    // www.phpBB-SEO.com SEO TOOLKIT END -> no dupe
      $template->assign_block_vars('latest_hot_topics', array(
         'TITLE'          => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
         'FULL_TITLE'   => censor_text($row['topic_title']),
         'U_VIEW_TOPIC'   => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . ( ($row['forum_id'] == 0) ? $g_forum_id : $row['forum_id'] ) . '&amp;t=' . $row['topic_id'])
      ));
   }
}
$db->sql_freeresult($result);

//
// Recent topic (only show normal topic)
//
$sql = 'SELECT t.topic_title, t.forum_id, t.topic_id, t.topic_type, f.forum_name
   FROM ' . TOPICS_TABLE . ' AS t
    LEFT JOIN '.FORUMS_TABLE.' AS f
    ON (f.forum_id = t.forum_id)
   WHERE t.topic_status <> ' . ITEM_MOVED . '
      AND t.topic_approved = 1
      AND t.topic_type = ' . POST_NORMAL . '
      AND t.topic_moved_id = 0
        AND t.topic_deleted_time = 0
      ' . $sql_where . '
   ORDER BY t.topic_time DESC';

$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);

while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
{
   // auto auth
   if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
   {
        // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> no dupe
      if (@$phpbb_seo->seo_opt['no_dupe']['on']) {   
         $phpbb_seo->prepare_iurl($row, 'topic', (($row['topic_type'] == POST_GLOBAL) || ($row['topic_type'] == POST_ANNOUNCE)) ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$row['forum_id']]);
         $phpbb_seo->seo_opt['topic_forum_name'][$row['topic_id']] = $row['forum_name'];
      }
    // www.phpBB-SEO.com SEO TOOLKIT END -> no dupe
      $template->assign_block_vars('latest_topics', array(
         'TITLE'          => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
         'FULL_TITLE'   => censor_text($row['topic_title']),
         'U_VIEW_TOPIC'   => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id'])
      ));
   }
}
$db->sql_freeresult($result);

$template->assign_vars(array(
   'S_DISPLAY_RECENT'         => true,
));

?>


Attention!
I've installed the "Prime Trash Bin" - Mod! So the

Code: Select all
AND t.topic_deleted_time = 0


within the SQL-Statements ( 3times) will couse errors if this mod is NOT installed!
wolkenkrieger
PR0
PR0
 
Posts: 77
Joined: Sat Nov 03, 2007 4:49 pm

Re: Board3 Portal again

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

I started a new thread for patching the board3 portal here : [SEO URL] Board3 portal

;)
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Previous

Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 6 guests


 
cron