WordPress.org

Ready to get started?Download WordPress

Forums

WORDPRESS VIDEO GALLERY
[resolved] How to prevent member add duplicate Youtube URL (5 posts)

  1. hoa.buiduy
    Member
    Posted 1 year ago #

    How can I prevent member add duplicate Youtube link?

    Please tell me a way to fixed.

    Thank all!

    http://wordpress.org/plugins/contus-video-gallery/

  2. hoa.buiduy
    Member
    Posted 1 year ago #

    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/

  3. karthikeyani
    Member
    Posted 1 year ago #

    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.

  4. hoa.buiduy
    Member
    Posted 1 year ago #

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

  5. karthikeyani
    Member
    Posted 1 year ago #

    Hi,

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.