Arcade Webmaster Forum - Arcade Webmasters Talk Arcades at ArcadeBB
Current time: 05-19-2012, 05:46 AM



okHow to feed games from GamesFeed into WordPress
Post Reply 
Arcade Webmaster Forum - Arcade Webmasters Talk Arcades at ArcadeBB ok Arcade Forum ok Arcade Scripts and Software ok WordPress Arcade v
1
2 3 Next »
araclar
How to feed games from GamesFeed into WordPress
Threaded Mode
Linear Mode
 
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
12-10-2010, 04:57 PM (This post was last modified: 12-10-2010 06:21 PM by admin.)
Post: #1
admin Offline
Administrator
*******
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";



$gfconf['image_directory'] = "content/icons";
$gfconf['game_directory'] = "content/games";

Replace with:
Quote:// WordPress Mod 1 Begin
include "wp-config.php";

$gfconf['image_directory'] = "wp-content/gamesfeed/images";
$gfconf['game_directory'] = "wp-content/gamesfeed/games";
// WordPress Mod 1 End

Find
Quote:// Database

Replace after the above and before the below:
Quote://_______________________________________________________________
//
$gfconf['script'] = basename(__FILE__);

With:
Quote:// WordPress Mod 2 Begin
$gfconf['category_tablename'] = $table_prefix."terms";
$gfconf['category_id_fieldname'] = "term_id";
$gfconf['category_name_fieldname'] = "name";
$gfconf['category_status_fieldname'] = "";
$gfconf['game_tablename'] = $table_prefix."posts";
$gfconf['game_plays_fieldname'] = "";
$gfconf['game_name_fieldname'] = "post_title";
// WordPress Mod 2 End

Find:
Quote:function pullgame($gameid, $apcid, $remote_debug)
{
global $gfconf;

Replace with:
Quote:function pullgame($gameid, $apcid, $remote_debug)
{
// WordPress Mod 4 Begin
global $gfconf,$table_prefix;
// WordPress Mod 3 End

Find:
Quote: // Insert the db record, can be customized as needed... [CUSTOM]

Replace after the above and before the below:
Quote: $sql = "INSERT INTO ".$gfconf[game_tablename]." (";

With:
Quote:// WordPress Mod 2 Begin
$date = date("Y-m-d H:iConfused");
$field['post_author'] = '1';
$field['post_date'] = $date;
$field['post_date_gmt'] = $date;
$field['post_content'] = $feed['description'];
$field['post_title'] = $feed['title'];
$field['post_status'] = 'publish';
$field['post_name'] = $feed['slug'];
$field['post_modified'] = $date;
$field['post_modified_gmt'] = $date;
// WordPress Mod 4 End

Find:
Quote: if ($debug) echo "<br />did sql<br />";

Add after the above and before the below:
Quote: return "clear";

With:
Quote:// WordPress Mod 5 Begin
$fullpath = 'http://'.$HTTP_SERVER_VARS[HTTP_HOST].$HTTP_SERVER_VARS[REQUEST_URI];
$thisfile = basename($fullpath);
$cutoffpos = strpos($fullpath,$thisfile);
$thisdir = substr($fullpath, 0, $cutoffpos);
$last_id = mysql_insert_id();
$guid = $thisdir."?p=".$last_id;
$time = time();

$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.

Alternatively, you can download a free copy of ArcadeBB Theme V4 (to be released before 24th Dec 2010).
Demo :
http://addictinggames88.com
http://playgames88.com

iBannerX.com
Arcade Banner Click Exchange
Sign up now and get 80,000 free credits!!!
http://ibannerx.com
Visit this user's website Find all posts by this user
Quote this message in a reply
09-13-2011, 11:45 PM
Post: #2
ArcadeCreate Offline
Junior Member
**
Posts: 1
Joined: Jan 2011
Reputation: 0
Points: 2
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)
Find all posts by this user
Quote this message in a reply
 
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


Iphone Seri 4 Tasarımı blackinci Tarafından Yapılmıştır
Powered By MyBB, © 2002-2012 MyBB Group.