ThemeShaper Forums » Thematic

[closed]

How to add custom code to "branding" section, in powerblog theme.

(16 posts)
  • Started 4 years ago by capitalistdog
  • Latest reply from martianarm
  • This topic is resolved
  1. capitalistdog
    Member

    Hi,

    I'm a bit of a noob to child themes and theming in general, but I just bought the powerblog child theme and was just wondering what the best way to put a flash element in the branding section of the theme.

    I want to implement a Flash Cover Flow, found here. http://www.weberdesignlabs.com/blog/?p=11

    If someone could kick me in the right direction on how to implement this code into the branding section, that'd be much appreciated! Thanks!

    Posted 4 years ago #
  2. capitalistdog
    Member

    I've been playing with this for 24 hours or so, with no luck. :-(

    Posted 4 years ago #
  3. Hi,

    I can get this script into the header but it won't run.

    Chris

    Posted 4 years ago #
  4. Starting to give this ******** thing names .. got it to run, but I still need to fix the pictures / XML thing.

    Posted 4 years ago #
  5. Strike!

    I hate this ********* directory mess!

    Ok .. step by step:

    1. Copy albuminfo.xml to your root.
    2. Edit albuminfo.xml:
    Change all

    <artLocation>album1.jpg</artLocation>

    to

    <artLocation>wp-content/themes/thematicpowerblog/album1.jpg</artLocation>

    (I copied the whole script thing into my thematicpowerblog directory)

    3. Edit your functions.php and add:

    function albumart_header() { ?>
    <div id="albumart">
    <embed width="590" height="300" align="middle" type="application/x-shockwave-flash" salign="" allowscriptaccess="sameDomain" allowfullscreen="false" menu="true" name="iTunesAlbumArt" bgcolor="#000000" devicefont="false" wmode="window" scale="showall" loop="true" play="true" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="/support/wp-content/themes/thematicpowerblog/iTunesAlbumArt.swf"/>
    </div>
    <?php
    }
    add_action('thematic_header','albumart_header', 6);

    Don't ask me how to remove the standard frame ... at least not today! ;)

    I know that this is 'quick' and dirty, but it works now.

    Chris
    -- needs some beer now

    Posted 4 years ago #
  6. capitalistdog
    Member

    Chris, enjoy that beer, you definitely earned it! :-)

    I have the flash showing up on the header, above the branding section, which is great progress! I've made the appropriate changes to the XML file but, the flash player is displaying an "Unable to load xml" error.

    Are you able to view the coverflow, and not get this XML error?

    Posted 4 years ago #
  7. Will do that :)

    The XML file needs to be in the root directory. Otherwise you'll get that error.

    Had everything running on my system without any errors except the W3C warning regarding the 'embed'. I will send a fix for this tomorrow.

    Chris
    -- four Koelsch later ;)

    Posted 4 years ago #
  8. capitalistdog
    Member

    Chris, your help here is amazing, thanks again!

    I have got it working following your advice, and I don't receive a W3C warning in any of my browsers. What is a w3c warning?

    Anyways, this is good info, the only part I need help with now, is getting it into the "branding" section of the header.

    Cheers, and thanks. :-)

    Posted 4 years ago #
  9. Hi,

    found a real nice site to fix the validation problem and here's the generated code:

    function albumart_header() { ?>
    <div id="albumart">
    <!--[if !IE]> -->
      <object type="application/x-shockwave-flash" data="/support/wp-content/themes/thematicpowerblog/iTunesAlbumArt.swf" width="590" height="300">
    <!-- <![endif]-->
    <!--[if IE]>
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="590" height="300">
        <param name="movie" value="/support/wp-content/themes/thematicpowerblog/iTunesAlbumArt.swf" />
    <!--><!-- http://Validifier.com -->
      </object>
    <!-- <![endif]-->
    </div>
    <?php
    }
    add_action('thematic_header','albumart_header', 6);

    Chris

    Posted 4 years ago #
  10. capitalistdog
    Member

    awesome, thanks man!

    Any chance you can kick me in the right direction as to how to get this thing in the "branding" section? Removing the branding section could also work, i guess, and just leave the flash in the header.

    Time for me to crack a Becks,

    Cheers :-)

    Posted 4 years ago #
  11. Mmh .. it is already in the branding section. Do you want to remove the blog title / description?

    Chris
    -- no beer today :)

    Posted 4 years ago #
  12. capitalistdog
    Member

    Got it working great! Thanks Chris!

    Posted 4 years ago #
  13. capitalistdog
    Member

    Chris, I'm having some issues still, I hate to call upon ya again.

    I have the code running on www.non-intervention.com and I am unable to load the XML, when visiting other pages on the site, only the home page.

    Any ideas as to why?

    Posted 4 years ago #
  14. Sorry .. tested only with HOME.

    Have you tried to copy the SWF file to the root of your server? .. Keep in mind that you need to change the path in the above mentioned function.

    Chris

    Posted 4 years ago #
  15. Chris, thanks for the code! It works great and is Dreamweaver friendly. C-dog, check to see if the full URL path to your XML is in your SWF in order to make it work on pages other than home; it worked for me.

    Posted 4 years ago #
  16. Hi guys. Your code is great and works well - thanks! I'd like the flash to display only on the homepage. I'm also trying to get it to display below the menu. Does anybody know how to do this? My site is handsourced.com

    I saw that you can add .home before the branding div in the css file, but can't see to use this method to work for the albumart div.

    .home #branding {
    background:url(images/header-image.jpg) no-repeat center bottom;
    margin-bottom:22px;
    padding:44px 0 198px 0; /* Bottom padding is the same height as the image called above */
    }

    Rachel

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.