Recent MOD

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Knueps
Mitglied
Beiträge: 97
Registriert: 01.06.2004 21:45
Wohnort: Köln

Recent MOD

Beitrag von Knueps »

Hallo zusammen!


Ich habe mir den Recent MOD runtergeladen und wollte ihn installieren. Aber leider verstehe ich die Anleitung überhaupt garnicht.

Daher fange ich direkt ganz vorne mit meinen Fragen an. Zuerst habe ich die recent.php aus dem no_phpbb_recent-Ordner hochgeladen. Dann irgendwo anders eine php-Datei erstelllt, mit folgendem Quellcode:

Code: Alles auswählen

<? include('http://www.dein-forum.de/phpbb2/recent.php'); ?>

<table width="100%" cellpadding="1" cellspacing="1" border="0" align="center" class="forumline">
  <tr>
        <th colspan="5">{L_RECENT_TITLE}</th>
  </tr>
  <!-- BEGIN recent -->
  <tr> 
        <td class="{recent.ROW_CLASS}" align="center" valign="middle"><img src="{recent.TOPIC_FOLDER_IMG}" alt="{recent.TOPIC_FOLDER_ALT}" title="{recent.TOPIC_FOLDER_ALT}" /></td>
        <td class="{recent.ROW_CLASS}" nowrap="nowrap"><span class="topictitle">{recent.NEWEST_IMG}{recent.TOPIC_TYPE}<a href="{recent.U_VIEW_TOPIC}" class="topictitle">{recent.TOPIC_TITLE}</a></span>
                                                                                       <span class="gensmall">{recent.GOTO_PAGE}<br />{recent.FIRST_TIME}{recent.FIRST_AUTHOR}<br /></span></td>
        <td class="{recent.ROW_CLASS}" width="8%" align="left"><span class="postdetails">&nbsp;{recent.L_REPLIES}: {recent.REPLIES}
                                                                                                   <br />&nbsp;{recent.L_VIEWS}: {recent.VIEWS}</span></td>
        <td class="{recent.ROW_CLASS}" width="25%" nowrap="nowrap">&nbsp;<span class="forumlink"><a href="{recent.U_VIEW_FORUM}" class="forumlink">{recent.FORUM_NAME}</span></td>
        <td class="{recent.ROW_CLASS}" width="25%" nowrap="nowrap"><span class="postbody">{recent.POST_TEXT}</span><br />
                                                                                                           <span class="gensmall"> {recent.LAST_URL} {recent.LAST_TIME}&nbsp;&nbsp;{recent.LAST_AUTHOR}</span></td>
  </tr>
  <!-- END recent -->
</table>
Wenn ich dann auf die Seite gehe bekomme ich folgende Fehlermeldung:

Code: Alles auswählen

Warning: main(): Unable to access /srv/www/htdocs/web21/html/phpbb2/forum/config.php in /srv/www/htdocs/web21/html/phpbb2/recent.php on line 13

Warning: main(/srv/www/htdocs/web21/html/phpbb2/forum/config.php): failed to open stream: No such file or directory in /srv/www/htdocs/web21/html/phpbb2/recent.php on line 13

Warning: main(): Failed opening '/srv/www/htdocs/web21/html/phpbb2/forum/config.php' for inclusion (include_path='.:/usr/share/php') in /srv/www/htdocs/web21/html/phpbb2/recent.php on line 13

Warning: mysql_connect(): Access denied for user: 'wwwrun@localhost' (Using password: NO) in /srv/www/htdocs/web21/html/phpbb2/recent.php on line 14
Unable to select server.include($phpbb_root_path .'recent.'.$phpEx); {L_RECENT_TITLE} 
 {recent.NEWEST_IMG}{recent.TOPIC_TYPE}{recent.TOPIC_TITLE} {recent.GOTO_PAGE}
{recent.FIRST_TIME}{recent.FIRST_AUTHOR}
  {recent.L_REPLIES}: {recent.REPLIES} 
 {recent.L_VIEWS}: {recent.VIEWS}  {recent.FORUM_NAME} {recent.POST_TEXT}
{recent.LAST_URL} {recent.LAST_TIME}  {recent.LAST_AUTHOR} 
Ich denke mal, dass ich so richtig etwas falsch gemacht habe. Wär echt super wenn mir jmd weiterhelfen könnte!


Danke schonmal im vorraus!

MfG
Wer sich aufregt wegen Fussball ist ein armer Idiot.
- Fick dich sebst, wenn ich Orange sehe seh ich nunmal rot!
http://www.freshn.de
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

hast du in der recent.php diese Pfade angepasst?

Code: Alles auswählen

$config_path = '/forum/';	// path to config.php
$root_path = '/forum/';		// link path
Markus
Knueps
Mitglied
Beiträge: 97
Registriert: 01.06.2004 21:45
Wohnort: Köln

Beitrag von Knueps »

Danke jetzt klappt es. Nur jetzt stehe ich wieder vor meinem ersten Problem. Der MOD sieht genau so aus wie der topics_anywhere.

Ich such aber einen MOD der in etwas so aussieht www.uo-mittelerde.de (startseite).
Wer sich aufregt wegen Fussball ist ein armer Idiot.
- Fick dich sebst, wenn ich Orange sehe seh ich nunmal rot!
http://www.freshn.de
Knueps
Mitglied
Beiträge: 97
Registriert: 01.06.2004 21:45
Wohnort: Köln

Beitrag von Knueps »

Danke, werd das gleich direkt ausprobieren.
Habe aber noch eine kleine Frage zu dem recent MOD, da ich auf ner anderen Seite ne Verwendung dafür haben könnte :)
Wo kann ich angeben, dass der den Link zu dem Forenbeitrag in einem neuen Fenster öffnen soll?
Wer sich aufregt wegen Fussball ist ein armer Idiot.
- Fick dich sebst, wenn ich Orange sehe seh ich nunmal rot!
http://www.freshn.de
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

zum Thema fetch_all gehts hier weiter ...
http://www.phpbb.de/viewtopic.php?t=103453

zum Thema recent ...

In der recent.php hat du diese Zeile ...

Code: Alles auswählen

<td><a href="'. $forum_url .'">'. $line[$i]['forum_name'] .'</a>: '. $last_url .' '. $last_time .'</td>
ändere in:

Code: Alles auswählen

<td><a target="_blank" href="'. $forum_url .'">'. $line[$i]['forum_name'] .'</a>: '. $last_url .' '. $last_time .'</td>
Markus
Knueps
Mitglied
Beiträge: 97
Registriert: 01.06.2004 21:45
Wohnort: Köln

Beitrag von Knueps »

Hab die etwas umgeschrieben. Die sieht nu nurnoch so aus:

Code: Alles auswählen

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

$config_path = '/';	// path to config.php
$root_path = '/';		// link path
// ############         Edit above         ########################################

$path = dirname(__FILE__);
include_once($path.$config_path .'config.php');
mysql_connect($dbhost, $dbuser, $dbpasswd) OR die('Unable to select server.');
mysql_select_db($dbname) OR die('Unable to select database.'); 

// ############## output ##############
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
          <tr>
                
          </tr>';
// ############## output ##############

$where_forums = ( $special_forums == '0' ) ? '' : 't.forum_id 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 ."topics t, ". $table_prefix ."forums f, ". $table_prefix ."users u, ". $table_prefix ."posts p, ". $table_prefix ."posts p2, ". $table_prefix ."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 = 'http://www.dein-forum.de/phpbb2/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' ) ? '': '';
	$topic_type .= ( $line[$i]['topic_type'] == '3' ) ? '': '';
	$topic_type .= ( $line[$i]['topic_type'] == '1' ) ? '': '';
	$topic_type .= ( $line[$i]['topic_vote'] ) ? '': '';

	$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'] .'">'. $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'] .'">'. $last_author .'</a>';

	// ############## output ##############
	echo '<tr> 
                        <td valign="top" nowrap="nowrap">'. $topic_type .'<a href="'. $topic_url .'">'. $topic_title .'</a></td>
                    </tr>
                    <tr>

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

echo '</table>';
mysql_close();
?>
Wer sich aufregt wegen Fussball ist ein armer Idiot.
- Fick dich sebst, wenn ich Orange sehe seh ich nunmal rot!
http://www.freshn.de
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

suche:

Code: Alles auswählen

   // ############## output ############## 
   echo '<tr> 
                        <td valign="top" nowrap="nowrap">'. $topic_type .'<a href="'. $topic_url .'">'. $topic_title .'</a></td> 
                    </tr> 
                    <tr> 

                    </tr>'; 
   // ############## output ############## 
ersetze mit:

Code: Alles auswählen

   // ############## output ############## 
   echo '<tr> 
                        <td valign="top" nowrap="nowrap">'. $topic_type .'<a target="_blank" href="'. $topic_url .'">'. $topic_title .'</a></td> 
                    </tr> 
                    <tr> 

                    </tr>'; 
   // ############## output ############## 
Markus
Knueps
Mitglied
Beiträge: 97
Registriert: 01.06.2004 21:45
Wohnort: Köln

Beitrag von Knueps »

Vielen Dank!
Wer sich aufregt wegen Fussball ist ein armer Idiot.
- Fick dich sebst, wenn ich Orange sehe seh ich nunmal rot!
http://www.freshn.de
Benutzeravatar
mtsluft
Mitglied
Beiträge: 413
Registriert: 03.12.2005 18:54
Kontaktdaten:

Beitrag von mtsluft »

Hi ...

hast du in der recent.php diese Pfade angepasst?

Code:
$config_path = '/forum/'; // path to config.php
$root_path = '/forum/'; // link path


Markus
Hallo,
ich hab das gleiche Problem, weiss aber nicht wie ich diese beiden anpassen muss :( :(
Antworten

Zurück zu „phpBB 2.0: Mod Support“