URLs Amigables del SEO funcionando en el Board3 Portal Tema Solucionado
www.miforo.com/topicxxx.html o www.miforo.com/postxxx.html
Cuando lo que debería mostrar seria:
www.miforo.com/nombre-de-mi-post.html
Este add-on ayuda a que esto no suceda y tambien para que las URLs del portal sean correctamente indexadas por los buscadores ademas de no perder el sentido del SEO en el portal.
Abrir portal/block/recent.php:
Buscar :
Código: Seleccionar todo
//
// Recent announcements
//
$sql = SELECT topic_title, forum_id, topic_id
Código: Seleccionar todo
//
// Recent announcements
//
$sql = SELECT *
Código: Seleccionar todo
// auto auth
if (($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0'))
{
Código: Seleccionar todo
// 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
Código: Seleccionar todo
//
// Recent hot topics
//
$sql = SELECT topic_title, forum_id, topic_id
Código: Seleccionar todo
//
// Recent hot topics
//
$sql = SELECT *
Código: Seleccionar todo
// auto auth
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
{
Código: Seleccionar todo
// 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
Código: Seleccionar todo
//
// Recent topic (only show normal topic)
//
$sql = SELECT topic_title, forum_id, topic_id
Código: Seleccionar todo
//
// Recent topic (only show normal topic)
//
$sql = SELECT *
Código: Seleccionar todo
// auto auth
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
{
Código: Seleccionar todo
// 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
Abrir portal/includes/functions.php
Buscar :
Código: Seleccionar todo
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;
Código: Seleccionar todo
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END
Código: Seleccionar todo
'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,
Código: Seleccionar todo
'SELECT' => t.*,
Código: Seleccionar todo
while ( $row = $db->sql_fetchrow($result) )
{
Código: Seleccionar todo
// 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
Un saludo.
Fuente: phpBB SEO.