• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] New usergroup access?!

Started by ipeci,

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ipeciTopic starter

Hallo ,

i have created a new premium usergroup on my database,

how to fix that the futured videos, only the premium group members can watching and all other groups like member or author to have NO access ?

thankl you
  •  

PHPVibe A.

If(is_user() && (user_group() == x)) {
show it
}


where x is your group's id.

You may want to allow admins and mods as well:

If((is_user() && (user_group() == x)) || is_moderator()) {


Also
$video->featured > 0
for video is featured check.

ipeciTopic starter

Hi Alex
Thank you, it works all perfect the way I want it, except for the problem on who you as the visitor clicks futured video, the promotion is that you should first login ... This is good :-)
But after the visitor does log in, and click the futured video,  its coming a blank page, really should come back a note and inform the user that only premium users can look at this!

Friendly greetings
  •  

PHPVibe A.

#3
But that depends how you coded it and where you've placed it, I've just given you the if conditions, you can add an else for the users not having this.

For example you can wrap the embed code in:
If($video->featured > 0 && ((is_user() && (user_group() == x)) || is_moderator())) {
echo $embedvideo;
} elseif($video->featured < 1) {
echo $embedvideo;
}
else {
echo "This is video is premium...bla bla bla";
}

ipeciTopic starter

Yes thats right, and thank you for great helping
but if i know this doit my self i dont ask you der alex .
Im have other specifikatoons lernin ,but not cms :-)

Thank youuuu ar the best  ::)
  •  

Similar topics (7)