Server Help

Bot Questions - [MERVBot] "MySQL Substats" Plugin Request

L.C. - Sat Jun 09, 2007 1:18 am
Post subject: [MERVBot] "MySQL Substats" Plugin Request
Invader-Zim told me to look for someone who would like to make a nostalgic kind of plugin for MERVBot.

Required Experiences or Languages:
-MySQL
-PHP (most favorable) or Perl
-HTML (maybe)
-C or C++ (I don't know)

I will provide the grounds for online testing (since I am a webhost myself) if it is needed.

What:
You're going to build a MERVBot plugin that will generate online scores statistics. The idea of this is to try replicate the old eDome/Bdvines scores website; and the objective of this is to provide the entire Subspace community for a free, professional, simple, and compact way to recieve their scores (although the bot has to be online for this to happen, so that is the limiting factor).

How:
If you are interested, I will share ideas of this with you. For now I will provide just a spoiler of a template file. The template file is what the software will use as a reference. It is extremely simple and basic, and highly customizable. To explain just this example, the software would look at this and read first for a <style></style> and take that to heart and make sure that it would put that before a <body> tag atleast. Then it will read the rest of the file -- whatever is the rest of the file is what it will use to generate the tabular data. The only part of this that is not complete is putting the correct PHP, shortcut syntax (ie. in between "<td class="row_alt1_player"></td>" might be "$player"), or whatever. It would pass through the code and replace things like $player with the correct thing. Both the first and second row would have $player, otherwise the generated output might look weird. It will manipulate the table to its needs. There should only be one header row (which is the first row of this table). It should recognize the first data and second data row (which is the second and third row of this table; the alternating pattern rows), and will manipulate these two rows, since it is inputting the real stuff into this. I could go on but I feel that I have spoiled too much already.
Code: Show/Hide
<style>
.hdr{background-color: #003366;}
.hdr_number{}
.hdr_player{}
.hdr_squad{}
.hdr_wins{}
.hdr_losses{}
.hdr_ratio{}
.hdr_average{}
.hdr_points{}
.hdr_flagpoints{}
.hdr_totalpoints{}
.row_alt1{background-color: #000033;}
.row_alt1_number{}
.row_alt1_player{}
.row_alt1_squad{}
.row_alt1_wins{}
.row_alt1_losses{}
.row_alt1_ratio{}
.row_alt1_average{}
.row_alt1_points{}
.row_alt1_flagpoints{}
.row_alt1_totalpoints{}
.row_alt2{background-color: #000000;}
.row_alt2_number{}
.row_alt2_player{}
.row_alt2_squad{}
.row_alt2_wins{}
.row_alt2_losses{}
.row_alt2_ratio{}
.row_alt2_average{}
.row_alt2_points{}
.row_alt2_flagpoints{}
.row_alt2_totalpoints{}
.statstable{width: 720px; border: 0;}
</style>
<table class="statstable">
  <tr class="hdr">
    <td class="hdr_number">#</td>
    <td class="hdr_player">Pilot</td>
    <td class="hdr_squad">Squad</td>
    <td class="hdr_wins">Wins</td>
    <td class="hdr_losses">Losses</td>
    <td class="hdr_ratio">Ratio</td>
    <td class="hdr_average">Average</td>
    <td class="hdr_points">Points</td>
   <td class="hdr_flagpoints">Flag Points</td>
   <td class="hdr_totalpoints">Total Points</td>
  </tr>
  <tr class="row_alt1">
    <td class="row_alt1_number"></td>
    <td class="row_alt1_player"></td>
    <td class="row_alt1_squad"></td>
    <td class="row_alt1_wins"></td>
    <td class="row_alt1_losses"></td>
    <td class="row_alt1_ratio"></td>
    <td class="row_alt1_average"></td>
    <td class="row_alt1_points"></td>
    <td class="row_alt1_flagpoints"></td>
    <td class="row_alt1_totalpoints"></td>
  </tr>
  <tr class="row_alt2">
    <td class="row_alt2_number"></td>
    <td class="row_alt2_player"></td>
    <td class="row_alt2_squad"></td>
    <td class="row_alt2_wins"></td>
    <td class="row_alt2_losses"></td>
    <td class="row_alt2_ratio"></td>
    <td class="row_alt2_average"></td>
    <td class="row_alt2_points"></td>
    <td class="row_alt2_flagpoints"></td>
    <td class="row_alt2_totalpoints"></td>
  </tr>
</table>

L.C. - Sat Jun 09, 2007 4:57 pm
Post subject:
Original Post is at http://forums.sscentral.com/index.php?showtopic=15600&st=0&gopid=174541&#entry174541
Solo Ace - Sun Jun 10, 2007 4:50 am
Post subject:
Err? What?

Substats is work of Dustpuppy. How original.
Dustpuppy - Sun Jun 10, 2007 7:21 am
Post subject: Re: [MERVBot] "MySQL Substats" Plugin Request
L.C. wrote:
-HTML (maybe)

Smong - Sun Jun 10, 2007 7:30 am
Post subject:
Solo Ace wrote:
Substats is work of Dustpuppy. How original.
That's why it's in quotation marks, he wants a similar plugin.
Solo Ace - Sun Jun 10, 2007 7:37 am
Post subject:
Like this is going to work anyway. icon_smile.gif
Maverick - Sun Jun 10, 2007 10:22 am
Post subject:
I hate to say it but ffs do it server-side, do it on ASSS!
(Use Smong's ASSS stats module/stuff)
L.C. - Sun Jun 10, 2007 5:36 pm
Post subject:
readme.txt
▪This file just goes over some things briefly (and some in detail).
Code: Show/Hide
Main Stuff:
$title         This is where the website title will be outputted.
$sortnumber      This is the number of players per page that will be displayed.
$sortcategory   This is the name of the category that the data is sorted by.
$cssfile      This is the filename and/or location of the CSS file to load.
$zonename      This is the name of the zone data is generated for.
$form         This is where the contents of a fully parsed and manipulated form.html is placed

Categories:
$number         This is where the place numbers will be outputted (ie "1." "2." "34." "53.").
$player         This is where the player name will appear.
$squad         This is where the squad name will appear.
$wins         This is where the number of wins (kills) will appear.
$losses         This is where the number of losses (deaths) will appear.
$ratio         This is where the ratio of wins (kills) to losses (deaths) in simplest form is outputted.
$rating         This is where the rating ((points(10)+(wins-losses)100)/(wins+100)) is displayed.
$average      This is where the average (points/kills) is outputted.
$points         This is where the number of points is displayed.
$flagpoints      This is where the number of flag points is displayed.
$totalpoints   This is where the number of total points (points+flag points) is displayed.

Form $sortcategory Explanation:
   <option value="$sortcategpry">$sortcategpry</option>
    See [Categories] in scoreman.ini. Those are what will be placed accordingly into this
    list. Everything under [Categories] will be inputted into the form during manipulation
    (which is in the process of generating the webpages for the scores). You can change the
    category strings as you please.

CSS ss_ Prefix Explanation:
You will notice that the prefix ss_ is the beginning of all the CSS styles. If you have a
website (hopefully taking advantage of CSS and using a CSS file), the CSS for this plugin
will not interfere with your website and it's CSS. There are less chances of this plugin
messing up someone's website if CSS style names are made unique by using a prefix. If your
website happens to use the same prefix, them you should change them. There is no reason for
anyone's website to be constructed with the ss_ prefix.

CSS Body Style Explanation:
   body.formpage{}
   body.statsbody{text-align: center;}
    You can put class="formpage" or class="statsbody" in a <body> tag to load the styles for this.
    The reason for having this is so that you could customize specific styles for the page that
    the form is on, and styles for the popup window where the statistical scores data is presented.

Scoreman.ini ArchiveEarly Explanation:
   SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
   ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
   ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
    There is an extremely good reason for having this command. ArchiveTime is like a season, period,
    or semester. If ArchiveEarly is set to 60 (1 hour), 60 minutes (1 hour) before ArchiveTime ends
    it will archive the current scores. ArchiveEarly should not exceed SaveTime. For example:
      SaveTime > ArchiveEarly
      360 > Any number within the range of 0 and 359
    Setting it to 360 is not allowed (it cannot be equal with SaveTime or more than SaveTime). Setting
    ArchiveEarly to 0 is basically disabling this feature; it means that it will regenerate data and
    create an archive after how ever many weeks ArchiveTime is set to.
    Archiving will automatically regenerate data (to make it the most up to date) before archiving this
    data for future reference.

Scoreman.ini ArchiveDates Explanation:
   ArchiveDates = 0;         // See the Readme file for details on using this
    This information is used for the form itself. By default a user views the "Current scores" but
    will also have a list of archived dates to choose from. These are the dates that the archive was
    made on. Use these numbers to help you customize exactly how you want the dates to be displayed.
     0 ... Apr 1, 2007
     1 ... April 1, 2007
     2 ... 4/1/2007
     3 ... 2007 Apr 1
     4 ... 2007 April 1


scoreman.ini
▪Of course most of this data will also be stored in the MySQL database. A config.php file will take care of connecting the PHP website to the MySQL database, then it will use some of the stored configurations to its advantage.
▪The bot will of course have this file (or something ultimately similar). It will always re-update the MySQL entries (for verification). The plugin is almost literally updating the entire MySQL database.
▪To put it in other words, when it transfers scores data to the MySQL database, it will also transfer and replace configuration stuff in the database too (like SaveTime or Statstable). Quite nice and convenient, isn't it? sa_tongue.gif
Code: Show/Hide
[MySQL]         // Information about connecting to a MySQL source is entered here
Host = localhost;         // The IP address of your MySQL host (localhost otherwise)
Database = scoreman;         // The MySQL database name
Username = scoreman;         // The MySQL Username
Password = "abc123";         // The MySQL User Pasword

[Notification]         // Information about how the bot should or could notify about fresh generations
NotifyType = 0;         // Do you want in-game notifications or not? (0) No, (1) Yes
NotifyMessage = "*arena Scores Statistics have just been updated! Find them at scores.sscidragonballz.net.";         // Type this as if you were chatting in Continuum, you are limited to one message or line only

[Website]         // Configurations about how the website should operate
FormPage = index.html;         // It will parse this page for $form
FormTemplate = form.html;         // $form = <content of form.html>
StatsTable = statstable.html;         // Template file to parse, use, and manipulate for data output
$title = "Page Title Here";         // The title of this website
ZoneName = "SSCI Dragonball Z";         // The name of the zone that statistics are being reported for goes here
$cssfile = /scoreman.css;         // The location and address of your *.css file
SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
ArchiveDates = 0;         // See the Readme file for details on using this

[Sortnumber]         // This is data for the form itself
List0 = 5;         // This is an option that will be included in the form
List1 = 10;         // Use this to limit the number of
List2 = 20;         // Sort by top 20 something
List3 = 50;         // Sort by top 50 sometimes
List5 = 100;         // Sort by top 100 something
Maxlist = 100;         // To prevent someone from ever being able to render like 999 entries in one page

[Categories]         // This is the data for the form itself
Category0 = "Player";         // These are an option on the form that you can sort your desired data request by
Category1 = "Squad";         // Sort by Squad name (alphabetical)
Category2 = "Wins";         // Sort by wins (from highest to lowest)
Category3 = "Losses";         // Sort by losses (from highest to lowest)
Category4 = "Ratio";         // Sort by ratio (from best ratio, which is highest wins to lowest losses, to worst ratio)
Category5 = "Rating";         // Sort by rating (from highest to lowest)
Category6 = "Average";         // Sort by average (from highest to lowest)
Category7 = "Points";         // Sort by points (from highest to lowest)
Category8 = "Flagpoints";         // Sort by flag points (from highest to lowest)
Category9 = "Totalpoints";         // Sort by total points (from highest to lowest)


scoreman.css
▪I think this may be as complete as the CSS could get. icon_smile.gif
Code: Show/Hide
.ss_formcontent{width: 220px; text-align: left; padding: 4px;}
.ss_formdiv{width: 229px; text-align: center; background-color: #000030; font-family: Verdana, Arial, Helvetica, sans-serif; color:#FFFFFF; font-size: 12px;}
.ss_formtitle{width: 229px; background-color: #101060; color: #FFFFFF; text-align: center;}
.ss_formzone{width: 109px;}
.ss_hdr_average{}
.ss_hdr_flagpoints{}
.ss_hdr_losses{}
.ss_hdr_number{}
.ss_hdr_player{}
.ss_hdr_points{}
.ss_hdr_rating{}
.ss_hdr_ratio{}
.ss_hdr_squad{}
.ss_hdr_totalpoints{}
.ss_hdr_wins{}
.ss_hdr{background-color: #003366;}
.ss_row_alt1_average{}
.ss_row_alt1_flagpoints{}
.ss_row_alt1_losses{}
.ss_row_alt1_number{}
.ss_row_alt1_player{}
.ss_row_alt1_points{}
.ss_row_alt1_rating{}
.ss_row_alt1_rating{}
.ss_row_alt1_ratio{}
.ss_row_alt1_squad{}
.ss_row_alt1_totalpoints{}
.ss_row_alt1_wins{}
.ss_row_alt1{background-color: #000033;}
.ss_row_alt2_average{}
.ss_row_alt2_flagpoints{}
.ss_row_alt2_losses{}
.ss_row_alt2_number{}
.ss_row_alt2_player{}
.ss_row_alt2_points{}
.ss_row_alt2_ratio{}
.ss_row_alt2_squad{}
.ss_row_alt2_totalpoints{}
.ss_row_alt2_wins{}
.ss_row_alt2{background-color: #000000;}
.ss_statstable{width: 720px; border: 0;}
a.ss:active{}
a.ss:hover{}
a.ss:link{}
a.ss:visited{}
body.ss_formpage{text-align: center; background-color: #000030;}
body.ss_statsbody{text-align: center;}
input.ss_formbutton{background-color: #000030; color:#c080c0;}
select.ss_formlist{background-color:#104020; color:#FFFFFF;}


index.html
▪Quite simple, really. In order to have an accurate copy, an individual must have the PHP/MySQL software for generating scores data on the same server.
▪Another trick might be to use an iFrame or something to display the form from another server.
▪But really, this is pretty much the frontpage of the web-based part of the plugin. All other modifications must be done through MySQL (phpMyAdmin), PHP, or HTML.
Code: Show/Hide
<html>
<head>
<title>$title</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_formpage">
$form
</body>
</html>


form.html
▪Obviously it isn't quite complete. I am not a PHP coder, so I just did as much as I could.
Code: Show/Hide
<div class="ss_formdiv">
   <form name="UntitledForm" method="post" action="">
      <div style="padding: 4px;">
         <select class="ss_formlist" name="date">
            <option value="0">Current scores</option>
            <option value="$datevalue">$date</option>
         </select>
      </div>
      <div class="ss_formtitle"><b>Top Pilots</b></div>
      <div class="ss_formcontent">Show top
         <select class="ss_formlist" name="sortnumber">
            <option value="$sortnumber">$sortnumber</option>
         </select>
         <select class="ss_formlist" name="sortcategpry">
            <option value="$sortcategpry">$sortcategpry</option>
         </select>
         <br />
         <div class="ss_formcontent" style="margin-bottom: -4px;">
            <div style="text-align: right; margin-right: 4px;">
               <select class="ss_formzone ss_formlist" name="zonename">
                  <option>$zonename</option>
               </select>
               <input class="ss_formbutton" value="Go!" type="submit">
            </div>
         </div>
      </div>
   </form>
</div>


statstable.html
▪This is like the webpage file of a popup-looking window. Or like having your website in a popup.
Code: Show/Hide
<html>
<head>
<title>$title - Top $sortnumber $sortcategory</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_statsbody">
<table class="ss_statstable">
  <tr class="ss_hdr">
    <td class="ss_hdr_number">#</td>
    <td class="ss_hdr_player">Pilot</td>
    <td class="ss_hdr_squad">Squad</td>
    <td class="ss_hdr_wins">Wins</td>
    <td class="ss_hdr_losses">Losses</td>
    <td class="ss_hdr_ratio">Ratio</td>
    <td class="ss_hdr_rating">Rating</td>
    <td class="ss_hdr_average">Average</td>
    <td class="ss_hdr_points">Points</td>
    <td class="ss_hdr_flagpoints">Flag Points</td>
    <td class="ss_hdr_totalpoints">Total Points</td>
  </tr>
  <tr class="ss_row_alt1">
    <td class="ss_row_alt1_number">$number</td>
    <td class="ss_row_alt1_player">$player</td>
    <td class="ss_row_alt1_squad">$squad</td>
    <td class="ss_row_alt1_wins">$wins</td>
    <td class="ss_row_alt1_losses">$losses</td>
    <td class="ss_row_alt1_ratio">$ratio</td>
    <td class="ss_row_alt1_rating">$rating</td>
    <td class="ss_row_alt1_average">$average</td>
    <td class="ss_row_alt1_points">$points</td>
    <td class="ss_row_alt1_flagpoints">$flagpoints</td>
    <td class="ss_row_alt1_totalpoints">$totalpoints</td>
  </tr>
  <tr class="ss_row_alt2">
    <td class="ss_row_alt2_number">$number</td>
    <td class="ss_row_alt2_player">$player</td>
    <td class="ss_row_alt2_squad">$squad</td>
    <td class="ss_row_alt2_wins">$wins</td>
    <td class="ss_row_alt2_losses">$losses</td>
    <td class="ss_row_alt2_ratio">$ratio</td>
    <td class="ss_row_alt2_rating">$rating</td>
    <td class="ss_row_alt2_average">$average</td>
    <td class="ss_row_alt2_points">$points</td>
    <td class="ss_row_alt2_flagpoints">$flagpoints</td>
    <td class="ss_row_alt2_totalpoints">$totalpoints</td>
  </tr>
</table>
</body>
</html>




I will need a PHP Coder, some Javascript may be required (unless can be done fully in PHP), and perhaps light HTML knowledge needed (if you're a PHP coder though, you would have to know HTML then, wouldn't you? tongue.gif).

I happened to forget to add something to the scoreman.ini file about setting the X and Y dimensions of a popup window. Hehe.
L.C. - Sun Jun 10, 2007 5:38 pm
Post subject:
Quote:
but ffs do it server-side, do it on ASSS!

AS3 won't ever take over all of Subspace. You would only wish. Maybe when the plugin would be completed, released, open-sourced, then it could be ported to AS3. lol. What am I saying?
Maverick - Sun Jun 10, 2007 6:09 pm
Post subject:
I honestly don't wish for As3 to take over subspace icon_wink.gif I'm just saying it would be so much easier and more stable. (No more bot aka client dependency)
L.C. - Sun Jun 10, 2007 8:09 pm
Post subject:
Hmm, it could technically be coded to support more than 1 zone in the database. Not sure if anyone would want to do that (although it would make a create scores site). It would have to be in the hands of trusted individuals, and if something went wrong the password would have to be changed (which would be an exhaustive work having to go to each bot, etc). The way that could work out is if (for example), I, Confess+ or someone setup a dedicated bot server (maybe not strictly a bot server) and we hosted an almost "dummy" bot in whatever zones.

I will just use me as an example. Say I would have a dedicated server of my own. I could go to each SSC zone or something and request VIP-ship for a scores-monitoring bot that could periodically report to my webserver (two different physical servers). If I use this tactic, I could have a list of zones with their own scores being updated regularly.

Making a public scoring site (aka giving out the MySQL information to anybody and freely) creates a potential for a big mash and mess up of how things are organized in the system. You could spam the server to kingdom come through MySQL, spam up the zone list, you know.


Of course, if I did this I would have to make a few adjustments to the ini file. I'm thinking of adding an option where you could turn on a "shared" (support for multiple zones, will not send a few MySQL queries that standalone would) or "standalone" mode (standalone mode simply means just one zone in the system, no more than that). Some data that it might not send on shared could be like [Sortnumber] and [Categories], and would be globally defined by a super bot. Ah, that's a great idea.

There could be another thing in the ini, which could be a special password that it sends to the MySQL server or whatever. A password that could be set through phpMyAdmin; if this special password in the INI matches the one in the database, then it gains authority. By authority (if it is on the shared mode) it will be the one that dictates and sends the [Categories] and [Sortnumber].

EDIT :: Multi-pub zones would have problems regardless. There will always be some kind of confusion unless each public arena is split off in the zone list to something like: (Public 0), (Public 1), (Public 2).. Infact that's an excellent idea for Standalone mode. Multi-pub support wouldn't work for shared (it could, but there would be more work involved and I don't want to go that far; for shared the list is used as a zone listing a player could select from); multi-pub support would work for standalone (the list would be used as an arena list).
L.C. - Tue Jun 12, 2007 1:46 pm
Post subject:
Purge will be making a brand new bot instead of making this a plugin.
Cyan~Fire - Tue Jun 12, 2007 9:32 pm
Post subject:
L.C. wrote:
AS3 won't ever take over all of Subspace. You would only wish. Maybe when the plugin would be completed, released, open-sourced, then it could be ported to AS3. lol. What am I saying?

What are you saying?
Solo Ace - Wed Jun 13, 2007 2:19 am
Post subject:
Let's not listen to L.C. and just pretend this thread was never created.

Don't you guys see this is just another Qndre?

Look at what he's saying and how relevant that is to what he's trying to create at all.

L.C. wrote:
You could spam the server to kingdom come through MySQL, spam up the zone list, you know.

L.C., you go and spam up the zone list, homeboy.
L.C. - Wed Jun 13, 2007 2:22 am
Post subject:
Nah, I don't want to start an AS3 arguement. ;o
Cyan~Fire - Wed Jun 13, 2007 2:14 pm
Post subject:
Solo Ace wrote:
Don't you guys see this is just another Qndre?

Come on, you're just being mean to LC. icon_sad.gif

LC, I'm not trying to start an "AS3" argument either, but you are asking us to volunteer to write a program using a pretty much obsolete interface/toolset. That is not what programmers do for fun, that is what they do for their paid jobs.
L.C. - Thu Jun 14, 2007 12:50 am
Post subject:
Before I had posted the thread, Invader-Zim had given me some advice. One of those were that if nobody were interested for a full week, then to setup a reward (in money) with a bunch of conditions. With a conversation between Purge and I, I accidentally conveyed the sense to Purge that he was getting paid no matter what. After I realized that he misinterpretted me, I just told him that I'll go ahead and pay him fairly for it. He's being paid $25 at the moment.

Quote:
Let's not listen to L.C. and just pretend this thread was never created.
Or you just don't post in this thread. Quite simple to ignore an entire thread rather than a sole reply or post. icon_smile.gif

EDIT :: And to mention that the bot will be completed by Saturday. After that I'll just need to hire a PHP coder to do the PHP side of things. -_-
L.C. - Fri Jun 15, 2007 12:29 pm
Post subject:
Looking for a PHP Coder, read for details

Hey, we are now going to be needing a PHP coder to pitch a hand on the PHP-side of things. We can negotiate on a fair price (your job should be reletively simple, should be accomplishable in either a few hours, a day or two; not more than two days -- one day is already enough). Become a mercanery TODAY! sa_tongue.gif (Don't be afraid to negotiate on how much you want to be paid; the current starting price is $25.)
Smong - Fri Jun 15, 2007 5:03 pm
Post subject:
A day or two hmm. I will have a go at this, I got a lot of spare time recently biggrin.gif plus I'm already familiar with this kind of thing since I wrote DAWS. Is there anymore info or am I supposed to start work using the information that is already posted?
Solo Ace - Fri Jun 15, 2007 6:37 pm
Post subject:
Why wouldn't you take the chance to learn it yourself? PHP is a language I found the easiest to learn.

Yeah. sa_tongue.gif
CypherJF - Fri Jun 15, 2007 8:16 pm
Post subject:
PHP is a walk in the park; secure-PHP is not.
BDwinsAlt - Sat Jun 16, 2007 5:33 pm
Post subject:
Solo Ace wrote:
Why wouldn't you take the chance to learn it yourself? PHP is a language I found the easiest to learn.

Yeah. sa_tongue.gif

Aside from HTML icon_biggrin.gif haha
L.C. - Sat Jun 16, 2007 6:30 pm
Post subject:
Well there is one more bit of information regarding payment, thought I better make a public note of this before anything happens on the PHP side of things. My first paycheck wasn't as big as I thought it would be (~$130 - $80 for 500w Power Supply - $25 for Purge+'s work). I had to urgently buy a 500w Power Supply (this one is a Thermaltake) from NewEgg because my 500w popped a cap on a strange overload.

Now for the PHP side of things regarding payment - I would be able to pay you in a week or two from yesterday (which is when I get my next paycheck; and it'll be larger than my first paycheck). If you can wait that long, that's great. Wish I had something to tie this down so that I could earn your trust on this. :X

Now to slap some words back.
Quote:
Why wouldn't you take the chance to learn it yourself? PHP is a language I found the easiest to learn.
I wrote about 2 or 3 large paragraphs to reply to those quote, but then I decided to delete them because it was too difficult for me.

Working environments, conditions, and abilities. It is NOT in my mental ability or capacity to learn languages like C++, PHP, and even language alone without someone to personally (face to face) tutor me. The internet does not and will not work, guaranteed. Books do not work and will not work, guaranteed. No matter how I try to look at it (attitude-wise), I simply am incapable to learn language without a personal tutor. Some people can do it better than I can, but unfortunately I am afraid I am one of those who has far more trouble than any average learner when it comes to language.

I have borderline-ADHD, but I don't think that matters.
L.C. - Sat Jun 16, 2007 6:49 pm
Post subject:
Quote:
Is there anymore info or am I supposed to start work using the information that is already posted?
It might be a good idea to get in touch with Purge+ so that it could be discussed how we can approach it. We have to debug this, so it will take us three to look at it (atleast you and Purge).



readme.txt
-This file just goes over some things briefly (and some in detail).
Code: Show/Hide
Main Stuff:
$title         This is where the website title will be outputted.
$sortnumber      This is the number of players per page that will be displayed.
$sortcategory   This is the name of the category that the data is sorted by.
$cssfile      This is the filename and/or location of the CSS file to load.
$zonename      This is the name of the zone data is generated for.
$form         This is where the contents of a fully parsed and manipulated form.html is placed

Categories:
$number         This is where the place numbers will be outputted (ie "1." "2." "34." "53.").
$player         This is where the player name will appear.
$squad         This is where the squad name will appear.
$wins         This is where the number of wins (kills) will appear.
$losses         This is where the number of losses (deaths) will appear.
$ratio         This is where the ratio of wins (kills) to losses (deaths) in simplest form is outputted.
$rating         This is where the rating ((points(10)+(wins-losses)100)/(wins+100)) is displayed.
$average      This is where the average (points/kills) is outputted.
$points         This is where the number of points is displayed.
$flagpoints      This is where the number of flag points is displayed.
$totalpoints   This is where the number of total points (points+flag points) is displayed.

Form $sortcategory Explanation:
   <option value="$sortcategpry">$sortcategpry</option>
    See [Categories] in scoreman.ini. Those are what will be placed accordingly into this
    list. Everything under [Categories] will be inputted into the form during manipulation
    (which is in the process of generating the webpages for the scores). You can change the
    category strings as you please.

CSS ss_ Prefix Explanation:
You will notice that the prefix ss_ is the beginning of all the CSS styles. If you have a
website (hopefully taking advantage of CSS and using a CSS file), the CSS for this plugin
will not interfere with your website and it's CSS. There are less chances of this plugin
messing up someone's website if CSS style names are made unique by using a prefix. If your
website happens to use the same prefix, them you should change them. There is no reason for
anyone's website to be constructed with the ss_ prefix.

CSS Body Style Explanation:
   body.formpage{}
   body.statsbody{text-align: center;}
    You can put class="formpage" or class="statsbody" in a <body> tag to load the styles for this.
    The reason for having this is so that you could customize specific styles for the page that
    the form is on, and styles for the popup window where the statistical scores data is presented.

Scoreman.ini ArchiveEarly Explanation:
   SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
   ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
   ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
    There is an extremely good reason for having this command. ArchiveTime is like a season, period,
    or semester. If ArchiveEarly is set to 60 (1 hour), 60 minutes (1 hour) before ArchiveTime ends
    it will archive the current scores. ArchiveEarly should not exceed SaveTime. For example:
      SaveTime > ArchiveEarly
      360 > Any number within the range of 0 and 359
    Setting it to 360 is not allowed (it cannot be equal with SaveTime or more than SaveTime). Setting
    ArchiveEarly to 0 is basically disabling this feature; it means that it will regenerate data and
    create an archive after how ever many weeks ArchiveTime is set to.
    Archiving will automatically regenerate data (to make it the most up to date) before archiving this
    data for future reference.

Scoreman.ini ArchiveDates Explanation:
   ArchiveDates = 0;         // See the Readme file for details on using this
    This information is used for the form itself. By default a user views the "Current scores" but
    will also have a list of archived dates to choose from. These are the dates that the archive was
    made on. Use these numbers to help you customize exactly how you want the dates to be displayed.
     0 ... Apr 1, 2007
     1 ... April 1, 2007
     2 ... 4/1/2007
     3 ... 2007 Apr 1
     4 ... 2007 April 1


scoreman.ini
-Of course most of this data will also be stored in the MySQL database. A config.php file will take care of connecting the PHP website to the MySQL database, then it will use some of the stored configurations to its advantage.
-The bot will of course have this file (or something ultimately similar). It will always re-update the MySQL entries (for verification). The plugin is almost literally updating the entire MySQL database.
-To put it in other words, when it transfers scores data to the MySQL database, it will also transfer and replace configuration stuff in the database too (like SaveTime or Statstable). Quite nice and convenient, isn't it? sa_tongue.gif
Code: Show/Hide
[MySQL]         // Information about connecting to a MySQL source is entered here
Host = localhost;         // The IP address of your MySQL host (localhost otherwise)
Database = scoreman;         // The MySQL database name
Username = scoreman;         // The MySQL Username
Password = "abc123";         // The MySQL User Pasword

[Notification]         // Information about how the bot should or could notify about fresh generations
NotifyType = 0;         // Do you want in-game notifications or not? (0) No, (1) Yes
NotifyMessage = "*arena Scores Statistics have just been updated! Find them at scores.sscidragonballz.net.";         // Type this as if you were chatting in Continuum, you are limited to one message or line only

[Website]         // Configurations about how the website should operate
Formpage = index.html;         // It will parse this page for $form
Formtemplate = form.html;         // $form = <content of form.html>
Statstable = statstable.html;         // Template file to parse, use, and manipulate for data output
$title = "Page Title Here";         // The title of this website
ZoneName = "SSCI Dragonball Z";         // The name of the zone that statistics are being reported for goes here
$cssfile = /scoreman.css;         // The location and address of your *.css file
SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
ArchiveDates = 0;         // See the Readme file for details on using this
PopupX = 750;         // The width of the scores popup window in pixels
PopupY = 550;         // The heighth of the scores popup window in pixels
Resizable = 1;         // Can the user resize the popup window manually? (0) No, (1) Yes

[Sortnumber]         // This is data for the form itself
List0 = 5;         // This is an option that will be included in the form
List1 = 10;         // Use this to limit the number of
List2 = 20;         // Sort by top 20 something
List3 = 50;         // Sort by top 50 sometimes
List5 = 100;         // Sort by top 100 something
Maxlist = 100;         // To prevent someone from ever being able to render like 999 entries in one page

[Categories]         // This is the data for the form itself
Category0 = "Player";         // These are an option on the form that you can sort your desired data request by
Category1 = "Squad";         // Sort by Squad name (alphabetical)
Category2 = "Wins";         // Sort by wins (from highest to lowest)
Category3 = "Losses";         // Sort by losses (from highest to lowest)
Category4 = "Ratio";         // Sort by ratio (from best ratio, which is highest wins to lowest losses, to worst ratio)
Category5 = "Rating";         // Sort by rating (from highest to lowest)
Category6 = "Average";         // Sort by average (from highest to lowest)
Category7 = "Points";         // Sort by points (from highest to lowest)
Category8 = "Flagpoints";         // Sort by flag points (from highest to lowest)
Category9 = "Totalpoints";         // Sort by total points (from highest to lowest)


scoreman.css
-I think this may be as complete as the CSS could get. icon_smile.gif
Code: Show/Hide
.ss_formcontent{width: 220px; text-align: left; padding: 4px;}
.ss_formdiv{width: 229px; text-align: center; background-color: #000030; font-family: Verdana, Arial, Helvetica, sans-serif; color:#FFFFFF; font-size: 12px;}
.ss_formtitle{width: 229px; background-color: #101060; color: #FFFFFF; text-align: center;}
.ss_formzone{width: 109px;}
.ss_hdr_average{}
.ss_hdr_flagpoints{}
.ss_hdr_losses{}
.ss_hdr_number{}
.ss_hdr_player{}
.ss_hdr_points{}
.ss_hdr_rating{}
.ss_hdr_ratio{}
.ss_hdr_squad{}
.ss_hdr_totalpoints{}
.ss_hdr_wins{}
.ss_hdr{background-color: #003366;}
.ss_row_alt1_average{}
.ss_row_alt1_flagpoints{}
.ss_row_alt1_losses{}
.ss_row_alt1_number{}
.ss_row_alt1_player{}
.ss_row_alt1_points{}
.ss_row_alt1_rating{}
.ss_row_alt1_rating{}
.ss_row_alt1_ratio{}
.ss_row_alt1_squad{}
.ss_row_alt1_totalpoints{}
.ss_row_alt1_wins{}
.ss_row_alt1{background-color: #000033;}
.ss_row_alt2_average{}
.ss_row_alt2_flagpoints{}
.ss_row_alt2_losses{}
.ss_row_alt2_number{}
.ss_row_alt2_player{}
.ss_row_alt2_points{}
.ss_row_alt2_ratio{}
.ss_row_alt2_squad{}
.ss_row_alt2_totalpoints{}
.ss_row_alt2_wins{}
.ss_row_alt2{background-color: #000000;}
.ss_statstable{width: 720px; border: 0;}
a.ss:active{}
a.ss:hover{}
a.ss:link{}
a.ss:visited{}
body.ss_formpage{text-align: center; background-color: #000030;}
body.ss_statsbody{text-align: center;}
input.ss_formbutton{background-color: #000030; color:#c080c0;}
select.ss_formlist{background-color:#104020; color:#FFFFFF;}


index.html
-Quite simple, really. In order to have an accurate copy, an individual must have the PHP/MySQL software for generating scores data on the same server.
-Another trick might be to use an iFrame or something to display the form from another server.
-But really, this is pretty much the frontpage of the web-based part of the plugin. All other modifications must be done through MySQL (phpMyAdmin), PHP, or HTML.
Code: Show/Hide
<html>
<head>
<title>$title</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_formpage">
$form
</body>
</html>


form.html
-Obviously it isn't quite complete. I am not a PHP coder, so I just did as much as I could.
Code: Show/Hide
<div class="ss_formdiv">
   <form name="UntitledForm" method="post" action="">
      <div style="padding: 4px;">
         <select class="ss_formlist" name="date">
            <option value="0">Current scores</option>
            <option value="$datevalue">$date</option>
         </select>
      </div>
      <div class="ss_formtitle"><b>Top Pilots</b></div>
      <div class="ss_formcontent">Show top
         <select class="ss_formlist" name="sortnumber">
            <option value="$sortnumber">$sortnumber</option>
         </select>
         <select class="ss_formlist" name="sortcategpry">
            <option value="$sortcategpry">$sortcategpry</option>
         </select>
         <br />
         <div class="ss_formcontent" style="margin-bottom: -4px;">
            <div style="text-align: right; margin-right: 4px;">
               <select class="ss_formzone ss_formlist" name="zonename">
                  <option>$zonename</option>
               </select>
               <input class="ss_formbutton" value="Go!" type="submit">
            </div>
         </div>
      </div>
   </form>
</div>


statstable.html
-This is like the webpage file of a popup-looking window. Or like having your website in a popup.
Code: Show/Hide
<html>
<head>
<title>$title - Top $sortnumber $sortcategory</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_statsbody">
<table class="ss_statstable">
  <tr class="ss_hdr">
    <td class="ss_hdr_number">#</td>
    <td class="ss_hdr_player">Pilot</td>
    <td class="ss_hdr_squad">Squad</td>
    <td class="ss_hdr_wins">Wins</td>
    <td class="ss_hdr_losses">Losses</td>
    <td class="ss_hdr_ratio">Ratio</td>
    <td class="ss_hdr_rating">Rating</td>
    <td class="ss_hdr_average">Average</td>
    <td class="ss_hdr_points">Points</td>
    <td class="ss_hdr_flagpoints">Flag Points</td>
    <td class="ss_hdr_totalpoints">Total Points</td>
  </tr>
  <tr class="ss_row_alt1">
    <td class="ss_row_alt1_number">$number</td>
    <td class="ss_row_alt1_player">$player</td>
    <td class="ss_row_alt1_squad">$squad</td>
    <td class="ss_row_alt1_wins">$wins</td>
    <td class="ss_row_alt1_losses">$losses</td>
    <td class="ss_row_alt1_ratio">$ratio</td>
    <td class="ss_row_alt1_rating">$rating</td>
    <td class="ss_row_alt1_average">$average</td>
    <td class="ss_row_alt1_points">$points</td>
    <td class="ss_row_alt1_flagpoints">$flagpoints</td>
    <td class="ss_row_alt1_totalpoints">$totalpoints</td>
  </tr>
  <tr class="ss_row_alt2">
    <td class="ss_row_alt2_number">$number</td>
    <td class="ss_row_alt2_player">$player</td>
    <td class="ss_row_alt2_squad">$squad</td>
    <td class="ss_row_alt2_wins">$wins</td>
    <td class="ss_row_alt2_losses">$losses</td>
    <td class="ss_row_alt2_ratio">$ratio</td>
    <td class="ss_row_alt2_rating">$rating</td>
    <td class="ss_row_alt2_average">$average</td>
    <td class="ss_row_alt2_points">$points</td>
    <td class="ss_row_alt2_flagpoints">$flagpoints</td>
    <td class="ss_row_alt2_totalpoints">$totalpoints</td>
  </tr>
</table>
</body>
</html>




sub.js
-I was looking around on archive.org and managed to peak into this file. The following is just a small portion of it (the rest was useless).
-The main reason I'm pointing this out so that "menubar=no,scrollbars=yes,resizable=yes" is not forgotten in the coding of the popup function.
Code: Show/Hide
function sub(f)
{
  if ( score != null ) score.close() ;
  var score=window.open("", "score", "width=750,height=550,menubar=no,scrollbars=yes,resizable=yes"); 
  score.focus() ;
  return true;
}

Dustpuppy - Sat Jun 16, 2007 10:16 pm
Post subject:
Solo Ace wrote:
sa_tongue.gif
D1st0rt: you are a patient, patient man.
Purge - Sun Jun 17, 2007 12:13 am
Post subject:
Whoa, you make it seem so complicated. sa_tongue.gif
L.C. - Wed Jun 20, 2007 3:19 am
Post subject:
Renames..
scoreman.ini --> scoremon.ini
scoreman.css --> scoremon.css

Edits..
scoremon.css
FIND ".ss_formzone{width: 109px;}"
REPLACE ".ss_formzone{width: 75%;}

scoremon.ini
FIND "$cssfile = /scoreman.css;"
REPLACE "$cssfile = /scoremon.css;"
L.C. - Wed Jun 20, 2007 3:37 am
Post subject:
Edits..
scoremon.css
FIND ".ss_statstable{width: 720px; border: 0;}"
REPLACE ".ss_statstable{width: 720px; border-collapse: collapse;}"


Bleh, some CSS mistakes. sa_tongue.gif
L.C. - Wed Jun 20, 2007 3:48 am
Post subject:
@Purge+ I need to make a correction.
Points is just kill points, no powerball, flag, king of the hill, etc points. Purely kill points. I think Flag Points is everything but Points (kill points).

Someone correct me on that if I'm wrong. icon_surprised.gif
L.C. - Wed Jun 20, 2007 3:34 pm
Post subject:
Smong says...
Quote:
Nah you are correct in this situation, points = killpoints, flagpoints = flagpoints, totalpoints = killpoints + flagpoints.


I reply...
Quote:
He had asked me though about powerball score points, king of the hill, etc. Are those flag points too? According to the FAQ section on MGB's Server site it says that Kill points do not include these, but is strictly kill points. I don't think it mentioned anything about Flag Points (or what "category" soccer points, king of the hill points, *points points go under).

Smong - Wed Jun 20, 2007 4:59 pm
Post subject:
Kill points have to be strictly kills only otherwise it would mess up your average and rating. As a sidenote *points on subgame converts all points to flag points so will mess up those 2 stats anyway.

Also why is this topic going in parallel on two forums? This makes it harder to keep track of what's going on.
L.C. - Fri Jun 22, 2007 1:12 am
Post subject:
Edits...
scoremon.ini (changes by Smong)
FIND "$title"
REPLACE "PageTitle"
FIND "$cssfile"
REPLACE "CSSFile"
L.C. - Fri Jun 22, 2007 1:15 am
Post subject:
Quote:
Also why is this topic going in parallel on two forums? This makes it harder to keep track of what's going on.
Aye. I thought it might be more convenient. I'll post a note in the thread at SSForums that this thread here (at minegoboom.com) will be the one I'll continue to update. Done!
L.C. - Fri Jun 22, 2007 1:42 am
Post subject:
May find a directory with the following files at http://www.hlrse.net/scores.

readme.txt (Currently an Explanation Guide to clear up things)
Code: Show/Hide
Main Stuff:
$title         This is where the website title will be outputted.
$sortnumber      This is the number of players per page that will be displayed.
$sortcategory   This is the name of the category that the data is sorted by.
$cssfile      This is the filename and/or location of the CSS file to load.
$zonename      This is the name of the zone data is generated for.
$form         This is where the contents of a fully parsed and manipulated form.html is placed

Categories:
$number         This is where the place numbers will be outputted (ie "1." "2." "34." "53.").
$player         This is where the player name will appear.
$squad         This is where the squad name will appear.
$wins         This is where the number of wins (kills) will appear.
$losses         This is where the number of losses (deaths) will appear.
$ratio         This is where the ratio of wins (kills) to losses (deaths) in simplest form is outputted.
$rating         This is where the rating ((points(10)+(wins-losses)100)/(wins+100)) is displayed.
$average      This is where the average (points/kills) is outputted.
$points         This is where the number of points is displayed.
$flagpoints      This is where the number of flag points is displayed.
$totalpoints      This is where the number of total points (points+flag points) is displayed.

Points vs Flag Points Explanation:
   $points         This is where the number of points is displayed.
   $flagpoints      This is where the number of flag points is displayed.
   $totalpoints      This is where the number of total points (points+flag points) is displayed.
There has been a small controversy about the difference between Points and Flag Points. To
clear all of this and confusion up, points are strictly kill points (points that you get
from killing other players). Flag points include the following kind of points: flag rewards,
flag-game wins, king of the hill, *points, and soccer.

Form $sortcategory Explanation:
   <option value="$sortcategpry">$sortcategpry</option>
See [Categories] in scoreman.ini. Those are what will be placed accordingly into this
list. Everything under [Categories] will be inputted into the form during manipulation
(which is in the process of generating the webpages for the scores). You can change the
category strings as you please.

CSS ss_ Prefix Explanation:
You will notice that the prefix ss_ is the beginning of all the CSS styles. If you have a
website (hopefully taking advantage of CSS and using a CSS file), the CSS for this plugin
will not interfere with your website and it's CSS. There are less chances of this plugin
messing up someone's website if CSS style names are made unique by using a prefix. If your
website happens to use the same prefix, them you should change them. There is no reason for
anyone's website to be constructed with the ss_ prefix.

CSS Body Style Explanation:
   body.formpage{}
   body.statsbody{text-align: center;}
You can put class="formpage" or class="statsbody" in a <body> tag to load the styles for this.
The reason for having this is so that you could customize specific styles for the page that
the form is on, and styles for the popup window where the statistical scores data is presented.

Scoreman.ini ArchiveEarly Explanation:
   SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
   ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
   ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
There is an extremely good reason for having this command. ArchiveTime is like a season, period,
or semester. If ArchiveEarly is set to 60 (1 hour), 60 minutes (1 hour) before ArchiveTime ends
it will archive the current scores. ArchiveEarly should not exceed SaveTime. For example:
   SaveTime > ArchiveEarly
   360 > Any number within the range of 0 and 359
Setting it to 360 is not allowed (it cannot be equal with SaveTime or more than SaveTime). Setting
ArchiveEarly to 0 is basically disabling this feature; it means that it will regenerate data and
create an archive after how ever many weeks ArchiveTime is set to.
Archiving will automatically regenerate data (to make it the most up to date) before archiving this
data for future reference.

Scoreman.ini ArchiveDates Explanation:
   ArchiveDates = 0;         // See the Readme file for details on using this
This information is used for the form itself. By default a user views the "Current scores" but
will also have a list of archived dates to choose from. These are the dates that the archive was
made on. Use these numbers to help you customize exactly how you want the dates to be displayed.
  0 ... Apr 1, 2007
  1 ... April 1, 2007
  2 ... 4/1/2007
  3 ... 2007 Apr 1
  4 ... 2007 April 1


scoreman.ini (Contains Bot plugin information, MySQL information, and information that the PHP-side will use to its own needs)
Code: Show/Hide
[MySQL]         // Information about connecting to a MySQL source is entered here
Host = localhost;         // The IP address of your MySQL host (localhost otherwise)
Database = scoreman;         // The MySQL database name
Username = scoreman;         // The MySQL Username
Password = "abc123";         // The MySQL User Pasword

[Notification]         // Information about how the bot should or could notify about fresh generations
NotifyType = 0;         // Do you want in-game notifications or not? (0) No, (1) Yes
NotifyMessage = "*arena Scores Statistics have just been updated! Find them at scores.sscidragonballz.net.";         // Type this as if you were chatting in Continuum, you are limited to one message or line only

[Website]         // Configurations about how the website should operate
Formpage = /indexpage.html;         // It will parse this page for $form
Formtemplate = /formpage.html;         // $form = <content of formpage.html>
Statstable = /statstable.html;         // Template file to parse, use, and manipulate for data output
PageTitle = "Page Title Here";         // The title of this website
ZoneName = "SSCI Dragonball Z";         // The name of the zone that statistics are being reported for goes here
CSSFile = /scoremon.css;         // The location and address of your *.css file
SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
ArchiveDates = 0;         // See the Readme file for details on using this
PopupX = 750;         // The width of the scores popup window in pixels
PopupY = 550;         // The heighth of the scores popup window in pixels
Resizable = 1;         // Can the user resize the popup window manually? (0) No, (1) Yes

[Sortnumber]         // This is data for the form itself
List0 = 5;         // This is an option that will be included in the form
List1 = 10;         // Use this to limit the number of
List2 = 20;         // Sort by top 20 something
List3 = 50;         // Sort by top 50 sometimes
List5 = 100;         // Sort by top 100 something
Maxlist = 100;         // To prevent someone from ever being able to render like 999 entries in one page

[Categories]         // This is the data for the form itself
Category0 = "Player";         // These are an option on the form that you can sort your desired data request by
Category1 = "Squad";         // Sort by Squad name (alphabetical)
Category2 = "Wins";         // Sort by wins (from highest to lowest)
Category3 = "Losses";         // Sort by losses (from highest to lowest)
Category4 = "Ratio";         // Sort by ratio (from best ratio, which is highest wins to lowest losses, to worst ratio)
Category5 = "Rating";         // Sort by rating (from highest to lowest)
Category6 = "Average";         // Sort by average (from highest to lowest)
Category7 = "Points";         // Sort by points (from highest to lowest)
Category8 = "Flagpoints";         // Sort by flag points (from highest to lowest)
Category9 = "Totalpoints";         // Sort by total points (from highest to lowest)


scoreman.css (The content style sheet for the whole webbased part of the Bot plugin)
Code: Show/Hide
/* Designed by L.C. and added to by Smong. For use with the Scoremon MERVBot plugin. */
.ss_formcontent{padding: 4px; text-align: left; width: 220px;}
.ss_formdiv{background-color: #000030; color:#FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; text-align: center; width: 229px;}
.ss_formtitle{background-color: #101060; color: #FFFFFF; text-align: center; width: 229px;}
.ss_formzone{width: 75%;}
.ss_hdr_average{}
.ss_hdr_flagpoints{}
.ss_hdr_losses{}
.ss_hdr_number{}
.ss_hdr_player{}
.ss_hdr_points{}
.ss_hdr_rating{}
.ss_hdr_ratio{}
.ss_hdr_squad{}
.ss_hdr_totalpoints{}
.ss_hdr_wins{}
.ss_hdr{background-color: #003366;}
.ss_row_alt1_average{}
.ss_row_alt1_flagpoints{}
.ss_row_alt1_losses{}
.ss_row_alt1_number{}
.ss_row_alt1_player{}
.ss_row_alt1_points{}
.ss_row_alt1_rating{}
.ss_row_alt1_rating{}
.ss_row_alt1_ratio{}
.ss_row_alt1_squad{}
.ss_row_alt1_totalpoints{}
.ss_row_alt1_wins{}
.ss_row_alt1{background-color: #000033;}
.ss_row_alt2_average{}
.ss_row_alt2_flagpoints{}
.ss_row_alt2_losses{}
.ss_row_alt2_number{}
.ss_row_alt2_player{}
.ss_row_alt2_points{}
.ss_row_alt2_ratio{}
.ss_row_alt2_squad{}
.ss_row_alt2_totalpoints{}
.ss_row_alt2_wins{}
.ss_row_alt2{background-color: #000000;}
.ss_statstable{border-collapse: collapse; width: 720px;}
a.ss:active{}
a.ss:hover{}
a.ss:link{}
a.ss:visited{}
body.ss_formpage{background-color: #000030; color: #FFFFFF; text-align: center;}
body.ss_statsbody{background-color: #000030; color: #FFFFFF; text-align: center;}
input.ss_formbutton{background-color: #000030; color:#C080C0;}
select.ss_formlist{background-color:#104020; color:#FFFFFF;}


indexpage.html (The main page for a simple setup on someones webserver)
+06/22/2007: Someone could use some of the features in this to have their webpages parsed and the form itself implemented onto their website.
Code: Show/Hide
<html>
<head>
<title>$title</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
</head>
<body class="ss_formpage">
$form
</body>
</html>


formpage.html ("Obviously not complete," now just a basic demo example; Smong has a working version that I don't have to show right now)
Code: Show/Hide
<div class="ss_formdiv">
   <form name="UntitledForm" method="post" action="">
      <div style="padding: 4px;">
         <select class="ss_formlist" name="date">
            <option value="0">Current scores</option>
            <option value="$datevalue">$date</option>
         </select>
      </div>
      <div class="ss_formtitle"><b>Top Pilots</b></div>
      <div class="ss_formcontent">Show top
         <select class="ss_formlist" name="sortnumber">
            <option value="$sortnumber">$sortnumber</option>
         </select>
         <select class="ss_formlist" name="sortcategpry">
            <option value="$sortcategpry">$sortcategpry</option>
         </select>
         <br />
         <div class="ss_formcontent" style="margin-bottom: -4px;">
            <div style="text-align: right; margin-right: 4px;">
               <select class="ss_formzone ss_formlist" style="width: 100%" name="zonename">
                  <option>$zonename</option>
               </select>
               <input class="ss_formbutton" value="Go!" type="submit">
            </div>
         </div>
      </div>
   </form>
</div>


statstable.html (The webpage part for the popup window of generated and outputted scores)
Code: Show/Hide
<html>
<head>
<title>$title - Top $sortnumber $sortcategory</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
</head>
<body class="ss_statsbody">
<table class="ss_statstable">
  <tr class="ss_hdr">
    <td class="ss_hdr_number">#</td>
    <td class="ss_hdr_player">Pilot</td>
    <td class="ss_hdr_squad">Squad</td>
    <td class="ss_hdr_wins">Wins</td>
    <td class="ss_hdr_losses">Losses</td>
    <td class="ss_hdr_ratio">Ratio</td>
    <td class="ss_hdr_rating">Rating</td>
    <td class="ss_hdr_average">Average</td>
    <td class="ss_hdr_points">Points</td>
    <td class="ss_hdr_flagpoints">Flag Points</td>
    <td class="ss_hdr_totalpoints">Total Points</td>
  </tr>
  <tr class="ss_row_alt1">
    <td class="ss_row_alt1_number">$number</td>
    <td class="ss_row_alt1_player">$player</td>
    <td class="ss_row_alt1_squad">$squad</td>
    <td class="ss_row_alt1_wins">$wins</td>
    <td class="ss_row_alt1_losses">$losses</td>
    <td class="ss_row_alt1_ratio">$ratio</td>
    <td class="ss_row_alt1_rating">$rating</td>
    <td class="ss_row_alt1_average">$average</td>
    <td class="ss_row_alt1_points">$points</td>
    <td class="ss_row_alt1_flagpoints">$flagpoints</td>
    <td class="ss_row_alt1_totalpoints">$totalpoints</td>
  </tr>
  <tr class="ss_row_alt2">
    <td class="ss_row_alt2_number">$number</td>
    <td class="ss_row_alt2_player">$player</td>
    <td class="ss_row_alt2_squad">$squad</td>
    <td class="ss_row_alt2_wins">$wins</td>
    <td class="ss_row_alt2_losses">$losses</td>
    <td class="ss_row_alt2_ratio">$ratio</td>
    <td class="ss_row_alt2_rating">$rating</td>
    <td class="ss_row_alt2_average">$average</td>
    <td class="ss_row_alt2_points">$points</td>
    <td class="ss_row_alt2_flagpoints">$flagpoints</td>
    <td class="ss_row_alt2_totalpoints">$totalpoints</td>
  </tr>
</table>
</body>
</html>


sub.js (Old stuff; Smong was able to use this to advantage)
Code: Show/Hide
function sub(f)
{
  if ( score != null ) score.close() ;
  var score=window.open("", "score", "width=750,height=550,menubar=no,scrollbars=yes,resizable=yes"); 
  score.focus() ;
  return true;
}




EDIT :: I'm trying to minimize on these large "SPAM" posts. Just a side-note.
Smong - Fri Jun 22, 2007 7:43 am
Post subject:
A small technicality about the form submission/popup.

Normally when you submit a form the page reloads and shows the results. This works by the browser attempting to load a page URL looking like:
showresults.php?sortcategory=Ratio&sortnumber=10
Note the browser generates this URL automatically, no extra code is required such as javascript.

Now the problem comes in trying to get the pop-up window to change "location" to this page. So if a form exists in window A how can I get it to submit to window B?

What I will attempt to do is generate the query string (the bit in green above) using javascript, something like this:
Code: Show/Hide
sortcategory = getElementById
sortnumber = getElementById
window.open("showresults.php?sortcategory=" + sortcategory.value + "&sortnumber=" sortnumber.value, "score", "width=750,height=550,menubar=no,scrollbars=yes,resizable=yes");

Anyone want to chip in with a better way? Or has anyone got a full copy of the old scores site? That sub(f) function LC posted looks incomplete, since there is an "f" parameter that doesn't appear to get used. That and the popup's location is set to "" (empty string).
L.C. - Fri Jun 22, 2007 12:30 pm
Post subject:
sub.js (http://web.archive.org/web/20060104050528/http://edome.fi.soneraplaza.net/subspace/sub.js)
Code: Show/Hide
function sub(f)
{

  var f0 = document.f0 ;

  var date = f0.date.options[f0.date.selectedIndex].value ;

  if ( date == '0' ) { var loc = f.cgi.value } else { var loc = date + "/" + f.cgi.value }

  f.target="score" ;
  f.action="http://edome.fi.soneraplaza.net/subspace/cgi-bin/" + loc ;

  if ( score != null ) score.close() ;
  var score=window.open("", "score", "width=750,height=550,menubar=no,scrollbars=yes,resizable=yes"); 
  score.focus() ;
  return true;
}

Smong - Fri Jun 22, 2007 7:06 pm
Post subject:
Looks like "target" was what I was looking for. Thanks for posting more of the script (why did you trim it in the first place? icon_sad.gif).
Solo Ace - Sat Jun 23, 2007 7:08 pm
Post subject:
Hah. I love seeing other people having the same problems with Javascript that I had earlier while working on my gallery's image viewer. icon_smile.gif
Too bad I couldn't post earlier. icon_sad.gif

But hey, let's all just use AJAX.
Solo Ace - Tue Jul 03, 2007 2:09 am
Post subject:
So anyway, it's finished?
L.C. - Tue Jul 03, 2007 4:14 am
Post subject:
Smong and Mattalic[reborn] are supposed to be in touch.
L.C. - Sun Jul 08, 2007 4:23 am
Post subject:
It doesn't seem like Mattalic[reborn] is right for the job (time-wise). He just never seems to be available and I haven't heard of progress from Smong for quite a while now. Anyone want to replace Mattalic[reborn] as plugin coder and co-operate with Smong? sa_tongue.gif I'll toss in a free beginners plan from hlrse.net if you want one. -_-
L.C. - Tue Jul 17, 2007 5:10 pm
Post subject:
New coder I believe is allshallperish.
Anonymous - Sat Aug 11, 2007 2:02 pm
Post subject:
Bump. Just curious on the progress this has made since the last update.
L.C. - Fri Aug 24, 2007 10:48 pm
Post subject:
ssdhfkjadhgiuasgfhliaegihaeighkdhnvkladnivnpwiugheaphg

School carried me away. I'll try to get this back on in-progress and off the ground.

Irony is that people actually want this plugin and are waiting for its release, but there aren't enough coders out there that would seemingly care enough to get this done ASAP (and without having constant long-term interruptions). I've still got the $25 offer open.

allshallperish doesn't want any money (anything as a matter of fact).
Smong will receive his $25 upon project completion.
Anonymous - Sat Aug 25, 2007 1:26 am
Post subject:
Something I did awile ago, it sends a nick, zoneid and date to edome.fi.soneraplaza.net or did b4 it went down.. Then rips the html source and navigates the DOM leeching the data then loads the next previous date all the way back to 1999.


I password protected it cause its crude to leech from another site like this, but that dont matter anymore.
You wont be able to run the application anymore, because edome is no longer with us, but you can still load a saved document, or view the save from the 2nd link below.


PW is "OK"

Then type "Fly Swatter" (CaSe SeNsiTiVe)

http://swatter.brinkster.net/stats/ALL_TiMe_DsB_PLaYeR_StAtS.html


http://swatter.brinkster.net/stats/saves/default.asp


Just something to look at,

Swatter
D1st0rt - Mon Sep 03, 2007 6:51 pm
Post subject:
L.C. wrote:
Irony is that people actually want this plugin and are waiting for its release, but there aren't enough coders out there that would seemingly care enough to get this done ASAP (and without having constant long-term interruptions).

I know it's a little late but I just wanted to point out that this is merely unfortunate and not actually ironic. All of the coders I know are typically overloaded with their own projects, much less somebody else's.
L.C. - Mon Sep 03, 2007 6:55 pm
Post subject:
Quote:
All of the coders I know are typically overloaded with their own projects, much less somebody else's.
Well you do have a point, and I accept it. So be it. -_-
L.C. - Thu Oct 25, 2007 5:15 pm
Post subject:
You may find everything of this plugin as open source at http://www.hlrse.net/scores/.
Solo Ace - Wed Jan 02, 2008 12:46 pm
Post subject:
So anyway, it's finished?
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group