PDA

View Full Version : random image in side column


ichange
01-29-2008, 07:59 PM
How could I add a random image to the side column of www.raidarena.com any help would be greatly appreciated thank you.

Morgan
01-29-2008, 08:36 PM
Check the main readme file for how to add thumbnails to forum home. You can add the thumbnails wherever you want on the page, but after $navbar is a good spot. If you want a different number of thumbnails, you would need to change the LIMIT of the query located in the PhotoPlog Forum Home Thumbs plugin.

ichange
01-29-2008, 08:54 PM
so if you wanted it in a side column you would have to add $photoplog_forumhome to your side column code and change the query to 1 for it to work right huh?

Morgan
01-29-2008, 09:01 PM
Yes, change the query to 1 but as to your side column code, you will need to try it, as I don't know the content of that code and have no time to review it for you.

ichange
01-29-2008, 09:17 PM
I think I have it figured out I found a PhotoPlog 1337 Thumbs addon that I can use I played with the code to change the image size show and I can put it in the side column and it works but hmm what do I change in this code to make it only show 1 random.

FROM photoplog_fileuploads
WHERE moderate = 0
ORDER BY RAND()
LIMIT 20 change to 1 correct?

Content visible to registered users only.

Morgan
01-29-2008, 10:59 PM
Yes, try it, that change won't break anything. ;)

ArnyVee
06-08-2009, 01:08 AM
I was about to start a thread about this, but figured I should try 'search' first ;)

I've tried to have one random picture appear in my side column, but it hasn't worked. I went into the PhotoPlog Forum Home Thumbs plugin and changed the number from 5 to 1 (I'm assuming that's right) and then added my code to the side column using $photoplog_forumhome.

But, to no avail.

Any other suggestions or tips on how to get this to work properly without adding another hack/mod to my site?

Morgan
06-09-2009, 05:41 PM
Your sidebar probably gets set before the PhotoPlog variable so nothing would show. Check these (http://www.photoplog.com/forum/search.php?do=process&query=global_start) threads for how to make use of the global_start hook.