Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Header On Popup


  • Please log in to reply
2 replies to this topic

#1 bselmani

bselmani

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 28 March 2013 - 10:27 AM

Hi all,

I want to put a Like button of my fanpage on top of the every popup window, or a banner of my fanpage. How can I execute this?

Thanks in advance!



#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 29 March 2013 - 06:32 PM

This isn't the easiest mod in the world, but definitely doable. Here's what I would suggest:

  • Create and activate a custom TubePress theme.
     
  • In your theme's copy of players/popup.tpl.php (assuming you're using the popup playerLocation), you'll see something like:
    <?php 
    /**
     * Copyright 2006 - 2013 TubePress LLC (http://tubepress.org)
     * 
     * This file is part of TubePress (http://tubepress.org)
     * 
     * This Source Code Form is subject to the terms of the Mozilla Public
     * License, v. 2.0. If a copy of the MPL was not distributed with this
     * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     */
    echo ${tubepress_api_const_template_Variable::EMBEDDED_SOURCE};
    
  • Add the HTML for your like button as the first line:
    <YOUR LIKE BUTTON HTML HERE>
    <?php
    /**
     * Copyright 2006 - 2013 TubePress LLC (http://tubepress.org)
     * 
     * This file is part of TubePress (http://tubepress.org)
     * 
     * This Source Code Form is subject to the terms of the Mozilla Public
     * License, v. 2.0. If a copy of the MPL was not distributed with this
     * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     */
    echo ${tubepress_api_const_template_Variable::EMBEDDED_SOURCE};
    
  • Optional. You might find that the video is "shifted down" out of the window by your like button. If this is the case, you'll need to make the following mod:
    • Swap the contents of src/main/web/players/popup/popup.js and src/main/web/players/popup/popup-dev.js.
       
    • Add an extra line, just under line 25, to change it from
      invoke = function (e, playerName, height, width, videoId, galleryId) {

      to

      invoke = function (e, playerName, height, width, videoId, galleryId) {
      
      height += 25;   //or however tall your like button is

A little complicated, I know, but for now it's the best way to get it done. Please give it a shot and let us know. Thanks!



#3 bselmani

bselmani

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 30 March 2013 - 01:44 PM

That's what I needed.

Thank you Eric! I appreciate your help!