Thread: Major Additions - 8WayRun.Com - Media Library
View Single Post
  #2461  
Old 01-05-2012, 08:46 PM
michal72 michal72 is offline
 
Join Date: Nov 2010
Posts: 213
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mariner1 View Post
Thanks for the info.Did what you send but now it hangs here

Altering Table usergroup ...Done!
Altering Table user ...Done!

Creating Table media ... Done!
Creating Table media_category ... Done!
Creating Table media_comment ... Done!
Creating Table media_rating ... Done!
Creating Table media_service ... Done!
-- Adding Service Row YouTube ...
So, now is clear that install is not able add records to the tables. Why? I don't know

Please remove also below code to finalize installation
Then you will try to add these records manually.

Code:
echo('<li> -- Adding Service Row <strong>YouTube</strong> ... '); vbflush();
	$dm =& datamanager_init('Media_Service', $vbulletin, ERRTYPE_CP);
	$dm->set('svcName', "YouTube");
	$dm->set('svcRegex', "http:\/\/[a-z]*?[\.]?youtube\.[a-z]*?\/watch\?v=([\w_-]*)");
	$dm->set('svcURL', "http://www.youtube.com/watch?v={serviceVAL}");
	$dm->set('svcFeed', "http://gdata.youtube.com/feeds/api/videos/{serviceVAL}");
	$dm->set('svcValue2', "null");
	$dm->set('svcThumb', "\$arr['media:group']['media:thumbnail'][3]['url']");
	$dm->set('svcTitle', "\$arr['media:group']['media:title']['value']");
	$dm->set('svcDesc', "\$arr['media:group']['media:description']['value']");
	$dm->set('svcLength', "\$arr['media:group']['yt:duration']['seconds']");
	$dm->set('svcTags', "\$arr['media:group']['media:keywords']");
	$dm->set('svcMovie', "http://www.youtube.com/v/{serviceVAL}?autoplay={ap10}&hd=1&fs=1");
	$dm->set('svcWidth', "640");
	$dm->set('svcHeight', "385");
	$dm->set('svcStream', "null");
	$dm->set('svcError', "\$arr['app:control']['yt:state']['value']");
	$dm->set('svcParams', "");
	$dm->save();
echo('Done!</li>'); vbflush();

echo('<li> -- Adding Service Row <strong>Vimeo</strong> ... '); vbflush();
	$dm =& datamanager_init('Media_Service', $vbulletin, ERRTYPE_CP);
	$dm->set('svcName', "Vimeo");
	$dm->set('svcRegex', "http:\/\/[a-z]*?[\.]?vimeo\.[a-z]*?\/([\d]*)");
	$dm->set('svcURL', "http://www.vimeo.com/{serviceVAL}");
	$dm->set('svcFeed', "http://www.vimeo.com/api/clip/{serviceVAL}.xml");
	$dm->set('svcValue2', "null");
	$dm->set('svcThumb', "\$arr['clip']['thumbnail_large']");
	$dm->set('svcTitle', "\$arr['clip']['title']");
	$dm->set('svcDesc', "strip_tags(\$arr['clip']['caption'])");
	$dm->set('svcLength', "\$arr['clip']['duration']");
	$dm->set('svcTags', "\$arr['clip']['tags']");
	$dm->set('svcMovie', "http://vimeo.com/moogaloop.swf?clip_id={serviceVAL}&autoplay={ap10}");
	$dm->set('svcWidth', "640");
	$dm->set('svcHeight', "360");
	$dm->set('svcStream', "null");
	$dm->set('svcError', "null");
	$dm->set('svcParams', "");
	$dm->save();
echo('Done!</li>'); vbflush();

echo('<li> -- Adding Service Row <strong>MetaCafe</strong> ... '); vbflush();
	$dm =& datamanager_init('Media_Service', $vbulletin, ERRTYPE_CP);
	$dm->set('svcName', "MetaCafe");
	$dm->set('svcRegex', "http:\/\/[a-z]*?[\.]?metacafe\.[a-z]*?\/watch\/([\w-]*)");
	$dm->set('svcURL', "http://www.metacafe.com/watch/{serviceVAL}");
	$dm->set('svcFeed', "http://www.metacafe.com/api/item/{serviceVAL}/");
	$dm->set('svcValue2', "null");
	$dm->set('svcThumb', "\$arr['channel']['item']['media:thumbnail']['url']");
	$dm->set('svcTitle', "\$arr['channel']['item']['media:title']");
	$dm->set('svcDesc', "\$arr['channel']['item']['media:description']");
	$dm->set('svcLength', "\$arr['channel']['item']['media:content']['duration']");
	$dm->set('svcTags', "\$arr['channel']['item']['media:keywords']");
	$dm->set('svcMovie', "http://www.metacafe.com/fplayer/{serviceVAL}/0.swf?autoPlay={ap10}");
	$dm->set('svcWidth', "640");
	$dm->set('svcHeight', "392");
	$dm->set('svcStream', "null");
	$dm->set('svcError', "null");
	$dm->set('svcParams', "");
	$dm->save();
echo('Done!</li>'); vbflush();

echo('<li> -- Adding Service Row <strong>DailyMotion</strong> ... '); vbflush();
	$dm =& datamanager_init('Media_Service', $vbulletin, ERRTYPE_CP);
	$dm->set('svcName', "DailyMotion");
	$dm->set('svcRegex', "http:\/\/[a-z]*?[\.]?dailymotion\.[a-z]*?\/video\/([A-Za-z0-9]*)");
	$dm->set('svcURL', "http://www.dailymotion.com/video/{serviceVAL}");
	$dm->set('svcFeed', "http://www.dailymotion.com/rss/video/{serviceVAL}");
	$dm->set('svcValue2', "null");
	$dm->set('svcThumb', "\$arr['channel']['item']['media:thumbnail']['url']");
	$dm->set('svcTitle', "\$arr['channel']['item']['media:title']");
	$dm->set('svcDesc', "\$arr['channel']['item']['itunes:summary']");
	$dm->set('svcLength', "\$arr['channel']['item']['media:group']['media:content'][0]['duration']");
	$dm->set('svcTags', "\$arr['channel']['item']['itunes:keywords']");
	$dm->set('svcMovie', "http://www.dailymotion.com/swf/video/{serviceVAL}?autoplay={ap10}");
	$dm->set('svcWidth', "640");
	$dm->set('svcHeight', "360");
	$dm->set('svcStream', "null");
	$dm->set('svcError', "null");
	$dm->set('svcParams', "");
	$dm->save();
echo('Done!</li>'); vbflush();

echo('<li> -- Adding Service Row <strong>Veoh</strong> ... '); vbflush();
	$dm =& datamanager_init('Media_Service', $vbulletin, ERRTYPE_CP);
	$dm->set('svcName', "Veoh");
	$dm->set('svcRegex', "http:\/\/[a-z]*?[\.]?veoh\.[a-z]*?\/.*?watch\/([\w]*)");
	$dm->set('svcURL', "http://www.veoh.com/browse/videos/watch/{serviceVAL}");
	$dm->set('svcFeed', "http://www.veoh.com/rest/videos/{serviceVAL}/details");
	$dm->set('svcValue2', "null");
	$dm->set('svcThumb', "\$arr['video']['fullHighResImagePath']");
	$dm->set('svcTitle', "\$arr['video']['title']");
	$dm->set('svcDesc', "\$arr['video']['description']");
	$dm->set('svcLength', "\$arr['video']['length'];preg_match('/([\d]*)([a-z\s]*)([\d]*)([a-z\s]*)([\d]*)/i',\$len,\$T);if(strpos(\$T[2],'h')){\$A=\$T[1]*60*60;}elseif(strpos(\$T[2],'m')){\$A=\$T[1]*60;}else{\$A=\$T[1];}if(strpos(\$T[4],'m')){\$B=\$T[3]*60+\$T[5];}else{\$B=\$T[3];}\$len=\$A+\$B");
	$dm->set('svcTags', "\$arr['video']['tagsCommaSeparated']");
	$dm->set('svcMovie', "http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?permalinkId={serviceVAL}&amp;videoAutoPlay={ap10}");
	$dm->set('svcWidth', "640");
	$dm->set('svcHeight', "385");
	$dm->set('svcStream', "null");
	$dm->set('svcError', "null");
	$dm->set('svcParams', "");
	$dm->save();
echo('Done!</li>'); vbflush();

echo('<li> -- Adding Service Row <strong>MegaVideo</strong> ... '); vbflush();
	$dm =& datamanager_init('Media_Service', $vbulletin, ERRTYPE_CP);
	$dm->set('svcName', "MegaVideo");
	$dm->set('svcRegex', "http:\/\/[a-z]*?[\.]?megavideo\.[a-z]*?\/\?v=([\w]*)");
	$dm->set('svcURL', "http://www.megavideo.com/?v={serviceVAL}");
	$dm->set('svcFeed', "http://www.megavideo.com/xml/videolink.php?v={serviceVAL}");
	$dm->set('svcValue2', "null");
	$dm->set('svcThumb', "preg_match('/[\w+%.-]*'.\$service['serviceVAL'].'([\w]*)[\w+%.-]*/i',\$arr['ROW']['embed'],\$match);\$thu='http://img1.megavideo.com/'.\$match[1].'.jpg'");
	$dm->set('svcTitle', "urldecode(\$arr['ROW']['title'])");
	$dm->set('svcDesc', "urldecode(\$arr['ROW']['description'])");
	$dm->set('svcLength', "urldecode(\$arr['ROW']['runtime'])");
	$dm->set('svcTags', "urldecode(preg_replace('/\+/',', ',\$arr['ROW']['tags']))");
	$dm->set('svcMovie', "http://www.megavideo.com/v/{serviceVAL}?autoplay={apTF}");
	$dm->set('svcWidth', "640");
	$dm->set('svcHeight', "360");
	$dm->set('svcStream', "null");
	$dm->set('svcError', "null");
	$dm->set('svcParams', "");
	$dm->save();
echo('Done!</li>'); vbflush();

echo('<li> -- Adding Service Row <strong>uStream</strong> ... '); vbflush();
	$dm =& datamanager_init('Media_Service', $vbulletin, ERRTYPE_CP);
	$dm->set('svcName', "uStream");
	$dm->set('svcRegex', "http:\/\/[a-z]*?[\.]?ustream\.tv\/recorded\/([\d]*)");
	$dm->set('svcURL', "http://www.ustream.tv/recorded/{serviceVAL}");
	$dm->set('svcFeed', "http://api.ustream.tv/xml/video/{serviceVAL}/getinfo");
	$dm->set('svcValue2', "null");
	$dm->set('svcThumb', "\$arr['results']['imageUrl']['medium']");
	$dm->set('svcTitle', "\$arr['results']['title']");
	$dm->set('svcDesc', "\$arr['results']['description']");
	$dm->set('svcLength', "\$arr['results']['lengthInSecond']");
	$dm->set('svcTags', "preg_match_all('/<array key=\"\d*\"><!\[CDATA\[(.*)\]\]><\/array>/i',\$result,\$matches);\$tag=implode(',', \$matches[1])");
	$dm->set('svcMovie', "http://www.ustream.tv/flash/video/{serviceVAL}?autoplay={apTF}");
	$dm->set('svcWidth', "640");
	$dm->set('svcHeight', "386");
	$dm->set('svcStream', "null");
	$dm->set('svcError', "null");
	$dm->set('svcParams', "");
	$dm->save();
echo('Done!</li>'); vbflush();
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01098 seconds
  • Memory Usage 1,824KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete