Moviendo tema de Foro šŸ„‡ Foro Portal DragonFlyCMS, CPGNuke

Foros de discusiĆ³nPortal DragonFlyCMS, CPGNuke

#1:  Moviendo tema de Foro  Autor: Aforo Enlaces Publicado: Lun Nov 10, 2008 11:49 am
    ----
Cuando queremos mover un tema de foro se nos depliega una serie de opciones de posibles foros. Dichas opciones estan por un orden distinto al establecido en nuestro foro, creando un poco de desconcierto cuando tenemos muchas opciones.

He realizado una que hace que las opciones aparezcan en el mismo orden y, ademas, aparezcan las categorias de foro en negrita (no selecionables) para mas claridad.

Para conseguirlo se sustituye la funciĆ³n "make_forum_select" en includes/phpBB/functions_admin.php por la siguiente funciĆ³n:

Quote::
//
// Simple version of jumpbox, just lists authed forums
//

function make_forum_select($box_name, $ignore_forum = false, $select_forum = '')
{
global $db, $userdata;
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
$forum_list = '';
$result = $db->sql_query("SELECT f.forum_id, f.forum_name, c.cat_title
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
WHERE c.cat_id = f.cat_id
ORDER BY c.cat_order ASC, f.forum_order ASC");
$cat_title="";
while ($row = $db->sql_fetchrow($result)) {
if ($is_auth_ary[$row['forum_id']]['auth_read'] && $ignore_forum != $row['forum_id']) {
if($cat_title != $row['cat_title']){
$cat_title = $row['cat_title'];
$forum_list .= '<optgroup label="'.$cat_title.'">';
}
$selected = ($select_forum == $row['forum_id']) ? ' selected="selected"' : '';
$forum_list .= '<option value="' . $row['forum_id'] . '"' . $selected .'> ' . $row['forum_name'] . '</option>';
}
}
$forum_list = ( $forum_list == '' ) ? '<option value="-1">-- ! No Forums ! --</option>' : '<select name="' . $box_name . '">' . $forum_list . '</select>';
return $forum_list;
}





Foros de discusiĆ³nPortal DragonFlyCMS, CPGNuke

Todas las horas son GMT + 1 Hora

PƔgina 1 de 1 - Tema con 1 Mensajes y 8902 Lecturas

DiseƱo web, bases de datos, lenguajes de programaciĆ³n, comunidades... todo lo necesario para construir tu sitio web.
The logos and trademarks used on this site are the property of their respective owners. We are not responsible for comments posted by our users, as they are the property of the poster.
Aviso Legal - Privacidad Construyendo la web 2.0
The logos and trademarks used on this site are the property of their respective owners. We are not responsible for comments posted by our users, as they are the property of the poster.
Aviso Legal - Privacidad