Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Almost done - flash vs. images in header (http://forum.bytesforall.com/showthread.php?t=1516)

mcphoto May 2, 2009 12:53 PM

Almost done - flash vs. images in header
 
Hi all - Theme is working great for me; one thing I need to figure out.

However, is there a way to have the flash header on the home page, and have all other pages use the default header image folder? (Or just a static header image?). Is there a way to choose flash header vs. image on a page-by-page basis (that would be really cool - my header will have video content, I'd like to go static on pages with posted video for smoother playing).

If it's easier, I could be very happy with simply choosing which SWF is in the header on a page-by-page basis - I could use a single-frame SWF and that would take care of bandwidth problems.

I looked into the dynamic headers plugin but from searching here, it seems it's not compatible?

Thanks in advance!

test url is:

http://cloudyproject.com

(Yes, that's me on the video page...)

mcphoto May 5, 2009 02:48 PM

Anyone got any ideas??? :)

Thanks - mc

Flynn May 5, 2009 08:52 PM

That will be a messy edit of bfa_header_config.php and it'll be obsolete soon as I am going to re-code the whole header area and add widget areas there. I'll start with that the next days and have it in the over-next release towards the end of May

mcphoto May 6, 2009 10:31 PM

Thanks Flynn - is there any hack that could get me through for now though, even if just the index had one file and everything else had another?

I guess I'm thinking along the lines of "if it's the index, this file - otherwise, that file"

Man, I wish PHP was that easy...

Flynn May 7, 2009 02:31 AM

I'd disable the default header images at Theme Options -> Header -> Configure header Area, then put this into index.php below or above
<?php bfa_header_config($bfa_ata['configure_header']); ?>

PHP Code:

<?php if ( is_front_page() ) { ?>
Flash / Video code for homepage
<?php } else { ?>
<div class="header-image-container"></div>
<?php ?>

Then add a CSS Insert
HTML Code:

div.header-image-container {
height: 150px;
background: url(/wp-content/themes/atahualpa/images/defaultimage.gif);
}
body#body-page-13 div.header-image-container {
background: url(/wp-content/themes/atahualpa/images/page13.gif);
}
body#body-page-27 div.header-image-container {
background: url(/wp-content/themes/atahualpa/images/page27gif);
 }
body#body-page-109 div.header-image-container {
background: url(/wp-content/themes/atahualpa/images/page109.gif);
 }
...


mcphoto May 7, 2009 11:43 AM

No go, I get this on all pages (and I assume you meant header.php :)

Parse error: syntax error, unexpected T_STRING in /home/content/c/l/o/cloudycom/html/wp-content/themes/atahualpa332/header.php on line 841

Header image is disabled in the theme controls (I've already had a global flash header working fine)

Here's how the code looks as pasted; I notice in dreamweaver that the second div is highlighted as an error (div class="header-image-container):

Code:

<?php bfa_header_config($bfa_ata['configure_header']); ?>

                <!-- Header -->
                <td id="header" colspan="<?php echo $cols; ?>">
<?php*if*(*is_front_page()*)*{*?>
<div style="height: 200px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="940" height="200"><param name="movie" value="http://cloudyproject.com/wp-content/themes/atahualpa332/images/hdr-1.swf" /><param name="quality" value="high" /><param name="menu" value="false" /><param name="wmode" value="transparent" /><embed src="http://cloudyproject.com/wp-content/themes/atahualpa332/images/hdr-1.swf" wmode="transparent" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="200"></embed></object></div>
<?php*}*else*{*?>
<div*class="header-image-container style="height: 200px;"></div>
<?php*}*?>
                </td>
}

(I've since closed the quotes after "header-image-container" )

CSS insert - keeping it simple for now, and the image URL is good, comes up in my browser when entered:

Code:

/* header no-flash image */
div.header-image-container {
height: 200px;
background: url(http://www.cloudyproject.com/wp-content/themes/atahualpa332/images/defaultimage.png);
}

URL is cloudyproject.com, but I've returned to the working header with global flash.

Flynn, thanks a bunch for helping!

mcphoto May 9, 2009 12:29 PM

**bump*** - And of you PHP experts have a guess? Thanks - about the last issue for my personal site...

mcphoto May 11, 2009 02:49 PM

I've tried it now on a site with 333 running - still getting this:

Parse error: syntax error, unexpected '<' in /home/content/h/a/v/havenwoodtexas/html/wordpress/wp-content/themes/atahualpa333/header.php on line 861

Flynn May 11, 2009 03:04 PM

At the bottom of post #6 it seemed you were all set. What is the "last issue for my personal site" that you mention in post #7?

mcphoto May 11, 2009 06:26 PM

On post six I pasted the errors I got when I tried the code from post #5 - since it broke the site, I returned to the global flash header (instead of flash homepage/static everywhere else) -

to be clear, the issue that started the thread is still a problem - I'm back to flash globally, when I tried the suggested code in 332 and 333 I get the parse error and no pages sitewide.

thanks for checking - MC

Flynn May 11, 2009 08:18 PM

These asterisks in your code, are they there to highlight the code here on the forum, or do you actually have them in header.php, too?

<?php*if*(*is_front_page()*)*{*?>
<div style="height: 200px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="940" height="200"><param name="movie" value="http://cloudyproject.com/wp-content/themes/atahualpa332/images/hdr-1.swf" /><param name="quality" value="high" /><param name="menu" value="false" /><param name="wmode" value="transparent" /><embed src="http://cloudyproject.com/wp-content/themes/atahualpa332/images/hdr-1.swf" wmode="transparent" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="200"></embed></object></div>
<?php*}*else*{*?>
<div*class="header-image-container style="height: 200px;"></div>
<?php*}*?>

mcphoto May 12, 2009 09:43 AM

No, I pasted directly from my browser to the file; and then back into the reply box (and wrapped with the code tag) - not sure why those are showing up.

Flynn May 12, 2009 10:11 AM

Remove the asterisks from the atahualpa theme files, Dreamweaver may have added them. You should use a text editor for working with code

mcphoto May 12, 2009 04:20 PM

That wasn't it (I did get it figured out though) - those asterisks showed up somewhere between pasting the code in the forum post and wrapping it with the code tags - must be a safari thing.

I had pasted the code into the whole header area and killed this line:
<td id="header" colspan="<?php echo $cols; ?>">

Got it working now... THANKS Flynn!

Now if I can just figure out my category page troubles (hint: thread is 1564...)

this is an awesome ability to have, flash header on the home page only - I'm testing it on three different sites now. Thanks again!


All times are GMT -6. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.