Global IP Address:

54.161.53.213

Your Local IP Address:

Determining Local IP address....

*If you are behind a firewall (NAT) your global and local IP addresses will differ. Learn More

Home > Articles > Adding A Flash Header to WordPress Atahualpa Theme

Adding A Flash Header to WordPress Atahualpa Theme

August 5th, 2009 reset

This article has been updated for Atahualpa Theme 3.4.1, see Adding Flash Header to WordPress Atahualpa Theme (ver 3.4.1).

wordpress2If you are a WordPress user and use the ‘Atahualpa’ theme and want a Flash header, this post may help. First for non-WordPress users, WordPress is a Blog publishing system that is very popular (wordpress.org). The ‘Atahualpa’ theme is the most downloaded WordPress theme and is an excellent theme. However it is not the theme behind this site (myDeviceIP.com), which uses another very popular theme ‘inove’. To see a reference of the ‘Atahualpa’ theme with a flash header, see SuzieTrainsMaui.com/blog.

To use a Flash header with ‘Atahualpa’ theme, it will require modification of the theme’s .php code files, so a little web experience is helpful. I recomend to have a test blog setup (on your web server) with ‘Atahualpa’ theme so you can test the modifications before updating the Live Blog.

The ‘Atahualpa’ theme is really well done (great job Bytes For All!!). It provides a lot of options and was programmed well enough for me to make this change (hack) farily easily.  This example uses Version 3.2 of Atahualpa Theme.

  1. Make a backup copy of bfa_header_config.php
  2. Edit bfa_header_config.php following highlighted changes shown here (.pdf). Code changes are highlighted Yellow. See code discussion below for details about edits.
  3. Update ‘Ata’ options from WordPress Admin panel->Appearance->Atahualpa Theme options. Go to the Header Options. Add %flash to the ‘Configure Header Area’ (aka header options). You cannot use %image or %logo if you use %flash. You can (and should) setup a header image using Blog Title overlay and Blog tagline overlay. This content will be displayed as alternate content for visitors that don’t have flash and will make the search robots happy.  (to test disable flash add-on and check out SuzieTrainsMaui.com/blog to see alternate content in action.)
  4. Upload your flash header file (.swf) to your blog and make sure path and filename in bfa_header_config.php (line 195 in the .pdf) match path and filename to your particular header .swf.
  5. You will also need to put swfobject.js in your blog folder and make sure bfa_header_config.php (line 194 in the .pdf) matches your path. The example shows a /blog folder. You can get swfobject.js at Google Code site.  swfobject.js is the javascript code that loads flash (.swf) objects. You will need to download the .zip file, extract and upload swfobject.js to your web server.

Code Discussion

The original bfa_header_config.php can be found here for comparison. Note, this example used Atahualpa theme version 3.2.  Adapting to the newest Atahualpa theme may require some additional adjustments.

Line 9: The IF statement was modified to check for %flash in the header options. Technically added OR and test condition for %flash.

Lines 164-188: Again the IF statement is modfied to check for %flash in header options. Then I needed to break-up header string into 3 parts and concatenate in line 187. This separates the header_content from the DIV tags, which allows us to provide alternate content for non-flash visitors/robots.

Line 191-202: This is where the flash HTML code is formulated, so this code is ALL added to the file. Just make sure the path to swfobject.js and path to your flash movie (.swf) is correct for your blog. In this example, I put the header2.swf in the theme’s header folder, which is where Atahualpa theme stores it header images.

Line 217-218: The last edit is adding our new ‘%flash’ tag to these 2 statements so all the HTML code gets assembled correctly. This is where the beauty of Bytes-for-All Atahualpa theme robust programming allowed easy adding of ‘%flash’ to the header options.

I would hope (and encourage) BFA to implement this into their theme. Again, Great job on Atahualpa theme Bytes for All.

If you attempted this update, I hope it was easy to follow and you got it to work without too much trouble. I can be contacted via the Contact Us link or leave a comment.

  1. August 11th, 2009 at 12:01 | #1

    Hi,

    Great tutorial!!

    Unfortunatly I am using Atahualpa ver. 3.4.1 and the code is too different for me to work out the changes.

    I really want to add a flash header :(

    Any chance of some help with ver 3.4.1

    thanks in advance,

    Simon

  2. Admin
    August 11th, 2009 at 17:21 | #2

    Thanks for your comment Simon.

    I am working on updated post for Atahualpa version 3.4.1. I have had a few requests. I plan to post it soon.

    Thanks!

  3. Noam Dworman
    October 21st, 2009 at 12:00 | #3

    Any luck with 3.4?

  4. Admin
    October 21st, 2009 at 13:24 | #4

    Yes, Please see the updated post for 3.4.4 here which uses a %flash[url,width,height] param in Ata theme options from Dashboard.

    Also, See custom header post here which uses %html[html code]% param for complete custom header.

    Good Luck!

  5. Dean
    November 3rd, 2009 at 12:16 | #5

    I tried this for version 3.2 and all I’m getting is a blank area where I should be seeing my flash file. I deleted %logo from my header options and the paths are correct to my .swf and the .js file Any ideas?

  6. Admin
    November 4th, 2009 at 11:33 | #6

    Hi Dean,

    I would upgrade Ata theme to 3.4.4. This allows you to specify everything thru the WordPress Ata theme Options and not edit any .php code. After you upgrade theme, get the new bfa_header_config.php file (here or here). See the posts for syntax for %flash[...] and %html[...] params.

    Give that a try. If you are still having issues leave a comment with a web site link. Good Luck!

  7. January 14th, 2010 at 14:01 | #7

    Hey great post here. Just what i was looking for to edit this popular design. Will upgrade to 3.4.4.

  8. Admin
    January 15th, 2010 at 11:28 | #8

    Thanks WebDesign Kent,

    Ata 3.4.4 worth the upgrade. I am pretty sure 3.4.4 mods shown here will work with 3.3 as just small changes to bfa_header_config.php.

    You can use the starter flash file I supplied in the post.
    Thanks, Admin – myDeviceIP.com

Comments are closed.