Eigene Seite ins Forum integrieren?

Du suchst einen bestimmten Mod, weißt aber nicht genau wo bzw. ob er überhaupt existiert? Wenn dir dieser Artikel nicht weiterhilft, kannst du hier den von dir gewünschten/gesuchten Mod beschreiben ...
Falls ein Mod-Autor eine der Anfragen hier aufnimmt, um einen neuen Mod zu entwickeln, geht's in [3.0.x] Mods in Entwicklung weiter.
Forumsregeln
phpBB 3.0 hat das Ende seiner Lebenszeit überschritten
phpBB 3.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 3.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf die neuste phpBB-Version, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
albert0583
Mitglied
Beiträge: 33
Registriert: 28.01.2012 08:54

Re: Eigene Seite ins Forum integrieren?

Beitrag von albert0583 »

Na ich dachte die ganzen Angaben zu den Tabellen wo die Variablen drin stehen
Benutzeravatar
TW1920
Mitglied
Beiträge: 746
Registriert: 02.06.2007 16:31
Wohnort: Ismaning
Kontaktdaten:

Re: Eigene Seite ins Forum integrieren?

Beitrag von TW1920 »

Nein, erstmal noch nicht, da du das ganze dann in eine spezielle Abfrage einbaun musst, damit auch 3 oder mehr Beiträge gleichzeitig ausgegeben werden können ;)

Das wäre der erste Schritt. ;)
Mfg T. Wolf
-Mods gesucht? Ne weitere Community gesucht?
-Mods gesucht? Mod-Übersetzungen gesucht?:->hier klicken
Benutzeravatar
albert0583
Mitglied
Beiträge: 33
Registriert: 28.01.2012 08:54

Re: Eigene Seite ins Forum integrieren?

Beitrag von albert0583 »

aha verstehe.
also das mit der datenbank scheint nun zu funktionieren aber es kommt eine Fehlermeldung wenn ich die datei direkt aufrufe
Parse error: syntax error, unexpected '<', expecting ')' in /var/www/web977/html/portal/last_topics.php on line 59
hab schon in zeile 59 nachgesehen nur dieses '<' ist nicht drin

Hab dir ne PN geschrieben. Schau mal rein

Benutzeravatar
TW1920
Mitglied
Beiträge: 746
Registriert: 02.06.2007 16:31
Wohnort: Ismaning
Kontaktdaten:

Re: Eigene Seite ins Forum integrieren?

Beitrag von TW1920 »

Sorry, ich hab einen kleinen Fehler gemacht :oops:
Hab vergessen ' zu setzten und das < existiert ;)

So, nun müsste der code passen: 8)

Code: Alles auswählen

<?php
// ############         Edit below         ######################################## 
$topic_length = '60';   // length of topic title 
$topic_limit = '3';   // limit of displayed topics 
$special_forums = '0';   // specify forums ('0' = no; '1' = yes) 
$forum_ids = '3,5,6,7';      // IDs of forums; separate them with a comma 

$config_path = '/';   // path to config.php 
$root_path = 'http://www.vfbfansauerbach.de/portal/';      // link path 
// ############         Edit above         ####################################### 

$path = dirname(__FILE__); 

$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 " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " 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 = $db->sql_query($sql);

$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_hour = date('H:i' ,  $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' ); 
   $t1 = $root_path.'viewtopic.php?f='.$forum_id.'&t='.$topic_id.'&p='.$line[$i]['topic_last_post_id'].'#p'.$line[$i]['topic_last_post_id'];
   $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 ############## 
	$template->assign_vars(array(
		'LASTTOPICS'            => sprintf('<tr> 

            <td style="width: 50%" bgcolor="#DBD3B4"><a href="'. $t1 .'" target="_blank" style="text-decoration:none"> 
            <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px" >'. $topic_title .'</a></font>&nbsp;&nbsp;<a href="'. $t1 .'"><img src="../forum/icon_topic_latest.gif" width="11" height="9" alt="Neuester Beitrag" /></a></td> 
            <td style="width: 20%" bgcolor="#DBD3B4"> 
            <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">'. $last_url .'</font></td> 
            <td style="width: 20%" bgcolor="#DBD3B4"> 
            <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">'. $last_time .'</font></td> 
         <td style="width: 10%" bgcolor="#DBD3B4"> 
            <font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:11px">'. $last_hour .'</font></td> 


        </tr>'),
	));
   // ############## output ############## 
} 


?>




Zuletzt geändert von TW1920 am 23.02.2012 20:59, insgesamt 1-mal geändert.
Mfg T. Wolf
-Mods gesucht? Ne weitere Community gesucht?
-Mods gesucht? Mod-Übersetzungen gesucht?:->hier klicken
Benutzeravatar
albert0583
Mitglied
Beiträge: 33
Registriert: 28.01.2012 08:54

Re: Eigene Seite ins Forum integrieren?

Beitrag von albert0583 »

Ruf mal den Link auf:

http://www.vfbfansauerbach.de/portal/last_topics.php

da haben wir wieder das Prob mit der DB oder?
Antworten

Zurück zu „[3.0.x] Mod Suche/Anfragen“