Well, it's something that have come to my attention - the way developers write the scripts.
I think there should be a standard template on which to begin to write an addon or rewrite a script.
First off all, I think moving the includes, mysql queries, and all that stuff, to a separate file, or try to not use it at all.
Here is an example of what I think could be done;
<?php
/**
* Instead of having this whole messy starting point
*/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm);
$h->menuarea();
{ ... actual script ... }
$h->endpage();
?>
<?php
/**
* Rather have something like this
*/
$mccodes->initialize(); // this is more descriptive than $h->blah()...
{ ... actual script ... }
$mccodes->end();
?>
In doing that, it would make documenting and learning how to program with the engine much easier.
I'm not implying that we should go about changing every aspect, but at least some of it.
I think that being able to document certain things will give new game owners the ability to start learning to program for the engine much faster, and they will gain better knowledge than just the simple scripts some people put out there - in addition, if we can document the functions properly, we can release tutorials for creating addons etc., but I personally don't expect to know each function on the current lite model, simply because the names doesn't make sense at all.
I really don't know what you other guys/gals think about this approach, so please give me your input.
I accept all critics, good or bad.