Recordad que para pedir soporte alguno, debéis facilitar los datos de soporte oportunos por favor, mirad aquí y leer las Normas generales del foro, esto nos servirá de ayuda para dar el mejor soporte..

Gracias.

La Administración de phpBB España.

URLs Amigables del SEO funcionando en el Board3 PortalTema Solucionado

Soporte de MODs para phpBB 3.0.x
Dudas sobre AutoMOD aquí por favor.
Cerrado
Avatar de Usuario
Alorse
Ex Staff
Mensajes: 5144
Registrado: 22 Mar 2008, 02:14
Género:
Edad: 36

URLs Amigables del SEO funcionando en el Board3 Portal  Tema Solucionado

#1

Mensaje por Alorse »

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.

Cerrado

Volver a “Soporte de MODs”