Biblioteca de phpBB-Es

URLs Amigables del SEO funcionando en el Board3 Portal

URLs Amigables del SEO funcionando en el Board3 Portal

Publicado por : Alorse
Publicado el : Jueves, 07 Abril 2011, 20:01
Cambiad a : Jueves, 07 Abril 2011, 20:02
De : Alorse
Visto : Visto 1150 veces
Título : URLs Amigables del SEO funcionando en el Board3 Portal
Descripción : URLs Amigables del SEO funcionando en el Board3 Portal
Calificación: 5/5 (1 Calificaciones)

Link a este artículo: Seleccionar todo
[url=http://www.phpbb-es.com/biblioteca/kb_show.php?id=6]URLs Amigables del SEO funcionando en el Board3 Portal[/url]

URLs Amigables del SEO funcionando en el Board3 Portal

Sucede que al instalar el Board3 portal >= 1.0.3 cuando tenemos el phpBB SEO Ultimate SEO URL >= 0.6.0, las URLs de dicho portal no quedan correctamente funcionando con la configuración del seo y muestran urls del tipo:

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


Reemplazar con :
Código: Seleccionar todo
//
// Recent announcements
//
$sql = SELECT * 


Buscar :
Código: Seleccionar todo
    // auto auth
    if (($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0'))
    { 


Agregar despues:
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 


Buscar :
Código: Seleccionar todo
//
// Recent hot topics
//
$sql = SELECT topic_title, forum_id, topic_id


Reemplazar con :
Código: Seleccionar todo
//
// Recent hot topics
//
$sql = SELECT * 


Buscar :
Código: Seleccionar todo
    // auto auth
    if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
    { 


Agregar despues :
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 


Buscar :
Código: Seleccionar todo
//
// Recent topic (only show normal topic)
//
$sql = SELECT topic_title, forum_id, topic_id


Reemplazar con :
Código: Seleccionar todo
//
// Recent topic (only show normal topic)
//
$sql = SELECT * 


Buscar :
Código: Seleccionar todo
    // auto auth
    if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
    { 


Agregar después :
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; 


Agregar después :
Código: Seleccionar todo
    // www.phpBB-SEO.com SEO TOOLKIT BEGIN
    global $phpbb_seo;
    // www.phpBB-SEO.com SEO TOOLKIT END 


Buscar :
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, 

Reemplazar con :
Código: Seleccionar todo
        'SELECT' => t.*, 


Buscar : (Sobre la linea 201)
Código: Seleccionar todo
    while ( $row = $db->sql_fetchrow($result) )
    { 


Agregar después :
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 


La modificación la comprobe en mi foro antes de postearla, así que funciona correctamente, cualquier duda en su tema correspondiente.

Un saludo.

Fuente: phpBB SEO.

Artículos similares

[Add-on] Temas en en portal (Borad3 Portal) sin necesidad de m
En: Modificaciones
Por: Alorse
URLs en español para MOD phpBB SEO Ultimate SEO URL
En: Modificaciones
Por: Makoto
phpBB3 Portal
En: Modificaciones
Por: mitch
Editar un archivo de los módulo del Board3 2.0.x
En: Modificaciones
Por: Megabyte

 Volver a Modificaciones

¿Problemas para activar la cuenta de usuario?

Si luego de registrarse tiene problemas para activar la cuenta usuario puede visitar nuestra Página en Facebook y dejarnos un mensaje (inbox) con los datos de registro para que activemos la cuenta manualmente, de igual manera el problema se presenta con las cuentas de hotmail, así que si antes de registrarse puede hacerlo desde otra cuenta, evitará dicho inconveniente.
Publicidad

Funcionando con phpBB® Forum Software © phpBB Group
Traducción al español por Huan Manwë para phpBB-Es.COM
Knowledge Base by Gameserveradmin.de
phpBB SEO  CC BY-ND
Tiempo : 0.135s | 26 Consultas | GZIP : On