Sunday, February 05, 2012
This Article shows how to use the Auto-Publishing service from Mochimedia to Joomla. It is designed to browse games on Mochimedia and press the "auto-publish" button from the Mochimedia Website.
To prevent confusion: This article shows how to use the optional "auto-publish"-feature. You do not have to do this. It is a feature designed to get games from mochi, when you are on the mochi-website!
So let's get started
Setup & Configure
Before you can use the feature you have to enable it. Do so, by getting in your Joomla Administrator Panel and go to Mochigames->Settings. In there enter a secret word. For now, the secret word can be whatever you want, just make sure it is a word containing letters and numbers and underscores only (no spaces, no colons etc.). Then enable the autopost feature by clicking it 'on'. Save your settings and switch over to Mochimedia.

Once you logged in with your username and password on mochimedia.com go to your publisher tab and select Settings (https://www.mochimedia.com/pub/settings). Scroll down to the end and find the Auto Post Settings. As method choose 'custom made script'. The autopost URL is
http://"your_domain"/administrator/components/com_yoflash/autopost/autopost.php?sid=secret_word
Make sure you put your secret word behind the "sid=" tag.

Get some games
After pressing the save-button, everything should be configured now. If you want to test the functionality, go to mochimedia->Games and find a game that you like from the catalog. (https://www.mochimedia.com/pub/catalog). Once you are satisified with a game, click on the 'Post game to site' button. This establishes a connection to your server telliing it to get the game, read-out the information and store it in the database.

Mochis site will confirm that with a note: "Success - you should know see the game on your page". However, Mochi only checks, if the autopost.php file was reachable. So in any case it didn't worked out, you will still see the confirmation. If you don't see the game on your site, make sure the autopost-feature is on and that you entered the correct URL in the mochi-settings. Otherwise the script will just die silently. If everything worked correctly, the game will be online in real-time on your site.