hmm...mit Ilch 1.1 funktioniert das wohl nicht mehr ganz. Bekomme die Fehlermeldung: "Fatal error: Call to undefined function: itemstats_parse()"
Bin gerade recht ratlos...
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
| Geschlossen | ||




# code zurueck ersetzten $s = bbcode_code_end ($s, $coTime, $result);
# Items umwandelen $s = itemstats_parse($s);
function bbcode_code_end ($s, $coTime, $result) {
$tpl = new tpl ( 'codereplace.htm' );
for ($i=0;$i<count($result[1]);$i++) {
if ($result[1][$i]) {
#ob_start();
#$result[1][$i] = str_replace ('<', '<', str_replace('>', '>', $result[1][$i]));
$codereplace = highlight_string(trim($result[1][$i]), 1);
#$codereplace = ob_get_contents();
#ob_end_clean();
$newstring = $tpl->set_get ( 'CODEREPLACE', $codereplace, 0);
$s = str_replace('#'.$coTime.'#'.$i.'#'.$coTime.'#',$newstring,$s);
}
}
unset($tpl);
return ($s);
}
include_once(dirname(__FILE__) . '/itemstats.php');
function itemstats_parse($message)
{
$item_stats = new ItemStats();
preg_match_all('#\[(item|itemicon)\](.+?)\[/(item|itemicon)\]#s', $message, $matches);
for($i = 0;$i<count($matches[2]);$i++) {
$item_name = $matches[2][$i];
// Get the proper name of this item.
$item_name = $item_stats->getItemName($item_name, true);
if (strpos($matches[0][$i], "[itemicon]") !== false)
{
$item_html = '<img src="' . $item_stats->getItemIconLink($item_name, false). '" border="0" alt="'.$item_name.'" />';
// Get the tooltip html for this item and apply it to the html.
} else {
// Initialize the html.
$item_html = '[' . $item_name . ']';
// Get the color of this item and apply it to the html.
$item_color = $item_stats->getItemColor($item_name);
if (!empty($item_color))
{
$item_html = "<span class='" . $item_color . "'>" . $item_html . "</span>";
}
}
// Get the tooltip html for this item and apply it to the html.
$item_tooltip_html = $item_stats->getItemTooltipHtml($item_name);
if (!empty($item_tooltip_html))
{
$item_html = "<span " . $item_tooltip_html . ">" . $item_html . "</span>";
}
// If this item has a link to the info site, add this link to the HTML. If it doesn't have a link, it
// means the item hasn't been found yet, so put up a link to the update page instead.
$item_link = $item_stats->getItemLink($item_name);
if (!empty($item_link))
{
$item_html = "<a class='forumitemlink' target='_blank' href='" . $item_link . "'>" . $item_html . "</a>";
}
else
{
$item_link = 'itemstats/updateitem.php?item=' . urlencode(urlencode($item_name));
$item_html = "<a class='forumitemlink' href='$item_link'>" . $item_html . "</a>";
}
// Finally, replace the bbcode with the html.
$message = str_replace($matches[0][$i], $item_html, $message);
}
return $message;
}

$item_link = 'itemstats/updateitem.php?item=' . urlencode(urlencode($item_name));
$item_link = '/include/includes/func/itemstats/updateitem.php?item=' . urlencode(urlencode($item_name));
define('dbhost', 'localhost');
define('dbname', 'datenbankname');
define('dbuser', 'datenbankusername');
define('dbpass', 'passwort');
define('item_cache_table', 'item_cache');
# code zurueck ersetzten $s = bbcode_code_end ($s, $coTime, $result);
# Items umwandelen $s = itemstats_parse($s);
function bbcode_code_end ($s, $coTime, $result) {
$tpl = new tpl ( 'codereplace.htm' );
for ($i=0;$i<count($result[1]);$i++) {
if ($result[1][$i]) {
#ob_start();
#$result[1][$i] = str_replace ('<', '<', str_replace('>', '>', $result[1][$i]));
$codereplace = highlight_string(trim($result[1][$i]), 1);
#$codereplace = ob_get_contents();
#ob_end_clean();
$newstring = $tpl->set_get ( 'CODEREPLACE', $codereplace, 0);
$s = str_replace('#'.$coTime.'#'.$i.'#'.$coTime.'#',$newstring,$s);
}
}
unset($tpl);
return ($s);
}
include_once ('VERZEICHNIS/itemstats/phpbb_itemstats.php');
<link rel="stylesheet" href="VERZEICHNIS/itemstats/templates/itemstats.css" type="text/css"> <script type="text/javascript" src="VERZEICHNIS/itemstats/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>








versuch es mal damit ich denke dann könnte es evt funzen




CREATE TABLE `item_cache` ( `item_name` varchar(100) NOT NULL default '', `item_link` varchar(100) default NULL, `item_color` varchar(20) NOT NULL default '', `item_icon` varchar(50) NOT NULL default '', `item_html` text NOT NULL, UNIQUE KEY `name` (`item_name`), FULLTEXT KEY `data` (`item_html`) ) TYPE=MyISAM;
CREATE TABLE `update_item` ( `item_name` varchar(100) NOT NULL default '', `item_link` varchar(100) default NULL, `item_color` varchar(20) NOT NULL default '', `item_icon` varchar(50) NOT NULL default '', `item_html` text NOT NULL, UNIQUE KEY `name` (`item_name`), FULLTEXT KEY `data` (`item_html`) ) TYPE=MyISAM;








// Sets the default game
if (!isset($GLOBALS['game'])) { $GLOBALS['game'] = 'lotro'; }
# load all needed func
include_once("./itemstats/generic_itemstats.php");
function bbcode_simple ($s) {
$s = preg_replace($search, $replace, $s);
$s = itemstats_parse($s);
<link rel="stylesheet" href="itemstats/templates/itemstats.css" type="text/css"\><script type="text/javascript" src="itemstats/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>

| Geschlossen | ||
![]() |
Zurück zu HTML, PHP, SQL,... | |