Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by mark1million

  1. yes i do :) its based upon the forum creation its a simple add on file.

    in your coremodules create another folder named in my case TSRegister    (case sensitive)

    place this code in to that folder and when some one registeres it will create a teamspeak account with the same password and in my case Pilot is and Firstname this can be changes to what ever you like but it suites my cause.

    <?php
    class TSRegister extends CodonModule
    {
       
       public function __construct()
       {
          CodonEvent::addListener('TSRegister');
       }
       
       public function EventListener($eventinfo)
       {
          if($eventinfo[0] == 'registration_complete')
          {
    
             $userinfo = $eventinfo[2];
    
             $fname = $userinfo['firstname'];
             $lname = $userinfo['lastname'];
             $pass = $userinfo['password1'];
             $email = $userinfo['email'];
             $code = $userinfo['code'];
    
    
             $uinfo = PilotData::GetPilotByEmail($userinfo['email']);
    
             $code = PilotData::GetPilotCode($uinfo->code, $uinfo->pilotid);
             $pilot_id = $fname.$lname.$code.$pilot_id;
             $pilot_id_klein = strtolower($pilot_id);
    
             $passMD5 = md5($pass);
    
             $tm = time();
    
             mysql_connect("your own server", "username", "password") or die(mysql_error());
    mysql_select_db("YOUR TS DB NAME") or die(mysql_error());
    
    // Insert a row of information into the table "ts2_clients "
    mysql_query("INSERT INTO ts2_clients
    (i_client_id, i_client_server_id, b_client_privilege_serveradmin, s_client_name, s_client_password, dt_client_created, dt_client_lastonline) VALUES('0', '1', '0', '".$code.' '.$fname."', '".$pass."', '', '' ) ")
    or die(mysql_error());
    
    mysql_close();
    
    //echo "Data Inserted!";
    
          }
       }
    
    }
    ?>
    
    

    Its a bit crude but it works :)

  2. Back to the original error now on view details,

    Fatal error: Call to undefined method SchedulesData::getscheduleflowncounts() in /home/mgrant/public_html/grantsva.com/core/modules/Schedules/Schedules.php on line 79

  3. Hi everyone, when a user registers i have an insert statement taken from the create forum account that inserts a users ID and name in to my teamspeak db, what i currently have is this,

    // Insert a row of information into the table "ts2_clients "
    mysql_query("INSERT INTO ts2_clients
    (i_client_id, i_client_server_id, b_client_privilege_serveradmin, s_client_name, s_client_password, dt_client_created, dt_client_lastonline) VALUES('0', '1', '0', '".$code.$fname."', '".$pass."', '', '' ) ")
    

    So this inserts in to my teamspeak db Pilot ID and First name like this ABC0001Mark, what i am trying to do is put a space in between the id and the name so it inserts like this, ABC0001 Mark

    Im no coder and have been hunting about with no luck, google who normally is my best friend yields no results, any suggestions would be gratefully received.

    Thanks.

  4. Nabeel a good feature would be inactivity, would it be possible to write in to the code if a pilot doesn't file a pirep for a specified amount of time he goes inactive?

    And following on from that displays a image, so for example if a pilot is active a green image is displayed next to his name, http://www.grantsva.com/index.php/pilots if he becomes inactive another image is displayed, hope you get where im coming from.

  5. Quote, url Here, http://docs.phpvms.net/installation#phpvms_installation

    phpVMS Installation

    Requirements

    PHP 5+ (5.2+ recommended).

    MySQL 4.1+ with InnoDB.

    Recommended extras:

    GD Image Library

    allow_url_fopen set to ON or cURL

    phpVMS is designed to run with PHP with register_globals set to 'off'

    phpVMS may not run properly with safe mode on

    phpVMS uses some of the “advanced” features of MySQL, mainly foreign keys. This will ensure the integrity of your data. These are enabled by most DB software, and it's implemented by MySQL in InnoDB tables. Chances are, your host has InnoDB enabled (the default table types are MyISAM). If you don't, usually a quick email to them and they will enable it for you.

    Installation

    Installation Preliminaries

    Before you start the installation, a few things must be done:

    Write permissions:

    core/pages

    core/local.config.php

    lib/rss/

    lib/signatures

    lib/avatars

    Your database user must have SELECT/UPDATE/DELETE/CREATE/APPEND permissions

×
×
  • Create New...