Feature request: first X items of a playlist (5 posts)

  1. smcphill
    Posted 6 years ago #

    Apologies if this has been previously requested. I did a search, but the WP forum search isn't very inspiring...

    I'm using wordtube v2.3.1, and love the default video playlist. One thing I would like to do is limit the results of the playlist, to say, the 5 most recent videos. This way I can use the video playlist to showcase the most recent additions without having to manually manage my own playlist.

    I envisage an additional shortcode attribute 'limit'. I've had a look through the code and it seems to me the myExtractXML.php file would require updating (to look for $_GET['limit']), along with the upstream calls (lib/wortube.class.php, lib/shortcodes.php, wordtube.php).

    I can do this myself, but don't want to lose the functionality should I upgrade the plugin. I could start overriding the calls in my own plugin, but that will get messy and I'll end up duplicating (or including) a bunch of your code... ugh!

    Is this something you'd be interested in looking at? Would you accept a patch?


  2. smcphill
    Posted 6 years ago #

    following up on this, i ended up writing a patch - it's fairly trivial. more than happy to share if you think people would like this feature

  3. dquelhas
    Posted 5 years ago #

    Hi smcphill,

    that sounds great and if you could share I would love to give it a go.
    But I have a problem with the playlists. It keeps on saying that "Task Queue failed at step 5: Playlist could not be loaded: XML could not bee parsed or playlist was empty". Could you give me a hand on this one?

    Thanks in advance!

  4. smcphill
    Posted 5 years ago #

    You can download a patch file here. It works fine for me, but YMMV.

  5. rodlehiboo
    Posted 5 years ago #

    great ! But I don't see how it works. All seems easy for people who have the knowledge of coding, but sometimes they forget whom don't understand anything :)

    So I understand I'll remove the "-" and replace by the "+" lines ... OK.

    but after then ... i want to show for example in wordpress footer the 10 last videos (not inside a post), what must I do ?

    thanks :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • wordTube
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic