} if ($pattern != '') { $data[$k]['website_link'] = $config['project_url'] . '/' . str_replace("%ID%", $video_id, str_replace("%DIR%", $video['dir'], $pattern)) . $affiliate_str; if ($feed_options['enable_localization'] == 1 && $locale != '') { $satellites = mr2array(sql("select * from {$config['tables_prefix']}admin_satellites")); foreach ($satellites as $satellite) { $satellite_website_ui_data = @unserialize($satellite['website_ui_data']); if ($satellite_website_ui_data['locale'] == $locale) { $data[$k]['website_link'] = $satellite['project_url'] . '/' . str_replace("%ID%", $video_id, str_replace("%DIR%", $video['dir'], $satellite_website_ui_data['WEBSITE_LINK_PATTERN'])) . $affiliate_str; break; } } } } if ($feed_options['enable_categories'] == 1) { $data[$k]['categories'] = get_video_categories($video_id, $feed['cache'], $feed_options['enable_localization'] == 1 && $locale != '' ? $locale : ""); } if ($feed_options['enable_tags'] == 1) { $data[$k]['tags'] = get_video_tags($video_id, $feed['cache'], $feed_options['enable_localization'] == 1 && $locale != '' ? $locale : ""); } if ($feed_options['enable_models'] == 1) { $data[$k]['models'] = get_video_models($video_id, $feed['cache'], $feed_options['enable_localization'] == 1 && $locale != '' ? $locale : ""); } if ($feed_options['video_content_type_id'] == 2 || $feed_options['video_content_type_id'] == 4) { if ($video['load_type_id'] == 1 || $video['load_type_id'] == 4) { if ($video['is_private'] == 0 || $video['is_private'] == 1) { if ($video_format_standard != '') { foreach ($video_formats as $format_rec) { if ($format_rec['postfix'] == $video_format_standard) { $data[$k]['hotlink_format'] = $format_rec; break;
$affiliate_str = ''; $affiliate_str_embed = ''; if ($feed['affiliate_param_name'] != '' && $_REQUEST[$feed['affiliate_param_name']] != '') { $affiliate_str = "?{$feed['affiliate_param_name']}=" . $_REQUEST[$feed['affiliate_param_name']]; $affiliate_str_embed = "&wm_id=" . $_REQUEST[$feed['affiliate_param_name']]; } foreach ($data as $k => $video) { $video_id = $video['video_id']; $dir_path = get_dir_by_id($video_id); $video_formats = get_video_formats($video_id, $video['file_formats']); $data[$k]['screen_url'] = "{$dir_path}/{$video_id}/{$screenshot_format}"; if ($pattern != '') { $data[$k]['website_link'] = $config['project_url'] . '/' . str_replace("%ID%", $video_id, str_replace("%DIR%", $video['dir'], $pattern)) . $affiliate_str; } if ($feed_options['enable_categories'] == 1) { $data[$k]['categories'] = get_video_categories($video_id, $feed['cache']); } if ($feed_options['enable_tags'] == 1) { $data[$k]['tags'] = get_video_tags($video_id, $feed['cache']); } if ($feed_options['enable_models'] == 1) { $data[$k]['models'] = get_video_models($video_id, $feed['cache']); } if ($feed_options['video_content_type_id'] == 2 || $feed_options['video_content_type_id'] == 4) { if ($video['load_type_id'] == 1 || $video['load_type_id'] == 4) { if ($video['is_private'] == 0 || $video['is_private'] == 1) { if ($video_format_standard != '') { foreach ($video_formats as $format_rec) { if ($format_rec['postfix'] == $video_format_standard) { $data[$k]['hotlink_format'] = $format_rec; break;