I'm been trying to learn php and make something useful and this is what I've come up with so far.
These scripts will import (2 fields of) a database into YACG. I know this is really really basic stuff but hopefully they might be of use to anyone else new to this, the basics of them can be used to pull content from a db to put anywhere.
Here's step by step instructions:
1. Get YACG, fill in the config.inc.php file, ftp to your server and chmod (see http://getyacg.com/support), delete the existing keywords from keywords.txt
2. Import you chosen database. Choose wisely as this amazing script only allows you to have one field as the title/keyword and another as the content!
3. Complete dbconfig.php - usual database details plus table name and the names of the fields for the title/keyword and content.
4. ftp the dbconfig.php and keywords.php files to the same directory as YACG and the content.php to your hooks folder.
5. Insert <?php content(THIS_PAGE_KEYWORD) ?> into the page.php file in the template folder. (e.g. replace the Wikipedia hook)
6. Run keywords.php (e.g. yourdomain .com/yacg/keywords.php). This should build the keywords.txt file from the title field.
7. Check out your new site! The content will be pulled when each page is requested and cached in YACG
8. Join me in learning more about what YACG can do! Read the forums etc.. It is very strongly recommended that you change the template and remove footprints - there's loads of info on this on the YACG forums (including some great advice from Guerilla - cheers!)
Or... wait a few days and I might finally figure out how to get the RSS feed working with this content then that can be imported into Wordpress (or whatever you like). I'm planning on just using YACG to process the data and produce a feed from various hooks then import it into the more Google friendly WP and create sites in a pale shade of blue.
I'm nearly there on an alternative script which puts the content into text files to be used by the Markov hook in YACG and I'm also trying to sort out an easy way to use more db fields (e.g. title = hotel name + city, content = address + review + ...). Then it's on to using multiple databases..
Though that doesn't seem to be much harder than using one db really.
Please tear this apart guys! Let me know where I've done things in a long-winded way or whatever!
Probs I'm aware of:
It strips extra characters from the keywords to make the list YACG compatible, this results in some keywords that don't match the db content and so it doesn't pull any results - think this should be easy to do some sort of best match thing.
The formatting can go a bit off - seems to lose line breaks sometimes (and puts too much whitespace in text files).
Here's a couple of examples I did:
MNAV (test site) - Celebrity Biographies
Generic Drug Information
(Just tests, so I'm not concerned about the template etc)
I know it's nothing special - but I'm amazed I managed to do this!
Thanks to Busin3ss for YACG and to the great tutorials at Tizag and phpvideotutorials (def recommeded - that guy is funny as fuck.. chicken titty anyone!) Thanks to Eli for providing so many databases and giving me the motivation to learn this shit!
The way I'm heading with this the keywords file will also create the articles text files (I'll find out how to put an option in to turn that off as well).
So each time it appends a keyword to the keywords.txt it will also create the relevant article file, using the data that matches the original keyword/title, but saving it as a cleaned YACG-compatible name (to match the keywords file).
Does that sound like the logical way to do it?? (To anyone who knows what I'm talking about?!)
These scripts will import (2 fields of) a database into YACG. I know this is really really basic stuff but hopefully they might be of use to anyone else new to this, the basics of them can be used to pull content from a db to put anywhere.
Here's step by step instructions:
1. Get YACG, fill in the config.inc.php file, ftp to your server and chmod (see http://getyacg.com/support), delete the existing keywords from keywords.txt
2. Import you chosen database. Choose wisely as this amazing script only allows you to have one field as the title/keyword and another as the content!
3. Complete dbconfig.php - usual database details plus table name and the names of the fields for the title/keyword and content.
4. ftp the dbconfig.php and keywords.php files to the same directory as YACG and the content.php to your hooks folder.
5. Insert <?php content(THIS_PAGE_KEYWORD) ?> into the page.php file in the template folder. (e.g. replace the Wikipedia hook)
6. Run keywords.php (e.g. yourdomain .com/yacg/keywords.php). This should build the keywords.txt file from the title field.
7. Check out your new site! The content will be pulled when each page is requested and cached in YACG
8. Join me in learning more about what YACG can do! Read the forums etc.. It is very strongly recommended that you change the template and remove footprints - there's loads of info on this on the YACG forums (including some great advice from Guerilla - cheers!)
Or... wait a few days and I might finally figure out how to get the RSS feed working with this content then that can be imported into Wordpress (or whatever you like). I'm planning on just using YACG to process the data and produce a feed from various hooks then import it into the more Google friendly WP and create sites in a pale shade of blue.

I'm nearly there on an alternative script which puts the content into text files to be used by the Markov hook in YACG and I'm also trying to sort out an easy way to use more db fields (e.g. title = hotel name + city, content = address + review + ...). Then it's on to using multiple databases..

Please tear this apart guys! Let me know where I've done things in a long-winded way or whatever!
Probs I'm aware of:
It strips extra characters from the keywords to make the list YACG compatible, this results in some keywords that don't match the db content and so it doesn't pull any results - think this should be easy to do some sort of best match thing.
The formatting can go a bit off - seems to lose line breaks sometimes (and puts too much whitespace in text files).
Here's a couple of examples I did:
MNAV (test site) - Celebrity Biographies
Generic Drug Information
(Just tests, so I'm not concerned about the template etc)
I know it's nothing special - but I'm amazed I managed to do this!
Thanks to Busin3ss for YACG and to the great tutorials at Tizag and phpvideotutorials (def recommeded - that guy is funny as fuck.. chicken titty anyone!) Thanks to Eli for providing so many databases and giving me the motivation to learn this shit!
The way I'm heading with this the keywords file will also create the articles text files (I'll find out how to put an option in to turn that off as well).
So each time it appends a keyword to the keywords.txt it will also create the relevant article file, using the data that matches the original keyword/title, but saving it as a cleaned YACG-compatible name (to match the keywords file).
Does that sound like the logical way to do it?? (To anyone who knows what I'm talking about?!)