ramone_kalsaw Posted May 17, 2005 Share Posted May 17, 2005 Hello, I'm trying to install a random image rotation script. In the instructions it says: 1. Upload this file (rotate.php) to your webserver ... 2. Link to the file as you would any normal image file, like this: <img src="http://example.com/rotate.php"> I'm using the path: <img src="http://www.biom.net/public_html/images/uploads/rotate.php"> but it's not working. Any suggestions? Thanks! Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted May 17, 2005 Share Posted May 17, 2005 Changing the link to this should solve the issue. ><img src="/images/uploads/rotate.php"> Don't use the http:// Quote Link to comment Share on other sites More sharing options...
MikeJ Posted May 17, 2005 Share Posted May 17, 2005 I'm using the path: <img src="http://www.biom.net/public_html/images/uploads/rotate.php"> but it's not working. <{POST_SNAPBACK}> You'll need to change that to either (as Bruce is suggesting): ><img src="/images/uploads/rotate.php"> Or (if you require the link to be absolute): ><img src="http://www.biom.net/images/uploads/rotate.php"> This assumes the script is located in your account under public_html/images/uploads/ directory. Quote Link to comment Share on other sites More sharing options...
ramone_kalsaw Posted May 17, 2005 Author Share Posted May 17, 2005 I'm using the path: <img src="http://www.biom.net/public_html/images/uploads/rotate.php"> but it's not working. <{POST_SNAPBACK}> You'll need to change that to either (as Bruce is suggesting): ><img src="/images/uploads/rotate.php"> Or (if you require the link to be absolute): ><img src="http://www.biom.net/images/uploads/rotate.php"> This assumes the script is located in your account under public_html/images/uploads/ directory. <{POST_SNAPBACK}> Thanks for the clarification ... but I'm still not there yet. I'm getting the x'ed out graphic placeholder on my page, but not the random graphic the script is designed to pull up. Based on the the configuration instructions, included below, do I need to point it to my "uploads" folder, since that will be the folder containing the pictures that will be rotating? And if so, to make it conform to proper pathway $folder = '/user/me/www.biom.net/images/uploads/'; What would I put in for the '/user/me/... part? Thanks! /* ------------------------- CONFIGURATION ----------------------- Set $folder to the full path to the location of your images. For example: $folder = '/user/me/example.com/images/'; If the rotate.php file will be in the same folder as your images then you should leave it set to $folder = '.'; */ $folder = '.'; /* */ Quote Link to comment Share on other sites More sharing options...
marie b. Posted May 17, 2005 Share Posted May 17, 2005 your(TCHassigned)username*/public_html/images/uploads/ *What you use to log into your Cpanel with. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted May 17, 2005 Share Posted May 17, 2005 Based on the the configuration instructions, included below, do I need to point it to my "uploads" folder, since that will be the folder containing the pictures that will be rotating? And if so, to make it conform to proper pathway $folder = '/user/me/www.biom.net/images/uploads/'; What would I put in for the '/user/me/... part? You would change it like this. >$folder = '/home/your-cpanel-login-name/public_html/images/uploads/'; Quote Link to comment Share on other sites More sharing options...
marie b. Posted May 17, 2005 Share Posted May 17, 2005 Oops, forgot the "home" folder in my reply. Quote Link to comment Share on other sites More sharing options...
ramone_kalsaw Posted May 17, 2005 Author Share Posted May 17, 2005 Based on the the configuration instructions, included below, do I need to point it to my "uploads" folder, since that will be the folder containing the pictures that will be rotating? And if so, to make it conform to proper pathway $folder = '/user/me/www.biom.net/images/uploads/'; What would I put in for the '/user/me/... part? You would change it like this. >$folder = '/home/your-cpanel-login-name/public_html/images/uploads/'; <{POST_SNAPBACK}> Still trying to make this work The objective: to get the right variation of this link on my index page: <img src="/images/uploads/rotate.php"> <br> <img src="http://www.biom.net/images/uploads/rotate.php"> <br> <img src="/home/mikey/public_html/images/uploads/"> to pull and show a random image from my .../image/uploads/ folder which I pointed to in my "rotate.php" configuration file with the path name: $folder = '/home/my-cpanel-login-name/public_html/images/uploads/'; (I included my actual cpanel name in the config file version.) But all I'm getting is the 'x-placeholder' on my index page where the random image should be. Can you see what I'm doing wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
marie b. Posted May 17, 2005 Share Posted May 17, 2005 (edited) I used this script before -- ages ago -- and there's no need to modify $folder if the rotate.php is in the same folder as your images (which it is, from what I can see). Maybe that's the issue. ** I went to images/uploads/rotate.php, and there is no rotate.php file. There is, however, a rotator.php (which is working perfectly). Try either renaming the file or using images/uploads/rotator.php. Edited May 17, 2005 by marie b. Quote Link to comment Share on other sites More sharing options...
ramone_kalsaw Posted May 17, 2005 Author Share Posted May 17, 2005 I used this script before -- ages ago -- and there's no need to modify $folder if the rotate.php is in the same folder as your images (which it is, from what I can see). Maybe that's the issue. ** I went to images/uploads/rotate.php, and there is no rotate.php file. There is, however, a rotator.php (which is working perfectly). Try either renaming the file or using images/uploads/rotator.php. <{POST_SNAPBACK}> Thanks for the sharp eye, Marie. It was the renaming of "rotate" to "rotator" that did it And since you're familiar with this script, maybe you can help me refine my implementation of it a bit. You see, it's working too well now. The photoblog I'm using "rotator" in has a thumbnail, medium, and full size version of each photoentry, and they're all stored in my "uploads" folder, which rotator is pulling from. Can you make a suggestion as to how I can make rotator only display the thumbnail version? Thanks, again! And thanks to all! Quote Link to comment Share on other sites More sharing options...
marie b. Posted May 17, 2005 Share Posted May 17, 2005 (edited) 1. All I could suggest would be to either move the thumbnails and rotate.php to their own folder. or 2. If someone here knows PHP intricately, they might be able to tell you how to modify the script so that it only pulls images with certain characters in the filename (for instance, most automatic thumbnail generators add " _tn" before the suffix, but I don't know if this is the case here or not). I'd, personally, go with the first option. Oh, and you're welcome. Surprised no-one thought to do that before now, really. Edited May 17, 2005 by marie b. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted May 17, 2005 Share Posted May 17, 2005 Glad you got it sorted out. Thanks marie b. Quote Link to comment Share on other sites More sharing options...
futurevj Posted March 8, 2013 Share Posted March 8, 2013 i am trying to change the image after couple of seconds automatically not on reloading. please help me.... Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted March 8, 2013 Share Posted March 8, 2013 You could do a Google search for javascript image rotation or have a look at a script here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.