The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Change header by refresh.

View previous topic View next topic Go down

Change header by refresh.

Post by allase on August 10th 2011, 8:44 pm

I dont know how it is called. But could you please help me and tell me if its possible each time someones refreshes the forum the header changes.

thank you

allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

Re: Change header by refresh.

Post by Mike on August 11th 2011, 12:03 am

It's a javascript code and it'll only be possible if you're using PHPBB2 or PunBB

Mike
Hyperactive

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Re: Change header by refresh.

Post by allase on August 11th 2011, 12:29 am

ohh thank you i was losing hope Smile
yes i am using PHPBB2
so is it easy for me that i obviously have no idea of it to do it? any helpful tutorials?

allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

Re: Change header by refresh.

Post by Mike on August 11th 2011, 12:35 am

Are you looking to change the whole header or just the logo?

Mike
Hyperactive

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Re: Change header by refresh.

Post by allase on August 11th 2011, 12:41 am

when you say logo you mean the banner at the header? thats what i want to change

here is my forum http://greekpop.asiat-world.com/

allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

Re: Change header by refresh.

Post by Mike on August 11th 2011, 12:49 am

Alright so basically:

ACP -> Display -> Templates -> General -> overall_header -> Find:

Code:
<!-- BEGIN switch_logo_center -->
                     <a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a>
                     <br />
                     <!-- END switch_logo_center -->

Replace with:

Code:
<script type="text/javascript">
//<![CDATA[

var images=new Array();
images[0]="image_1.jpg";
images[1]="image_2.jpg";
images[2]="image_3.jpg";
images[3]="image_4.jpg";
images[4]="image_5.jpg";
images[5]="image_6.jpg";

function randomImage() {
var i=Math.floor(Math.random()*images.length);
document.getElementById("random").src=images[i];

}
onload=randomImage;

//]]>
</script>

Note that this is center... So keep your logo position to center. Change your images where it says:

Code:
images[0]="image_1.jpg";

Hope this works for you Smile

Mike
Hyperactive

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Re: Change header by refresh.

Post by allase on August 11th 2011, 2:24 am

all i had to modify from your code was the image_1.jpg part right and replace it with ex.http://img694.imageshack.us/img694/8374/dsads.png ?
and it was supposed to work ... unfortunately it didn't.

it doesnt show anything on the header. Sad

allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum