The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Change header by refresh.

2 posters

Go down

Change header by refresh. Empty Change header by refresh.

Post by allase 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
avatar
allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

Change header by refresh. Empty Re: Change header by refresh.

Post by Mike 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
Mike
Hyperactive

Male Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado

Back to top Go down

Change header by refresh. Empty Re: Change header by refresh.

Post by allase 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?
avatar
allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

Change header by refresh. Empty Re: Change header by refresh.

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

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

Male Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado

Back to top Go down

Change header by refresh. Empty Re: Change header by refresh.

Post by allase 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/
avatar
allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

Change header by refresh. Empty Re: Change header by refresh.

Post by Mike 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
Mike
Hyperactive

Male Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado

Back to top Go down

Change header by refresh. Empty Re: Change header by refresh.

Post by allase 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.https://2img.net/r/ihimizer/img694/8374/dsads.png ?
and it was supposed to work ... unfortunately it didn't.

it doesnt show anything on the header. Sad
avatar
allase
New Member

Posts : 24
Reputation : 0
Language : english

Back to top Go down

Back to top

- Similar topics

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