[ Video Sharing CMS v4 ] How 2 ? Only registred users can watch Videos ?

Started by ipeci,

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ipeciTopic starter

Hallo
How i can make it , only registred users can watch video´s ?
Plz Help.

Regards
  •  

PHPVibe A.

Hi!

if(is_user()) {
//user is logged 
}
if(!is_user()) {
// is guest
}


ipeciTopic starter

Wow thank you Alex for a quick reply .

I just ned to know were i ned to modifly that code ? wich folder in the script?

Regards
  •  

PHPVibe A.

I guess that depends from you, I would go wrap it around the embed in tpl/main/video.php

ipeciTopic starter

Thank You
The problem is , i dont wont to make all videos , just some videos i chose ?

:-\
  •  

PHPVibe A.

You can bundle it with featured option.

On video page

if(is_user() && ($video->featured > 0)) {
//user is logged and video is featured
}

ipeciTopic starter

Hi,
thank you for your help .

i have make a video as futured and puted the code on line18 to /video.php and tryed !?!
but is not work for me ? :-\

best thank.
  •  

PHPVibe A.

Change

<?php echo $embedvideo; ?>


to

<?php
if( $video->featured > 0) {
if(is_user()) {
echo $embedvideo;
} else {
echo _lang("Please login to see this video.");

}

} else {

echo $embedvideo;

}
?>

PHPVibe A.

I was giving you coding tips, you should have said you don't know how to use them :)

ipeciTopic starter

Wow Cool now its working ....

Thank you Thank you Thank you Alexander   :-* :-* :-*

Best Regards
  •  

Similar topics (7)