Please tell me where the error is that is not letting this work.
[]
// #####################################################################
// Create the instant graemlin/ubbcode
// #####################################################################
function instant_ubbcode() {
global $theme,$config,${$config['cookieprefix']."w3t_language"},$thispath,$tempstyle,$ubbt_lang,$debug,$dbh;$user;
$langfile = ${$config['cookieprefix']."w3t_language"};
if (!$langfile) {
$langfile = $config['language'];
}
require ("$thispath/languages/$langfile/instant_markup.php");
// --------------------------------------------------
// We need to grab all of the graemlins out of the db
$query = "
SELECT G_Code,G_Smiley,G_Image
FROM {$config['tbprefix']}Graemlins
";
$sth = $dbh -> do_query($query);
$i=0;
$gnum = 0;
$remotelink = "";
$graemlinlist="";
while (list($code,$smiley,$image) = $dbh -> fetch_array($sth)) {
if ($smiley) {
$code = $smiley;
} else {
if (stristr("$code","$")) {
eval("\$code = $code;");
}
$code = ":$code:";
}
if ($gnum < $theme['max_graemlins']) {
$graemlinlist .= <<<EOF
<a href="javascript:void(0)" onclick="insertAtCaret(document.replier.Body, ' $code'); document.replier.Body.focus();"><img src="{$config['images']}/graemlins/$image" border="0" alt="$code" /></a>
EOF;
}
else {
$remotelink = "<a href="javascript:void(0)" onclick="openGraemlinPanel()">{$ubbt_lang['MORE_G']} >>></a>";
}
EOF;
$i++;
$gnum++;
if ($i==6) {
$i=0;
if ($gnum < ($theme['max_graemlins'] +1)) {
$graemlinlist .= "<br />";
}
if( (preg_match("/-1-/",$user['U_Groups'])) or (preg_match("/-2-/",$user['U_Groups'])) or (preg_match("/-3-/",$user['U_Groups']))) {
$showpanelgenerator="<p align="center"><a href="javascript: x()" onclick="window.open('pano/popup.php','panelpopup','Width=510,height=320');">Panel Generator</a></p>";
}else{
$showpanelgenerator="";
}
}
}
$graemlinlist .= $remotelink;
if (!$debug) {
include("$thispath/templates/$tempstyle/ubbt_instant_ubbcode.tmpl");
}
return $template;
}
[/]
And yes, I am
NEW