The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hey guys,
I have a bit of a dilema here.I am currently searching for a random image script that makes the image change each time the page is refreshed/reloaded.I found a few that work fine but thats were the problem comes in.I am attempting to use this to make two images on my forum banner change at the same time so they match each other on each refresh but i can not find a script thaat does this.Due to my limited knowledge of PHP and javascript i can not make my own so i was hoping someone may be able to help me. Im not sure exactly what info is needed so please let me know if you need anything and i will provide it.Thanks. |
#2
|
|||
|
|||
![]()
Hello, I have a random image in my website but it can work for background
here is the code: PHP Code:
background_1.jpg background_2.jpg change the 23 in rand(1,23); to wahtever max images you have. if you have 10, then chagne it to rand(1,10); then u just change the URL. |
#3
|
|||
|
|||
![]()
thanks lightwave,i will give it a try,do you know if this will work for two images?
![]() This image shows the part of my page with the images i want to change,so maybe that will help answer this question a bit better.The only problem is i dont need a random backround script.I more so want the images to change in a certain order each time the page is refreshed.for example first refresh would make the top image number 1 and bottom image number 1 show,then it would go to top image number 2,bottom image number 2,and so on. |
#4
|
|||
|
|||
![]()
What i would do in my case, is put all of the image files in an array
PHP Code:
PHP Code:
|
#5
|
|||
|
|||
![]()
would this work for backround images though?Sorry for the noob Q's i dont know very much PHP.
|
#6
|
|||
|
|||
![]()
yup, any images
![]() |
#7
|
|||
|
|||
![]()
Hey guys sorry for the long overdue bump of this topic.I remebered something after reading up a bit that i needed to check on reguarding the above php array idea.I recall reading somewhere on this forum that php scripts will not work inside of the vbulliten templates so doesnt this mean that the array would not work as i want to use it in my vB header tamplate?
|
#8
|
|||
|
|||
![]()
you have to call the template dont you?
PHP Code:
and in your template call $image HTML Code:
<body background-image="$image">
I think my html is wrong, but you get the idea |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|