Pagina 1 di 1

Mod last topic list: titoli topic compatibili con mod seo

Inviato: 01/01/2011, 19:50
da metal master
Ho installato nel mio forum,la mod di micogian "last topic list" che fa apparire nel forum una tabella con gli ultimi 10 post in ordine di tempo di 10 topic del forum di qualsiasi categoria.

Questo e' il codice mod del file modlast topilist.php

Codice: Seleziona tutto

            <?php
        // ##### Mod Last_TopicList - Lista ultimi Topics - created by Micogian #####

        $sql = "SELECT
            tp.post_id, tp.topic_id, tp.forum_id, tp.post_subject, tp.post_time, tp.poster_id,
            tt.topic_id, tt.forum_id, tt.topic_title, tt.topic_time, tt.topic_views, tt.topic_replies, tt.topic_poster, tt.topic_first_poster_name, tt.topic_first_poster_colour,
            tt.topic_last_poster_id, tt.topic_last_poster_name, tt.topic_last_poster_colour, tt.topic_last_post_time, tt.topic_moved_id,
            tf.forum_id, tf.forum_name,
            tu.user_id, tu.username, tu.user_colour

           FROM " . TOPICS_TABLE . " tt, " . POSTS_TABLE . " tp, " . FORUMS_TABLE . " tf, " . USERS_TABLE . " tu
           WHERE tp.poster_id = tu.user_id
           AND tp.forum_id = tf.forum_id
           AND tp.topic_id = tt.topic_id
           AND tf.forum_id <> '36' 
           ORDER BY tp.post_time DESC LIMIT 0,40";
            $result = $db->sql_query($sql);
            $n_post = 0 ;
            $lista_topics = '' ;
            while ($row = $db->sql_fetchrow($result))
            {
               if ($auth->acl_get('f_read', $row['forum_id']) == 1) {
                  if( strpos($lista_topics, $row['topic_id']) == '0' AND $n_post < 10 ){
             if (strlen($row['topic_title'] > '63'))
             {
             $topic_title_cor = substr($row['topic_title'],0,62) . "";
             }else{
             $topic_title_cor = $row['topic_title'];
             }

               $template->assign_block_vars('last_topiclist', array(
           'TOPIC_LINK'        => "{$phpbb_root_path}viewtopic.$phpEx" . "?t=" . $row['topic_id'] . "&p=" . $row['post_id'] . "&#p" . $row['post_id'],
           'TOPIC_TITLE'       => $topic_title_cor ,
           'FORUM_LINK'        => "{$phpbb_root_path}viewforum.$phpEx" . '?f='.$row['forum_id'],
           'FORUM_NAME'        => $row['forum_name'],
           'TOPIC_VIEWS'       => $row['topic_views'],
           'TOPIC_REPLIES'     => $row['topic_replies'],
           'LAST_POST_TIME'    => date("d.m.Y, H:i",$row['topic_last_post_time']),
           'LAST_AUTHOR_FULL'  => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour'])   
                  ));
               $lista_topics .= "," . $row['topic_id'] ;
                  $n_post = ++$n_post ;
                  }
               }
            }
        // ##### END Mod Last_TopicList - Lista ultimi Topics - created by Micogian #####
        ?>
File mod_last_topiclist_body.html

Codice: Seleziona tutto

        <div class="forabg">
                    <div class="inner"><span class="corners-top"><span></span></span>
                    <ul class="topiclist">
                          <li class="header">
                             <dl>
                              <dt style="text-align: left; width: 38%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ultimi Topics</dt>
                              <dd style="text-align: left; width: 18%;">&nbsp;Nome del Forum</dd>
                              <dd style="text-align: center; width: 7%;">&nbsp;{L_REPLIES}</dd>
                              <dd style="text-align: center; width: 7%;">&nbsp;{L_VIEWS}</dd>               
                              <dd style="text-align: left; width: 16%;">&nbsp;Ultimo Mess.</dd>
                              <dd style="text-align: right;">&nbsp;Data</dd>
                             </dl>
                          </li>
                    </ul>
               <!-- BEGIN last_topiclist -->
                <ul class="topiclist forums">     
                          <li class="row">
                             <dl>
                                <dt style="text-align: left; width: 38%;"><a href="{last_topiclist.TOPIC_LINK}"><b>{last_topiclist.TOPIC_TITLE}</b></a></dt>
                                <dd style="text-align: left; width: 18%;"><a href="{last_topiclist.FORUM_LINK}"><span style="color:#0066FF"><b>{last_topiclist.FORUM_NAME}</b></dd>
                               
                                <dd style="text-align: center; width: 7%">{last_topiclist.TOPIC_REPLIES}</dd>
                                <dd style="text-align: center; width: 7%;">{last_topiclist.TOPIC_VIEWS}</dd>
                                <dd style="text-align: left;  width: 16%;"><b>{last_topiclist.LAST_AUTHOR_FULL}</b></dd>   <span style="color:#0066FF"><dd style="text-align: right;"><b>{last_topiclist.LAST_POST_TIME}</b></dd>
                             </dl>
                          </li>
                </ul>
              <!-- END last_topiclist -->
                <span class="corners-bottom"><span></span></span>
                 </div>
            </div>
            <br />             
La mod funziona bene,pero visto che ho anche successivamente installato la mod seo,vorrei che i link in lista apparissero allo stesso modo di quelli di quando si clicca direttamente nel forum.

Faccio un esempio:
Topic: Le trasmissioni televisive locali,se clicco in lista con la mod di micogian appare cosi: http://solonapolifans.altervista.org/vi ... 651&#p3651

Se vado direttamente nel forum invece,vista la mod seo appare cosi': http://solonapolifans.altervista.org/le ... html#p3651

E' possibile modifcare qualcosa nel codice di micogian per rendere i titoli dei topic compatibili con la seo?

Re: Mod last topic list: titoli topic compatibili con mod se

Inviato: 07/01/2011, 21:28
da gennyna
puoi dare il link ufficiale della mod?

Re: Mod last topic list: titoli topic compatibili con mod se

Inviato: 07/01/2011, 23:15
da Micogian
Non capisco dove sia il problema.
Cosa cambia se il link comprende un ID (come previsto dalla mia Mod) o una stringa come fa la SEO ?

SarĂ , ma io della Mod SEO non ne ho mai voluto sapere e i miei Forum sono indicizzati comunque.