Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

incorporating xspf player to the header...


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Feb 11, 2009, 05:30 PM
metwin1
 
4 posts · Feb 2009
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?
  #2  
Old Feb 11, 2009, 06:56 PM
Flynn's Avatar
Flynn
 
3,754 posts · Oct 2008
Munich, Germany
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

Last edited by Flynn; Feb 11, 2009 at 11:55 PM. Reason: Added more code. Also: Turn searchbox ON instead of OFF
  #3  
Old Feb 11, 2009, 11:57 PM
Flynn's Avatar
Flynn
 
3,754 posts · Oct 2008
Munich, Germany
Thank you for the donation.
  #4  
Old Feb 12, 2009, 07:01 AM
metwin1
 
4 posts · Feb 2009
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?
  #5  
Old Feb 12, 2009, 07:15 AM
Flynn's Avatar
Flynn
 
3,754 posts · Oct 2008
Munich, Germany
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


  #6  
Old Feb 12, 2009, 08:02 AM
metwin1
 
4 posts · Feb 2009
It looks perfect now... thanks so much!
  #7  
Old Jun 26, 2010, 08:49 PM
metwin1
 
4 posts · Feb 2009
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.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with flv player lion.gem Atahualpa 3 Wordpress theme 3 Jul 16, 2009 10:49 PM
Audio Player Plugin not showing up or working Nefeli Plugins & Atahualpa 1 Feb 24, 2009 10:06 AM
Incorporating a store into Atahualpa mactony Atahualpa 3 Wordpress theme 0 Feb 12, 2009 09:17 AM
Mp3 player via widgets mactony Sidebars & Widgets 6 Feb 2, 2009 10:34 AM


All times are GMT -6. The time now is 10:49 AM.


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