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

English |
French
News
