Recent Topics

1 Jun 18, 2007 22:21    

My b2evolution Version: Not Entered

I am in need of some quantum blog theory here .

this is a piggy back to post:

i am attempting to put a custom banner on each site, but

- the .css doesn't cut it, because i want it to show up when printed, and be clickable ...not a background image
- altering the _main.php changes all my blogs
- i was hoping to avoid a separate skin for each blog (i have 30 now and will have 100 shortly..lots of file maintenance).

my only thought is there must be a way to pull a dynamic file name based on the blog id (if i named all the image files to correspond with the blog name) in _main.php and placed them in each media directory or dumped all the banners in the same 'custom' skin folder.

an example site is

_main.php below:
<div class="pageHeader">
<!--this is the area for google ads to go above the banner-->

<h1 id="pageTitle"><a href="<?php $Blog->disp( 'url', 'raw' ) ?>"><?php $Blog->disp( 'name', 'htmlbody' ) ?></a></h1>

<div class="pageSubtitle"><?php $Blog->disp( 'tagline', 'htmlbody' ) ?></div>

<a href="<?php $Blog->disp( 'url', 'raw' ) ?>"><img src="img/knng_banner.jpg" alt="KNNG"></a>

there has to be a way to make the 'name'_banner.jpg be variable but my coding hasn't cut the mustard yet

2 Jun 19, 2007 15:11

This is an excellent request. Maybe this would be some sort of array, perhaps in a hacks2.php that could be included in the _main.php, which would describe the conditions and the result. It would be sort of a (realize that what follows is just "pretend" code):

if (isset($blog['7'])) { a href="<php $Blog ['7']->disp 'url', 'raw' ) ?>"><img src="whatever.jpg"></a> ; }
if (isset($blog['8'])) { a href="<php $Blog ['8']->disp 'url', 'raw' ) ?>"><img src="whatever2.jpg"></a> ; }

Unfortunately, I don't know how to do that. but I'm thinkng that would be a wonderful capability that a real php programmer could do quite easily.

3 Jun 19, 2007 16:42

How about changing

<img src="img/knng_banner.jpg" alt="KNNG">


<img src="img/whatever_banner_<?php echo $blog; ?>.jpg" alt="KNNG" />

then saving the blog-specific image as "whatever_banner_99.jpg" where 99 is the blog number it belongs to?

Form is loading...