Support > cpg1.5 plugin contributions
Remote videos for cpg1.5.x
kylemj:
--- Quote from: Αndré on August 04, 2015, 08:21:13 pm ---Please post more details. What exactly have you tried?
--- End quote ---
I didn't keep all the tests but this was the last one i tried, I don't know coding and tried to manipulate existing ones but it didn't work as the VK embed code uses 3 different IDs
--- Code: ---
case 'vk':
$params = array(
'search_pattern' => '/http:\/\/(?:www\.)?vk\.com\/\?video_ext.php?oid=([A-Za-z0-9]+)&id=([A-Za-z0-9]+)&hash=([A-Za-z0-9]+)/',
'default_width' => 640,
'default_height' => 480,
'player' => 'http://vk.com/video_ext.php?oid={MATCH_1}&id={MATCH_2}&hash={MATCH_3}',
'player_height' => 0,
);
return remote_videos_html_replace($params, $pic_html);
break;
/*
case '':
$params = array(
'search_pattern' => '',
'default_width' => ,
'default_height' => ,
'player' => '{MATCH_1}',
'player_height' => ,
);
return remote_videos_html_replace($params, $pic_html);
break;
--- End code ---
This is the embed code VK gives
--- Code: ---<iframe src="http://vk.com/video_ext.php?oid=164681391&id=162151261&hash=45dcf38e51031b2f" width="607" height="360" frameborder="0"></iframe>
--- End code ---
So theoretically just need to know how to get the oid, id and hash values
Αndré:
--- Code: ---'search_pattern' => '/http:\/\/(?:www\.)?vk\.com\/video_ext\.php\?oid=([A-Za-z0-9]+)&id=([A-Za-z0-9]+)&hash=([A-Za-z0-9]+)/',
--- End code ---
removes the invalid video ID message.
Unfortunately the vk.com player needs some more parameters to play the video:
--- Code: ---<param name="flashvars" value="uid=164681391&vid=162151261&oid=164681391&host=http://cs505420v4.vk.me/&vtag=3db79b5d6d&ltag=l_6b169856&vkid=162151261&md_title=%26lt%3Biframe+src%3D%22http%3A%2F%2Fvk.com%2Fvideo_ext.php%3Foid%3D7324586%26id%3D162001297%26hash%3Db7d57fd756ecf0d3%26sd%22+width%3D%26quot&md_author=Elena+Rotsel&author_id=164681391&author_href=/id164681391&hd=0&no_flv=1&hd_def=0&dbg_on=0&t=0&duration=63&thumb=http://cs505420.vk.me/u164681391/video/l_6b169856.jpg&hash=6b3a8670eb0ed9db33fef5cd5dc3487f&hash2=45dcf38e51031b2f&angle=0&img_angle=0&repeat=0&show_ads_preroll=0&show_ads_postroll=0&show_ads_overlay=0&legal_owner=0&eid1=0&slot=0&g=0&a=0&puid34=0&water_mark=&can_rotate=1&c3=&no_adfox=1&ads_preview=0&puid4=0&url240=http://cs505420v4.vk.me/u164681391/videos/3db79b5d6d.240.mp4?extra=D0j3UO6n8dPwDgaNZXS5TbpsaynlgivH2y_L8viVqgfY7xW98I-99CNw08vomo0qwM7NyMTi3mmG4EjeM-J4qNC_IdjPOFI&jpg=http://cs505420.vk.me/u164681391/video/l_6b169856.jpg&ip_subm=1&video_ext=1&is_yandex=0&apm;&is_vk=1&is_ext=1&referrer=&lang_add=Add+to+My+Videos&lang_added=Video+added+to+My+Videos&lang_share=Share&lang_like=Like&lang_subscribe=Subscribe&lang_subscribed=You+have+subscribed&lang_volume_on=Unmute&lang_volume_off=Mute&lang_volume=Volume&lang_hdsd=Change+Video+Quality&lang_open_popup=Expand&lang_fullscreen=Full+Screen&lang_window=Minimize&lang_rotate=Rotate&lang_ads_link=Advertiser%27s+Site&lang_ads=Ads&lang_ads_skip=Skip+ad&lang_next=Next+video&lang_replay=Replay&lang_next_cancel=Cancel&lang_ads_skip_time=Skip+ads+in+%7Btime%7D&lang_report_problem=Report+a+problem..&video_play_hd=Watch+in+HD&video_stop_loading=Stop+Download&video_player_version=VK+Video+Player&goto_orig_video=Go+to+Video&video_get_video_code=Copy+video+code&video_load_error=The+video+has+not+uploaded+yet+or+the+server+is+not+available&video_get_current_url=Copy+frame+link"></param>
--- End code ---
so the video player cannot be embedded directly in Coppermine, but needs an iframe. Please have a look how it has been solved for vine.
kylemj:
After many days of clueless testing i have got it to work ;D
ok and to share
find
--- Code: ---$params['player'] = str_replace("{MATCH_2}", $video_id[2], $params['player']);
--- End code ---
and below add
--- Code: ---$params['player'] = str_replace("{MATCH_3}", $video_id[3], $params['player']);
--- End code ---
find
--- Code: ---$params['extra_params'] = str_replace("{MATCH_2}", $video_id[2], $params['extra_params']);
--- End code ---
and below add
--- Code: ---$params['extra_params'] = str_replace("{MATCH_3}", $video_id[3], $params['extra_params']);
--- End code ---
after the last case (eg. vine after break; add
--- Code: --- case 'vk':
$params = array(
'search_pattern' => '/http:\/\/(?:www\.)?vk\.com\/video_ext\.php\?oid=([A-Za-z0-9]+)&id=([A-Za-z0-9]+)&hash=([A-Za-z0-9]+)/',
'default_width' => 660,
'default_height' => 415,
'player' => 'http://vk.com/video?act=get_swf&oid={MATCH_1}&vid={MATCH_2}&embed_hash={MATCH_3}',
--- End code ---
kylemj:
You'll need to take the url out of the embed code and to save the text file extension as .vk
chant_s:
--- Quote from: Αndré on June 18, 2009, 05:03:20 pm ---With this plugin you can 'upload' videos from Youtube and other video file hosters to your website.
Please find the button for the config page on the plugin manager. There you can enable/disable the different video hosters.
Usage:
1. Create a text file and insert the permalink or url from the browser address bar (e.g. http://www.youtube.com/watch?v=6B26asyGKDo)
2. Rename the text file to <filename>.<provider> (e.g. my_video.youtube)
3. Upload the text file to your Coppermine gallery (use the upload form or the batch-add feature)
4. Optional: upload a thumbnail for your video by using this plugin
Download: http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_remote_videos_v1.9.zip/download
--- End quote ---
Ive uploaded the folder to the gallery directory, as well as the txt file, but this plugin doenst show in plugin directory? nor does the video work
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version