Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

incorporating xspf player to the header...


  #1  
Old Feb 11, 2009, 05:30 PM
metwin1
 
4 posts · Feb 2009
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?
  #2  
Old Feb 11, 2009, 06:56 PM
Flynn's Avatar
Flynn
 
3,768 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,768 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,768 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!

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 05:02 PM.


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