WordPress.org

Ready to get started?Download WordPress

Forums

(wordtube) How do I put the video playlist in the sidebar? (14 posts)

  1. kiwiboy
    Member
    Posted 5 years ago #

    Hey guys...

    I need some help with WordTube: http://wordpress.org/extend/plugins/wordtube/

    I have set it up and got it working in one of my normal blog pages: http://socialsupermen.com/company-profile/

    To put the list into a page I just paste in the tag: [myplaylist id=1]

    But it doesn't work the same when I paste the same tag into my sidebar...

    I want to put the same player into my sidebar - there is a widget for putting just ONE video in the sidebar but how can I put more the whole list there?

    Thanks in advance!

    Nathan

  2. net90s
    Member
    Posted 5 years ago #

  3. ZmoneyENT
    Member
    Posted 5 years ago #

    Try widget Box and search Youtube!

    Thats how I got mine :)

    http://www.widgetbox.com/

  4. zigurds
    Member
    Posted 5 years ago #

    I you want to add a play-list into your sidebar, then you will have to download WordTube version 1.53, extract it somewhere and open file wordtube.php.
    Find and copy function "replacevideo" (line 147).
    Then open your wp-content/plugins/wordtube/wordtube.php file and paste the function after last line. Save the file.
    Next open your wp-content/themes/your_theme/sidebar.php file and add the following code in the place where you want your play-list to appear:

    <?php if(function_exists('replacevideo')){echo replacevideo(ID,"mediaplayer.swf","playlist");} ?>

    Replace "ID" with ID of your play-list, e.g. 1. Save and upload both modified files to your live server.

    It is strange that author of this cool plugin have removed this function after v 1.53. Next strange thing is it has WordTube widget, but there is no play-list selection and you can't display any play-list.

    Let's hope in next version author will add this functionality.

  5. kepcos
    Member
    Posted 5 years ago #

    Please u can to put el code complete of the file wordtube.php

    thank u very Much!!

  6. trumanews
    Member
    Posted 5 years ago #

    Well, I copied the function from line 147 to 244, but I get the following message: "Get the Flash Player to see the wordTube Media Player."

  7. bollywooddreamz
    Member
    Posted 5 years ago #

    i am not a guy who know coding well but got it working.

    dont need to use all that code copy and pasting as the function is within the plugin. just check the functions.php in lib folder of the plugin.

    this is what u need to use

    '<?php if(function_exists('wt_GetPlaylist')){echo wt_GetPlaylist(0,"player.swf","playlist");} ?>'

    hope it helps for u.

  8. bollywooddreamz
    Member
    Posted 5 years ago #

    hey i for got replace the '0' with the id of ur playlist

  9. johndeere
    Member
    Posted 5 years ago #

    I dont understand as there actually is a 0!?

    strange thing...

  10. hartlijn
    Member
    Posted 5 years ago #

    @bollywooddreamz: thanks a lot. is there some additional variables we can add to change the size and skin of this specific playlist?

    thanks
    hartlijn

  11. hartlijn
    Member
    Posted 5 years ago #

    forget my last question.
    I tried to create my first widget today :)
    A quick and dirty way to add this as a widget. Create file with this content.

    <?php
    /*
    Plugin Name: Wordtube Joost Widget Playlist
    Version: 0.1 alpha
    Plugin URI: http://
    Author: Joost
    Author URI:
    Description: Toont de  playlist van gallery nummer 1 (Terre).
    
    */
    
    function widget_joostwidgetwordtube_register() {
          function widget_joostwidgetwordtube($args) {
              extract($args);
          ?>
                  <?php echo $before_widget; ?>
                      <?php echo $before_title
                          . 'Terre Cinema'
                          . $after_title; ?>
                      <?php if(function_exists('wt_GetPlaylist')){echo wt_GetPlaylist(1,250,380,"player.swf","playlist");} ?>
                  <?php echo $after_widget; ?>
          <?php
          }
          register_sidebar_widget('Wordtube show playlist',
              'widget_joostwidgetwordtube');
    
      register_sidebar_widget('Terre Cinema','widget_joostwidgetwordtube');}
    add_action('init', widget_joostwidgetwordtube_register);
    
    ?>

    Replace 'Terre Cinema' by something you like to call your widget.
    Change wt_GetPlaylist(1,250,380,"player.swf","playlist"). The '1' is de number of the gallery.
    Save it to your plugins folder and activate.

    It works great for me.

    Please note: this widget is not customizable from Admin panel. The gallery number, dimensions and descriptions should be able to be changed from there. But that's for someone else to fix.

    enjoy

  12. maimaithaichai
    Member
    Posted 5 years ago #

    works great for me too!

  13. Alex Blink
    Member
    Posted 5 years ago #

    hartlijn good job bro,
    but adsense not work.

  14. koneck
    Member
    Posted 5 years ago #

    hartlijn, Thank you so freaking much. All the other coding was giving me a damn headache.

Topic Closed

This topic has been closed to new replies.

About this Topic