• 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 ] Hide "Views"

Started by PHPClient


Replies: 6
Views: 1506

[ Video Sharing CMS v4 ] How To get Related video to show related videos

Started by drwho


Replies: 1
Views: 1536

[ Video Sharing CMS v4 ] Members List

Started by megzz


Replies: 11
Views: 1787

[ Video Sharing CMS v4 ] converting videos

Started by shpeedie


Replies: 8
Views: 1979

[ Video Sharing CMS v4 ] Parent directories in 'Channels'. Not picking up subcategory videos

Started by DeadFish


Replies: 1
Views: 1613

[ Video Sharing CMS v4 ] does it embed youtube videos or do they need to be uploaded?

Started by dtiberio


Replies: 1
Views: 1997

[ Video Sharing CMS v4 ] Please help me make the Load more button on the homepage

Started by lucaphuoc


Replies: 6
Views: 2260