total)) { $ids = array(); foreach ($get_videos->list as $key => $video) { $check_if_exists = $db->where('daily', $video->id)->getValue(T_VIDEOS, 'count(*)'); if ($check_if_exists == 0) { $ids[] = $video->id; } } } } else { $respond_error = 1; $error_text = 'Error connecting to Dailmotion API, you might reached your daily limit, please try again later.'; } } if (empty($ids) && empty($respond_error)) { $keyword_id = (isset($_SESSION['keyword-id'])) ? $_SESSION['keyword-id'] : null; if (!empty($explode[$keyword_id + 1])) { $_SESSION['keyword-id'] = $_SESSION['keyword-id'] + 1; } else { unset($_SESSION['keyword-id']); if (empty($_GET['finished']) && $search_made == 1) { header("Location: " . PT_LoadAdminLinkSettings('import-from-dailymotion?finished=1')); } } } $category_filter = 0; if (!empty($_GET['category_id'])) { if (in_array($_GET['category_id'], array_keys(ToArray($pt->categories)))) { $category_filter = $_GET['category_id']; } } $get_ini = ini_get('max_input_vars'); $auto_import = 0; if (!empty($_GET['auto_import'])) { $auto_import = 1; } ?>
If you want to import more than 180 videos by one click, you need to increase max_input_vars in your php.ini file.

Videos > Import Videos > Import From Dailymotion

Import Videos From Dailymotion

Videos

list as $key => $video) { $thumb = PT_GetMedia('upload/photos/thumbnail.jpg'); if (!empty($video->thumbnail_1080_url)) { $thumb = $video->thumbnail_1080_url; } else if (!empty($video->thumbnail_large_url)) { $thumb = $video->thumbnail_large_url; } $tags = ''; if (is_array($video->tags)) { $tags_array = array(); $tag_count = 0; foreach ($video->tags as $key => $tag) { if ($tag_count < 11) { $tags_array[] = $tag; } $tag_count++; } $tags = implode(',', $tags_array); } $duration = '00:00'; if (!empty($video->duration)) { $duration = gmdate("i:s", $video->duration); } $array_data = array( 'ID' => $video->id, 'TITLE' => $video->title, 'DESC' => $video->description, 'THUMB' => $thumb, 'TAGS' => $tags, 'DURATION' => $duration ); echo PT_LoadAdminPage('import-from-dailymotion/list', $array_data); } } else { echo '
No videos found, try another page.
'; } ?>

Auto Import Successfully Completed!

videos successfully imported.

Error found while fetching the videos!