'._('Results from ').$filter_by_query_text.' ('.$numHits_preview_shown._(' out of ').number_format($numHits_preview).')
';
foreach ($hits_preview as $hit) {
$user = $hit->disp_name; // Display name of video's owner
$gallery_id = $hit->gallery_id; // Gallery ID
$id = $hit->video_id; // Video ID
$master_id = $hit->master_id;
$thumb = tmb_loader($hit->thumbnail); // Video thumbnail URL
$title = $hit->title_short; // Video title
$video_url = safe_url($title);
$posted = $hit->posted; // Video post date
$posted_formatted = calcDateDifference(time(), $posted); // Formated post date
$description = $hit->teaser; // Video description
echo '
';
unset($user, $gallery_id, $gallery_url, $gallery_dir, $gallery_name, $channel,
$channel_name, $id, $thumb, $title, $posted, $posted_formatted, $description);
}
echo '
';
}
$z=0;
//search results
if ($numHits && !$error) {
if ($query_text) echo '
'._('Results from ').$query_text.' ('.$numHits_shown._(' out of ~').number_format($numHits).')
';
else echo '
'._('Page').' '.$page.' '._('of about').' '.number_format($numHits).' '._('results').'
';
if($numHits < 100 && ($filter_by == "myvidster" || $filter_by == "tag")) {
$alert= "
"._("The results from your search appear low, try our
web search for better results.")."
";
}
echo $alert;
// echo $myV_ad;
foreach ($hits as $hit) {
$user = $hit->doclist->docs[0]->disp_name; // Display name of video's owner
$gallery_id = $hit->doclist->docs[0]->gallery_id; // Gallery ID
$id = $hit->doclist->docs[0]->video_id; // Video ID
$master_id = $hit->doclist->docs[0]->master_id;
$thumb = tmb_loader($hit->doclist->docs[0]->thumbnail); // Video thumbnail URL
$title = $hit->doclist->docs[0]->title_short; // Video title
$video_url = safe_url($title);
$posted = $hit->doclist->docs[0]->posted; // Video post date
$posted_formatted = calcDateDifference(time(), $posted); // Formated post date
$description = $hit->doclist->docs[0]->teaser; // Video description
$vid_collapse_count = $hit->doclist->numFound;
$private = $hit->doclist->docs[0]->private69;
if($filter_by=='groups') {
$type = 'groups';
$type_id = $master_id;
if(!$thumb) $thumb = "images/has_groupz.jpg?v=1";
$h=75;
$w=75;
}
else {
$type = 'vsearch';
$type_id = $id;
$h=$glb_home_thumb_h;
$w=$glb_home_thumb_w;
}
if($filter_by=='downloads' || $filter_by=='cloud') {
$full_video_url="/user/cloud/page/1/play/$id";
}
else
$full_video_url = "/$type/$type_id/$video_url";
//get other users collecting this
if($vid_collapse_count > 1) {
$vid_collapse_result="
"._("collected by ")."$vid_collapse_count users";
}
$meta_type_html="";
if($glb_filter_by == 'all' && $adult_filter == 0 && $user_id && $private == 2) {
$sql = "select id from myvidster_content_meta_final where master_id = '$master_id' and status = 1 limit 1";
$result = mysql_query($sql,$mysql_link_slave);
$row = @mysql_fetch_assoc($result);
if(!$row['id']) {
$report = "
"._("filter")."";
$meta_type_html="
"._("Earn MyVidster points by setting the ").$report._(" of this video.")."
";
}
}
//if ($z < $ad_cnt) $vidresult_class = "vidresult2";
//else $vidresult_class = "vidresult";
$vidresult_class = "vidresult";
$remove = false;
$posted_by_html = '
Bookmarked ' . $posted_formatted . '';
if(!$remove) {
echo '
|
' . $title . '
Bookmarked ' . $posted_formatted . '
'.$vid_collapse_result.'
' . ShortenText($description, 150) . ''.$meta_type_html.'
|
';
}
if(!$glb_no_ads && $adult_filter==1) {
//pornmd!
$zz=urlencode(stripslashes($_GET['q']));
if($glb_sex_pref==1) $orientation="straight";
else $orientation="gay";
$taboola = "
";
}
unset($user, $gallery_id, $gallery_url, $gallery_dir, $gallery_name, $channel,
$channel_name, $id, $thumb, $title, $posted, $posted_formatted, $description,$vid_collapse_result);
$z++;
}
if($z) {
$pagination = '
';
if($prepage > 0) $pagination .= ' | ';
else $pagination .= ' | ';
$pagination .= ''.$taboola.' | ';
if($numHits_shown > 9) $pagination .= ' | ';
else $pagination .= ' | ';
$pagination .= '
';
}
else {
echo "
"._("No results")."
";
}
}
elseif($error) {
echo $error;
}
elseif($filter_by == 'myvidster') {
$alert= "
"._("No results found on MyVidster, please try our
web search for better results.")."
";
echo $alert;
}
if($numHits_profile) {
echo '
'._('Results from ').$query_text.' ('.$numHits_shown._(' out of ').number_format($numHits_profile).')
';
//echo $myV_ad;
while ($hit = mysql_fetch_array($hits)) {
$disp_name = $hit['disp_name'];
$thumb = $hit['profile_photo'];
$reg_date = $hit['reg_date']; // Video post date
$reg_date = @date("F j, Y", @strtotime($hit['reg_date']));
$p_email = $hit['email'];
if(!$thumb) {
$thumb = get_gravatar($p_email,40,'monsterid','pg',false,1);
}
//if(!$thumb) $thumb = "/images/myv_silhouette.jpg";
//if ($z < $ad_cnt+1) $vidresult_class = "vidresult2";
//else $vidresult_class = "vidresult";
$vidresult_class = "vidresult";
echo '
';
unset($user, $gallery_id, $gallery_url, $gallery_dir, $gallery_name, $channel,
$channel_name, $id, $thumb, $title, $posted, $posted_formatted, $description);
$z++;
}
$pagination = getPaginationString_no_ajax($page, $numHits_profile, $num_page, 1, addslashes($current_url));
}
elseif($web_hits) {
//echo $myV_ad;
foreach ($web_hits as $value) {
$link = $value['link'];
$thumb = $value['thumb'];
$title = sanitize_html_string($value['title']);
$source = $value['source'];
$description = sanitize_html_string($value['description']);
$win = rand();
if($description) {
$description_html = '
' . ShortenText($description, 100) . '';
}
else {
$description_html = '';
}
//if ($z < $ad_cnt) $vidresult_class = "vidresult2";
$vidresult_class = "vidresult";
echo '
';
unset($user, $gallery_id, $gallery_url, $gallery_dir, $gallery_name, $channel,
$channel_name, $id, $thumb, $title, $posted, $posted_formatted, $description);
$z++;
}
if(!$z) {
echo "
"._("No results")."
";
}
$pagination = getPaginationString_no_ajax($page, $numHits_web, $num_page, 1, addslashes($current_url));
}
?>