Ravens PHP Scripts: Forums


View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message

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

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

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! ]

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.

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);



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


   <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":

which would pull up

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)) {



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


(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    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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
You can attach files in this forum
You can download files in this forum

Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
Forums ©