WordPress.org

Support

Support » Plugins and Hacks » [Resolved] How to prevent member add duplicate Youtube URL

[Resolved] How to prevent member add duplicate Youtube URL

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have a problem when I add 2 videos same title.
    When I view video, the detail page show both video.
    P/s : I set the permalink as : http://mysite.com/sample-post/

    Hi,

    Please open \wp-content\plugins\contus-video-gallery\admin\controllers\videosController.php and find $videoName = filter_input(INPUT_POST, 'name');. below the line you can find the following code.

    $slug = sanitize_title($videoName1);

    Please replace with the below code and check.

    $titlequery         = $this->_wpdb->get_var("SELECT count(vid) FROM ".$wpdb->prefix . "hdflvvideoshare where name='$videoName'");
                    if(!empty($titlequery) || $titlequery>0){
                        $videoName1       = $videoName.rand();
                    }
                    $slug = sanitize_title($videoName1);

    If you have any other queries feel free to contact us.

    I did. It’s ok.
    Thank u, K.

    Hi,

    Thank you for your update. If you have any other queries feel free to contact us.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How to prevent member add duplicate Youtube URL’ is closed to new replies.