WordPress MochiAds plugin beta released

Finally I found some time to fix the WordPress MochiAds plugin and make a working beta.

Please notice it’s just a working beta, install it on your own risk on an empty blog.

There are some interesting features already developed, and a million more features to do.

Also, I am releasing the plugin, not the theme, because I am not satisfied with it. The plugin will only create the posts from MochiAds feed, then it’s up to you to display them properly.

All in all, on triqui.com is working fine and is compatible with WordPress 2.7.

As said, there is an enormous list of features to add to the plugin. If you want to contribute it, your name and site will get credited in the plugin.

System requirements

You need a server able to host WordPress with PHP 5.2.0 and a decent amount of memory. I am running my plugin on HostGator and it’s working fine.

How to install

Download the plugin, unzip it and copy the content into your wp-content/plugins directory… line all other plugins. Then activate it, like all other plugins…

You will find a new item in the Dashboard called MochiAds.

Click it and you will open a menu. Let’s see how does it work.

MochiAds page

This is the main page… only saying it’s a beta and inviting to visit the blog for more information or contributions.

To do: turn this page into a small dashboard with options and statistics. Also, a little help about how to use the plugin should be written, eventually in more than one language. An installation wizard would be appreciated.

Mochi Table page

(a picture would be useless…)

This page creates the table that will store all your games data. Without such table, the plugin won’t be able to create the posts, so this is the next page you need to visit.

It creates a table called with your WP prefix (usually wp_) followed by mochi, so usually this table is called wp_mochi. I will refer to this table with its default name from now on.

You can call this page everytime you want without getting mysql erros if the table already exists.

To do: displaying more information about the table, such as size, number of lines (games) and an option to reset it.

Categories page

Now you should click on this page to create the categories. I included all MochiAds categories plus the “High Scores” one, where to list all games with high scores. Again, you can access to this page anytime you want without getting any error for duplicate categories.

To do: giving the ability to create only some categories by selecting them. At the moment, the script creates all categories. Creation of a “featured” category to show the so-called “frontpage games”

Feed Games page

This page will look for the last 100 games added in the Mochi feed and add them to the wp_mochi table if the aren’t already there. Then displays the games just added.

To do: First, the user has to be able to select how many games he wants to look for. I set the limit to 100 to avoid any memory issue, anyway during my tests I was able to feed 4,500 games with no errors. Also, having a limit will make you lose the first released games. It would be nice to parse the feed in different ways other than simply retrieving the last n games. The feed should be automatic at a specific hour of the day.

Add games to blog page

This page will look for games in the wp_mochi table that aren’t published on the blog and publish them. To give the most freedom to custom results in the preferred theme, all game attributes such as width, height, description and so on are saved in a custom field.

To do: The user should be able to select what game he wants to post on the blog. At the moment the plugin posts all games.

And that’s all. I hope some WP gurus can help me to improve the plugin.

If you have any question about the plugin or how does it work, post it as a comment and I’ll reply at once.

And don’t forget to visit triqui.com to see it in action!

Get the most popular Phaser 3 book

Through 202 pages, 32 source code examples and an Android Studio project you will learn how to build cross platform HTML5 games and create a complete game along the way.

Get the book

214 GAME PROTOTYPES EXPLAINED WITH SOURCE CODE
// 1+2=3
// 100 rounds
// 10000000
// 2 Cars
// 2048
// A Blocky Christmas
// A Jumping Block
// A Life of Logic
// Angry Birds
// Angry Birds Space
// Artillery
// Astro-PANIC!
// Avoider
// Back to Square One
// Ball Game
// Ball vs Ball
// Ball: Revamped
// Balloon Invasion
// BallPusher
// Ballz
// Bar Balance
// Bejeweled
// Biggification
// Block it
// Blockage
// Bloons
// Boids
// Bombuzal
// Boom Dots
// Bouncing Ball
// Bouncing Ball 2
// Bouncy Light
// BoxHead
// Breakout
// Bricks
// Bubble Chaos
// Bubbles 2
// Card Game
// Castle Ramble
// Chronotron
// Circle Chain
// Circle Path
// Circle Race
// Circular endless runner
// Cirplosion
// CLOCKS - The Game
// Color Hit
// Color Jump
// ColorFill
// Columns
// Concentration
// Crossy Road
// Crush the Castle
// Cube Jump
// CubesOut
// Dash N Blast
// Dashy Panda
// Deflection
// Diamond Digger Saga
// Don't touch the spikes
// Dots
// Down The Mountain
// Drag and Match
// Draw Game
// Drop Wizard
// DROP'd
// Dudeski
// Dungeon Raid
// Educational Game
// Elasticity
// Endless Runner
// Erase Box
// Eskiv
// Farm Heroes Saga
// Filler
// Flappy Bird
// Fling
// Flipping Legend
// Floaty Light
// Fuse Ballz
// GearTaker
// Gem Sweeper
// Globe
// Goat Rider
// Gold Miner
// Grindstone
// GuessNext
// Helicopter
// Hero Emblems
// Hero Slide
// Hexagonal Tiles
// HookPod
// Hop Hop Hop Underwater
// Horizontal Endless Runner
// Hundreds
// Hungry Hero
// Hurry it's Christmas
// InkTd
// Iromeku
// Jet Set Willy
// Jigsaw Game
// Knife Hit
// Knightfall
// Legends of Runeterra
// Lep's World
// Line Rider
// Lumines
// Magick
// MagOrMin
// Mass Attack
// Math Game
// Maze
// Meeblings
// Memdot
// Metro Siberia Underground
// Mike Dangers
// Mikey Hooks
// Nano War
// Nodes
// o:anquan
// One Button Game
// One Tap RPG
// Ononmin
// Pacco
// Perfect Square!
// Perfectionism
// Phyballs
// Pixel Purge
// PixelField
// Planet Revenge
// Plants Vs Zombies
// Platform
// Platform game
// Plus+Plus
// Pocket Snap
// Poker
// Pool
// Pop the Lock
// Pop to Save
// Poux
// Pudi
// Pumpkin Story
// Puppet Bird
// Pyramids of Ra
// qomp
// Quick Switch
// Racing
// Radical
// Rebuild Chile
// Renju
// Rise Above
// Risky Road
// Roguelike
// Roly Poly
// Run Around
// Rush Hour
// SameGame
// SamePhysics
// Save the Totem
// Security
// Serious Scramblers
// Shrink it
// Sling
// Slingy
// Snowflakes
// Sokoban
// Space Checkers
// Space is Key
// Spellfall
// Spinny Gun
// Splitter
// Spring Ninja
// Sproing
// Stabilize!
// Stack
// Stick Hero
// String Avoider
// Stringy
// Sudoku
// Super Mario Bros
// Surfingers
// Survival Horror
// Talesworth Adventure
// Tetris
// The Impossible Line
// The Moops - Combos of Joy
// The Next Arrow
// Threes
// Tic Tac Toe
// Timberman
// Tiny Wings
// Tipsy Tower
// Toony
// Totem Destroyer
// Tower Defense
// Trick Shot
// Tunnelball
// Turn
// Turnellio
// TwinSpin
// vvvvvv
// Warp Shift
// Way of an Idea
// Whack a Creep
// Wheel of Fortune
// Where's my Water
// Wish Upon a Star
// Word Game
// Wordle
// Worms
// Yanga
// Yeah Bunny
// Zhed
// zNumbers