Seite 3 von 3

Verfasst: 05.03.2006 14:46
von S2B
OK. :wink:

Finden:

Code: Alles auswählen

$sql = "SELECT * FROM " . INTROPORTALMOD_TABLE;
if(!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, '<b>Could not query Intro + Portal configuration !<br><br>RUN <a href="intro_portal_mod_db_install.php" target="_blank">intro_portal_mod_db_install.php</a> AND DELETE IT AFTER THAT AND CHECK THE FILES TO EDIT !!!<br><br>Fehler beim Abfragen der Intro + Portal Konfiguration !<br><br>FÜHRE DIE <a href="intro_portal_mod_db_install.php" target="_blank">intro_portal_mod_db_install.php</a> AUS UND LÖSCHE SIE DANACH UND ÜBERPRÜFE DIE ZU EDITIERENDEN DATEIEN !!!<br><br><a href="http://www.awsw.de" target="_blank">HTH AWSW</a></b>', '', __LINE__, __FILE__, $sql);
}
Danach einfügen:

Code: Alles auswählen

$introportalmod_config = array();
while ($row = $db->sql_fetchrow($result))
{
  $introportalmod_config[$row['config_name']] = $row['config_value'];
}
$db->sql_freeresult($result);

Verfasst: 05.03.2006 22:11
von Beychaliban
Hui, so langsam wird es tatsächlich wieder *g*

Inhalte sind wieder da. Nur habe ich jetzt noch über dem header einiges stehen, was da nicht hingehört.
Ähm... glaube, da stehen die Einstellungen aus dem Admin-bereich...
sowas hier:
Array
(
[config_id] => 1
[modversion] => 1.50a
[introportalmod_disable] => 0
[intro_disable] => 0
[intro_disable_msg] => Intro derzeit deaktiviert
[introlasttopics_active] => 0
[introlasttopics_limit] => 10
[lasttopics_length_intro] => 25
[portal_disable] => 0
[portal_disable_msg] => Portal derzeit deaktiviert
[navigation_active] => 1
[navigationquote_active] => 1
[lastnewmembers_active] => 1
[lastnewmembers_limit] => 5
[topposter_active] => 0
[topposter_limit] => 5
[topposts_active] => 0
[topposts_limit] => 5
[searchtopics_active] => 1
[pollbox_active] => 0
[pollbox_forums] => 1,2,3,4,5
[forumview_active] => 0
[lasttopics_active] => 0
[lasttopics_limit] => 3
[lasttopics_length_portal] => 80
[freenet_active] => 0
[heise_active] => 0
[whoisonline_active] => 1
[webmaster_active] => 1
[partners_active] => 0
[Partnersitelinks] =>



Dunkelelfen
- Forum





[google_active] => 0
[left_active] => 1
[center_active] => 1
[right_active] => 1
[border_active] => 1
[fpost_active] => 1
[fpost_numofnews] => 2
[fpost_forums] => 4
[fpost_newslength] => 5000
[loginform_active] => 1
[welcomeuser_active] => 1
[forumlegend_active] => 0
[userpostcount_active] => 1
[birthdaymod_active] => 1
[lastvisitmod_active] => 0
[chatboxmod_active] => 1
[globalannouncemod_active] => 0
[addonbox_active] => 1
)

Verfasst: 06.03.2006 14:19
von S2B
Du hast die Änderungen in diesem Beitrag nicht rückgängig gemacht.

Verfasst: 06.03.2006 16:11
von Beychaliban
Args *hust* ...wie dämlich....

Super, dann stimmt ja jetzt alles wieder... Wahnsinn :o

D A N K E ! ! !


...und kannst Du mir vielleicht noch ungefähr sagen, woran das lag? Nicht, dass ich das wieder verbocke, ohne es zu merken :oops:


Bey

Verfasst: 06.03.2006 18:05
von S2B
Ähm, soweit ich das sehe, dürfte der MOD gar nicht funktionieren, weil eben diese Zeilen fehlen... :-?

Die Zeilen sorgen dafür, dass die Konfiguration für das Portal in ein Array gespeichert wird.

Verfasst: 06.03.2006 19:29
von Beychaliban
Also der Mod hat schon funktioniert, ganz ohne Probleme, hatte die Dateien auch nicht verändert, sondern nur die Template Dateien.

Naja. Dann schließe ich daraus jedenfalls, dass das nicht nochmal passiert :)

Danke nochmal... meine große Rettung *gg*


Bey

Verfasst: 31.03.2006 03:20
von Cait
Hallo!

Ich habe genau das gleiche Problem. D.h. die gleiche Fehlermeldung, allerdings beim Installieren des Portals.
Ich hab diesen Thread aufmerksam durchgelesen und meine eigene portal_poll.php durchleuchtet, konnte aber mit diesen Ratschlägen hier gar nichts anfangen. Das meiste davon hab ich nicht mal in meiner Datei gefunden. :oops:

meine portal_poll-Datei

Ich hoffe mir kann ein schlauer Kopf helfen. :-)

Verfasst: 02.04.2006 22:02
von ASabine
Hallo cait!

Ich hatte gerade das selbe Problem...

mach einfach genau das, was in den Beiträgen von S2B

vom 05.03.2006, 13:27 und
vom 05.03.2006, 15:46

steht.



dann müsste es gehen ;)

Bitteschön ich kann nix garantieren *g* also wenns doch nicht funktionieren sollte, bitte nicht schlagen.. bei mir funktionierts jedenfalls

Verfasst: 10.04.2006 07:46
von StarWolf3000
ich hab ein ähnliches Problem, allerdings etwas anders:

Der Fehler:

Code: Alles auswählen

Could not query poll information

DEBUG MODE

SQL Error : 1030 Got error 28 from table handler

SELECT t.*, vd.* FROM phpbb_topics AS t, phpbb_vote_desc AS vd WHERE t.forum_id IN (1,2,3,4,5) AND t.topic_status <> 1 AND t.topic_status <> 2 AND t.topic_vote = 1 AND t.topic_id = vd.topic_id ORDER BY t.topic_time DESC LIMIT 0,1

Line : 179
File : portal_poll.php
Die portal_poll kann ich im Moment nicht zum Download zur Verfügung stellen, hab momentan Probleme mit dem FTP-Zugang, deswegen siehe unten

Code: Alles auswählen

<?php
/***************************************************************************
 *                              fetchposts.php
 *                           --------------------
 *   begin              : Tuesday, August 13, 2002
 *   copyright          : (C) 2002 Smartor
 *   email              : smartor_xp@hotmail.com
 *   original work      : Volker Rattel <ca5ey@clanunity.net>
 *
 *   $Id: fetchposts.php,v 2.1.7 2003/01/30, 16:45:24 Smartor Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   Some code in this file I borrowed from the phpBB Fetch Posts MOD by Ca5ey
 *   and Mouse Hover Topic Preview MOD by Shannado
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);

include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx);


function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length)
{
	global $db, $board_config;

	$sql = 'SELECT
			  t.topic_id,
			  t.topic_time,
			  t.topic_title,
			  pt.post_text,
			  u.username,
			  u.user_id,
			  t.topic_replies,
			  pt.bbcode_uid,
			  t.forum_id,
			  t.topic_poster,
			  t.topic_first_post_id,
			  t.topic_status,
			  pt.post_id,
			  p.post_id,
			  p.enable_smilies
			FROM
			  ' . TOPICS_TABLE . ' AS t,
			  ' . USERS_TABLE . ' AS u,
			  ' . POSTS_TEXT_TABLE . ' AS pt,
			  ' . POSTS_TABLE . ' AS p
			WHERE
			  t.forum_id IN (' . $forum_sql . ') AND
			  t.topic_time <= ' . time() . ' AND
			  t.topic_poster = u.user_id AND
			  t.topic_first_post_id = pt.post_id AND
			  t.topic_first_post_id = p.post_id AND
			  t.topic_status <> 2
			ORDER BY
			  t.topic_time DESC';
	if ($number_of_posts != 0)
	{
		$sql .= '
			LIMIT
			  0,' . $number_of_posts;
	}
	//
	// query the database
	//
	if(!($result = $db->sql_query($sql)))
	{
		message_die(GENERAL_ERROR, 'Could not query announcements information', '', __LINE__, __FILE__, $sql);
	}
	//
	// fetch all postings
	//
	$posts = array();
	if ($row = $db->sql_fetchrow($result))
	{
		$i = 0;
		do
		{
			$posts[$i]['bbcode_uid'] = $row['bbcode_uid'];
			$posts[$i]['enable_smilies'] = $row['enable_smilies'];
			$posts[$i]['post_text'] = $row['post_text'];
			$posts[$i]['topic_id'] = $row['topic_id'];
			$posts[$i]['topic_replies'] = $row['topic_replies'];
			$posts[$i]['topic_time'] = create_date($board_config['default_dateformat'], $row['topic_time'], $board_config['board_timezone']);
			$posts[$i]['topic_title'] = $row['topic_title'];
			$posts[$i]['user_id'] = $row['user_id'];
			$posts[$i]['username'] = $row['username'];

			//
			// do a little magic
			// note: part of this comes from mds' news script and some additional magics from Smartor
			//
			stripslashes($posts[$i]['post_text']);
			if (($text_length == 0) or (strlen($posts[$i]['post_text']) <= $text_length))
			{				
				$posts[$i]['post_text'] = bbencode_second_pass($posts[$i]['post_text'], $posts[$i]['bbcode_uid']);
				$posts[$i]['striped'] = 0;
			}
			else // strip text for news
			{
				$posts[$i]['post_text'] = bbencode_strip($posts[$i]['post_text'], $posts[$i]['bbcode_uid']);
				$posts[$i]['post_text'] = substr($posts[$i]['post_text'], 0, $text_length) . '...';
				$posts[$i]['striped'] = 1;
			}
			//
			// Smilies
			//
			if ($posts[$i]['enable_smilies'] == 1)
			{
				$posts[$i]['post_text'] = smilies_pass($posts[$i]['post_text']);
			}
			$posts[$i]['post_text'] = make_clickable($posts[$i]['post_text']);
			//
			// define censored word matches
			//
			$orig_word = array();
			$replacement_word = array();
			obtain_word_list($orig_word, $replacement_word);
			//
			// censor text and title
			//
			if (count($orig_word))
			{
				$posts[$i]['topic_title'] = preg_replace($orig_word, $replacement_word, $posts[$i]['topic_title']);
				$posts[$i]['post_text'] = preg_replace($orig_word, $replacement_word, 	$posts[$i]['post_text']);
			}
			$posts[$i]['post_text'] = nl2br($posts[$i]['post_text']);
			$i++;
		}
		while ($row = $db->sql_fetchrow($result));
	}
	//
	// return the result
	//
	return $posts;
} // phpbb_fetch_posts

function phpbb_fetch_poll($forum_sql) 
{ 
global $db; 

$sql = 'SELECT 
t.*, 
vd.* 
FROM 
' . TOPICS_TABLE . ' AS t, 
' . VOTE_DESC_TABLE . ' AS vd 
WHERE 
t.forum_id IN (' . $forum_sql . ') AND 
t.topic_status <> 1 AND 
t.topic_status <> 2 AND 
t.topic_vote = 1 AND 
t.topic_id = vd.topic_id 
ORDER BY 
t.topic_time DESC 
LIMIT 
0,1'; 

if (!$query = $db->sql_query($sql)) 
{ 
message_die(GENERAL_ERROR, 'Could not query poll information', '', __LINE__, __FILE__, $sql); 
} 

$result = $db->sql_fetchrow($query); 

if ($result) 
{ 
$sql = 'SELECT 
* 
FROM 
' . VOTE_RESULTS_TABLE . ' 
WHERE 
vote_id = ' . $result['vote_id'] . ' 
ORDER BY 
vote_option_id'; 

if (!$query = $db->sql_query($sql)) 
{ 
message_die(GENERAL_ERROR, 'Could not query vote result information', '', __LINE__, __FILE__, $sql); 
} 

while ($row = $db->sql_fetchrow($query)) 
{ 
$result['options'][] = $row; 
} 
} 

return $result; 
} // end func phpbb_fetch_poll 


//
// Function strip all BBcodes (borrowed from Mouse Hover Topic Preview MOD)
//
function bbencode_strip($text, $uid)
{
	// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
	// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
	$text = " " . $text;

	// First: If there isn't a "[" and a "]" in the message, don't bother.
	if (! (strpos($text, "[") && strpos($text, "]")) )
	{
		// Remove padding, return.
		$text = substr($text, 1);
		return $text;
	}

	// code] and /CODE for posting code (HTML, PHP, C etc etc) in your posts.
	$text = str_replace("[code:1:$uid]","", $text);
	$text = str_replace("[/code:1:$uid]", "", $text);
	$text = str_replace("[code:$uid]", "", $text);
	$text = str_replace("[/code:$uid]", "", $text);

	// [quote] and [/quote] for posting replies with quote, or just for quoting stuff.
	$text = str_replace("[quote:1:$uid]","", $text);
	$text = str_replace("[/quote:1:$uid]", "", $text);
	$text = str_replace("[quote:$uid]", "", $text);
	$text = str_replace("[/quote:$uid]", "", $text);
	// New one liner to deal with opening quotes with usernames...
	// replaces the two line version that I had here before..
	$text = preg_replace("/\[quote:$uid=(?:\"?([^\"]*)\"?)\]/si", "", $text);
	$text = preg_replace("/\[quote:1:$uid=(?:\"?([^\"]*)\"?)\]/si", "", $text);
	
	// [list] and [list=x] for (un)ordered lists.
	// unordered lists
	$text = str_replace("[list:$uid]", "", $text);
	// li tags
	$text = str_replace("[*:$uid]", "", $text);
	// ending tags
	$text = str_replace("[/list:u:$uid]", "", $text);
	$text = str_replace("[/list:o:$uid]", "", $text);
	// Ordered lists
	$text = preg_replace("/\[list=([a1]):$uid\]/si", "", $text);

	// colours
	$text = preg_replace("/\[color=(\#[0-9A-F]{6}|[a-z]+):$uid\]/si", "", $text);
	$text = str_replace("[/color:$uid]", "", $text);

	// url #2
	$text = str_replace("[url]","", $text);
	$text = str_replace("[/url]", "", $text);

	// url /\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\](.*?)\[/url\]/si
	$text = preg_replace("/\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $text);
	$text = str_replace("[/url:$uid]", "", $text);

	// img
	$text = str_replace("[img:$uid]","", $text);
	$text = str_replace("[/img:$uid]", "", $text);

	// email
	$text = str_replace("[email:$uid]","", $text);
	$text = str_replace("[/email:$uid]", "", $text);

	// size
	$text = preg_replace("/\[size=([\-\+]?[1-2]?[0-9]):$uid\]/si", "", $text);
	$text = str_replace("[/size:$uid]", "", $text);
	
	// align
	$text = preg_replace("/\[align=(left|right|center|justify):$uid\]/si", "", $text);
	$text = str_replace("[/align:$uid]", "", $text);

	// [b] and [/b] for bolding text.
	$text = str_replace("[b:$uid]","", $text);
	$text = str_replace("[/b:$uid]", "", $text);

	// [u] and [/u] for underlining text.
	$text = str_replace("[u:$uid]", "", $text);
	$text = str_replace("[/u:$uid]", "", $text);

	// [i] and [/i] for italicizing text.
	$text = str_replace("[i:$uid]", "", $text);
	$text = str_replace("[/i:$uid]", "", $text);
   	
	// Remove our padding from the string..
	$text = substr($text, 1);

	return $text;
}

?>
Edit: hab jetz rausgefunden, dass es nicht an der portal_poll lag sondern ein MySQL-Datei-Fehler vorlag (Datei zerstört)

Verfasst: 19.04.2006 12:49
von Cait
Wer lesen kann ist klar im Vorteil. Hab natürlich in der portal_poll nach den Codes gesucht und nicht in der portal.php.
Nun geht's! :)