Posts: 683
Joined: Dec 2009
Reputation: 0 Points: 1096
How to feed games from GamesFeed into WordPress
Below are the steps involved to feed games from GamesFeed into your WordPress.
1) Login TalkArcade
2) Go to GameFeed (http://www.talkarcades.com/gamefeed.php)
3) Click on Create Your Autopublisher
4) Fill in your Web URL (eg. http://www.arcadebb.com/)
5) Select your server PHP version. (PHP 4 or PHP 5)
6) For Script Type, Select any script if WordPress is still not there.
7) Download the autopublisher script and skip step 8 if Autopublisher for WordPress is available.
8) Open and Edit the file as follows:
Find:
Quote:include "inc/main-func.php";
include "admin/config.php";
$sql = "update ".$table_prefix."posts set guid = '$guid' where id = $last_id";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'_edit_lock',$time)";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'_edit_last',1)";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_formatnumber',$feed[formatNumber])";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_gamefile','$feed[gamefile]')";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_new_image_1','$new_image_1')";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_new_image_2','$new_image_2')";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_width',$feed[width])";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_height',$feed[height])";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_controlssentence','$feed[controlsSentence]')";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_description','$feed[description]')";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_categoryid',$feed[categoryid])";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_mochi_uuid','$feed[mochi_uuid]')";
$result = mysql_query($sql) or die(mysql_error());
$sql = "insert into ".$table_prefix."postmeta (post_id,meta_key,meta_value) values($last_id,'gf_taglistcsv','$feed[taglistCSV]')";
$result = mysql_query($sql) or die(mysql_error());
$sql = "update ".$table_prefix."term_taxonomy set count = count+1 where term_id = ".$feed['categoryid'];
$result = mysql_query($sql) or die(mysql_error());
$sql = "select * from ".$table_prefix."term_taxonomy where term_id = ".$feed['categoryid'];
$result = mysql_query($sql) or die(mysql_error());
$row_taxonomy = mysql_fetch_array($result);
$sql = "insert into ".$table_prefix."term_relationships(object_id,term_taxonomy_id) values($last_id,'$row_taxonomy[term_taxonomy_id]')";
$result = mysql_query($sql) or die(mysql_error());
$taglistexplode = explode(', ',$feed[taglistCSV]);
for($x=0;$x<count($taglistexplode);$x++){
$taglistCSV=$taglistexplode[$x];
$sql = "select * from ".$table_prefix."terms where slug='$taglistCSV'";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
if(!mysql_num_rows($result)){
$sql = "insert into ".$table_prefix."terms (name,slug) values ('$taglistCSV','$taglistCSV')";
$result = mysql_query($sql) or die(mysql_error());
$last_term_id = mysql_insert_id();
$sql = "insert into ".$table_prefix."term_taxonomy(term_id,taxonomy,count) values ($last_term_id,'post_tag',1)";
$result = mysql_query($sql) or die(mysql_error());
$last_taxonomy_id = mysql_insert_id();
$sql = "insert into ".$table_prefix."term_relationships(object_id,term_taxonomy_id) values($last_id,'$last_taxonomy_id')";
$result = mysql_query($sql) or die(mysql_error());
}
else{
$sql = "update ".$table_prefix."term_taxonomy set count = count+1 where term_id = ".$row[term_id];
$result = mysql_query($sql) or die(mysql_error());
$sql = "select * from ".$table_prefix."term_taxonomy where term_id = ".$row[term_id];
$result = mysql_query($sql) or die(mysql_error());
$row_taxonomy = mysql_fetch_array($result);
$sql = "insert into ".$table_prefix."term_relationships(object_id,term_taxonomy_id) values($last_id,'$row_taxonomy[term_taxonomy_id]')";
$result = mysql_query($sql);
}
}
// WordPress Mod 5 End
9. Upload the file into your root folder.
10. Create 2 folders under wp-content
a) gamesfeed/images
b) gamesfeed/games
11. Chmod images and games folder above with "777"
12. Verify the autopublisher installation.
13. Once verified, click on "category maps".
14. Create all the categories required. (Replace uncategoried with any category)
15. Go to FeedBot or http://www.talkarcades.com/gamefeed.php?tab=feedbot
16. Click on the "Create a new FeedBot" button.
17. Select your domain and click on "Next Schedule this FeedBot" button.
18. Check on the required boxes and click on "Activate FeedBot".
That's it. Just sit down and wait for the first 10 games to feed into your WordPress.
You can then create your own WordPress theme using custom field to display the images and the games.
RE: How to feed games from GamesFeed into WordPress
Any idea how one might get this edited for a 'MyArcadePlugin' setup? Still trying to get a handle on the whole wordpress environment in general, but Gamefeed isn't putting some vars in the 'right' place regarding the swf and image files (They get downloaded where they are supposed to be however)
As soon as I get this part figured out, then I'll tackle your trade plugin (already installed)