POT
POT
POT
Main menu

Download

Forum

SVN

Prev Next

POT

This is documenation of POT - official toolkit for OTServ AAC scripts.

Table of Contents

PHP OTServ Toolkit

There are several reasons why POT was created:

  • Just because it was needed - OTServ should have had that long time ago.
  • To unify AAC scripts - there are tons of them, and you never know how to write even a single line of code to them as each of them are created different way.
  • To provide reliable way of database accessing - most of people who create AAC scripts don't know what PHP realy is, how to use it, they just "want to make own AAC script".
  • To provide easy interface - people who write in PHP want to write in PHP, not using SQL, XML and many other languages. POT provides abstract PHP interface for data stored in database.

POT is always kept up-to-date for latest SVN release, it will work best with pure SVN servers. However it provides routines to access custom database structure elements. Thought it won't work with broken database - it ralies on database foreign key contraints, triggers etc.

System requirements

To use POT you need PHP version at least 5.0 with PDO extension installed (so it means you will mostly need PHP 5.1, but it is possible to download PDO as external libraries for PHP 5.0.x).

DOM XML

POT uses DOM PHP extension which is available in core PHP5. However some people still have enabled outdated DOMXML extension which was created for PHP4, but is still possible to compile it for PHP5. If you use any code that uses PHP DOM extension (which POT does) make sure you have DOMXML extension disabled in your php.ini file.



What POT is

POT is a toolkit/library for developing PHP scripts that work with OTServ resources like it's database, content, or more exotic tools like OTAdmin protocol. It provides objective enviroment to work with them.


What POT is not

  • It is not AAC script - this is a toolkit for making them, but you can't directly run it as website. It has only programming interface.
  • It is not application/system framework - you won't create website with only POT. POT has only functionality connected with OTServ database, it doesn't contain for example templates engine. You also won't be able to use it as an ordinary database connection engine - it makes use of PDO so you can use PDO by itself, POT doesnt provide any additional universal functionality. All it's classes are strictly connected with OTServ database.

How to use

This is toolkit - set of classes/methods for OTServ resources. It abstracts database mechanisms for you so you can work on "physical" PHP objects. But you must know how to use them. This documentation describes some basic steps and toolkit API, but you must know PHP in order to make use of them - the best place to get some knowledge is PHP manual.

Don't just copy-paste any of provided examples - they probably won't work for you. Mainly it's because you have to put your database configuration into them and your script paths. But it's not enought. If you have your own __autoload() mechanism you won't be able to just inlude example codes - you would need to redefine __autoload() function, which PHP doesnt allow to (but you should know that very well). Example codes are examples - write your own (if you want them to work the best way for you).

Link

If you use POT in your script and want to show that you can put this image on your website:

You can use following code for that:

  1. <a href="http://otserv-aac.info/">
  2.     <img alt="This site was smoked" src="http://otserv-aac.info/pot.png"/>
  3. </a>
Prev   Next
Basics