Like Tree1Likes
  • 1 Post By Morti23

Foros en columnas

Esta es una discusión para el tema Foros en columnas en el foro Tips y tutoriales, bajo la categoría Recursos para vBulletin (Descargas); Primera parte --> Instalar el Category icons y el Arrange forums in columns Entramos en el panel de administrador. Vamos a "Plugins & Productos --> Administrador de productos". Le damos a "Añadir/importar producto". Damos a ...
Página:


Resultados 1 al 10 de 10

Temas similares

  1. Por excesos en el foro Soporte para Productos/Plugins
  2. Por packo8 en el foro vBulletin 3 - Preguntas, Problemas y Soluciones
  3. Por Skavenger en el foro vBulletin 3 - Preguntas, Problemas y Soluciones
  4. Por Hispabit en el foro vBulletin 3 - Preguntas, Problemas y Soluciones
  5. VB en Columnas Respuestas: 0
    Por krisiun666 en el foro Archivos de vBulletin 3.0 - 3.7
  1. #1
    Miembro especial Miembro de plata Array Avatar de Morti23
    Fecha de ingreso
    10 ago, 08
    Mensajes
    78
    Gustado
    2 Veces
    Me Gustan
    0 Veces

    Predeterminado Foros en columnas






    Primera parte --> Instalar el Category icons y el Arrange forums in columns



    1. Entramos en el panel de administrador.
    2. Vamos a "Plugins & Productos --> Administrador de productos".
    3. Le damos a "Añadir/importar producto".
    4. Damos a examinar y seleccionamos el archivo XML que está dentro del archivo anteriormente descargado vB Category Icons.
    5. Repetimos todo lo anterior pero esta vez seleccionamos el archivo XML del archivo Arrange Forums in Columns.



    Segunda parte --> Modificamos el archivo functions_forumlist.php



    1. Vamos a nuestro cliente FTP y nos conectamos.
    2. Entramos en el directorio Includes y buscamos el archivo functions_forumlist.php
    3. Le damos a editar el archivo y buscamos:


    Código HTML:
    if ($subsonly)
            {
                $childforumbits = construct_forum_bit($forum['forumid'], 1, $subsonly);
            }
            else if ($depth < MAXFORUMDEPTH)
            {
                $childforumbits = construct_forum_bit($forum['forumid'], $depth, $subsonly);
            }
            else
            {
                $childforumbits = '';
            }
    Lo cambiamos por:

    Código HTML:
    if (THIS_SCRIPT == 'index' AND $forum['subforumcolumns'] != 1 AND ($subsonly OR $depth < MAXFORUMDEPTH))
            {
                $childforumbits = construct_forum_columns($forum['forumid'], $forum['subforumcolumns']);
            }
            else if ($subsonly)
            {
                $childforumbits = construct_forum_bit($forum['forumid'], 1, $subsonly);
            }
            else if ($depth < MAXFORUMDEPTH)
            {
                $childforumbits = construct_forum_bit($forum['forumid'], $depth, $subsonly);
            }
            else
            {
                $childforumbits = '';
            }
    Al final del mismo archivo delante de:

    Código HTML:
    /*======================================================================*\
    || ####################################################################
    || # CVS: $RCSfile$ - $Revision: 26194 $
    || ####################################################################
    \*======================================================================*/
    ?>

  2. #2
    Miembro especial Miembro de plata Array Avatar de Morti23
    Fecha de ingreso
    10 ago, 08
    Mensajes
    78
    Gustado
    2 Veces
    Me Gustan
    0 Veces

    Predeterminado Re: Foros en columnas

    Añadimos:

    Código HTML:
    // ###################### Start construct_forum_columns #######################
    function construct_forum_columns($parentid, $columncount)
    {
        global $vbulletin, $stylevar, $vbphrase, $show;
        global $imodcache, $lastpostarray, $counters, $inforum;
    
        // this function takes the constant MAXFORUMDEPTH as its guide for how
        // deep to recurse down forum lists. if MAXFORUMDEPTH is not defined,
        // it will assume a depth of 2.
    
        if ($columncount == 0)
        {
            // 0 Columns means don't show subforums at all
            return '';
        }
    
        // call fetch_last_post_array() first to get last post info for forums
        if (!is_array($lastpostarray))
        {
            fetch_last_post_array();
        }
    
        if (empty($vbulletin->iforumcache["$parentid"]))
        {
            return;
        }
    
        if (!defined(MAXFORUMDEPTH))
        {
            define('MAXFORUMDEPTH', 1);
        }
    
        $forumbits = '';
    
        $counter = 0;
        foreach ($vbulletin->iforumcache["$parentid"] AS $forumid)
        {
            // grab the appropriate forum from the $vbulletin->forumcache
            $forum = $vbulletin->forumcache["$forumid"];
            $lastpostforum = $vbulletin->forumcache["$lastpostarray[$forumid]"];
            if (!$forum['displayorder'] OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['active']))
            {
                continue;
            }
    
            $forumperms = $vbulletin->userinfo['forumpermissions']["$forumid"];
            $lastpostforumperms = $vbulletin->userinfo['forumpermissions']["$lastpostarray[$forumid]"];
            if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums'])
            { // no permission to view current forum
                continue;
            }
    
            if ($subsonly)
            {
                $childforumbits = construct_forum_bit($forum['forumid'], 1, $subsonly);
            }
            else if ($depth < MAXFORUMDEPTH)
            {
                $childforumbits = construct_forum_bit($forum['forumid'], $depth, $subsonly);
            }
            else
            {
                $childforumbits = '';
            }
    
            // do stuff if we are not doing subscriptions only, or if we ARE doing subscriptions,
            // and the forum has a subscribedforumid
            if (!$subsonly OR ($subsonly AND !empty($forum['subscribeforumid'])))
            {
    
                $GLOBALS['forumshown'] = true; // say that we have shown at least one forum
    
                if (($forum['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads']))
                { // get appropriate suffix for template name
                    $tempext = '_post';
                }
                else
    
                {
                    $tempext = '_nopost';
                }
    
                if (!$vbulletin->options['showforumdescription'])
                { // blank forum description if set to not show
                    $forum['description'] = '';
                }
    
                // dates & thread title
                $lastpostinfo = $vbulletin->forumcache["$lastpostarray[$forumid]"];
    
                // compare last post time for this forum with the last post time specified by
                // the $lastpostarray, and if it's less, use the last post info from the forum
                // specified by $lastpostarray
                if ($vbulletin->forumcache["$lastpostarray[$forumid]"]['lastpost'] > 0)
                {
                    if (!($lastpostforumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR (!($lastpostforumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND $lastpostinfo['lastposter'] != $vbulletin->userinfo['username']))
                    {
                        $forum['lastpostinfo'] = $vbphrase['private'];
                    }
                    else
                    {
                        $lastpostinfo['lastpostdate'] = vbdate($vbulletin->options['dateformat'], $lastpostinfo['lastpost'], 1);
                        $lastpostinfo['lastposttime'] = vbdate($vbulletin->options['timeformat'], $lastpostinfo['lastpost']);
                        $lastpostinfo['trimthread'] = fetch_trimmed_title($lastpostinfo['lastthread']);
    
                        if ($icon = fetch_iconinfo($lastpostinfo['lasticonid']))
                        {
                            $show['icon'] = true;
                        }
                        else
                        {
                            $show['icon'] = false;
                        }
    
                        $show['lastpostinfo'] = (!$lastpostforum['password'] OR verify_forum_password($lastpostforum['forumid'], $lastpostforum['password'], false));
    
                        eval('$forum[\'lastpostinfo\'] = "' . fetch_template('forumhome_lastpostby') . '";');
                    }
                }
                else if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']))
                {
                    $forum['lastpostinfo'] = $vbphrase['private'];
                }
                else
                {
                    $forum['lastpostinfo'] = $vbphrase['never'];
                }
    
                // do light bulb
                $forum['statusicon'] = fetch_forum_lightbulb($forumid, $lastpostinfo, $forum);
    
                // add lock to lightbulb if necessary
                if ((!($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostnew']) OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['allowposting'])) AND $vbulletin->options['showlocks'] AND !$forum['link'])
                {
                    $forum['statusicon'] .= '_lock';
                }
    
                // get counters from the counters cache ( prepared by fetch_last_post_array() )
                $forum['threadcount'] = $counters["$forum[forumid]"]['threadcount'];
                $forum['replycount'] = $counters["$forum[forumid]"]['replycount'];
    
                // get moderators ( this is why we needed cache_moderators() )
                if ($vbulletin->options['showmoderatorcolumn'])
                {
                    $showmods = array();
                    $listexploded = explode(',', $forum['parentlist']);
                    foreach ($listexploded AS $parentforumid)
                    {
                        if (!isset($imodcache["$parentforumid"]))
                        {
                            continue;
                        }
                        foreach($imodcache["$parentforumid"] AS $moderator)
                        {
                            if (isset($showmods["$moderator[userid]"]))
                            {
                                continue;
                            }
    
                            ($hook = vBulletinHook::fetch_hook('forumbit_moderator')) ? eval($hook) : false;
    
                            $showmods["$moderator[userid]"] = true;
                            if (!isset($forum['moderators']))
                            {
                                eval('$forum[\'moderators\'] = "' . fetch_template('forumhome_moderator') . '";');
                            }
                            else
                            {
                                eval('$forum[\'moderators\'] .= ", ' . fetch_template('forumhome_moderator') . '";');
                            }
                        }
                    }
                    if (!isset($forum['moderators']))
                    {
                        $forum['moderators'] = '';
                    }
                }
    
                if ($forum['link'])
                {
                    $forum['replycount'] = '-';
                    $forum['threadcount'] = '-';
                    $forum['lastpostinfo'] = '-';
                }
                else
                {
                    $forum['replycount'] = vb_number_format($forum['replycount']);
                    $forum['threadcount'] = vb_number_format($forum['threadcount']);
                }
    
                if (($subsonly OR $depth == MAXFORUMDEPTH) AND $vbulletin->options['subforumdepth'] > 0)
                {
                    $forum['subforums'] = construct_subforum_bit($forumid, ($forum['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads'] ) );
                }
                else
                {
                    $forum['subforums'] = '';
                }
    
                $children = explode(',', $forum['childlist']);
                foreach($children AS $childid)
                {
                    $forum['browsers'] += ($inforum["$childid"] ? $inforum["$childid"] : 0);
                }
    
                if ($depth == 1 AND $tempext == '_nopost')
                {
                    global $vbcollapse;
                    $collapseobj_forumid =& $vbcollapse["collapseobj_forumbit_$forumid"];
                    $collapseimg_forumid =& $vbcollapse["collapseimg_forumbit_$forumid"];
                    $show['collapsebutton'] = true;
                }
                else
                {
                    $show['collapsebutton'] = false;
                }
    
                $show['forumsubscription'] = ($subsonly ? true : false);
                $show['forumdescription'] = ($forum['description'] != '' ? true : false);
                $show['subforums'] = ($forum['subforums'] != '' ? true : false);
                $show['browsers'] = ($vbulletin->options['displayloggedin'] AND !$forum['link'] AND $forum['browsers'] ? true : false);
    
                // build the template for the current forum
                $column_width = intval(100 / $columncount) . '%';
                eval('$column = "' . fetch_template("forumhome_forumbit_columncell") . '";');
                
                // do the columnstuff
                if ($counter % $columncount == 0)
                {
                    // Begin a new row
                    $forumbits .= "\t<tr>\n";
                }
                $forumbits .= $column;
                if ($counter % $columncount == $columncount - 1)
                {
                    // End row
                    $forumbits .= "\t</tr>\n";
                }
                $counter++;
            }
        }
    
        // prevent unclosed <tr> tags
        if ($counter % $columncount != 0)
        {
            $forumbits .= "\t</tr>\n";
        }
        
        return $forumbits;
    }

  3. #3
    Miembro especial Miembro de plata Array Avatar de Morti23
    Fecha de ingreso
    10 ago, 08
    Mensajes
    78
    Gustado
    2 Veces
    Me Gustan
    0 Veces

    Predeterminado Re: Foros en columnas

    Tercera parte --> Editar plantillas



    1. Vamos al panel de administración y nos logeamos.
    2. Entramos en "Estilos & plantillas --> Buscar en plantillas".
    3. En el recuadro ponemos forumhome_forumbit_level1_nopost y le damos a buscar.
    4. Le damos a forumhome_forumbit_level1_nopost y dentro buscamos:

    Código HTML:
    <if condition="$childforumbits">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    $childforumbits
    </tbody>
    </if>
    Lo remplazamos por:

    Código HTML:
    <if condition="$childforumbits">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    <if condition="$forum['subforumcolumns'] > 1">
        <tr>
            <td class="alt1" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
    <table style="border: none; width: 100%;">
                $childforumbits
    </table>
            </td>
        </tr>
    <else />
        $childforumbits
    </if>
    </tbody>
    </if>

    5. Ahora repetimos el proceso pero en la plantilla forumhome_forumbit_level1_post
    6. Dentro de la plantilla buscamos:

    Código HTML:
    <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" 
    
    id="forum_statusicon_$forum[forumid]" />
    Y lo sustituimos por:

    Código HTML:
    <if condition="$vboptions[customimg_enabled] == 1">
        <if condition="$forum[customimg] == ''">
            <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" 
    
    id="forum_statusicon_$forum[forumid]" />
    
    <else />
            <img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
    </if>
    
    <else />
        <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" 
    
    id="forum_statusicon_$forum[forumid]" />
    </if>

    7. Repetimos otra vez el proceso con la plantilla forumhome_forumbit_columncell
    8.Sustituimos el contenido por:

    Código HTML:
    <style>
    <!--
    .alt1Active
    {
    color: #777777;
    padding: 7px;
    border-left: 1px solid #C0C0C0;
    border-top: 1px solid #C0C0C0;
    }
    -->
    </style>
    <td align="$stylevar
    " id="f$forum[forumid]" width="$column_width">
    
    <table border="0" width="100%" cellspacing="0" cellpadding="0" align="left">
    <tr>
    </td>
    <td class="alt1Active" align="$stylevar
    
    " id="f$forum[forumid]" width="$column_width">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left">
    <tr>
    <td width="100%"  class="alt1Active" colspan="2"><b><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"  name="top6">
                                    $forum[title]</a></b><font color="#9CCE21"><if condition="$show['browsers']"><span class="smallfont"> (<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if></font></td>
    <tr>
    <td  align="top" ><a name="top5">
                                    
                                    $forum[forumhomeicon]</a></td>
    <td  align="top" valign="top" >$forum[description]</td>
                                    
    
    <tr>
    <td colspan="2" > $forum[lastpostinfo]
    </td>
    </table>
    
    </table>
    
    <if condition="$vboptions[customimg_enabled] == 1">
        <if condition="$forum[customimg] == ''">
            <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" 
    
    id="forum_statusicon_$forum[forumid]" />
    
    <else />
            <img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
    </if>
    
    <else />
        <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" 
    
    id="forum_statusicon_$forum[forumid]" />
    </if>



    Cuarta parte --> Poner los iconos y seleccionar el número de columnas



    1. Vamos a editar las opciones del foro que contiene el resto y en la penúltima opción ponemos el número de columnas que queremos.

    2. Vamos a editar las opciones del foro en el que queremos que aparezca el icono y en la última opción ponemos la ruta de la imagen tal y como nos muestra en el ejemplo.



    Extra: A la hora de sustituir el contenido de la plantilla forumhome_forumbit_columncell por el otro código, este puede ser editado para cambiar las características del recuadro. Hay que editar la primera parte del código, que pongo a continuación:


    Código HTML:
      <style>
      <!--
      .alt1Active
      {
      color: #777777; (Cambia el color de la letra de la descripción del foro)
      padding: 7px; (Cambia el espacio entre las 2 lineas del recuadro)
      border-left: 1px solid #C0C0C0; (Cambia el grosor y el color de la linea de la izquierda del recuadro)
      border-top: 1px solid #C0C0C0; (Cambia el grosor y el color de la linea de arriba del recuadro)

    Nota: Si no quieres poner iconos nuevos en los foros y quieres los que están por defecto, saltate todos los pasos que tenen que ver con el category icons.


    hqa18 le gusta esto.

  4. #4
    Miembro Array
    Fecha de ingreso
    03 dic, 08
    Mensajes
    1
    Gustado
    0 Veces
    Me Gustan
    0 Veces

    Predeterminado Re: Foros en columnas

    no se por que nadie te agradecio, si se muy padre como queda al final, saludos

  5. #5
    Miembro Array
    Fecha de ingreso
    28 dic, 08
    Mensajes
    4
    Gustado
    0 Veces
    Me Gustan
    0 Veces

    Predeterminado Re: Foros en columnas

    donde descargo el Category icons y el Arrange forums in columns

  6. #6
    Miembro especial Miembro de diamante Array Avatar de Skavenger
    Fecha de ingreso
    16 sep, 05
    Mensajes
    1,201
    Gustado
    11 Veces
    Me Gustan
    0 Veces

    Predeterminado Re: Foros en columnas

    Deberias poner enlaces directos a los mods que nombras, para evitar problemas de compatibilidad y versiones, por ejemplo.

    Está bueno que expliques paso a paso, le va a servir a muchos esto, mucha gente pregunta como se hace esto de las columnas. Pero yo personalmente no lo veo desde el punto de vista estético (usuario), sino desde el punto de vista de un webmaster, el sólo hecho de pensar que voy a tener que realizar el cambio a los archivos y actualizar las plantillas cada vez que actualice el foro me quita las ganas de realizar las modificaciones, pero como dice el dicho, sobre gustos...

  7. #7
    Miembro Array
    Fecha de ingreso
    26 jun, 09
    Mensajes
    7
    Gustado
    0 Veces
    Me Gustan
    1 Veces

    Predeterminado Re: Foros en columnas

    lo intentado una y otra vez el tutorial y no consigo hacer eso

  8. #8
    Miembro especial Miembro de plata Array Avatar de felenn
    Fecha de ingreso
    08 sep, 09
    Ubicación
    llegando al ciello
    Mensajes
    67
    Gustado
    16 Veces
    Me Gustan
    26 Veces

    Predeterminado Re: Foros en columnas

    me llamo la tencion pero no c ve la pik puedes ponerla otra vez para si ver ke es lo ke de ke se traataa porfa graciass.

  9. #9
    Miembro especial Miembro de diamante Array Avatar de Andrés Durán
    Fecha de ingreso
    23 abr, 09
    Ubicación
    Costa Rica
    Mensajes
    5,480
    Gustado
    1999 Veces
    Me Gustan
    142 Veces

    Predeterminado Re: Foros en columnas

    Hola felenn.

    Al parecer Morti23 se refería a estas dos modificaciones:

    http://www.vbulletin.org/forum/showthread.php?t=99829

    http://www.vbulletin.org/forum/showthread.php?t=82750

    El vB Category Icons se encuentra en el Graveyard, no podrás descargarlo ni ver una vista previa de la función que cumplía.
    Yo solía ser un gurú de vBulletin. Solía...

    Find me on Facebook.

  10. #10
    Miembro especial Miembro de plata Array Avatar de felenn
    Fecha de ingreso
    08 sep, 09
    Ubicación
    llegando al ciello
    Mensajes
    67
    Gustado
    16 Veces
    Me Gustan
    26 Veces

    Predeterminado Re: Foros en columnas

    gracias chuta..
    ya entiendo..