Jump to content
Sign in to follow this  
eclipsemusic

Placing widgets using hooks

Recommended Posts

eclipsemusic

Hello guys! I have tried to look into this hook thing but I can't figure how to use them (I'm really a novice in this). So can someone help me through this step by step. Here is the "problem": I would like to add my audio player widget into the navigation bar, basically replacing the search box (exactly into the same space). How do I do this? With hooks?

Share this post


Link to post
Share on other sites
Rob
Actually, no. You can add a link to your audio player into the navigation via the menu. Go to Dashboard > Appearance > Menus and add a Custom Link to the audio player. Now that's a generic player, not specific to one audio clip. However, if you need to play a specific audio clip, then yes, you need a hook. Check this http://www.pagelines.com/wiki/Hooks as an intro to hooks. This will introduce where to add one http://www.pagelines.com/wiki/How_to_Add_Customization

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
eclipsemusic
I would like the audio player to actually be in the nav bar, not a link to the player. I have the Audio player plugin... Sorry I messed that up in the the last message. What I ment to ask was how to place the audio player plugin with hooks into the same place where the search box is if enabled. Or do I need hooks for that?

Share this post


Link to post
Share on other sites
Rob
I'm sorry. I misunderstood. Have you tried adding the code for your audio player into the custom link? It might actually show the actual player there, not as a link. Otherwise, could you provide a link to your site and we'll try to assist with the right kind of hook. Thanks for your patience.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
eclipsemusic
Unfortunately it didn't work. Here is a link to my page (very much in working progress). I added the player into the content area for now for you to check in to. http://www.eclipse-music.net/vuokko/ My intentions are that the player would play continuously even if visitors browse the pages. Will it work, or will it load the player every time when site is changed and start playing from the start again? If so, how could I get it to play continuously when browsing? Then I don't know if i should start a new discussion about this, but I would like to add a customized scrollbar to my Hungry feed rss feed plugin so that you could scroll the feed without showing all the posts. Is it doable? I don't have any kind of code for the scroll bar yet... Thank you.. -Vuokko

Share this post


Link to post
Share on other sites
Danny
Hi Vuokko, Can you post a link to the code or plug-in for the Media player please. Also, I don't think its possible to have it continuously play when a user navigates to a new page.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
eclipsemusic
Okay, here's what I inserted to the page where the player currently is: [audio:http://www.eclipse-music.net/soundfiles/07%20Missa%20inte%20bussen.mp3|autostart=yes] Can you think of any way to add the player so that visitors are able to listen the player without interruption? Maybe a new window that opens when entering the site where is only the player, I just dont know how to do it... I found this on from the plugin page: To insert a player anywhere else than in a page or post, use this ???tag???: I just don't know where to add it or how exactly it will work...

Share this post


Link to post
Share on other sites
Rob
Hi, Danny's absolutely correct that if someone navigates to another page or post in your site, the header changes too, not being constant through the entire site. Every navigation would restart the audio file. If it auto-plays, I can say with great honesty and 15 years of online experience, your visitors will leave your site fast and not return. The reason? You're forcing them to listen to something. Worse, you'll get massive complaints from people who have their speakers set to a high volume. I'd strongly recommend setting up the audio as an option on individual posts. This way, if you have different songs you wish people to hear, they can, without interference and by their own choice. That said, if you absolutely require the hook option for the header, then you'll find this in functions.php in the platformbase folder: [code]// ---> uncomment to load[/code] Immediately beneath it, add: [code]add_action('pagelines_inside_top_branding', 'audio_autoplayer'); // function name function audio_autoplayer(){ ?>
PlatformPro > Custom Code under CSS Rules add: [code]div.autoplayer {float: right;}[/code] Again, I think this ill-advised but wish you the best in your implementation. If you need additional assistance please let us know.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
eclipsemusic
Okay, thank you for your advice. I probably won't set the player to start automatically 'cause you're right about it being possibly annoying.. How can I set the player to play (when wanted) without it being interrupted when visitors browse? Is there any way? Maybe the player opening into another window? Thank's again!

Share this post


Link to post
Share on other sites
eclipsemusic
Oh I tried what you suggested and I didn't get it to work. Nothing showed up on the page... So how about the player opening into another window... Is it possible?

Share this post


Link to post
Share on other sites
Jenny
You won't be able to have it keep playing when a visitor browses because every page, link, menu, etc is a new page load, hence the audio will start playing again.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
eclipsemusic
So there is no way to do this. Too bad. Just wondering how they do it in some other sites.. But not even a pop up window is possible with wp? Thank you for your patience! It seems that I really have hard time taking no for an answer...

Share this post


Link to post
Share on other sites
catrina
I think these other websites use more advanced Flash audio players that are custom-made just for them and the way their sites are made allows visitors to browse other pages (using perhaps iFrames).

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×