You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 28-03-2014 14:23:13

nut1903
Contributors
Registered: 20-03-2014
Posts: 11

footer image and bkg header

a)Where i  put code to display image at footer ?
b)Is it possible to add background image ( best if change at every load page) at header ( i mean where is displayed "Metro ui template")

thanks

Offline

#2 28-03-2014 14:45:17

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

Re: footer image and bkg header

a) Either in config/general.php in $siteFooter variable or theme/[theme_name]/theme.css.
b) It's possible but require small changes in config/layout.php and index.php if you want to do it automatically or in theme/[theme_name]/theme.css which is non-invasive method and will be compatible with further updates (at least should be).

Code for b):

  1. Changing of config/layout.php and index.php.
    In index.php find <header> line of code and change it to:

    <header style="<?php if($hbgColor != "") echo "background-color:".$hbgColor."; ";?><?php if($hbgImage != "") echo "background-image:url('".$hbgImage."'); background-repeat: repeat;";?>">

    Image will be repeated in both direction to infinite (background-repeat: repeat;).

    In config/layout.php add code

    /* Header background */
    $hbgColor = "#000"; //if "" there will be no color, remember to use # in color
    $hbgImage = "[path_to_image]"; // if "" there will be no background image, leave blank if you dont want one. It is recommend to keep the filesize to a minimum and also, if possible, use a low resolution
  2. Changing of theme/[theme_name]/theme.css
    It's similar to 1. and is recommended to use this code.
    In your theme.css file find header{ line and add style similar to those from 1. which are:

    background-color: [color in hex/name/etc.];
    background-image:url('[path_to_image']);
    background-repeat: repeat;

Cheers.

Last edited by chrismaliszewski (28-03-2014 14:53:33)

Offline

#3 28-03-2014 16:19:35

nut1903
Contributors
Registered: 20-03-2014
Posts: 11

Re: footer image and bkg header

what a fast answer (every time)!

i try ,
thanks

Offline

#4 29-03-2014 08:43:00

nut1903
Contributors
Registered: 20-03-2014
Posts: 11

Re: footer image and bkg header

footer :to put banner with img and url , where i put the code ?

$siteFooter['footer.php'] = "" is possible ? or redirect to html <div id="footer">?

Offline

#5 29-03-2014 09:17:10

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

Re: footer image and bkg header

Write code in config/general.php in variable $siteFooter. If you want to have banner with anchor your code should look like:

<a href="[link]" target="[target i.e. _blank]"><img src="[path_to_image]" alt="[alt]" title="[title]"/></a>

Offline

#6 29-03-2014 09:30:19

nut1903
Contributors
Registered: 20-03-2014
Posts: 11

Re: footer image and bkg header

is but is possible ?
$siteFooter = <a href="[link]" target="[target i.e. _blank]"><img src="[path_to_image]" alt="[alt]" title="[title]"/></a>
give error

is not possible to link a bage
( i also have to put <script> and other lines ..)

Offline

#7 29-03-2014 09:33:18

nut1903
Contributors
Registered: 20-03-2014
Posts: 11

Re: footer image and bkg header

sorry i mean "page"

Offline

#8 29-03-2014 09:49:24

nut1903
Contributors
Registered: 20-03-2014
Posts: 11

Re: footer image and bkg header

ok solved, just put the code into '     '

thank you

Offline

Board footer

Powered by FluxBB