• Welcome to PHPVIBE Forums. Please log in.

How to Hide homepage videos from non registered member

Started by HPR,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HPRTopic starter

Hello Mario Sir
i hope you doing well
sir,i want to hide all homepage videos from non registered members.we  also wants to activate the members manually ,we are registering members through third party forms..

May i know how to do this?
Thank you
  •  

HPRTopic starter

Also wants to display"please login to watch the videos".Thankyou
  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

HPRTopic starter

Hello sir
i add this code after
<?php
function is_user( ) {
return (isset($_SESSION['user_id']) && intval($_SESSION['user_id']) > 0);
}
but nothing solved
i changed above code with your code too nothing changed
i still can see home whatsup and video in left menu.
 i think i am doing mistake

Thank you
  •  

Marius P.

Look, if you want to close it for non-logged users you just need to do this:

if(!is_user()) {
redirect('/your-landing-page/');
}

This will send non-users to a landing page. You can give them there a register, a login, whatever you like.

If the landing page is internal, you need to exclude the redirect from it:

if((com() !== 'register') && com() !== 'login') && other conditions fitted for you) {
if(!is_user()) {
redirect('/your-landing-page/');
}
}
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

Oh, sorry, you want just the homepage ???
I've just woken up  :D


Wrap the entire /tpl/main/home.php's content in
if(is_user()) {
}


https://github.com/PHPVibe/phpvibe-lite/blob/master/The%20CMS/tpl/main/home.php
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  
    The following users thanked this post: HPR

HPRTopic starter

Thanks for reply sir
actually i want non member to see only login section ,i dont want to show them videos before login .Also wants manual account creation only, administrator should be able to create account.Thank you
  •  

HPRTopic starter

Quote from: @Mario on Oh, sorry, you want just the homepage ???
I've just woken up  :D


Wrap the entire /tpl/main/home.php's content in
if(is_user()) {
}


https://github.com/PHPVibe/phpvibe-lite/blob/master/The%20CMS/tpl/main/home.php

Hello Sir
I did as u directed but it shows blank page now
 i want non member to see only login section ,i dont want to show them videos before login .Also wants manual account creation only, administrator should be able to create account.Thank you
  •  

Marius P.

Hi,

you need to build all that as it's not a feature.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

 

Similar topics (7)

[ Video Sharing CMS v4 ] videos automatic increase

Started by ali215215


Replies: 2
Views: 1853

[ Video Sharing CMS v4 ] not uplods videos

Started by surendra


Replies: 6
Views: 1607

[ Video Sharing CMS v4 ] Can VideoSwiper get Vines too or do we need to use the Phpvibe Vine importer?

Started by thefutureisbright


Replies: 5
Views: 2486

[ Video Sharing CMS v4 ] "see more" for the homepage blocks

Started by ronyhage


Replies: 0
Views: 1467

[ Video Sharing CMS v4 ] Mobile Videos Not Playing

Started by ankur@rayanaweb


Replies: 2
Views: 1284

[ Video Sharing CMS v4 ] New feature. Download videos from youtube to server.

Started by Cimmerio


Replies: 12
Views: 1949

[ Video Sharing CMS v4 ] InSite Ads with Embedded Videos

Started by HPR


Replies: 1
Views: 2094