I will do one better. Since it is included in some themes. Kenetix was the original maker of it. Here is the code for the admin panel you might have a better idea of what your looking at.
Code:
<?PHP
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* 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. */
/* */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
if (!eregi("admin.php", $_SERVER['SCRIPT_NAME'])) { die ("Access Denied"); }
global $prefix, $db;
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper FROM " . $prefix . "_authors WHERE aid='$aid'"));
if ($row['radminsuper'] == 1)
{
function themecpanel() {
include ("header.php");
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>Theme CPanel</b></font></center>";
Its an admin menu plugin. It supposed to control the left right blocks inside that theme, it also controls if you would like to change the theme links to other links. Also has some other features like disabling right click and print screen. I dont think I like those features since they have broken my old sites.
In fisubice how are the links labled in the $navMenu or where can I find the lables for them?
I would be more then happy to try and alter it and test it, to get it working with fisubice(possibly the other themes in rn as well). Set up a nice little download as well.
Joined: Aug 28, 2003 Posts: 6300 Location: Vsetin, Czech Republic
Posted:
Fri Mar 28, 2008 2:32 pm
This looks like nothing more than a script to store a link menu in a database table so you can control the header menu.
I wouldn't even bother, it would be quicker to just edit the menu directly in either yourtheme/theme.php or yourtheme/header.html
This looks like nothing more than a script to store a link menu in a database table so you can control the header menu.
I wouldn't even bother, it would be quicker to just edit the menu directly in either yourtheme/theme.php or yourtheme/header.html
Would not be that easy for what I need it for. I was gonna be making subdomains. But with no cpanel or ftp access. So it would be proudent to allow for such edits through the admin control panel. Thats why i was wondering what the navmenu was labled, or if its labeled at all.
If you can tell me what file the navmenu is located in so I can take a look at it. Would it be in the header.php file directly or theme.php or somewhere else entirely. I just need to know where the $navMenu labeling is.
nice, thanks Guardian. I will over the next week try and alter the theme.php to include the control panel atleast to the links to alter them. Then I will begin working all the custom block places. If everything goes good I will have a link ready for download. If all works you can include it ravennuke if you want.
Alright. Been looking at the blocks setting the links should work and will test them tomorrow on my site.
But these blocks, I was looking at something. Are these calls used anywhere inside phpnuke?
Code:
$leftblockstemp
$rightblockstemp
$forumleftblocks
I have been poking around my paid for theme, themeCpanel.
I was also thinking about adding a sub footer just as a include file. So it will display a sort of sitemap.
Here is the themepanel code for the xtrato theme that I might incorperate into fisubice.
Code:
<?PHP
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* Theme Cpanel (c) by Xtrato,
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* Encryption Source Created by Maku, phpnuke.ee
/* Based on original Theme CP by Kenetix, kenetix.net
/*
/* No removing of this copyright notice is allowed.
/************************************************************************/
if (!eregi("admin.php", $_SERVER['SCRIPT_NAME'])) { die ("Access Denied"); }
global $prefix, $db;
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper FROM " . $prefix . "_authors WHERE aid='$aid'"));
if ($row['radminsuper'] == 1)
{
function themecpanel() {
include ("header.php");
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>Theme CPanel</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<font class=\"title\">This theme cpanel allows you to have some administrative control over your theme. Most of the functions are self explanatory. <br><br>
- Left/Right blocks templates: This allows you to choose which block templates you want to use for your blocks. If set to default, blocks.htm will be used. Otherwise it will use the blocks-right.htm or blocks-left.htm template files.<br><br>
- Popup New Private Message: Notifies the user he/she has new private messages the moment the page loads on the site. This only works for all theme pages except the Members List, Forums, and Private Messages. If you wish to disable that you have to go to your forum profile and disable the popup.<br><br>
- Broadcast Message: A global message that appears Under The header for all pages of the siteite. Similar to broadcast message but it is permanent until deleted.<br><br>
- Forum Left Blocks: Choose weather to display left blocks on all forum pages or hide them for better viewing purposes.<br><br>
Please note that using the <b>&</b> symbol in the links will result to the links URL not working. Use the <b>%26</b> symbol instead.
echo "<center><input type='hidden' name='op' value='savesecurity'>";
echo "<input type='submit' value='Save Settings'></center></form><br><br>";
CloseTable();
//DO NOT REMOVE THE FOLLOWING LINES.
OpenTable();
echo "<center><font class=\"title\"><b>Theme CPanel</b><br> Script based on Kenetix CPanel Theme CP <br>Current Theme CPanel script created by Xtrato - http://xtrato.com.<br> Security script add-on and installer for theme cpanel created by Maku - http://PHP-Nuke.ee</font></center>";
CloseTable();
echo "<br>";
include("footer.php");
} //close 2
//security end
//save links
function themecpanelsave($xlink1name, $xlink1url, $xlink2name, $xlink2url, $xlink3name, $xlink3url, $xlink4name, $xlink4url, $xlink5name, $xlink5url, $xthemeflash, $xthemesearch, $xpmpop, $xleftblockstemp, $xrightblockstemp, $xsitelogin, $xsitemsg, $xbroadcastmsg, $xclock, $xforumleftblocks) {
global $prefix, $dbi, $module_name;
Joined: Aug 28, 2003 Posts: 6300 Location: Vsetin, Czech Republic
Posted:
Tue Apr 01, 2008 7:58 am
The problem seems to be that you have not escaped the double quotes. This;
[code]<a href="$link1url"[code] means to take $link1url literally rather than the 'value' of $link1url
You can escape those double quotes like this; [code]
$navMenu = ' <a href=\"$link1url\">'.$link1name.'</a>[/code]
Joined: Aug 28, 2003 Posts: 6300 Location: Vsetin, Czech Republic
Posted:
Tue Apr 01, 2008 9:23 am
IYou need to determine if that encoding is in the database by echoing out the variable;
Code:
echo $linkurl1;
You may find that the data in the table has saved a double quotes.
I notice in your first post that there are weird characters before the nbsp which would indicate you might be using a different character set in your editor.
The weird characters are the dots inbetween the lables of the links.
Now the hard part. I edited out the security part of the cpanel. But not from the install part of the file, I tried it but for some reason it wont install. I do not know enough about how the db gets installed to make the proper edits. Since the security seems to mess up with some installations, I think it needs to be removed.
So here is the base file:
Code:
<?php
require_once("mainfile.php");
global $admin;
if(!is_array($admin)) {
$adm = base64_decode($admin);
$adm = explode(":", $adm);
$aname = "$adm[0]";
} else {
$aname = "$admin[0]";
}
$index=1;
$adm_info = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_authors WHERE aid='$aname'"));
if ($adm_info['radminsuper']==1) {
//installer title
$pagename = "Theme Cpanel";
switch($op) {
default:
$pagetitle = $pagename;
include("header.php");
title("$pagetitle");
OpenTable();
echo "<table align='center' border='0' cellpadding='2' cellspacing='2'>\n";
echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n";
echo "<tr><td align='center'>This script will Install SQL tables or Destall SQL tables for $pagename.</td></tr>\n";
echo "<tr><td align='center'><b>Backup data tables before proceeding!</b></td></tr>\n";
echo "<tr><td align='center'><b>Proceed at your own risk. Kenetix will not be responsible for anything that happens to your nuke site!</b></td></tr>\n";
echo "<tr><td align='center'><select name='op'>\n";
echo "<option value='install'>Install $pagename SQL</option>\n";
echo "<option value='destall'>Destall $pagename SQL</option>\n";
echo "</select> <input type='submit' value='COMMIT'></td></tr>\n";
echo "</form>";
echo "</table>\n";
CloseTable();
include("footer.php");
break;
case "install":
//title of page for installer
$pagetitle = "$pagename: Install Theme CPanel";
include("header.php");
title("$pagetitle");
OpenTable();
echo "Operation Results:<br>\n";
echo "<hr>\n";
$result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_themecpanel");
$result = $db->sql_query("CREATE TABLE ".$prefix."_themecpanel (
link1name text NOT NULL,
link1url text NOT NULL,
link2name text NOT NULL,
link2url text NOT NULL,
link3name text NOT NULL,
link3url text NOT NULL,
link4name text NOT NULL,
link4url text NOT NULL,
link5name text NOT NULL,
link5url text NOT NULL,
rightclick tinyint(1) NOT NULL default '0',
rightclick1 tinyint(1) NOT NULL default '0',
disableall tinyint(1) NOT NULL default '0',
disableall1 tinyint(1) NOT NULL default '0',
sourcecode tinyint(1) NOT NULL default '0',
clickms varchar(255) DEFAULT 'Your text here!' NOT NULL
) TYPE=MyISAM");
if (!$result) { echo "- Create ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Create ".$prefix."_themecpanel succeeded<br>\n"; }
//insert values - also if fail, display msg
$db->sql_query("INSERT INTO ".$prefix."_themecpanel VALUES ('HOME', 'index.php', 'DOWNLOADS', 'downloads.html', 'LINKS', 'links.html', 'CONTENT', 'modules.php?name=Content', 'ACCOUNT', 'modules.php?name=Your_Account', 0, 0, 0, 0, 0,'Your text here!')");
//display results
if (!$result) { echo "- Insert into ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Insert into ".$prefix."_themecpanel succeeded<br>\n"; }
echo "<hr>\n";
echo "<b>Theme CPanel is successfully aaded in database.<br>Please <font color=#ff0000>delete</font> this file from your server <b>immediatly</b> for security reasons!<br><br><br><center>Click on the icon below to config Theme Cpanel.<br><br><a href=\"admin.php?op=themecpanel\"><img src=\"images/admin/themecpanel.gif\" border=0></a></center>";
CloseTable();
include("footer.php");
} else {
$pagetitle = "$pagename: ERROR";
include("header.php");
title("$pagetitle");
OpenTable();
echo "<center><b>Sorry, ONLY super admins may run this script. If you have no clue what a super user is, just run along and play ball.</b><center>\n";
CloseTable();
include("footer.php");
}
?>
Thats the install working
Now when I tried to remove the security values
Code:
<?php
require_once("mainfile.php");
global $admin;
if(!is_array($admin)) {
$adm = base64_decode($admin);
$adm = explode(":", $adm);
$aname = "$adm[0]";
} else {
$aname = "$admin[0]";
}
$index=1;
$adm_info = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_authors WHERE aid='$aname'"));
if ($adm_info['radminsuper']==1) {
//installer title
$pagename = "Theme Cpanel";
switch($op) {
default:
$pagetitle = $pagename;
include("header.php");
title("$pagetitle");
OpenTable();
echo "<table align='center' border='0' cellpadding='2' cellspacing='2'>\n";
echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n";
echo "<tr><td align='center'>This script will Install SQL tables or Destall SQL tables for $pagename.</td></tr>\n";
echo "<tr><td align='center'><b>Backup data tables before proceeding!</b></td></tr>\n";
echo "<tr><td align='center'><b>Proceed at your own risk. Kenetix will not be responsible for anything that happens to your nuke site!</b></td></tr>\n";
echo "<tr><td align='center'><select name='op'>\n";
echo "<option value='install'>Install $pagename SQL</option>\n";
echo "<option value='destall'>Destall $pagename SQL</option>\n";
echo "</select> <input type='submit' value='COMMIT'></td></tr>\n";
echo "</form>";
echo "</table>\n";
CloseTable();
include("footer.php");
break;
case "install":
//title of page for installer
$pagetitle = "$pagename: Install Theme CPanel";
include("header.php");
title("$pagetitle");
OpenTable();
echo "Operation Results:<br>\n";
echo "<hr>\n";
$result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_themecpanel");
$result = $db->sql_query("CREATE TABLE ".$prefix."_themecpanel (
link1name text NOT NULL,
link1url text NOT NULL,
link2name text NOT NULL,
link2url text NOT NULL,
link3name text NOT NULL,
link3url text NOT NULL,
link4name text NOT NULL,
link4url text NOT NULL,
link5name text NOT NULL,
link5url text NOT NULL,
) TYPE=MyISAM");
if (!$result) { echo "- Create ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Create ".$prefix."_themecpanel succeeded<br>\n"; }
//insert values - also if fail, display msg
$db->sql_query("INSERT INTO ".$prefix."_themecpanel VALUES ('HOME', 'index.php', 'DOWNLOADS', 'downloads.html', 'LINKS', 'links.html', 'CONTENT', 'modules.php?name=Content', 'ACCOUNT', 'modules.php?name=Your_Account')");
//display results
if (!$result) { echo "- Insert into ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Insert into ".$prefix."_themecpanel succeeded<br>\n"; }
echo "<hr>\n";
echo "<b>Theme CPanel is successfully aaded in database.<br>Please <font color=#ff0000>delete</font> this file from your server <b>immediatly</b> for security reasons!<br><br><br><center>Click on the icon below to config Theme Cpanel.<br><br><a href=\"admin.php?op=themecpanel\"><img src=\"images/admin/themecpanel.gif\" border=0></a></center>";
CloseTable();
include("footer.php");
} else {
$pagetitle = "$pagename: ERROR";
include("header.php");
title("$pagetitle");
OpenTable();
echo "<center><b>Sorry, ONLY super admins may run this script. If you have no clue what a super user is, just run along and play ball.</b><center>\n";
CloseTable();
include("footer.php");
}
?>
The install stops working. The install page comes up but it says it has failed to install.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum