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

Modifying the tubepress widget


  • Please log in to reply
7 replies to this topic

#1 Dany Joumaa

Dany Joumaa

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 12 May 2011 - 06:59 PM

Hi there,

I took a glance at the tubepress code and can't seem to find where its widget code is. Where might I find it?

Thanks so much,
--Dany.

#2 Paul Mitchener

Paul Mitchener

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 10 August 2011 - 03:34 AM

Dany,

Did you find the answer to this. I have the same issue. I want to remove the title from the widget.

Any clues on where to modify this would be great.

Thanks.
Paul

#3 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 12 August 2011 - 10:15 PM

Hi Paul,

You can modify the widget's output by editing https://github.com/e...lo...s.php#L105. If you want to remove the title entirely, I would change it from

echo $before_widget . $before_title .$context->get(org_tubepress_api_const_options_names_Widget::TITLE) .$after_title . $out . $after_widget;
to

echo $before_widget . $out . $after_widget;
Let me know how that works for you. Thanks!

#4 dan tamez

dan tamez

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 18 August 2011 - 01:34 AM

What if I want to move the title underneath the main video? Right now it appears above it. Thanks!

#5 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 21 August 2011 - 03:24 PM

What if I want to move the title underneath the main video? Right now it appears above it. Thanks!


Are you talking about the title that shows up above the embedded video player? Or the title that shows up above the video thumbnails in the widget? Let me know and I can point you in the right direction. Thanks!

#6 dan tamez

dan tamez

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 22 August 2011 - 01:37 AM

The title that appears above the embedded video player. I'd like to move it down so it appears below the main video, but above the thumbnails - in the middle. Thanks Eric!

#7 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 24 August 2011 - 12:36 AM

OK, no problem. You'll want to make an edit to one of TubePress's HTML templates, and I would highly recommend making your changes as part of a custom TubePress theme. Basically, here's what you'll want to do:

  • Create a custom TubePress theme. Call it "mytheme" for this example.
  • Copy sys/ui/themes/default/players/normal.tpl.php to content/themes/mytheme/players/normal.tpl.php
  • Edit content/themes/mytheme/players.normal.tpl.php. You'll want to swap the two inner divs. e.g. change it from
    <div id="tubepress_embedded_title_<span class="syntaxdefault"><?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>" class="tubepress_embedded_title">    <?php echo ${org_tubepress_api_const_template_Variable::VIDEO}->getTitle(); ?>    </div><div id="tubepress_embedded_object_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>">    <?php echo ${org_tubepress_api_const_template_Variable::EMBEDDED_SOURCE}; ?>    </div></span>
    to

    <div id="tubepress_embedded_object_<span class="syntaxdefault"><?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>">    <?php echo ${org_tubepress_api_const_template_Variable::EMBEDDED_SOURCE}; ?>    </div><div id="tubepress_embedded_title_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>" class="tubepress_embedded_title">    <?php echo ${org_tubepress_api_const_template_Variable::VIDEO}->getTitle(); ?>    </div></span>
The effect will be that the title will show up under the embedded player. Does that make sense? Let me know if you need help with any of these steps. Thanks.

#8 dan tamez

dan tamez

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 24 August 2011 - 01:35 AM

Cake walk! Thanks Eric.