Unzip the distribution file in your main PmWiki directory, not in the cookbook directory, unless you want to spend time moving things around. This should create a directory adit_admin in your main PmWiki directory, and in your cookbook directory the adit.php file and an adit directory should be created.
If the database you want to use already exists, You may have to comment out the create database line in setup.php. The syntax of the create table line for the adtype table may be wrong for your version of MySQL. Consult your local MySQL documentation. What worked for me was closing the parenthesis after int and substituting ENGINE = INNODB for TYPE = INNODB.
I'm still not getting it to work on the markup side, but I am getting the database to swallow ads.(20100717) ---LarsEighner
Okay I got it working. First off, in the file adit.php whete it says "this is a bit of a clumsy path," the following line is not merely clumsy, but wrong. The file globals.php is in the directory adit_admin. So for most people I think this line should be
I am unsure that this script will work without the GeoL.dat file referred to in the instructions. The instructions seem to imply it is optional. You want the binary version of this file. It comes gzipped (.gz file extension). Expanded this file is about 1M, but if you can't spare that, you probably shouldn't be running a wiki.
Most of the rest of the problems are not understanding what the author meant by his variables. When he writes $Title he does not necessarily mean the title of your page, but what ever you use for $Title must match what is called the keyword when you enter ads. When he writes $Group, he does not mean wiki group. He means geographical group. Plain text All seems to work if you are not using the geographical feature.
The admin tag (what you put in your page) is very fragile. The two parameters are separate by a comma, not a period. There are many implications to how you compose the variable the author calls $Title which afford much more flexibility than may be apparent at first, but this is not the place to expound on them. (20100717) ----Lars Eighner
If adit shows an error (at the top of the page) when you try to save an ad, indicating an MySql syntax error in the body of your ad code, but the ad code looks alright to you, you may have to add a line to insert.php (in adit_admin) to escape the ad code. This line should go immediately before the INSERT mysgl_query that inserts $adcode. I did this with the line
$eadcode=mysql_real_escape_string($adcode); then change $adcode in the following line (the INSERT statement) to $eadcode. In various combinations of PHP and Mysql versions, this fix may vary. This problem may not become evident until you have entered several ads successfully because some ads will not include characters that must be escaped. (20100718) ----Lars Eighner