How to add an image under the footer?

Go down

Solved How to add an image under the footer?

Post by Aronys on November 27th 2011, 5:39 pm

Hi guys, I have a problem. I've been searching for a solution everywhere, but i can't seem to find it. Anyway, I'd like to add an image under the footer of the forum.

Here is a screenshot of the footer http://img408.imageshack.us/img408/331/helpq.jpg

This is the image that should go under it http://img830.imageshack.us/img830/6053/footer1s.jpg

The forum is phpbb3.


Last edited by Aronys on November 28th 2011, 11:32 am; edited 3 times in total

Aronys
New Member

Male Posts : 6
Reputation : 0
Language : English

http://at-deathangels.forumcroatian.com/

Back to top Go down

Solved Re: How to add an image under the footer?

Post by Guest on November 27th 2011, 7:44 pm

Hi Aronys! Wink

Create an announcement and add this code:
Code:
<script>function footer () {a = document.getElementById("page-footer").innerHTML;document.getElementById("page-footer").innerHTML = a + '
<center><b><img src="http://img197.imageshack.us/img197/7166/footertq.jpg" /></b></center>';}</script><body onload="footer()">
Sincerely for me doesn't show this image - http://img197.imageshack.us/img197/7166/footertq.jpg re-upload this to another host, like imgur.com or what you want... Wink

Guest
Guest


Back to top Go down

Solved Re: How to add an image under the footer?

Post by Aronys on November 27th 2011, 8:11 pm

Ok, the link should be ok now.

An announcment? Is that in html? I'm kinda new to all this...

Aronys
New Member

Male Posts : 6
Reputation : 0
Language : English

http://at-deathangels.forumcroatian.com/

Back to top Go down

Solved Re: How to add an image under the footer?

Post by Guest on November 27th 2011, 9:26 pm

Go to Administration Panel => Gneral => Messages and emails => Announcements => Add but don't forget to activate the option, then create one...

Guest
Guest


Back to top Go down

Solved Re: How to add an image under the footer?

Post by LGforum on November 27th 2011, 10:02 pm

I can't let you use that code, that code is just annoying me for so many reasons Razz

Code:

        <script>function footer () {a = document.getElementById("page-footer").innerHTML;document.getElementById("page-footer").innerHTML = a + '
        <center><b><img src="http://img197.imageshack.us/img197/7166/footertq.jpg" /></b></center>';}</script><body onload="footer()">
Here's why:
1. why make a function? are you going to be using this again, or multiple times on your page? ... no. An executing function would make more sense. (or using CSS :after selector maybe).

2. A mistake i made for a while; i ignored proper syntax out of laziness and wanting to type my codes faster. But first instances of a variable should start with 'var'. Especially when in a function to avoid colliding or clashing with variable in other functions.

3. Although 'document.getElementById' is a fast method, there is still no need to use it twice here.

4. The use of the <center> tag is not recommended. Due to it not being used in HTML5. Future browsers will stop supporting the <center> tag (and many more).

5. Adding another <body> tag is just horrendous really. Its poor html. Not to mentioned... its a body tag that has not even been closed.

Gassy, i hope these reasons can help you learn and improve, and were not meant to offend you.

With that being said.
A preffered code would be:
Code:

$(function() {
document.getElementById('page-footer').innerHTML+= '<span style="text-align: center;"><img src="http://img197.imageshack.us/img197/7166/footertq.jpg" /></span>';
});

Aternatively. If you already have a self executing function somewhere which is active in all pages. Add the middle of the script to the bottom.
Or if you have a function running onload, then add it to that maybe.
avatar
LGforum
Hyperactive

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: How to add an image under the footer?

Post by Guest on November 27th 2011, 10:04 pm

I know this mate, thanks anyway. Mr. Green

Guest
Guest


Back to top Go down

Solved Re: How to add an image under the footer?

Post by Aronys on November 27th 2011, 10:47 pm

Ok, how do I get the announcement to be on the bottom of the forum? Now the image is just under the header.

Aronys
New Member

Male Posts : 6
Reputation : 0
Language : English

http://at-deathangels.forumcroatian.com/

Back to top Go down

Solved Re: How to add an image under the footer?

Post by RoNo on November 28th 2011, 2:13 am

@Aronys wrote:Hi guys, I have a problem. I've been searching for a solution everywhere, but i can't seem to find it. Anyway, I'd like to add an image under the footer of the forum.

Here is a screenshot of the footer http://img408.imageshack.us/img408/331/helpq.jpg

This is the image that should go under it http://img830.imageshack.us/img830/6053/footer1s.jpg

The forum is phpbb3.
You can use Css to add the image (under your Admin Panel link)

[for phpbb3] Go to...
Admin Control Panel»Display»Pictures and Colors»Colors»CSS Stylesheet

Paste this code to the top of your Css sheet & click submit
Code:
#page-footer {
     background-image: url('http://img830.imageshack.us/img830/6053/footer1s.jpg');
   background-position: center 30px;
   background-repeat: no-repeat;
   padding-bottom: 25px;
   }
avatar
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Solved Re: How to add an image under the footer?

Post by Aronys on November 28th 2011, 11:31 am

Thanks it worked! Very Happy

Aronys
New Member

Male Posts : 6
Reputation : 0
Language : English

http://at-deathangels.forumcroatian.com/

Back to top Go down

Solved Re: How to add an image under the footer?

Post by RoNo on November 28th 2011, 11:37 am


Since the issue has been resolved,
this topic is closed. Glad to help.
LockedRoNo
General rules
Tricks & Tips
FAQ listing
For founders who lost their passwords
About support requests by PM
Updates & New Features
avatar
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Back to top


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