• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Adult content warning function

Started by mio,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mioTopic starter

Hello,
I'm trying to add an adult content warning page to phpvibe script.

What is the best solution?
Where to put the code?

Thanks in advance.
  •  

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!
  •  

mioTopic starter

Nfsw function works without Xclub plugin.
If I install the plugin, Nfsw alert disappear!
What's the issue?
  •  

PHPVibe A.

XClub is not tested on/updated for 3.5, so there may be issues.


mioTopic starter

Can you fix it? NSFW function is useful for adult tube.
  •  

PHPVibe A.

If you run an adult website you simply have to change in lib/class.providers.php
// NSFW
function nsfilter() {
global $video;
if($video->nsfw < 1){
return false;
}elseif(isset($_SESSION['nsfw']) && $_SESSION['nsfw'] > 0){
 return false;
}else {
return true;
}
}


to

// NSFW
function nsfilter() {
if(isset($_SESSION['nsfw']) && $_SESSION['nsfw'] > 0){
 return false;
}else {
return true;
}
}


mioTopic starter

Sorry but I cannot find this function in lib/class.providers.php
  •  

mioTopic starter

Found in lib/functions.php but nothing happens.
  •  

PHPVibe A.


mioTopic starter

Found the problem:

Checking the com_video.php included in XClub plugin I saw are missing some functions related to the NSFW:

1) if(_get('nsfw') == 1) { $_SESSION['nsfw'] = 1; }

2) if (nsfilter()) {
$embedvideo   .='<div class="nsfw-warn"><span>'._lang("This video is not safe").'</span>
<a href="'.$canonical.'&nsfw=1">'.("I understand and I am over 18").'</a><a href="'.site_url().'">'._lang("I am under 18").'</a>
</div>';
}

Is it possible to fix it?
  •  

PHPVibe A.


mioTopic starter

File fixed. Let me know if there are errors, please.

Hope this is helpful for people using the XClub plugin.  :)

Regards.
  •  

Similar topics (7)