[phpBB Debug] PHP Warning: in file [ROOT]/ext/tas2580/seourls/event/listener.php on line 213: Undefined array key "FORUM_NAME"
phpBB Threadliste funktioniert nicht - REDAXO Forum
Hallo,

Wir haben in letzter Zeit festgestellt, dass die Kommunikation via Slack viel schneller und zielführender ist als ein Beitrag im Forum. Aufgrund der neuen und besseren Möglichkeiten der Kommunikation haben wir uns entschlossen das Forum nur noch als Archiv zur Verfügung zu stellen. Somit bleibt es weiterhin möglich hier nach Lösungen zu suchen. Neue Beiträge können nicht mehr erstellt werden.

Wir empfehlen, für deine Fragen/Probleme Slack zu nutzen. Dort sind viele kompetente Benutzer aktiv und beantworten jegliche Fragen, gerne auch von REDAXO-Anfängern! Slack wird von uns sehr intensiv und meistens "rund um die Uhr" benutzt :-)
Selbst einladen kannst Du dich hier: https://redaxo.org/slack/
Goldacker
Beiträge: 148
Registriert: 1. Jul 2007, 13:27
Wohnort: Hamburg / Berlin / Neubrandenburg
Kontaktdaten: Website

phpBB Threadliste funktioniert nicht

1. Jul 2007, 14:33

Ich dachte immer, dass ich kein Anfänger bin, aber bekomme einfach das Modul phpBB Threadliste http://www.redaxo.de/165-Moduldetails.h ... f3c69ff4f7 nicht zum laufen.

Ich habe das Forum unter /forum/ installiert. Läuft auch.
Hab das Modul angelegt:

Eingabe:

Code: Alles auswählen

<?php
/*
Konfiguration
*/
$phpbb_root_path = '/forum/';

/*
Ende der Konfiguration
*/
define('IN_PHPBB', true);
$phpbb_root_path = (preg_match("/\/$/i", $phpbb_root_path)) ? $phpbb_root_path : $phpbb_root_path . '/';

/*
Lade die benötigten phpBB Dateien
*/
if (!@include_once($phpbb_root_path . 'extension.inc')) {
	die('Unable to open extension.inc.  Feeling helpful?  Send an email to the webmaster.');
}
if (!@include_once($phpbb_root_path . 'common.' . $phpEx)) {
	die('Unable to open config file.  Feeling helpful?  Send an email to the webmaster.');
}

/*
Forenliste erstellen
*/
$sql = "SELECT forum_id, forum_name FROM " . FORUMS_TABLE . " ORDER BY forum_name";
if( !($result = $db->sql_query($sql)) )
{
  message_die(GENERAL_ERROR, "Could not query table information", "", __LINE__, __FILE__, $sql);
}
else {
  echo '<p>';
  echo '<label for="VALUE[1]">Forum</label>' . "\n";
  echo '<select name="VALUE[1]" id="VALUE[1]">';
  while ( $row = $db->sql_fetchrow($result) )
  {
    echo '<option value="' . $row['forum_id'] . '"' . ("REX_VALUE[1]" == $row['forum_id'] ? ' selected="selected"' : '') . '>' . $row['forum_name'] . ' (' . $row['forum_id'] .')</option>';
  }
  echo '</select>';
  echo '</p>';
}
?>

<p>
  <label for="VALUE[2]">Anzahl der Posts</label>
  <input type="text" value="REX_VALUE[2]" name="VALUE[2]" id="VALUE[2]" />
</p>

<p>
  <label for="VALUE[3]">Postlänge</label>
  <input type="text" value="REX_VALUE[3]" name="VALUE[3]" id="VALUE[3]" />
</p>

<p>
  <input type="checkbox"<?php if("REX_VALUE[4]") echo 'checked="checked"'; ?> value="true" name="VALUE[4]" id="VALUE[4]" />
  <label for="VALUE[4]">"Sticky"-Posts anzeigen</label>
</p>


<p>
  <input type="checkbox"<?php if("REX_VALUE[5]") echo 'checked="checked"'; ?> value="true" name="VALUE[5]" id="VALUE[5]" />
  <label for="VALUE[5]">Attachments anzeigen</label>
</p>
Ausgabe:

Code: Alles auswählen

<?php
/*
Konfiguration
*/
$phpbb_root_path = '/forum/';
$phpbb_url = 'http://www.briefmarken-jugend.de/forum/';
/*
Ende der Konfiguration
*/

define('IN_PHPBB', true);
$phpbb_root_path = (preg_match("/\/$/i", $phpbb_root_path)) ? $phpbb_root_path : $phpbb_root_path . '/';
$phpbb_url = (preg_match("/\/$/i", $phpbb_url)) ? $phpbb_url : $phpbb_url . '/';

/*
Thanks to geniusdex & hwlab for posting sample code to php.net.
*/
function shorten($str, $max_chars, $substitution = '...') {
	if (strlen($str) > $max_chars) {
		$str = substr($str, 0, ($max_chars - 3));
		$last_space = strrpos($str, ' ');
		$str = substr($str, 0, $last_space);
		/*
		Here we check to see if we just truncated right in the middle of a tag,
		like "<a " (if that happens, adding the ">" character will at least
		keep the page from crashing & burning)!
		*/
		if (strrpos($str, '>') < strrpos($str, '<')) {
			$str .= '>';
		}
		$str .= $substitution;
	}
	return $str;
}

/*
Lade die benötigten phpBB Dateien
*/
if (!@include_once($phpbb_root_path . 'extension.inc')) {
	die('Unable to open extension.inc.  Feeling helpful?  Send an email to the webmaster.');
}
if (!@include_once($phpbb_root_path . 'common.' . $phpEx)) {
	die('Unable to open config file.  Feeling helpful?  Send an email to the webmaster.');
}
if (!@include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx)) {
	die('Unable to open bbcode file.  Feeling helpful?  Send an email to the webmaster.');
}

/*
Variablen setzen
*/
$count = 0;
$more_url = $phpbb_url . 'viewforum.' . $phpEx . '?f=REX_VALUE[1]';
$GLOBALS['HTTP_COOKIE_VARS'] = & $HTTP_COOKIE_VARS;
$GLOBALS['HTTP_GET_VARS'] = & $HTTP_GET_VARS;
$GLOBALS['SID'] = & $SID;
$GLOBALS['board_config'] = & $board_config;
$GLOBALS['db'] = & $db;
$GLOBALS['gen_simple_header'] = & $gen_simple_header;
$GLOBALS['images'] = & $images;
$GLOBALS['lang'] = & $lang;
$GLOBALS['nav_links'] = & $nav_links;
$GLOBALS['phpbb_root_path'] = & $phpbb_root_path;
$GLOBALS['phpEx'] = & $phpEx;
$GLOBALS['session_length'] = & $session_length;
$GLOBALS['starttime'] = & $starttime;
$GLOBALS['template'] = & $template;
$GLOBALS['theme'] = & $theme;
$GLOBALS['user_ip'] = & $user_ip;
$GLOBALS['userdata'] = & $userdata;

/*
I need to run a SESSION just to have the bbcode file work!
*/
$userdata = session_pagestart($user_ip, $forum);
init_userprefs($userdata);

/*
Posts aus der Datenbank lesen
*/
$sql = 'SELECT t.topic_id, t.topic_poster, t.topic_time, t.topic_replies, u.username, p.post_id, p.bbcode_uid, p.post_subject, p.post_text ';
$sql .= 'FROM ' . TOPICS_TABLE . ' as t, ' . USERS_TABLE . ' as u, ' . POSTS_TEXT_TABLE . ' as p ';
$sql .= 'WHERE t.forum_id=REX_VALUE[1] AND t.topic_poster=u.user_id AND t.topic_first_post_id=p.post_id ';
if (!"REX_VALUE[4]") {
	$sql .= 'AND t.topic_type=0 ';
}
$sql .= 'ORDER BY t.topic_time DESC ';
$sql .= 'LIMIT REX_VALUE[2]';

if (!$result = $db->sql_query($sql)) {
	message_die(GENERAL_ERROR, 'Querying the database didn\'t work.  Feeling helpful?  Email the webmaster.');
}

/*
Ergebnisse durchlaufen und ausgeben
*/

while ($row = $db->sql_fetchrow($result)) {
	$topic_id = $row['topic_id'];
	$userid = $row['topic_poster'];
	$topic_time = $row['topic_time'];
	$replies = $row['topic_replies'];
	$username = $row['username'];
	$bid = $row['bbcode_uid'];
	$post_id = $row['post_id'];
	$subject = $row['post_subject'];
	$text = $row['post_text'];
	$topic_url = $phpbb_url . 'viewtopic.' . $phpEx . '?t=' . $topic_id;
  
  /*
  Attachments aus der Datenbank lesen
  */
  $sql = 'SELECT d.attach_id, IFNULL(d.comment, d.real_filename) as label, d.mimetype, d.filesize';
  $sql .= ' FROM ' . ATTACHMENTS_TABLE . ' as a';
  $sql .= ' INNER JOIN ' . ATTACHMENTS_DESC_TABLE . ' as d ON a.attach_id = d.attach_id';
  $sql .= ' WHERE a.post_id = ' . $post_id;
  if (!$attachments = $db->sql_query($sql)) {
  	message_die(GENERAL_ERROR, 'Querying the database didn\'t work.  Feeling helpful?  Email the webmaster.');
  }
  
  if ($count < "REX_VALUE[2]") {
		if ($bid != '') {
			$text = ($board_config['allow_bbcode']) ? bbencode_second_pass($text, $bid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $text);
		}
		$text = make_clickable($text);
		$orig_word = array();
		$replacement_word = array();
		obtain_word_list($orig_word, $replacement_word);
		if (count($orig_word)) {
			$subject = preg_replace($orig_word, $replacement_word, $subject);
			$text = preg_replace($orig_word, $replacement_word, $text);
		}
		$text = ($board_config['allow_smilies']) ? smilies_pass($text) : $text;
		$text = str_replace("\n", '<br />', $text);
		$text = preg_replace('/src ?= ?"images\/smiles\//', 'src="' . $phpbb_url . 'images/smiles/', $text);
    $text = ("REX_VALUE[3]") ? shorten($text, "REX_VALUE[3]", '... <a href="' . $topic_url . '">weiter</a>') : $text;
		$profile_url = $phpbb_url . 'profile.' . $phpEx . '?mode=viewprofile&u=' . $userid;
		$profile_link_start = '<a href="' . $profile_url . '">';
		$profile_link_end = '</a>';
    $topic_time = gmdate($board_config['default_dateformat'], $topic_time + (3600 * $board_config['board_timezone']));
  }
?>
<div class="forum_entry">
<h2 class="subject"><a href="<?php echo $topic_url; ?>"><?php echo $subject; ?></a></h2>
<p class="tagline"><?php echo $profile_link_start,$username,$profile_link_end . ' - ' . $topic_time; ?></p>

<p class="text"><?php echo $text; ?></p>
<?php
  /*
  Attachments durchlaufen und ausgeben
  */
  if("REX_VALUE[5]" && isset($attachments) && $db->sql_numrows($attachments) > 0) {
    echo '<h3>Anhang</h3>';
    echo '<ul>';
    while($attachment = $db->sql_fetchrow($attachments)) {
      $size_lang = ($attachment['filesize'] >= 1048576) ? 'MB' : ( ($attachment['filesize'] >= 1024) ? 'KB' : 'Bytes' );

			if ($attachment['filesize'] >= 1048576)
			{
				$attachment['filesize'] = (round((round($attachment['filesize'] / 1048576 * 100) / 100), 2));
			}
			else if ($attachment['filesize'] >= 1024)
			{
				$attachment['filesize'] = (round((round($attachment['filesize'] / 1024 * 100) / 100), 2));
			}
      echo '<li><a href=" ' . $phpbb_url . 'download.' . $phpEx . '?id=' . $attachment['attach_id'] . '">' . $attachment['label'] . ' (' . $attachment['filesize'] . ' ' . $size_lang . ')</a></li>';
    }
    echo '</ul>';
  }
?>
<p class="comments"><a href="<?php echo $topic_url; ?>">Kommentare</a> (<?php echo $replies; ?>)</p>
</div>
<?php
	$count++;
}
$db->sql_freeresult($result);
?>
<p><a href="<?php echo $more_url; ?>">Alle Einträge anzeigen.</a></p>
Im Backend folgender Fehler:
Unable to open extension.inc. Feeling helpful? Send an email to the webmaster.

Was nun? Was ist falsch konfiguriert? Ist noch etwas mehr nötig als Modul und phpBB-Forum??

Maidenaustria
Beiträge: 293
Registriert: 7. Mär 2006, 10:43
Wohnort: Österreich

4. Jul 2007, 14:43

ehrlich gesagt - vergiss dieses Modul - das funktioniert nicht... :roll:
Da hatten schon mehrere Redaxoaner (inkl. mir) Probleme..

Ich leg dir diese Version ans Herz:
http://forum.redaxo.de/ftopic4267.html

Wie das aussieht kann man auch meiner Seite sehen:
http://www.maidenaustria.at/redaxo

Be(a)st regards,
MA

Benutzeravatar
Markus.Staab
Entwickler
Beiträge: 9634
Registriert: 29. Jan 2005, 15:50
Wohnort: Aschaffenburg/Germany
Kontaktdaten: ICQ Website

4. Jul 2007, 15:34

Hi,

könntet ihr dem Autor ne Mail zukommen lassen, was am Modul zu ändern ist..? Ich nehm das dortige Modul solange offline.

Gruß,
Markus

Goldacker
Beiträge: 148
Registriert: 1. Jul 2007, 13:27
Wohnort: Hamburg / Berlin / Neubrandenburg
Kontaktdaten: Website

Hm schade

4. Jul 2007, 19:08

Na supa, probier stunden lang ... kann da nicht auch noch n Kommentar rein beim Download? Ich weiß nicht recht wie ich das machen soll.

Autor ist kontaktiert

Aber schonmal danke

Benutzeravatar
Markus.Staab
Entwickler
Beiträge: 9634
Registriert: 29. Jan 2005, 15:50
Wohnort: Aschaffenburg/Germany
Kontaktdaten: ICQ Website

4. Jul 2007, 22:16

Hi,

du kannst ja nen Kommentar dazu reinschreiben

Gruß,
Markus

Benutzeravatar
gfc
Beiträge: 152
Registriert: 27. Dez 2005, 22:46
Kontaktdaten: Website

4. Jul 2007, 22:56

ich hab das Modul immernoch im Einsatz. "Funktioniert nicht" ist nicht eine Fehlerbeschreibung, mit der ich helfen könnte.
http://www.parkrocker.net/ - Die Rock im Park Community

Maidenaustria
Beiträge: 293
Registriert: 7. Mär 2006, 10:43
Wohnort: Österreich

5. Jul 2007, 10:32

ich glaube da ist jetzt was schief gelaufen!

gfc hat dieses Modul in ein Template umgewandelt und das funktioniert bei ihm genauso wie bei mir einwandfrei.

Dieses Modul:
http://www.redaxo.de/165-Moduldetails.h ... ule_id=156
funktioniert nicht...

Die gfc-Version schon ;)

Goldacker
Beiträge: 148
Registriert: 1. Jul 2007, 13:27
Wohnort: Hamburg / Berlin / Neubrandenburg
Kontaktdaten: Website

Wie jetzt?

10. Jul 2007, 17:21

Naja ich hab schon bisschen mehr geschrieben als "geht nicht".
Hab das Modul wie oben abgebildet erstellt und dann eingebunden. Jedoch erscheint dann nichts. Fehlermeldung auch nicht. Ist ist, als ob das Forum nicht gefunden wird. Daher meine Frage ob meine einstellungen flasch sind (siehe oben) oder ich noch im Header oder sonst wo etwas einfügen muss?

Dann würde ich noch gerne die Variante als Template verstehen. Was habt ihr gemacht mit dem Template und was ist die gfc-Version?

Maidenaustria
Beiträge: 293
Registriert: 7. Mär 2006, 10:43
Wohnort: Österreich

10. Jul 2007, 19:57

Erstelle ein Template wie gfc das in seinem Thread beschrieben hat:
http://forum.redaxo.de/ftopic4267.html

und binde dieses in das "default" oder wie auch immer deins heißt, ein!

Die gfc Version ist die mit dem Template!

Goldacker
Beiträge: 148
Registriert: 1. Jul 2007, 13:27
Wohnort: Hamburg / Berlin / Neubrandenburg
Kontaktdaten: Website

So also noch mal

11. Jul 2007, 23:13

Hab also Tempalte angelegt mit der ID 11

Hab im default-tempalte
include $REX['INCLUDE_PATH']."/generated/templates/11.template";
und dann im body:
<?php print $navLeftCol; ?>

So und nun kommen folgende Fehlermeldungen im Frontend
Warning: Invalid argument supplied for foreach() in /www/htdocs/w0087295/redaxo/include/generated/templates/11.template on line 45

Warning: Invalid argument supplied for foreach() in /www/htdocs/w0087295/redaxo/include/generated/templates/11.template on line 90
Diese beziehen sich beide auf den folgenden Ausdruck (kommt 2 mal vor in line 45 und line 90)
[/code]foreach($result as $line)

Code: Alles auswählen


Noch als info: habe redaxo 3.1 am laufen

Also scheint am Code was nicht zu passen - wie wirds passend gemacht ;-) ???

Goldacker
Beiträge: 148
Registriert: 1. Jul 2007, 13:27
Wohnort: Hamburg / Berlin / Neubrandenburg
Kontaktdaten: Website

12. Jul 2007, 23:41

okay problem hat sich gelöst

die phpbb-Daten müssen in der gleichen Datenbank sein wie die der redaxo-Daten

ich habe also per phpmyadmin die phpBB-SQL Daten exportiert auf meinen Desktop
diese Daten dann wieder in die redaxo-Datenbank importiert
und in meinen files auf den server in der config.php von phpBB den Datenbanknamen, Benutzernamen und das Passwort geändert

jetzt scheint es zu laufen

Großer Danke geht an Maidenaustria

Goldacker
Beiträge: 148
Registriert: 1. Jul 2007, 13:27
Wohnort: Hamburg / Berlin / Neubrandenburg
Kontaktdaten: Website

zurück zum thema

12. Jul 2007, 23:58

ist ja nicht umsonst im Untertopic "Module" daher hier mal meine "Modul"

nach dem ich ein template mit der id 11 erstellt habe dann folgendes Modul:

Eingabe

Code: Alles auswählen

Forum-Teaser
Ausgabe

Code: Alles auswählen


<?php

include $REX['INCLUDE_PATH']."/generated/templates/11.template";

?>

<?php print $navLeftCol; ?>


Zurück zu „Allgemeines [R3]“