• Random Games on Index
  • Uploader:leefish
#1
As requested, by davidedison a Random Games Plugin for MYBB. Tested and working on a mybb 1.6.4 install.

What does it do? It gets a number of random games and displays them on the index/portal/area of your choice.


WARNING: This query uses order by RAND() and is NOT cached. If you have memcache installed and working on your server then I can also add a cached version on request.

Order by RAND is not advisable where you have a large table to query - if you have less than 100 games on your board then this should be fine, otherwise I do NOT advise using this plugin.

Screenshots
Random Games on Index Screenshot Random Games on Index Screenshot Random Games on Index Screenshot
Download link
Filesize 2.35 KB | File Name Random Games by LeeFish.rar | # of Downloads 159  
Comments
#2 13-11-2011 
leefish;9514 Wrote:WARNING: This query uses order by RAND() and is NOT cached. If you have memcache installed and working on your server then I can also add a cached version on request.

I dont know anything about php. So I couldnt understand this sentence. But one thing that I know is that this plugin is awesome and it works well. Thankyou very much for this plugin! Big Grin
davidedison, proud to be a member of LeeFish since Nov 2011.

#3 13-11-2011 
well, everytime you reload the page then the database is queried. That is not very efficient and puts extra load on your board. I have a "random download" on the front page of leefish, but it is cached to change every 5-10 minutes.
The site don't jive? PRESS F5 Flower

#4 20-09-2012 
Hi.
How can I use this in my sideboxs on index, I'm using Nayars sidebox. Also will this even work on a massive gamesetion?

Thanks lee

#5 20-09-2012 
I don't think it will work with the sideboxes, this is because they are just an echo of the portal boxes with some space for HTML. You could try putting the variable in one of the portal boxes, like inside the search template or something like that.

It is the order by RAND that does it Ted - over 100 games and it will hammer your DB and slow your board.
The site don't jive? PRESS F5 Flower

#6 20-09-2012 
Hmm I tried to use portal and it did not work. Guess with 4000 + games my board be really slow lol. Thanks though I'll see if I can come up with an alternative.
Ted B, proud to be a member of LeeFish since Jun 2012.

#7 20-09-2012 
well, what were you looking for? Some kind of game recommendation? Top rated is good for that or most played.

I will see if i can find a way round that rand thing.
The site don't jive? PRESS F5 Flower

#8 21-09-2012 
What I'm lookin for is something to showcase the game section on my index for downloading games. I have in my sidebox now is a top 10 popular game list witch is nice and all, but it gets old with the same games displayed, and there's way to many games to keep manually updating it.
Ted B, proud to be a member of LeeFish since Jun 2012.

#9 26-09-2012 
Well, I have a fix on this - it DOES add an extra query, though we could avoid that if the number of games on the board is static, that is you don't often add a new game.

The other thing - is it will not be truly random. It will get a block of games from a random start point, so if the first game chosen is Game id 14, then the other games will be sequential, that is, games 14,15,16, 17 18.

BUT - it is quite fast.

Attached File(s) Thumbnail(s)
   

#10 03-10-2012 
Fantastic lee, now since I'm constantly adding games it might run a little slower, that's ok I guess.
Thank You

Also congratulations on your well deserved promotion.

Let me know when this is ready.


Sorry, that is a members only option