WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Standard logo and changing background

<< < (3/4) > >>

nibz:
Attached a edited version of Ruud's minigallery.
You can only upload one image per gallery (the background image)

By default the logo in front of the background has to be media/logo.png
You could change this in the frontend.php if you really want to.

In your template use: (please notice i use block 2!)

--- Code: ---<?php 
ob_start();
page_content(2);
$out1 = ob_get_contents();
ob_end_clean();

if((strlen($out1) < 60) && (substr($out1,0,2) == '<a') && (substr($out1,-4) == '</a>')) {
echo 'YOUR DEFAULT CONTENT'; 
} else { echo $out1; }
?>

--- End code ---

Where you have to replace the YOUR DEFAULT CONTENT placeholder by your own content.

A little demo over here:
nothing uploaded: http://slaaptotaal.com/addons/pages/no-image.php
with background uploaded: http://slaaptotaal.com/addons/pages/with-image.php

BTW the image you upload has to be JPG

Good luck :)

P.s. you can change the height and width of the background image in frontend.css

07 DEC - VERSION .0.3  ! Important please first remove previous versions installed, before installing this version

Note: This is an experimental module, for academic purpose!
I used Minigallery as a base, since i am not a PHP expert i will not be able to solve al your questions..

Hans:
Hi nibz
I sent you a PM to thank you but want to do that here too ;-). I'll give it a try next week and let you know!
Thanks again
Hans

nibz:
Read the PM ... curious what you think about it :)

nibz:
Updated the file, there was an error.
The background image wasn't visible on some browsers due to a missing ' in the view.php, please update the module

Hans:
Thanks!! gonna give it try this week.
Hans

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version