• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Reject Duplicate Videos

Started by ClashCorp,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ClashCorpTopic starter

The way the script is right now it seems to allow users to submit the same YouTube, Dailymotion, etc. Video multiple times which causes problems. It would be great if when a user tried to submit a video that had already been submitted it would show some sort of reject message, and not except the video.
  •  

PHPVibe A.

Hi, you know how this things go, some want to allow, some want to reject.
It's annoying for the user to reject his video.

Here is a simple function for this:


function has_duplicate($link){
global $db;
if(!nullval($link)) {
$sub = $db->get_row("Select count(*) as nr from ".DB_PREFIX."videos where source  like '".$link."'");
return (bool)$sub->nr;
}


Drop it in lib/functions.php or any other global file.

Then in com/com_share.php

you can do this, for example, after:

if(!$vid->isValid(_post('vfile'))){
return '<div class="msg-warning">'._lang("We don't support yet embeds from that website").'</div>';
}


something like:

if(has_duplicate(_post('vfile'))){
return '<div class="msg-warning">'._lang("This video already exists").'</div>';
}

ClashCorpTopic starter

Thanks! I know its annoying for the users video to get rejected but its even more annoying when the user looks through the suggested videos only to find a list of exactly the same video they just watched. :) Thanks Again!
  •  

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 37409

insite ads issue when selecting above/below video player location

Started by georgepanaitescu


Replies: 3
Views: 20777

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 68923

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 48485

when slecting to unpublish music mp3 - next page says unpublished video ?

Started by spirog


Replies: 2
Views: 3983

video,playlist,images, etc. (frontend) select all deselect all reselect all

Started by spirog


Replies: 3
Views: 4056

Like a video - unlinke a video - relike a video does not work

Started by spirog


Replies: 7
Views: 3740