GaBoNtZ
9th August 2008 00:16
TSSE Frontend Template Chooser
i made a plugin but i dunno what i done wrong.
the plugin is working but is not in right place.
you can see the plugin here:
tsse.smart-host.ro :: Welcome !
and the code is:
Code:
define('TS_P_VERSION', '0.1 by GaBoNtZ');
// Security Check.
if (!defined('IN_PLUGIN_SYSTEM'))
{
die("Error! Direct initialization of this file is not allowed. ");
}
// BEGIN Plugin: Template Changer
require_once('global.php');
gzip();
dbconn();
loggedinorreturn();
maxsysop();
$action = isset($_POST['action']) ? htmlspecialchars_uni($_POST['action']) : (isset($_GET['action']) ? htmlspecialchars_uni($_GET['action']) : '');
$type = isset($_POST['type']) ? htmlspecialchars_uni($_POST['type']) : (isset($_GET['type']) ? htmlspecialchars_uni($_GET['type']) : '');
$lang->load('usercp');
function form($name,$emailcheck=false)
{
return print("",1);
}
if ($type != 'save')
{
//stdhead($lang->usercp['tracker']);
//usercpmenu ("tracker");
print ("");
form ("tracker");
}
if ($type == 'save')
{
$stylesheet = htmlspecialchars_uni($_POST["stylesheet"]);
if ($stylesheet != $CURUSER['stylesheet'])
$updateset[] = "stylesheet = " . sqlesc($stylesheet);
if (isset($updateset) && count($updateset) > 0)
sql_query("UPDATE users SET " . implode(", ", $updateset) . " WHERE id=".sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
redirect("index.php");
}
$defaulttemplate = ts_template();
$template_dirs = dir_list(INC_PATH.'/templates');
if (empty($template_dirs))
$dirlist .= 'There is no template ';
else
{
foreach ($template_dirs as $dir)
{
if (substr($dir, -4, 1) !== '.')
{
$dirlist .= ''.$dir.' ';
}
}
}
$t_image = ' ';
tr($lang->usercp['stylesheet'], "\n$dirlist \n ".$t_image,1);
submit();
//End Plugin: Template Changer
?>
maybe someone can correct this?
trilious
9th August 2008 22:27
hi
hi i see what u mean for soemr eason mine apepars above shoutbox but not in a box like the others its wierd
GaBoNtZ
6th September 2008 15:06
so noone can help with this?
:sos:
All times are GMT +2. The time now is 06:02 .
Powered by vBulletin® Version 3.8.11 Beta 3 Copyright ©2000 - 2024, vBulletin Solutions Inc.