Lestat : I am using the version you put up for download. THanks!
Mesum : Yes admin and normal user. This seems to be the only problem with using nukeladder with phpnuke6.5, I installed phpnuke6.0 and nukeladder on my computer and got a handful of sql_layer errors.
krazybean Nuke Soldier
Joined: Sep 03, 2003
Posts: 32
Posted:
Wed Sep 03, 2003 9:29 am
I seen you were able to get your "Create Teams" to work if you get a chance could you tell me if you made any modifications to it? cause mine wont work, and where did you pull all the main files like that at? i ended up putting my in the root folder and they all worked except for that 1
_________________
Lestat Sergeant
Joined: Aug 31, 2003
Posts: 127
Posted:
Wed Sep 03, 2003 11:13 am
I had modified my admin.php
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management 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. */
/************************************************************************/
function deleteNotice($id, $table, $op_back) {
global $db;
$db->sql_query("DELETE FROM $table WHERE id = '$id'");
Header("Location: admin.php?op=$op_back");
}
/*********************************************************/
/* Administration Menu Function */
/*********************************************************/
/*********************************************************/
/* Administration Main Function */
/*********************************************************/
function adminMain() {
global $language, $admin, $aid, $prefix, $file, $db, $sitename, $user_prefix;
include ("header.php");
$dummy = 0;
$Today = getdate();
$month = $Today['month'];
$mday = $Today['mday'];
$year = $Today['year'];
$pmonth = $Today['month'];
$pmday = $Today['mday'];
$pmday = $mday-1;
$pyear = $Today['year'];
if ($pmonth=="January") { $pmonth=1; } else
if ($pmonth=="February") { $pmonth=2; } else
if ($pmonth=="March") { $pmonth=3; } else
if ($pmonth=="April") { $pmonth=4; } else
if ($pmonth=="May") { $pmonth=5; } else
if ($pmonth=="June") { $pmonth=6; } else
if ($pmonth=="July") { $pmonth=7; } else
if ($pmonth=="August") { $pmonth=8; } else
if ($pmonth=="September") { $pmonth=9; } else
if ($pmonth=="October") { $pmonth=10; } else
if ($pmonth=="November") { $pmonth=11; } else
if ($pmonth=="December") { $pmonth=12; };
$test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);
$curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
$curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";
GraphicAdmin();
$sql = "SELECT radminarticle, radminsuper, admlanguage FROM ".$prefix."_authors WHERE aid='$aid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$radminarticle = $row[radminarticle];
$radminsuper = $row[radminsuper];
$admlanguage = $row[admlanguage];
if ($admlanguage != "" ) {
$queryalang = "WHERE alanguage='$admlanguage' ";
} else {
$queryalang = "";
}
$sql = "SELECT main_module from ".$prefix."_main";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$main_module = $row[main_module];
OpenTable();
echo "<center><b>$sitename: "._DEFHOMEMODULE."</b><br><br>"
.""._MODULEINHOME." <b>$main_module</b><br>[ <a href=\"admin.php?op=modules\">"._CHANGE."</a> ]</center>";
CloseTable();
echo "<br>";
OpenTable();
$guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1'"));
$member_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='0'"));
$who_online_num = $guest_online_num + $member_online_num;
$who_online = "<center><font class=\"option\">"._WHOSONLINE."</font><br><br><font class=\"content\">"._CURRENTLY." $guest_online_num "._GUESTS." $member_online_num "._MEMBERS."<br>";
$sql = "SELECT COUNT(user_id) AS userCount from $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount = $row[userCount];
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount2 = $row[userCount];
echo "<center>$who_online<br>"
.""._BTD.": <b>$userCount</b> - "._BYD.": <b>$userCount2</b></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>"._AUTOMATEDARTICLES."</b></center><br>";
$count = 0;
$sql = "SELECT anid, aid, title, time, alanguage FROM ".$prefix."_autonews $queryalang ORDER BY time ASC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$anid = $row[anid];
$said = $row[aid];
$title = $row[title];
$time = $row[time];
$alanguage = $row[alanguage];
if ($alanguage == "") {
$alanguage = ""._ALL."";
}
if ($anid != "") {
if ($count == 0) {
echo "<table border=\"1\" width=\"100%\">";
$count = 1;
}
$time = ereg_replace(" ", "@", $time);
if (($radminarticle==1) OR ($radminsuper==1)) {
if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {
echo "<tr><td nowrap> (<a href=\"admin.php?op=autoEdit&anid=$anid\">"._EDIT."</a>-<a href=\"admin.php?op=autoDelete&anid=$anid\">"._DELETE."</a>) </td><td width=\"100%\"> $title </td><td align=\"center\"> $alanguage </td><td nowrap> $time </td></tr>"; /* Multilingual Code : added column to display language */
} else {
echo "<tr><td> ("._NOFUNCTIONS.") </td><td width=\"100%\"> $title </td><td align=\"center\"> $alanguage </td><td nowrap> $time </td></tr>"; /* Multilingual Code : added column to display language */
}
} else {
echo "<tr><td width=\"100%\"> $title </td><td align=\"center\"> $alanguage </td><td nowrap> $time </td></tr>"; /* Multilingual Code : added column to display language */
}
}
}
if (($anid == "") AND ($count == 0)) {
echo "<center><i>"._NOAUTOARTICLES."</i></center>";
}
if ($count == 1) {
echo "</table>";
}
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>"._LAST." 20 "._ARTICLES."</b></center><br>";
$sql = "SELECT sid, aid, title, time, topic, informant, alanguage FROM ".$prefix."_stories $queryalang ORDER BY time DESC LIMIT 0,20";
$result = $db->sql_query($sql);
echo "<center><table border=\"1\" width=\"100%\" bgcolor=\"$bgcolor1\">";
while ($row = $db->sql_fetchrow($result)) {
$sid = $row['sid'];
$said = $row[aid];
$title = $row[title];
$time = $row[time];
$topic = $row[topic];
$informant = $row[informant];
$alanguage = $row[alanguage];
$sql = "SELECT topicname FROM ".$prefix."_topics WHERE topicid='$topic'";
$ta = $db->sql_query($sql);
$row = $db->sql_fetchrow($ta);
$topicname = $row[topicname];
if ($alanguage == "") {
$alanguage = ""._ALL."";
}
formatTimestamp($time);
echo "<tr><td align=\"right\"><b>$sid</b>"
."</td><td align=\"left\" width=\"100%\"><a href=\"article.html$sid\">$title</a>"
."</td><td align=\"center\">$alanguage"
."</td><td align=\"right\">$topicname";
if (($radminarticle==1) OR ($radminsuper==1)) {
if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {
echo "</td><td align=\"right\" nowrap>(<a href=\"admin.php?op=EditStory&sid=$sid\">"._EDIT."</a>-<a href=\"admin.php?op=RemoveStory&sid=$sid\">"._DELETE."</a>)"
."</td></tr>";
} else {
echo "</td><td align=\"right\" nowrap><font class=\"content\"><i>("._NOFUNCTIONS.")</i></font>"
."</td></tr>";
}
} else {
echo "</td></tr>";
}
}
echo "</table>";
if (($radminarticle==1) OR ($radminsuper==1)) {
echo "<center>"
."<form action=\"admin.php\" method=\"post\">"
.""._STORYID.": <input type=\"text\" NAME=\"sid\" SIZE=\"10\">"
."<select name=\"op\">"
."<option value=\"EditStory\" SELECTED>"._EDIT."</option>"
."<option value=\"RemoveStory\">"._DELETE."</option>"
."</select>"
."<input type=\"submit\" value=\""._GO."\">"
."</form></center>";
}
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>"._LAST." 20 ".Ladders."</b></center><br>";
$sql = "SELECT sid, aid, title, game, time, topic, informant, alanguage FROM ".$prefix."_ladders $queryalang ORDER BY time DESC LIMIT 0,20";
$result = $db->sql_query($sql);
echo "<center><table border=\"1\" width=\"100%\" bgcolor=\"$bgcolor1\">";
while ($row = $db->sql_fetchrow($result)) {
$sid = $row[sid];
$said = $row[aid];
$title = $row[title];
$time = $row[time];
$ladders = $row[ladders];
$informant = $row[informant];
$alanguage = $row[alanguage];
$sql = "SELECT topicname FROM ".$prefix."_ladders WHERE topicid='$ladders'";
$ta = $db->sql_query($sql);
$row = $db->sql_fetchrow($ta);
if ($alanguage == "") {
$alanguage = ""._ALL."";
}
Thanks,
just one last question, did u have to do anything to createteams.php? or do you think the mod you gave me for admin will do the trick?, well ill test it out and let yall know, but as far as sql i never received any errors, if you want the query i used its the one from http://www.xboxradio.com/modules.php?name=Downloads&d_op=MostPopular
_________________
steve007 Nuke Soldier
Joined: Sep 03, 2003
Posts: 17
Posted:
Wed Sep 03, 2003 2:04 pm
I am also getting the same errors, i would really appreciate it if someone could make this compatible with phpNuke 6.5. Can any one help?
i get the following errors:
Fatal error: Call to a member function on a non-object in /home/virtual/site53/fst/var/www/html/league/mainfile.php on line 522
and also the following:
Fatal error: Call to a member function on a non-object in /home/virtual/site53/fst/var/www/html/league/mainfile.php on line 301
is there any way to make this work with 6.5?
steve007 Nuke Soldier
Joined: Sep 03, 2003
Posts: 17
Posted:
Wed Sep 03, 2003 2:52 pm
All i know is these errors are something to do with the login for members, as i got the exact same errors, but when i commented the lines out that appeared in the errors the ladder module worked fine, apart from the fact that the user could no longer log in. So if any one can help me how could i make this module compatible to run with nuke 6.5
Mesum Support Staff
Joined: Mar 11, 2003
Posts: 842
Location: Chicago
Posted:
Wed Sep 03, 2003 3:37 pm
I have just started to rewrite the whole article.php, just to see where things are going wrong...
Thanks dude,
You'll be answering all of our prayers, oh and good luck.
_________________
krazybean Nuke Soldier
Joined: Sep 03, 2003
Posts: 32
Posted:
Wed Sep 03, 2003 4:24 pm
oh and when you get a chance could you see if its odd that mine is redirecting, click here, thanks
lowflow Private
Joined: Jun 20, 2003
Posts: 37
Posted:
Wed Sep 03, 2003 5:06 pm
Thanks Mesum!
steve007 Nuke Soldier
Joined: Sep 03, 2003
Posts: 17
Posted:
Wed Sep 03, 2003 5:16 pm
Thanx mesum,
steve007 Nuke Soldier
Joined: Sep 03, 2003
Posts: 17
Posted:
Wed Sep 03, 2003 5:37 pm
what ive noticed is when these lines of coding that are bringingup the errors are commented out the user can sign up to that ladder as the line which shows the error on line 522/523 disappears how ever, if this ladder is to work it needs to be able to get the member data from the actual php nuke site user data. Since i am a n00b when it comes to php i don't how to do this. I assume its these functions that are causeing the errors which are:
line 522 $result = $db->sql_query($sql);
line 523 $row = $db->sql_fetchrow($result);
in the mainfile.php are not defined so the ladder module can't use them. Anywhere where these lines are present in the mainfile.php causes errors to appear on the actual ladder module pages. The error :
Call to a member function on a non-object in /home/virtual/site53/fst/var/www/html/league/mainfile.php on line 301
appears on the team information page and is again caused by the following line in the mainfile.php file $result = $db->sql_query($sql);
The errors which appear on the ladder pages and result in a message pointing to lines 522 or 523 are indicating that the function to add yourself to a ladder can't be produced. If you notice when you try inviting players to your team you can't as it can't pull the data from the Nuk users table. If this ladder is implemented in to an existing phpNuke site with members already existing it needs to be able to pull their data and use that. I also noticed after Icommented out a few more lines i eventually was greeted by a login page for the ladder how ever i logged in and i was greeted with an error message point to the your_account/index.php file so these errors are definately something to do with how the ladder has to access the site members data. Then again i could be wrong, but i hope this helps you.
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