Smiley Management Fehler....

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.
Antworten
de$ert
Mitglied
Beiträge: 341
Registriert: 21.10.2005 03:08
Kontaktdaten:

Smiley Management Fehler....

Beitrag von de$ert »

Hi

Ich habe den Smile Manage installiert........
Smilie Manager

........nur ich bekomme folgenden fehler angezeigt. Ich weiss nicht was den Fehler verursacht :-/

-----------------------------------------------
Allgemeiner Fehler

Couldn't obtain smilies data

DEBUG MODE

SQL Error : 1054 Unknown column 's.page' in 'where clause'

SELECT s.* FROM phpbb_neu_smilies s, phpbb_neu_smilies_pages p WHERE p.id = s.page AND code <> '' and smile_url <> '' AND access IN(0, 2, 1) AND (theme = 0 OR theme = 5) ORDER BY code

Line : 838
File : bbcode.php
-----------------------------------------------


In der bbcode.php soll folgendes ersetzt werden.
Hier mal meine bbcode.php:
www.goped-action.de/txt/bbcode.txt

Code: Alles auswählen

# 
#-----[ OPEN ]-----------------------------------------------------------------
# 

  includes/bbcode.php
  
# 
#-----[ FIND ]-----------------------------------------------------------------
# This is the complete smilies_pass function
#
//
// Smilies code ... would this be better tagged on to the end of bbcode.php?
// Probably so and I'll move it before B2
//
function smilies_pass($message)
{
	static $orig, $repl;

	if (!isset($orig))
	{
		global $db, $board_config;
		$orig = $repl = array();

		$sql = 'SELECT * FROM ' . SMILIES_TABLE;
		if( !$result = $db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
		}
		$smilies = $db->sql_fetchrowset($result);

		if (count($smilies))
		{
			usort($smilies, 'smiley_sort');
		}

		for ($i = 0; $i < count($smilies); $i++)
		{
			$orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
			$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
		}
	}

	if (count($orig))
	{
		$message = preg_replace($orig, $repl, ' ' . $message . ' ');
		$message = substr($message, 1, -1);
	}
	
	return $message;
}


# 
#-----[ REPLACE WITH ]---------------------------------------------------------
# Complete new function
#
//START MOD Smiley_management
//
// Smilies code
//
function smilies_pass($message)
{
	static $orig, $repl;

	if (!isset($orig))
	{
		// EDIT MSTheme: smilies are in templates/..../images/smiles
		global $db, $board_config, $theme, $userdata;
		$orig = $repl = array();

    //Smilies for parsing: No hidden pages (hidden > ADMIN) (assumed duplicate pages), 
    //and get only 1 of each themed set.
  	$style = ($userdata['user_style']) ? $userdata['user_style'] : $board_config['default_style'];
		$sql = "SELECT s.*
      FROM " . SMILIES_TABLE . " s, " . SMILIES_PAGES_TABLE . " p
		  WHERE p.id = s.page
		  AND code <> '' and smile_url <> ''
      AND access IN(" . USER . ', ' . MOD . ', ' . ADMIN . ")
      AND (theme = 0 OR theme = $style)
      ORDER BY code";		  
		if( !$result = $db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
		}
		$smilies = $db->sql_fetchrowset($result);

		for ($i = 0; $i < count($smilies); $i++)
		{
	    if (strpos($smilies[$i]['code'], ' ')>0) //multiple codes?
      { //Get all codes, create more records, sorting must be absolute correct
        $all_code = explode(' ', $smilies[$i]['code']);
        for ($k=1;$k<count($all_code);$k++)
        {
          $smilies[$i]['code'] = $all_code[$k]; //set code
          $smilies[] = $smilies[$i];            //add record
        }
        $smilies[$i]['code'] = $all_code[0];    //set first code
      }
    }
		if (count($smilies)) usort($smilies, 'smiley_sort');

    $smilies_path = $board_config['smilies_path']; //"images/smiles";//###
		for ($i = 0; $i < count($smilies); $i++)
		{
      $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
      switch ($smilies[$i]['align'])
      {
        case 0: $align="-3px;";break;
        case 1: $align="top";break;
        case 2: $align="middle";break;
        case 3: $align="bottom";break;
      }
      $align = 'style="vertical-align:' . $align . '"';
      $repl[] = '<img src="'. $smilies_path . '/' . $smilies[$i]['smile_url'] 
        . '" title="' . $smilies[$i]['emoticon'] . '" alt="[' . $smilies[$i]['emoticon'] 
        . ']" border="0" ' . $align . ' />';
		}
	}

	if (count($orig))
	{
		$message = preg_replace($orig, $repl, ' ' . $message . ' ');
		$message = substr($message, 1, -1);
	}

	return $message;
}
//END MOD Smiley_management
Antworten

Zurück zu „phpBB 2.0: Mod Support“