• 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 ] sitemap for a website with 250 K Videos

Started by pantsuhentai


Replies: 0
Views: 1010

[ Video Sharing CMS v4 ] Ads on homepage...

Started by ASDF


Replies: 18
Views: 1353

Uploading videos impossible on Firefox and Baidu browser PHPVIBE 5

Started by yafe3


Replies: 4
Views: 2584

[ Video Sharing CMS v4 ] Can you help me hide the remote link (mp4. flv ...) from Amazon S3 servers. ???

Started by minhkienad


Replies: 2
Views: 4989

[ Video Sharing CMS v4 ] How to integrate new videos into existing html page

Started by Tim


Replies: 2
Views: 1515

[ Video Sharing CMS v4 ] Related Videos not loading

Started by AvuY


Replies: 36
Views: 4648

[ Video Sharing CMS v4 ] News fields in Database videos table

Started by ggmustafa85


Replies: 33
Views: 4324