Página 1 de 1

Como agregar el prefijo de Evento igual que phpBB.com  Tema Solucionado

Publicado: 19 Oct 2014, 15:43
por nextgen
En esta guía les explicaremos como agregar el prefijo de Evento a la par del titulo del tema, esta modificación es la que tiene phpBB.com

Primero que nada agradecer a Marshalrusty por brindarnos el código.

Abrir root/viewforum.php

Buscar:

Código: Seleccionar todo

$topic_forum_id = ($row['forum_id']) ? (int) $row['forum_id'] : $forum_id;
Antes, agregar:

Código: Seleccionar todo

                // Replace "[EVENT]" with an events image
                $is_event = false;

                if (strtolower(substr($row['topic_title'], 0, 7)) == '[event]')
                {
                        $row['topic_title'] = substr($row['topic_title'], 7);
                        $is_event = true;
                }
Buscar:

Código: Seleccionar todo

                            'S_TOPIC_MOVED'                        => ($row['topic_status'] == ITEM_MOVED) ? true : false,
Despúes, agregar:

Código: Seleccionar todo

                            'S_IS_EVENT'                        => ($is_event) ? true : false,
Abrir root/search.php

Buscar:

Código: Seleccionar todo

                        $template->assign_block_vars('searchresults', array_merge($tpl_ary, array(
                                'FORUM_ID'                        => $forum_id,
Antes, agregar:

Código: Seleccionar todo

                            // Replace "[EVENT]" with an events image
                            $is_event = false;

                            if (strtolower(substr($topic_title, 0, 7)) == '[event]')
                            {
                                    $topic_title = substr($topic_title, 7);
                                    $is_event = true;
                            }
Buscar:

Código: Seleccionar todo

                                    'U_VIEW_TOPIC'                => $view_topic_url,
Antes, agregar:

Código: Seleccionar todo

                                    'S_IS_EVENT'                => $is_event,
Abrir root/styles/prosilver/template/viewforum_body.html

Buscar:

Código: Seleccionar todo

    <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
Replazar con:

Código: Seleccionar todo

    <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_IS_EVENT --><img src="{S_THEME_PATH}/images/community/event.png" style="margin-bottom:-2px; valign:bottom" />  <!-- ENDIF -->{topicrow.TOPIC_TITLE}</a>
Ahora subir esta imagen a su servidor Imagen a la ruta root/styles/prosilver/theme/images/*

Y eso sería todo, acá les dejo el resultado final.
prefijo.png
prefijo.png (22.41 KiB) Visto 6393 veces
tema_prefijo.png
tema_prefijo.png (15.33 KiB) Visto 6393 veces