• User Attivo

    Mappe Forum : da...a

    Ciao a tutti 🙂

    Chiedevo se fosse possibile conoscere il codice per creare queste utlissime Mappe, presenti nell'Home di giorgiotave.it
    Es.
    Fino a 100
    Fino a 200

    Avevo trovato un mezzo codice per farlo in un'altra discussione, ma penso che forse non era quello completo...

    Nella mia Home sono riuscito a creare una cosa simile, racchiudendo in un file .php tutti gli ultimi topic di una determinata sezione: Es. Ultime Programmi
    Ma a creare da un numero tot ad uno tot, non mi viene proprio..

    Muchas Gracias :ciauz:


  • User Attivo

    sarà che ho seccato fuori mezza bottiglia di rum ma non capisco di cosa stiamo parlando... sopratutto se seguo il link che hai messo come esempio che mi pare porti ad un sito che parla di serial e roba simile.

    chiedo scusa ma non capisco, ti puoi spigare melgio?

    achille


  • User Attivo

    Salve Trance

    Molto strano, eppure sotto le parole con collegamenti vedo link giusti...che comunque sono:

    (Esempi dei link di Giorgio che vorrei ricreare)

    http://www.giorgiotave.it/postforum.php
    http://www.giorgiotave.it/postforum2.php

    (Esempio di un mio link, contenente un numero tot di notizie da una determinata sezione, racchiusa in un file .php)

    http://www.p2psin.net/freeware.php


  • Community Manager

    Ranma,

    sono di fretta, nel thread in cui sei intervenuto anche tu per aiutare Karapoto ed altri con la mappa del sito c'è il codice.

    Cerca vbulletin nel forum.

    E mi raccomando, se non trovi uppa pure di nuovo questo per farmelo notare che appena ho 5 minuti liberi lo cerco io 🙂


  • User Attivo

    Ciao Giorgio, grazie di aver risposto 🙂

    Scusami, a dire il vero io quel codice l'ho trovato:

    <?
    $ciao=1200;
    $ciao/=30;
    $numero= 2;
    while ($numero <= $ciao){
    echo " <a href="http://www.giorgiotave.it/forum/segnala-il-tuo-sito-annunci/index$numero.html">$numero</a> ||";
    $numero ++;
    }
    ?>

    Ma ero convinto che ci mancasse qualche parte..in poche parole questo è tutto il contenuto di postforum.php o file simili, che sono in Home?

    Mi basta modificare quindi i numeri ed è fatto? Query, Db, niente di niente?

    Hai voglia ad impazzire allora..eheh :yuppi:


  • Community Manager

    Ciao 🙂

    Quello è il codice per creare mappe delle pagine interne dei forum, non dei post.

    In quel thread c'è anche l'altro codice (mi segnali il thread che lo trovo io?)

    :ciauz:


  • User Attivo

    CIao Giorgio 😉

    Non mi funziona l'altro..ehehe, non capisco se sia un problema di query al Db o di codice vero e proprio, cmq ecco il LInk

    Cmq per raccogliere gli ultimi post di determinate sezioni in un file .php io ho risolto utilizzando questo esempio, postato su vB.org tempo fa: Ultime

    <?php
    ##########################################################################
    // RECENT TOPICS (vbSEO edition) by LBmtb
    // [email][email protected][/email] OR aim: LBmtb
    //
    // Do not remove copyright unless you donate $5 via paypal
    // to the above email address, thanks
    // CUSTOMIZED from a www.phase1media.com script found here:
    // http://www.vbulletin.org/forum/showpost.php?p=589067&postcount=7
    ##########################################################################

    CUSTOMIZE THE FOLLOWING

    // DATABASE & URL SETTINGS
    $db_host = ""; // Change this if your MySQL database host is different.
    $db_name = "
    "; // Change this to the name of your database.
    $db_user = ""; // Change this to your database username.
    $db_pw = "
    "; // Change this to your database password.
    $db_prefix = ""; // Change to your tables' prefix. Usually vb_
    $forum_url = "
    "; // Change this to reflect to your forum's URL.

    // APPEARANCE OPTIONS
    $separator = "@"; // this goes between last poster and date
    $limit = "***"; // Number of posts displayed
    $post_date_format = "1"; // leave as 1 for "12/18/06 05:26 PM" or change to 2 for "05:26 PM"

    // FORUM SOURCES FOR TOPICS
    // use one or the other, not both. if left blank the script will return threads from any forum
    $fidi_raw = "***"; // ONLY include threads from these forums. seperate each ID with a comma
    $fidx_raw = ""; // Exclude threads from these forum. seperate each ID with a comma

    // CSS CLASSES
    $recent_topics = "vb_topics"; // you can use CSS to adjust the presentation of the list
    $recent_poster = "vb_last_post"; // you can use CSS to adjust the presentation the last poster and date

    VBSEO SETTINGS

    include_once "forum/includes/functions_vbseo.php"; // change this path to reflect where your forum is
    vbseo_startup(); // if you have a vbSEO version under 3, comment this line and uncomment the next three
    // vbseo_get_options();
    // vbseo_prepare_seo_replace();
    // get_forum_info();

    NO NEED TO TOUCH ANYTHING BELOW

    #############################################################################

    if (!($recent_topics_connection = mysql_connect("$db_host", "$db_user", "$db_pw")))
    die ("could not connect");
    if (!(mysql_select_db("$db_name", $recent_topics_connection)))
    mysql_error();
    echo "<ul class="$recent_topics">\n";
    $fidi_array = explode (',', $fidi_raw);
    $fidx_array = explode (',', $fidx_raw);
    function forum_where($f_array,$which){
    if ($which == "i") { $f_final .= "AND ("; }
    if ($which == "x") { $f_final .= "AND NOT ("; }
    foreach( $f_array as $key => $value){
    if ($key == 0) { $f_final .= "forumid=".$value; }
    else { $f_final .= " OR forumid=".$value; }
    }
    $f_final .= ")";
    return $f_final;
    }
    if ($fidi_raw) { $fidi_final = forum_where($fidi_array,"i"); }
    if ($fidx_raw) { $fidx_final = forum_where($fidx_array,"x"); }
    $thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter,forumid FROM ".$db_prefix."thread WHERE visible=1 AND open=1 $fidi_final $fidx_final ORDER BY lastpost desc LIMIT $limit");
    while($thread_get=@mysql_fetch_array($thread_sql))
    {
    $lastpost = $thread_get['lastpost'];
    $poster = $thread_get['lastposter'];
    $tid = $thread_get['threadid'];
    if ($post_date_format == "1") { $date2 = date ("m/d/y h:i A" ,$lastpost); }
    elseif ($post_date_format == "2") { $date2 = date ("h:i A" ,$lastpost); }
    else { $date2 = date ("m/d/y h:i A" ,$lastpost); }

    $threadurl = vbseo_thread_url_row($thread_get, $pagenum);
    echo "<li><a href=\"$forum_url/$threadurl\">$thread_get[title]</a> <span class=\"$recent_poster\">($poster $separator $date2)</span></li>\n";
    

    }
    echo "</ul>\n<div style="font-size: .9em;">recent topics by <a href="http://www.socaltrailriders.org/"><acronym title="Southern California Trail Riders">SocalTrailRiders.org</acronym></a></div>";
    mysql_close($recent_topics_connection);
    ?>

    Questo mi funziona..al limite possiamo provare a modificare questo anche per Mappe?


  • Community Manager

    @Ranma said:

    Questo mi funziona..al limite possiamo provare a modificare questo anche per Mappe?

    Si certo, prova a farlo vediamo....:)

    Ti sposto in PHP per ora, appena apriamo la sezione CMS ci divertiremo un mondo 🙂