kalyse Posted April 21, 2006 Share Posted April 21, 2006 Hey, As I said in the Thread I would post once I have the time. I modded the LGSL program and incorporated it to use a mySQL database. This makes things much easier for me because it allows me to assign a server in LGSL to a client etc. It basically means that I can display the servers when and how I choose. Please don't download this if you do not understand what mySQL means. I dont want to help people install it when you have no use for it and you could just use the standard LGSL 1.8 that uses a TXT file to store the files. I found it impossible to use for what i wanted so MODDED It. ============================== PLEASE READ THE README - DO NOT TRY AND USE IT WITHOUT READING ============================== DOWNLOAD: http://www.invision-gaming.co.uk/downloads/index.php?act=vie w&id=3 CHANGES: There is quite alot of changes with it, most listed in the README. You will notice a lot more files in there aswell, most are blank and just include other files because it makes it easier to display the data and create a template. Plus I didnt like the name lgsl_players.php so I changed it to players.php which is the file that you should include your header and footer in. Make sure you setup the details in your Config. CREDIT: Full credit goes to Richard Perry for creating the Code, Link to comment Share on other sites More sharing options...
kalyse Posted April 21, 2006 Author Share Posted April 21, 2006 And Example of the script can be seen here: ======================================= http://www.invision-gaming.co.uk ======================================= You can see the table on the right. FUTURE: I will release the PHP code used to add servers later, but for now you can just make do with that, I assume you know how to add entries with mySQL anyway Link to comment Share on other sites More sharing options...
MaxXx Posted April 21, 2006 Share Posted April 21, 2006 Nice, will try to install it now Link to comment Share on other sites More sharing options...
GameConnectors Posted April 21, 2006 Share Posted April 21, 2006 Cheers Kalyse, Will test it out and post a link Link to comment Share on other sites More sharing options...
kalyse Posted April 22, 2006 Author Share Posted April 22, 2006 It requires quit a lot of management from you. Which is why I say dont try and use it if you dont know how mySQL works, and you have good understand of PHP, and you can wrap it within your website. I reckon it would take about 10-20 minutes to setup. Do you guuys need the code to remove and add and edit servers? Link to comment Share on other sites More sharing options...
nick Posted April 22, 2006 Share Posted April 22, 2006 Do you guuys need the code to remove and add and edit servers? That would be excellent. Nick Link to comment Share on other sites More sharing options...
MaxXx Posted April 22, 2006 Share Posted April 22, 2006 I assume you do not have a script inserting the database information for all servers itself from tcadmin? Just want to make sure before I start working on that. Link to comment Share on other sites More sharing options...
kalyse Posted April 22, 2006 Author Share Posted April 22, 2006 I assume you do not have a script inserting the database information for all servers itself from tcadmin? Just want to make sure before I start working on that. I didnt have time to do anythignlike that, but the things I was goign to do is this: Find out the Servers runnning on TC Admin (Add the remove and add IP for) (Get it working with Crontabs) The thing at the moment is that it takes about 4 seconds for the user to run the script, I have actually fixd it on my server so that its instant, the user never actually needs to wait for the Game servers to be queried. http://www.invision-gaming.co.uk You see how there is no load time, Thats because I have a crontab that runs every minute to execute the script, the crontab is this: * * * * * php /my/home/directory/servers/cronstats.php Then the cronstats.php file basically runs the stats PHP file and the distributes the cache around my server. (This is because I have been unable to just use one cache, it seems that there needs to be a cache in each directory where the user canview your website, and if you have multiple websites that can be a pain. cronstats.php file: <?php include('lgsl_stats.php'); $file = 'lgsl_cache.dat'; $newfile = '../lgsl_cache.dat'; copy($file, $newfile); //You need to move the file to any child directory that your users view, like for instance http://www.invision-gaming.co.uk/downloads $file = 'lgsl_cache.dat'; $newfile = '../downloads/lgsl_cache.dat'; copy($file, $newfile); ?> Notes: You have to realise this is a really sloppy way but works. Because I didnt make the original script im just 'editing' it, there is alow of redundant code and effeciency isnt 100% but thats why we make the crontab eecute the script instead so it doesnt matter about effeciency because our users never feel the loading. Notes#2: I can get the script to automaticaly pull all of your IPs out of TCAdmin, but the problem with that is you would need to run it on your server, the best thing to do would be to use a separate script that isnt related that creates a SQL file. Also you may have noticed that there is some data already in the SQL file, this is just 'test data' and should be replaced. Thirdly: You may notice other fields, this is to be used in any way you need, like I use them to show wether they should be displayed maybe because I have decided to bann the user, in whcih case I can change the query that fetches the server to $query = "SELECT * FROM `iservers` where active = 1"; This will then only display there servers that have the value active. What else is useful is that you can do other searches, lets say you have 1000 servers, you could add your clients clan name in there and then install a search box and do: $query = "SELECT * FROM `iservers` where name like '".$searchitem."'"; //Obviosuly the column name would have to be added, but the possibilities using a mySQL database are by far endless, which is why I decided to add this instead of using a standard text file. Has anyone installed it yet? Link to comment Share on other sites More sharing options...
MaxXx Posted April 22, 2006 Share Posted April 22, 2006 Ok I get what you mean now. You probably still know that somebody (cant remember who) has written the VB TCADMIN Script which generates the LGSL text file. Why don't use that and write an additional file which transfers this data into the Database? That is what i thought about yesterday but I was not sure if I should try that or simply write a new TCADMIN SDK script in first place which imports the data into a database? What do you think? Link to comment Share on other sites More sharing options...
kalyse Posted April 22, 2006 Author Share Posted April 22, 2006 Can you link me to this? I could write a script that reads the text file and then checks each entry against the database to see if its there, then move on if it is, Have you got it to work yet? Link to comment Share on other sites More sharing options...
MaxXx Posted April 22, 2006 Share Posted April 22, 2006 well the part to the text file i have,...and it works with the normal lgsl but not with your modded one. Best you talk to me on msn aim or whatever you use (see my profile) Link to comment Share on other sites More sharing options...
G3mInI Posted April 24, 2006 Share Posted April 24, 2006 Thanks Kalyse for this... While I am not a game hosting provider, I do run a clan for Medal of Honor and I have a license with TCAdmin. I used the basics of your script to use on my site that I have created. (lower right hand content box). http://www.area51moh.com/testsite/ *Note: I am still building this site, so not all of it is as it will be when I am finished. Once again, thanks for this as it does exactly what I wanted it to do. G3mInI Link to comment Share on other sites More sharing options...
G3mInI Posted April 28, 2006 Share Posted April 28, 2006 In the above post, the url has changed for the site is now live and no longer in testing.... http://www.area51moh.com/ G3mInI Link to comment Share on other sites More sharing options...
ECF Posted April 28, 2006 Share Posted April 28, 2006 Love the alien with the army helmet Link to comment Share on other sites More sharing options...
Web1stLine Posted June 11, 2008 Share Posted June 11, 2008 The link : http://www.invision-gaming.co.uk/downloads/index.php?act=view&id=3 is dead ? Link to comment Share on other sites More sharing options...
w00der Posted June 12, 2008 Share Posted June 12, 2008 It is 2 years old this thread i suggest you try http://www.tcadminstats.com Link to comment Share on other sites More sharing options...
Web1stLine Posted July 3, 2008 Share Posted July 3, 2008 Ok thank's Link to comment Share on other sites More sharing options...
kalyse Posted July 16, 2008 Author Share Posted July 16, 2008 Yes the links dead. I don't even know where the script is any more. Link to comment Share on other sites More sharing options...
studeggle Posted July 16, 2008 Share Posted July 16, 2008 Here are the script files, all image files have been removed due to size. They can be obtained from the standalone version.LGSL SQL.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.