PDA

View Full Version : How can I change an image based on newposts and activity?


Marzas
10-15-2012, 06:06 AM
Hi there,

I'm not a programmer but require some simple assistance. Based on vBulletin 4 obviously.

Can anyone provide me with a small piece of PHP to allow me to change an 'IMAGE.jpg' based on the amount of 'new posts' for that day? Ie. if new posts > 300 to Image1.jpg, if new posts > 1000 image2.jpg etc.

And similarly, using this to change Picture1 to Picture2 or Picture3 based on the amount of users that have visited the forum today. if > 100, >200, >300 etc.

Thank you for any assistance in advance.

kh99
10-17-2012, 10:59 AM
It's easy enough to have a series of "ifs" to set a file name, the bigger problem is having the number of posts or visits available. You'd have to query to get them, then you'd probably want to cache the value so you're not doing those queries every time someone visits the page.