Hi,

i would like to remove the rotation ability of the theme and rather assign specific banners to specific primary links.

i tried this thread (http://drupal.org/node/241962) but didn't work for me and i am not getting any response from the authors of the solution anymore.

Would be very happy if someone could help me to work it out.

mentus

Comments

Anonymous’s picture

1 way: just delete all images from /marinelli/img/banners save the one you want. There is probably a small performance issue but it is the easiest short term.

Another way: Modify style.css:
#header {
50 padding: 0;
51 margin: 0;
52 height: 180px;
53 background: #000033 url(img/banners/rotate.php) no-repeat 0px 0px; /*rot ates images in the banners folder */
54 position:relative;
55 }
change "img/banners/rotate.php" to "img/banners/yourfilename.jpg", and make sure the size is 970x180 or modify the other css declarations to match your image size.

aharown07’s picture

daouverson2, I'm using this solution and it works fine. Just for the record.
Thanks.

mentus’s picture

If i understand You well, both Your sollutions refer to the case of only ONE banner image. i would like to use more of them however and make then fix to the specific primary links. See my home page: http://www.gaura-bhakti.ch to get an idea...

When i click on some particular primary link in the menu up, all the time comes some random banner image. That i would like to avoid, means when i click on some particular primary link then always the same image appears.

mentus

aharown07’s picture

I would guess (which is about all I'm qualified to do) that if you want different header images to appear on different pages of your site, you'd need something in page.tpl.php that looks at the page you're on and "prints" a different image accordingly.
So.. some <?php if... endif?> stuff. (Though I've noticed "endif" doesn't seem to always be requried. Have alot of reading to do about PHP!).

But that's what I'd explore if I were in your situation I think.

yolene’s picture

Hi,

For the first issue (with only one specific image that you want to show), the answer is in the comment in the "rotate" file of the theme :

Upload this file (rotate.php) to your webserver. I recommend uploading it to the same folder as your images.

Link to the file as you would any normal image file, like this:
< img src="http://example.com/rotate.php" >
You can also specify the image to display like this:
< img src="http://example.com/rotate.php?img=gorilla.jpg" >
(be careful if you copy/paste : i put blanks in the code to make it visible in this post)
This would specify that an image named "gorilla.jpg" located in the image-rotation folder should be displayed.

For the second issue (assigning banners according to specific parts of the website, that is to say specific primary links for example) : i'd like to do it too, so i'm interested in the solution, if anyone found it :-) Unfortunately i'm not a php programmer but if you copy/paste your code i may figure out what it is about and adapt it for my website.

Thanks in advance.

yolene’s picture

sorry, double post (i thought reply is different from adding new comment)

centralh2o’s picture

I'd be interested in finding out how to show page-specific banners as well.

vr_mex’s picture

Version: 5.x-2.0 » 6.x-2.92

I'd be interested in finding out how to show page-specific banners as well.

oadaeh’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

This issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-4.x branch.
Thank you.