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
++

English |
French
News



