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.

Header banner

5 posters

Go down

Solved Header banner

Post by jamski August 13th 2009, 11:16 pm

Hi everyone.

When I try and add an HTML banner into the homepage message area the banner is the size it is in the code but it appears in a box the width of the forum with the same boarder and background color.

I obviosly don't want to change the colour of this as it will effect the rest of the forum. All we want is a banner ad at the top of the homepage. Any ideas?

Hope that makes sense.

Thanks.

James
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by MrMario August 13th 2009, 11:19 pm

Not sure what you really want? Can you post a screen shot or a link to your forum?
MrMario
MrMario
Helper
Helper

Male Posts : 22186
Reputation : 1839
Language : test

Back to top Go down

Solved Re: Header banner

Post by jamski August 14th 2009, 12:05 am

I don't have the code we were using here, it's on my work computer, but I'll post some pics tomorrow.

Thanks,

James.
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by jamski August 14th 2009, 10:10 am

Header banner Pictur10

Here's what I mean.

You can see the banner is actually the size we want, but it's in a box the width of the page. If we change the colour of this box, it will change how all the forums appear.

Any ideas?
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by venomz3 August 14th 2009, 4:17 pm

yh i got the same problem...can anyone help us out?
avatar
venomz3
New Member

Posts : 19
Reputation : 0
Language : english

Back to top Go down

Solved Re: Header banner

Post by ankillien August 15th 2009, 5:48 am

Hello,

You can put the banner via template editing (only for phpBB2 and punBB).
GO to Admin CP > Display > 'General' under 'Templates' > Click 'Modify' button of 'index_body'

Notice this part in the beginning...

Code:
{JAVASCRIPT}
<!-- BEGIN message_admin_index -->

You have to put your banner code right after that. Don't forget to hit the '+' button to submit your changes and make it work.

Hope this helps.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Solved Re: Header banner

Post by jamski August 15th 2009, 2:35 pm

I think my forum is just phpBB, does this mean I can't do it! Sad
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by ankillien August 15th 2009, 5:01 pm

I've checked, you are using phpBB2 and you can edit the template.
Just follow my instructions above.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Solved Re: Header banner

Post by jamski August 15th 2009, 6:29 pm

OK, its sounding hopeful, but under display I can't seem to find the links your talking about. I've attached a picture of what I have under display.

Header banner Pictur15

Thanks for all your help,

James.
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by jamski August 18th 2009, 9:31 pm

I feel I'm close to getting sorted, can anyone help?

Thanks,

James.
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by ankillien August 19th 2009, 3:01 pm

Please provide a link to your forum.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Solved Re: Header banner

Post by jamski August 19th 2009, 3:03 pm

www.surreynewmini.co.uk

(there's no banner up there at the moment though, would you like me to add it?)
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by ankillien August 19th 2009, 3:10 pm

The template editing option should be right below the avatar settings in Admin CP > Display.

Try clearing you cache..

https://help.forumotion.com/frequently-asked-questions-f5/how-to-clear-the-cache-in-ff-ie-t22597.htm
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Solved Re: Header banner

Post by jamski August 19th 2009, 3:23 pm

Brilliant, I can get in there now, but the code doesn't work!! But that could be the code although it did work putting it where I was before??!!
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by jamski August 19th 2009, 3:44 pm

This is the code (in bold) but nothing appears?? Thanks for all the help.

{JAVASCRIPT}
<!-- BEGIN message_admin_index -->

<script type="text/javascript">
var imgs1 = new Array("https://i.servimg.com/u/f83/14/23/16/43/tm_ban10.jpg","https://i.servimg.com/u/f83/14/23/16/43/snm_ba10.jpg","https://i.servimg.com/u/f83/14/23/16/43/mini_b10.jpg");
var lnks1 = new Array("http://www.totalmini.com/forum/","http://www.surreynewmini.co.uk","http://www.mini.co.uk/");
var alt1 = new Array();
var currentAd1 = 0;
var imgCt1 = 3;
function cycle1() {
if (currentAd1 == imgCt1) {
currentAd1 = 0;
}
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
banner1.src=imgs1[currentAd1]
banner1.alt=alt1[currentAd1]
document.getElementById('adLink1').href=lnks1[currentAd1]
currentAd1++;
}
window.setInterval("cycle1()",5000);
</script>
<a href=""http://www.totalmini.com/forum/" target="_blank" id="adLink1" target="_top">
<img src="https://i.servimg.com/u/f83/14/23/16/43/tm_ban10.jpg" id="adBanner1" border="0" width="468" height="60"></a>



<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by ankillien August 19th 2009, 3:57 pm

Did you hit the '+' button after you saved you template.
You need to hit the + button to make your changes appear.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Solved Re: Header banner

Post by jamski August 19th 2009, 4:14 pm

Yeah I have, screen shot attached.

Have cleared cache too.

Header banner Pictur16
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by jamski August 19th 2009, 4:59 pm

When you modify the template will it automatically be used? Do I have to change anything else to use it, or activate something for java script to show??

We're sooooo close! Very Happy
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by ankillien August 19th 2009, 5:09 pm

Yes, When you modify template, add your script, save it, publish it....it should show up in your index page.

Try putting your script below this part in your template...

Code:
   <!-- END message_admin_txt -->
</table>
<!-- END message_admin_index -->
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Solved Re: Header banner

Post by jamski August 19th 2009, 5:37 pm

YES! It works. Now how do I centre it [centre] CODE HERE [/centre] doesn't work?!

That's all I know!

Thank you very much,
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by ankillien August 19th 2009, 5:40 pm

Use <center> </center> code.


Last edited by ankillien on August 19th 2009, 5:44 pm; edited 1 time in total
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Solved Re: Header banner

Post by jamski August 19th 2009, 5:42 pm

Perfect, thank you, I was nearly there, I'm learning! Very Happy
avatar
jamski
Forumember

Posts : 105
Reputation : 0
Language : English

Back to top Go down

Solved Re: Header banner

Post by Sanket August 19th 2009, 5:46 pm

Since this thread appears to be solved, I will lock this thread and mark it as solved.
Sanket
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Back to top

- Similar topics

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