» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 45
3 members and 42 guests
daucceems, Pukanhez, TNTGirl
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Football Betting - best nfl betting promotions at sportsbook.com.
Oral Chelation - initial cleansing of your veins & arteries
Portatiles - Ofertas en Ordenadores y Portatiles. Increibles Ofertas DELL.

Register Now! Contact Us

About this Page
This is a discussion on Question about admin modules within the Nuke 7.x - Modules forums, part of the PHP-Nuke 7.x category; Greetings everyone. I recently got into php-nuke module scripting and yesterday I got stuck with a new admin module ...



Go Back   Nukemods Forum » PHP-Nuke 7.x » Nuke 7.x - Modules

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-02-2005, 02:44 PM
Junior Member
 
Join Date: Feb 2005
Posts: 4
Question about admin modules
Greetings everyone.

I recently got into php-nuke module scripting and yesterday I got stuck with a new admin module I'm working on. The problem's that the module has to be in 4 php files instead of one. I'm confused on how to go with this. Any ideas or help would be most appreciated. Thanks for reading.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-02-2005, 05:51 PM
Junior Member
 
Join Date: Jan 2005
Location: France
Posts: 4
First step

Declare all your functions in your case.php file i.e

switch($op) {
# page1
case "function1":

# page2
case "function2":

# page3
case "function3":

# page4
case "function4":

include("modules/$module_name/admin/index.php");
break;

In you links file declare the first function to call from your admin panel
i.e.
adminmenu("".$admin_file.".php?op=function1", "Yourmodule", yourmodule.gif");

For jumping between files, do links like this

You're in file A and you want to call function functionzzzzz in your file B do
<a href=\"".$admin_file.".php?op=functionzzzzz\">"._o k."</a>";
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-03-2005, 11:19 AM
Junior Member
 
Join Date: Feb 2005
Posts: 4
I see. I will try out. Thanks a lot

There's another issue. This is one of the modules I'm working on:

rdblist.php
Code:
<?php
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
$querystr = "SELECT radminsuper, admlanguage FROM "
.$prefix."_authors where aid='$aid'";
$result = sql_query($querystr, $dbi) or die ("invalied query");
list($radminsuper) = sql_fetch_row($result, $dbi);
if ($radminsuper==1) {

function rdblist() {
	
	include ("header.php");
    GraphicAdmin();
    OpenTable();
	echo "<center><font class=\"title\">Test test</font></center>";
    CloseTable();
	include("footer.php");
}

}
?>
case.rdblist.php
Code:
<?php
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }

switch($op) {
	
	case "rdblist":
	include("admin/modules/rdblist.php");
	break;

}
?>
links.rdblist.php
Code:
<?php

if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }

if ($radminsuper == 1) {
    adminmenu("admin.php?op=rdblist", ""._ROUTINGDB."", "reset.gif");
}

?>
Everything looks set ok to me, however, when I click on the module icon in the Admin Panel, I get transferred to a white blank page. Any ideas what could causing this ?? =/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-03-2005, 12:41 PM
Junior Member
 
Join Date: Jan 2005
Location: France
Posts: 4
Code:
<?php
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
$querystr = "SELECT radminsuper, admlanguage FROM "
.$prefix."_authors where aid='$aid'";
$result = sql_query($querystr, $dbi) or die ("invalied query");
list($radminsuper) = sql_fetch_row($result, $dbi);
if ($radminsuper==1) {

function rdblist() {
   
   include ("header.php");
    GraphicAdmin();
    OpenTable();
   echo "<center><font class=\"title\">Test test</font></center>";
    CloseTable();
   include("footer.php");
}

switch($op) {
   
   case "rdblist":
   rdblist();
   break;
}
} else {
   include("header.php");
   GraphicAdmin();
   OpenTable();
   echo "<center>"._ERROR."

You do not have admin permission for \"$module_name\"</center>";
   CloseTable();
   include("footer.php");
}

?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-03-2005, 02:40 PM
Junior Member
 
Join Date: Feb 2005
Posts: 4
Thanks :wink:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-03-2005, 03:30 PM
Junior Member
 
Join Date: Jan 2005
Location: France
Posts: 4
:wink:
What are u working on?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-04-2005, 05:20 AM
Junior Member
 
Join Date: Feb 2005
Posts: 4
It's a database for IRC server link applications. I had it as a standalone database with its own login and passwords for the routing members of the IRC network until they've asked me to implement the scripts to php-nuke. Once again I thank you for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Admin User Permissions not letting me set myself as Admin MurphDog Purged Topics 8 01-10-2006 01:37 AM
Question about Admin and Moderator groups dochogan Open topics 4 12-20-2004 10:34 PM
Disabling Inactive modules in modules block Krutch Nuke 7.x - Modules 2 12-14-2004 10:43 AM
cannot add new site admin in admin cp aramis Nuke 7.x - General 2 10-10-2004 06:55 AM
top posters block question: can admin be excluded? sweetquads Nuke 6.5 to 6.9 - Blocks 1 07-09-2003 07:57 PM


All times are GMT -5. The time now is 06:34 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31