ilch Forum » Ilch Clan 1.1 » Module und Modifikationen » Forenticker

Geschlossen
  1. #1
    User Pic
    derrsammy Mitglied
    Registriert seit
    27.12.2009
    Beiträge
    3
    Beitragswertungen
    0 Beitragspunkte
    Hi, ich hab da mal ne Frage..

    Gibt es für Ilch einen Forenticker als Box, wo man die letzten Foren-Einträge sehen kann? Wir haben aber ein externes Forum.

    Hier der Link zum externen Forum
    91.194.91.199/~adm4341/forum/

    Grüße
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    derrsammy Mitglied
    Registriert seit
    27.12.2009
    Beiträge
    3
    Beitragswertungen
    0 Beitragspunkte
    Schade, hat keiner eine Idee?

    Grüße
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    Tyrargo Mitglied
    Registriert seit
    30.01.2006
    Beiträge
    5.541
    Beitragswertungen
    7 Beitragspunkte
    gibt es. aber nicht für ein externes forum.
    0 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    derrsammy Mitglied
    Registriert seit
    27.12.2009
    Beiträge
    3
    Beitragswertungen
    0 Beitragspunkte
    Danke Tyrargo, dann werde ich mal die Suche aufgeben.

    Grüße sammy
    0 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    GeCk0 Hall Of Fame
    Registriert seit
    01.05.2009
    Beiträge
    2.989
    Beitragswertungen
    96 Beitragspunkte
    sowas wirst du nicht finden

    aber machbar wäre es auf jeden fall mit etwas php-kenntnisse

    ansonsten Auftragsprogrammierung -> Anfragen/Angebote
    Alle Module von mir sind nun unter php-gecko.de erreichbar
    0 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    eisvogel10 Mitglied
    Registriert seit
    06.11.2009
    Beiträge
    129
    Beitragswertungen
    14 Beitragspunkte
    Für ne eigene Seite z.B. für ein phpbb Forum hab ich was zwinker
    • phpbbforenticker

    du must nur noch deine Angaben eingeben:
    "localhost", // meistens localhost
    "username", // dein FTP Username
    "passwort" // dein FTP Passwort
    "meine_db_1" // dein Datenbankname
    $config_path = '/ilch/meinforum/'; // Pfad zur config.php
    $root_path = 'http://meine-seite.de/ilch/meinforum/'; // Pfad zum Direktlink

    weiterhin kannst du hier die Anzeige verändern:
    $topic_length = '20'; // length of topic title
    $topic_limit = '12'; // limit of displayed topics
    $special_forums = '0'; // specify forums ('0' = no; '1' = yes)
    $forum_ids = '92'; // IDs of forums; separate them with a comma

    Ansehen kann man es sich hier externer Link, das Forum ist zwar nicht in Betrieb, weil wir das Ilch Forum verwenden, aber die Ansicht ist ersichtlich.

    Gruß eisvogel

    <?php
    
    $verbindung=mysql_connect("localhost","username","passwort")
                or die("Verbindung fehlgeschlagen!");
                $datenbank=mysql_select_db("meine_db_1")
                or die("<br>Datenbank nicht gefunden!");
    
    // ############         Edit below         ########################################
    $topic_length = '20';   // length of topic title
    $topic_limit = '12';   // limit of displayed topics
    $special_forums = '0';   // specify forums ('0' = no; '1' = yes)
    $forum_ids = '92';      // IDs of forums; separate them with a comma
    
    $config_path = '/ilch/meinforum/';   // path to config.php
    $root_path = 'http://meine-seite.de/ilch/meinforum/';      // link path
    // ############         Edit above         #######################################
    
    
    
    // ############## output ##############
    echo '<table border="0" cellpadding="0" cellspacing="0" style="width: 100%" id="Table_DSF-Top5">
    <body text="#000000" link="#000000" vlink="#333333" alink="#333333">
             <tr>
               <td colspan="4"><span class="small"><font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">
               Die '. $topic_limit .' letzten Themen im Forum</font></span></td><br>
             </tr>
             <tr>
    
                <td style="width: 20%"><span class="small">
                <strong>
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">Foren</font></strong>
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:9px"></font
                </strong></span></td>
                <td style="width: 20%"><span class="small">
                <strong>
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">User</font>
                </strong>
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:9px"></font
                </strong></span></td>
                <td style="width: 20%"><span class="small">
                <strong>
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">Datum</font>
                </strong></span></td>
                <td style="width: 20%"><span class="small"><strong>
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">Thema</font>
                </strong>
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:9px"></font
                </strong></span></td>
    
             </tr>';
    // ############## output ##############
    
    $where_forums = ( $special_forums == '0' ) ? '' : 't.forum_id NOT IN ('. $forum_ids .') AND ';
    $sql = "SELECT t.*, f.forum_id, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time
       FROM ". $table_prefix ."phpbb_topics t, ". $table_prefix ."phpbb_forums f, ". $table_prefix ."phpbb_users u, ". $table_prefix ."phpbb_posts p, ". $table_prefix ."phpbb_posts p2, ". $table_prefix ."phpbb_users u2
       WHERE $where_forums t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id
       ORDER BY t.topic_last_post_id DESC LIMIT $topic_limit";
    $result = mysql_query($sql);
    if( !$result )
    {
       die('SQL Statement Error: '. mysql_error());
       exit();
    }
    
    $line = array();
    while( $row = mysql_fetch_array($result) )
    {
       $line[] = $row;
    }
    
    for( $i = 0; $i < count($line); $i++ )
    {
       $forum_id = $line[$i]['forum_id'];
       $forum_url = $root_path .'viewforum.php?f='. $forum_id;
       $topic_id = $line[$i]['topic_id'];
       $topic_url = $root_path .'viewtopic.php?t='. $topic_id;
    
       $topic_title = ( strlen($line[$i]['topic_title']) < $topic_length ) ? $line[$i]['topic_title'] : substr(stripslashes($line[$i]['topic_title']), 0, $topic_length) .'...';
    
       $topic_type =  ( $line[$i]['topic_type'] == '2' ) ? 'Announcement ': '';
       $topic_type .= ( $line[$i]['topic_type'] == '3' ) ? 'Global Announcement ': '';
       $topic_type .= ( $line[$i]['topic_type'] == '1' ) ? 'Sticky ': '';
       $topic_type .= ( $line[$i]['topic_vote'] ) ? 'Poll ': '';
    
       $views = $line[$i]['topic_views'];
       $replies = $line[$i]['topic_replies'];
    
       $first_time = date('d.m.Y', $line[$i]['topic_time']);
       $first_author = ( $line[$i]['first_poster_id'] != '-1' ) ? '<a href="'. $root_path .'profile.php?mode=viewprofile&u='. $line[$i]['first_poster_id'] .'" target="_blank">'. $line[$i]['first_poster'] .'</a>' : ( ($line[$i]['first_poster_name'] != '' ) ? $line[$i]['first_poster_name'] : 'guest' );
       $last_time = date('d.m.Y', $line[$i]['post_time']);
       $last_author = ( $line[$i]['last_poster_id'] != '-1' ) ? $line[$i]['last_poster'] : ( ($line[$i]['last_poster_name'] != '' ) ? $line[$i]['last_poster_name'] : 'guest' );
       $last_url = '<a href="'. $root_path .'viewtopic.php?p='. $line[$i]['topic_last_post_id'] .'#'. $line[$i]['topic_last_post_id'] .'" target="_blank">'. $last_author .'</a>';
    
       // ############## output ##############
       echo '<tr>
    
                <td style="width: 20%"><a href="'. $forum_url .'" target="_blank">
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">'. $line[$i]['forum_name'] .'</font></a></td>
                <td style="width: 20%">
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">'. $last_url .'</font></td>
                <td style="width: 20%">
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">'. $last_time .'</font></td>
                <td style="width: 20%"><a href="'. $topic_url .'" target="_blank">
                <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">'. $topic_title .'</font></a></td>
    
            </tr>';
    
       // ############## output ##############
    }
    
    echo '</table>';
    
                $sql = 'SELECT COUNT(post_id) FROM phpbb_posts';
    if (!$result = mysql_query($sql))
    {
      die('Fehler: ' . mysql_error());
    }
    $post_count = mysql_result($result, 0);
    echo "Anzahl an Beiträgen im Forum: " . $post_count;
    mysql_free_result($result);
    
    mysql_close();
    ?>



    Zuletzt modifiziert von eisvogel10 am 02.01.2010 - 15:06:59
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Module und Modifikationen

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten