Example #1
0
function video()
{
    get_video();
    video_categories();
    video_favorites();
    video_genres();
    video_link();
}
Example #2
0
    echo video_link($video);
    ?>
" />
        <media:thumbnail url="<?php 
    echo get_thumb($video);
    ?>
" width="120" height="90" />
        <media:title><?php 
    echo substr($video['title'], 0, 50);
    ?>
</media:title>
        <media:category label="Tags"><?php 
    echo strip_tags(tags($video['tags'], 'video'));
    ?>
</media:category>
        <media:credit><?php 
    echo $video['username'];
    ?>
</media:credit>
        <enclosure url="<?php 
    echo video_link($video);
    ?>
" type="application/x-shockwave-flash" />

    </item>
    <?php 
}
?>

</channel>
</rss>
Example #3
0
 /**
  * Function used to create value array for email templates
  * @param video_details ARRAY
  */
 function set_share_email($details)
 {
     $this->email_template_vars = array('{video_title}' => $details['title'], '{video_description}' => $details['description'], '{video_tags}' => $details['tags'], '{video_date}' => cbdate(DATE_FORMAT, strtotime($details['date_added'])), '{video_link}' => video_link($details), '{video_thumb}' => GetThumb($details));
     $this->action->share_template_name = 'share_video_template';
     $this->action->val_array = $this->email_template_vars;
 }
Example #4
0
function VideoLink($vdetails, $type = NULL)
{
    return video_link($vdetails, $type);
}
Example #5
0
 /**
  * Function used to get list of subscribed users and then
  * send subscription email
  */
 function sendSubscriptionEmail($vidDetails, $updateStatus = true)
 {
     global $cbemail, $db;
     $v = $vidDetails;
     if (!$v['videoid']) {
         e(lang("invalid_videoid"));
         return false;
     }
     if (!$v['userid']) {
         e(lang("invalid_userid"));
         return false;
     }
     //Lets get the list of subscribers
     $subscribers = $this->get_user_subscribers_detail($v['userid'], false);
     //Now lets get details of our uploader bhai saab
     $uploader = $this->get_user_details($v['userid']);
     //Loading subscription email template
     $tpl = $cbemail->get_template('video_subscription_email');
     $total_subscribers = count($subscribers);
     if ($subscribers) {
         foreach ($subscribers as $subscriber) {
             $var = $this->custom_subscription_email_vars;
             $more_var = array('{username}' => $subscriber['username'], '{uploader}' => $uploader['username'], '{video_title}' => $v['title'], '{video_description}' => $v['description'], '{video_link}' => video_link($v), '{video_thumb}' => get_thumb($v));
             if (!is_array($var)) {
                 $var = array();
             }
             $var = array_merge($more_var, $var);
             $subj = $cbemail->replace($tpl['email_template_subject'], $var);
             $msg = nl2br($cbemail->replace($tpl['email_template'], $var));
             //Now Finally Sending Email
             cbmail(array('to' => $subscriber['email'], 'from' => WELCOME_EMAIL, 'subject' => $subj, 'content' => $msg));
         }
     }
     if ($total_subscribers) {
         //Updating video subscription email status to sent
         if ($updateStatus) {
             $db->update(tbl('video'), array('subscription_email'), array('sent'), " videoid='" . $v['videoid'] . "'");
         }
         $s = "";
         if ($total_subscribers > 1) {
             $s = "s";
         }
         e(sprintf(lang('subs_email_sent_to_users'), $total_subscribers, $s), "m");
         return true;
     }
     e(lang("no_user_subscribed_to_uploader"));
     return true;
 }