Random image in wordpress header

cookie

Joined: 2002-10-03
Posts: 14
Posted: Sat, 2008-11-01 03:30

I was looking at the wordpress theme: http://www.templatelite.com/photo-frame-free-wordpress-theme/ It has a cool image in the middle of the header that can be changed by dumping jpg's into a subfolder. I'd like to skip that and have the theme pull random images from the gallery.

This theme also uses GD Library to slightly rotate the image and resize if large. This is done in a php file separate from the traditional wordpress theme pages. I need to know the "call" for the theme to get a random jpg from gallery2 (hosted on same server, but different db), and then be able to do the gd library mumbo-jumbo (tilt, resize).

Thoughts?

 
dbarron

Joined: 2005-11-16
Posts: 3
Posted: Sun, 2008-11-23 18:28

Look at the vSlider theme, as it does this. Here's a link to the author's website: http://irui.ac/

 
cookie

Joined: 2002-10-03
Posts: 14
Posted: Sun, 2008-11-23 21:13

The wordpress vSlider theme doesn't call the gallery, it calls to an images folder inside the theme. I don't want to duplicate image files between the gallery and the wordpress header. I have managed to use this code:

<?php @readfile('http://examplewebsite.com/gallery2/main.php?g2_view=imageblock.External'); ?>

to put a image from the g2 into the wordpress header. It's not fancy or pretty, so the vSlider theme is intriguing to look at, but it's more of a tease.

It would be very cool to take the single image header from the vSlider theme, but make it pull random images from g2 to accomplish.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2008-11-23 21:44
 
dbarron

Joined: 2005-11-16
Posts: 3
Posted: Mon, 2008-11-24 14:45

Ah, I see what you're suggesting now. Yes, pulling a random G2 image would be very interesting. Although, I'm not sure most of my Gallery images would automatically scale/crop well to the wider header sizes.

 
cookie

Joined: 2002-10-03
Posts: 14
Posted: Tue, 2008-11-25 01:37

Mine either. I also don't have URL rewrite enabled on my G2 so many of the random jpeg scripts don't work. I think a theme that incorporates the random G2 image into a decorative page header would be cool. The photo-frame theme is cool looking, which is why I wanted to figure out how to put a random image from G2 in it.

If I actually knew some programing I'd probably have an easier time figuring this out...