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.
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.
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!
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
#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.
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
#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.
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.