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)
-   -   incorporating xspf player to the header... (http://forum.bytesforall.com/showthread.php?t=347)

metwin1 Feb 11, 2009 05:30 PM

incorporating xspf player to the header...
 
Hello,

I'm trying to add a xspf player to the header, preferably at the place where the location of the default search bar currently is. The thing is, my PHP knowledge is practically, non-existent. I know I'm supposed to put this:

<?php xspf_player::start('playlistname'); ?>

somewhere in my header.

Atahualpa is deeply customisable from within wordpress admin, which is a god-send for people like me. This means, however, that the header.php file looks so intimidating I do not know what to do, or where to begin

Please help?

Flynn Feb 11, 2009 06:56 PM

Does it have a similar size as the search box?

Turn the search box ON at A. Theme Options -> Header

and in functions/bfa_header_config.php, find

PHP Code:

     // Search box
    
if ($bfa_ata_show_search_box == "Yes" ) { 
    
$logo_area .= '<td valign="bottom" class="search-box" align="right">';
    
$logo_area .= '<div class="searchbox">
        <form method="get" class="searchform" action="' 
get_bloginfo'url' ) . '/">
        <div class="searchbox-form">
            <input type="text" class="text inputblur" onfocus="this.value=\''
.(get_search_query() ? get_search_query() : '' ).'\'" 
            value="' 
. (get_search_query() ? get_search_query() : $bfa_ata_searchbox_text ) . 
            
'" onblur="this.value=\''.(get_search_query() ? get_search_query() : $bfa_ata_searchbox_text ).'\'" name="s" />
        </div>
        </form>
    </div>
    </td>'

    } 
    
// END of Search box 

and change to
PHP Code:

    // Search box
    
if ($bfa_ata_show_search_box == "Yes" ) { 
    
/*$logo_area .= '<td valign="bottom" class="search-box" align="right">';
    $logo_area .= '<div class="searchbox">
        <form method="get" class="searchform" action="' . get_bloginfo( 'url' ) . '/">
        <div class="searchbox-form">
            <input type="text" class="text inputblur" onfocus="this.value=\''.(get_search_query() ? get_search_query() : '' ).'\'" 
            value="' . (get_search_query() ? get_search_query() : $bfa_ata_searchbox_text ) . 
            '" onblur="this.value=\''.(get_search_query() ? get_search_query() : $bfa_ata_searchbox_text ).'\'" name="s" />
        </div>
        </form>
    </div>
    </td>'; */
    

    
// END of Search box 

$logo_area .= '<td valign="bottom" align="right">';
ob_start(); xspf_player::start('playlistname'); 
$logo_area .= ob_get_contents(); ob_end_clean();
$logo_area .= '</td>'

Change the valign and align values in the last part of the code to position the player differently

Flynn Feb 11, 2009 11:57 PM

Thank you for the donation.

metwin1 Feb 12, 2009 07:01 AM

Hey Flynn!

Thank you so much for your help! But I've tried the new solution... doesn't work. You can see for yourself if you like; it looks exactly the same as the first alternative code.

I've shortened the length of the player from 370px to 250, and as you can see, it makes no difference either. If only somebody widgetised an Xspf player... :P

Now what? Please help?

Flynn Feb 12, 2009 07:15 AM

Sorry, I changed the code again

The line

PHP Code:

$logo_area .= '<td valign="bottom" class="search-box" align="right">'

needs to be disabled as well by including it into the comment.

The post above is updated



metwin1 Feb 12, 2009 08:02 AM

It looks perfect now... thanks so much!

metwin1 Jun 26, 2010 08:49 PM

Hello,

I've updated to 3.5.1, and I have the same problem as I did in this thread - incorporating xspf player to the header.

What I want to do is to incorporate the xspf player to the header exactly where the search box is, essentially replacing the search box with the music player. The original solution here does not work anymore as you've made changes to the php file.

Please help? Thanks.


All times are GMT -6. The time now is 09:12 AM.

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