vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Random YouTube/Vimeo Video Widget (https://vborg.vbsupport.ru/showthread.php?t=286016)

imported_dfmafia 07-26-2012 10:00 PM

Random YouTube/Vimeo Video Widget
 
1 Attachment(s)
Random YouTube Video Widget

Description: Allows you to display 1 random video from any number of videos you choose.

Tested on vB 4.2.0 Patch Level 2

Live Demo: MrDeids.com

https://vborg.vbsupport.ru/attachmen...1&d=1343421739

https://vborg.vbsupport.ru/attachmen...1&d=1343427292

Installation:
1. Download Random_Video_Widget_v1.0.1.zip
2. Unzip contents and view README
3. Go To -> Admincp -> vBulletin CMS -> Widgets
4. Create new widget
Widget Type: Static HTML. Name it whatever you desire. ie. "Random Video"and save it.
5. Configure The Widget in VBulletin CMS -> widgets (insert all the code in the Random_Video_Widget_v1.0.1.txt making edits highlighted in red to suit your site)
6. Add the widget in page through layout manager.

Uninstallation:
Delete "Random Video" (or whatever you named it) Widget in vBulletin CMS -> Widgets

The RED items below will need to be edited to suit your requirements.

video[0] = "http://www.youtube.com/embed/s7-pbVdiDas";

s7-pbVdiDas is the Video link you can get from your youtube channel.
ie. http://www.youtube.com/watch?v=s7-pbVdiDas


this is the total number of videos you want to pull from your youtube channel list
var numberOfVideos = 12;


adjust for height and width of your layout.
width="340" height="280"


I do not have a Vimeo account but it should work the same way.
for vimeo use:
video[0] = "http://player.vimeo.com/video/XXXXXXXX?title=0&byline=0&portrait=0";

XXXXXXXX is the Video link you can get from your vimeo video id.

Please Click Mark As Installed If You Have Installed.

Mod History:
v1.0.0 :: 27 July 2012 :: First Release
v1.0.1 :: 28 July 2012 :: Added Vimeo Support

ProFifaLeagues 07-27-2012 09:36 PM

Nice one m8 thank you will be useful in the coming weeks for us

imported_dfmafia 07-28-2012 12:19 AM

UPDATED:

for vimeo use:
video[0] = "http://player.vimeo.com/video/XXXXXXXX?title=0&byline=0&portrait=0";

XXXXXXXX is the Video link you can get from your vimeo video id.

Brew 08-03-2012 05:47 PM

I don't get it :)

How does the mod randomize videos if I only put the number of the video in the string?

Is there a way to set it up so it will randomly take a video from a channel?

Like say, a video from the CNN Youtube channel, then one from the Fox News channel, then one from MSNBC channel?

If this doesn't do that will you please consider making that happen?

Cheers!

imported_dfmafia 08-03-2012 11:41 PM

I haven't found a clean way to pull random videos from multiple channels. would be nice and something I am looking into.

This pulls a random video out of the list you provide. you can put as many videos links into it as you want. It will pull one of those videos randomly during each page load.

I have 12 on my channel. as I upload more videos, I just add that new video to the script. I'd rather have some control over the content of my site than pulling random videos from multiple channels.

Brew 08-04-2012 03:12 AM

Since I have a political web site I need to be able to post the newest stuff from the news sites. They update their stuff daily so I can't keep track of which things I'll put into this mod.

Even if you had it for one channel would be ok. Then add a randomizer conditional for the other sites.

Just a thought :)

imported_dfmafia 08-04-2012 03:18 AM

I'll look into it.

Syxguns 08-15-2012 02:38 AM

I tagged it, the widget looks nice, but being able to pull from certain channels would be perfect.

imported_dfmafia 09-11-2012 12:02 AM

I haven't forgotten this. I've been busy coding sites. When I get some free time, I'll reattack this.

alhidaya 10-16-2012 06:18 AM

The installation of video work.. When you refresh the page cms, represent several videos and they do not go on video [0], vidéo [1], vidéo [2], vidéo [3] etc... Mais elles font se représentent par exemple : vidéo [0], vidéo [1], vidéo [1], vidéo[1], vidéo[2], vidéo[3], vidéo[1], vidéo[4],... The videos don't follow every time we refreshes the page.


All times are GMT. The time now is 08:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01163 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete