Navigazione

    Privacy - Termini e condizioni
    © 2020 Search On Media Group S.r.l.
    • Registrati
    • Accedi
    • CATEGORIES
    • Discussioni
    • Non letti
    • Recenti
    • Hashtags
    • Popolare
    • Utenti
    • Stream
    • Interest
    • Categories
    1. Home
    2. andreast
    3. Post
    A

    andreast

    @andreast

    • Profilo
    • Chi segue 0
    • Da chi è seguito 0
    • Discussioni 0
    • Post 1
    • Migliore 0
    • Gruppi 0
    Iscrizione Ultimo Accesso
    Età 17
    0
    Reputazione
    1
    Post
    0
    Visite al profilo
    0
    Da chi è seguito
    0
    Chi segue
    User Newbie

    Post creati da andreast

    • RE: Ultimi topic di smf

      @patrick91 said:

      Scusate per la mia assenza 😞

      cmq ecco un piccolo script per visualizzare gli ultimi topic di un forum smf
      [PHP]<?php
      $query = "SELECT * FROM smf_topics ORDER BY ID_TOPIC DESC LIMIT 0,5";
      $row = mysql_query($query);
      echo "<table id="ultimipost">\n
      <thead><tr><th abbr="titolo" scope="col">Titolo Post</th><th scope="col">Autore</th><th abbr="orario" scope="col">Ora Post</th></tr></thead>\n
      <tbody>\n
      ";
      while($result = mysql_fetch_assoc($row)) {
      $id = $result['ID_TOPIC'];
      $board = $result['ID_BOARD'];
      $idlast = $result['ID_LAST_MSG'];
      $query_messaggio = "SELECT * FROM smf_messages WHERE ID_MSG = '$idlast'";
      $row_messaggio = mysql_query($query_messaggio);
      echo "<tr>";
      while ($res = mysql_fetch_assoc($row_messaggio)) {
      $id_msg = $res['ID_MSG'];
      $id_membro = $res['ID_MEMBER'];
      $orario = date("H:i:s - d/m/Y", $res['posterTime']);
      $subject = $res['subject'];
      echo "<td><a href="/forum/index.php?topic=$id.msg$id_msg#msg$id_msg">$subject</a></td>\n";
      $query_membro = "SELECT memberName FROM smf_members WHERE ID_MEMBER = '$id_membro'";
      $row_membro = mysql_query($query_membro);
      while ($res_m = mysql_fetch_assoc($row_membro)) {
      $autore = $res_m['memberName'];
      echo "<td><a href="/forum/index.php?action=profile;u=$id_membro">$autore</a></td>\n";
      }
      echo "<td>$orario</td>\n";
      }
      echo "</tr>\n";
      }
      echo "</tbody>\n";
      echo "</table>";
      ?>
      [/PHP]

      se volete vedere come funziona andate su
      😉

      salve io ho fatto il copia incolla del codice, ma mi dà un messaggio di errore...
      dove sbaglio???

      Parse error: syntax error, unexpected '<' in /miosito.it/home/forum/Sources/Load.php(1739) : eval()'d code(35) : eval()'d code on line 1

      sono un novellino abbiate pietà :giggle::giggle::giggle:
      Grazie

      postato in CMS & Piattaforme Self-Hosted
      A
      andreast