PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Tue Jul 12, 2005 1:29 pm Reply with quote Back to top

I am looking into a mod for NukeLadder. It comes with Ladder, League, Knockout, and you can also get Division, ELO, and Elimination as "addons".

I am interestred in created a mod called Campaign based on a gamesite I am running at
Only registered users can see links on this board!
Get registered or login to the forums!


We use Call of Duty and base a "campaign" style of wargaming on a strategic map.

What I need to do is find a way to create another admin page for administration of a "campaign" mod since this would use a whole different style of scoreing system than regular NukeLadder.

Below is a function taken from one of the core files of NukeLadder admin.


Code:
function ladderlistmanager() {

    global $admin, $dbi, $prefix, $bgcolor1, $bgcolor2, $bgcolor3;

    echo "

   <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"$bgcolor2\">

   <tr bgcolor=\"$bgcolor2\">

   <td width=\"5%\" align=\"right\" nowrap>Id</td>

   <td width=\"27%\" align=\"center\" nowrap>Ladder Name</td>

   <td width=\"27%\" align=\"center\" nowrap>Game</td>

   <td width=\"27%\" align=\"center\" nowrap>Mod Type</td>

   <td width=\"26%\" align=\"center\" nowrap>Active</td>

   <td width=\"26%\" align=\"center\" nowrap>Enabled</td>

   <td width=\"26%\" align=\"center\" nowrap>Modify</td>";

   $matchlist = sql_query("select title, sid, type, game, active, enabled from ".$prefix."_ladders order by sid DESC", $dbi);

   while(list($title, $ladder_id, $type, $game, $active, $enabled) = sql_fetch_row($matchlist, $dbi)) {

   $ln = sql_query("select gamename from ".$prefix."_games where gameid='$game'", $dbi);

   list($gamename) = sql_fetch_row($ln, $dbi);

   if($active=="1"){$active="Yes";}else{$active="No";}

   if($enabled=="1"){$enabled="Yes";}else{$enabled="No";}

   echo "<form method=\"post\" action=\"admin.php\">

   <tr>

   <td align=\"center\">$ladder_id</td>

   <td align=\"center\">$title</td>

   <td align=\"center\">$gamename</td>

   <td align=\"center\">$type</td>

   <td align=\"center\">$active</td>

   <td align=\"center\">$enabled</td>

   <td align=\"center\">

   <input name=\"sid\" type=\"hidden\" value=\"$ladder_id\">

   <select name=\"op\">

   <option value=\"EditLadder\">Edit Ladder</option>

   <option value=\"RemoveLadder\">Delete Ladder</option>

   </select><input name=\"Submit\" type=\"Submit\" value=\"Ok\"></tr></form>";                     

   }


I need to change this and put in an if statement that if $type = 'campaign'
then I need to pass a different value like
<option value=\"EditCampaignLadder
to the case statement
case "EditCampaignLadder":
editCampaignLadder($sid);
break;

which would pull up

Code:
function editCampaignLadder($sid) {

    global $user, $bgcolor1, $bgcolor2, $aid, $prefix, $dbi, $multilingual;

    $result = sql_query("select radminency, radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);

    list($radminency, $radminsuper) = sql_fetch_row($result, $dbi);

    $result2 = sql_query("select aid from ".$prefix."_ladders where sid='$sid'", $dbi);

    list($aaid) = sql_fetch_row($result2, $dbi);

    if (($radminency == 1) OR ($radminsuper == 1)) {

nukeladder(0);

   OpenTable();

   echo "<center><font class=\"title\"><b>Ladder Administration</b></font></center>";

   CloseTable();
etc
etc
etc

(This would all have to be rewriten to do what I want)


I don't want to mess up the core NukeLadder files any more than I have to but would rather just be able to add what I need done to the existing code.

If anybody has any experience with NukeLadder and can see what I am trying to accomplish then please give me some help to get started.

I know the 12- 14 game clans currently participating would much apprieciate it. We get new units every day wanting to join who are tired of TWL and CAL but we have closed due to the overwhelming response.
View user's profile Send private message Visit poster's website ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum