Trying to insert 'dynamic headers' into horbar2
Hello Flynn,
Thank you so much for your theme, it's a lot more powerful than I'd ever imagined and much better than the others I looked at :) I'm using it as a CMS. Usually use Joomla but that's so heavy! This is my test site: http://www.jobigger.co.uk/wordpress/ I'm trying to insert the code from a plugin called 'dynamic headers' (DH) into horbar2 so that I can define the image displayed on each page in the blue horizontal bar without coding it in to individual pages which would make it tricky for my client to manage. I've tested the DH snippet in header.php (and it works) and may well use it there in a table or somehting and deactivate horbar2 if all else fails but I'd rather have it in bfa_header_config.php in horbar2 if that were at all possible. This is the DN snippet: <?php show_media_header(); ?> I do appreciate that I haven't made a contribution yet and the reaosn is that I don't have any money, I'm trying to build up a web design business and my hubbie is out of work.. bla... bla... bla... everybody's like this at the moment! I'm getting paid once this site is finished and can make one then :) I've been trying not to ask you anything, search the forums and things but this has gotten me, most probably because I'm not a proper developer - more of a look it up as I go along and hope for the best sort of designer!! If you can help I'd appreciate it. Many thanks Jo |
Take a look at http://forum.bytesforall.com/showthr...hlight=horbar1 .
|
Thank you:)
|
Did you manage to get Dynamic Headers working?
I tried adding in: functions/bfa_header_config.php Code:
if (strpos($header_items,'%bar1')!==false) { Parse error: syntax error, unexpected '<' ? |
where did you put this code?
|
functions/bfa_header_config.php
(using latest version 3.3.3) |
try
$horizontal_bar1 = '<div class="horbar1">' . '<?php show_media_header(); ?>' . '</div>'; |
Hi and thanks for the response.
Your suggestion gets rid of the error message. Though the actual plugin isn't working. I'm using Wordpress 2.8-beta2. Hmm it would be interesting to hear if anyone has got it going yet. |
Well the plugin does work in WP 2.8 and the Thematic theme - just by doing:
Code:
<?php thematic_aboveheader(); ?> Maybe because i'm editing the bar1 area? All I'm looking to do is add it below all the header area. |
PHP is already open, you shouldn't put another opening PHP tag here
$horizontal_bar1 = '<div class="horbar1">' . <?php show_media_header(); ?> . '</div>'; Also, if show_media_header(); prints something then you cannot do $variable = show_media_header(); but need to capture the output first PHP Code:
PHP Code:
|
Page specific Flash or images in header solution!
Wey hey! It's working.
Thanks go to Flynn! (and some dosh when I get some ;-) Here's a walk through. Install the Dynamic Headers plugin. This also involves creating a new folder called 'header-images' in your 'wp-content' folder and chmod it to 777. In themes/atahualpa333/functions/bfa_header_config.php Change... Code:
// Horizontal bar 1 Code:
// Horizontal bar 1 You can also change where they appear (above or below logo/menu etc) in the Atahaulpa Header options page by changing the position of %bar1. Only one thing I've found is that the menu for selecting which image/swf goes on the page doesn't remember what you selected - so next time you update the page it goes back to the default image unless you change it. |
I got it to work on this site (and am elated beyond words!!!):
http://modernconcretesurfaces.net BUT as you can see the existing header spills over the container. How can I set %bar1 to "top-center" like the %image? Otherwise I'll just resize the images or make the width fixed, but it would be nice to know if this can be done anyway. My last atahualpa hurdle has been crossed. Yeehaw!!!! :) |
I think it's going to be quicker to resize the Flash to the correct width - it will be a smaller file size too.
But have you checked out the new version of Atahaulpa - 3.4.2 ? Now instead of messing with the php files you can insert Dynamic Headers by simply pasting <?php show_media_header(); ?> in the option pages, simply go to: Style & edit HEADER AREA > Configure Header Area Here's an example: %logo %image %pages %bar1 <?php show_media_header(); ?> %bar2 Also with WP 2.8 it now remembers which header for which page - unlike before when it reset to the default. Wey hey. |
I actually did do that with the new version of Atahualpa and it worked fine. Now I need to figure out how to make %bar2 into an image.
|
I wonder if it's a case of adding a new widget area into the heading area and forgetting %bar - not sure tho...
|
krystyna
you can make your image just fill the screen area by changing the three places where it says width="1498" to width="1oo%" - the problem is that it resizes the width to fit AND resizes the height, so it becomes very short. Since this is a fixed width site. I would recrop the base image to the size you need |
Quote:
|
eyup
thank you. now it works. |
All times are GMT -6. The time now is 05:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.