Viewing 15 replies - 16 through 30 (of 31 total)
  • karthikeyani

    (@karthikeyani)

    Hi Saptadeep Bhowmik,

    Please open \wp-content\plugins\contus-video-gallery\admin\models\video.php and find public function get_videodata($searchValue,$searchBtn,$order,$orderDirection) and replace with the following code.

    function get_current_user_role() {
            global $current_user;
            get_currentuserinfo();
            $user_roles = $current_user->roles;
            $user_role = array_shift($user_roles);
            return $user_role;
        }
    
            public function get_videodata($searchValue,$searchBtn,$order,$orderDirection)
            {//function for getting search videos starts
                $where='';
                $user_role = $this->get_current_user_role();
                $current_user = wp_get_current_user();
                if($user_role!='administrator'){
                    $where .=  " WHERE a.member_id=".$current_user->ID;
                }
                $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 1;
                $limit = 20;
                $offset = ( $pagenum - 1 ) * $limit;
                if(isset($searchBtn))
                {
                    if(empty($where)){
                        $where .= " WHERE";
                    } else {
                        $where .= " AND";
                    }
                    $where .=  " (a.name LIKE '%" . $searchValue . "%' || a.description LIKE '%" . $searchValue . "%')";
                }
                if(!isset($orderDirection))
                {
                    $orderDirection = 'DESC';
                }
               $query = "SELECT DISTINCT (a.vid),a.*,u.display_name FROM ".$this->_videotable .' a
                        LEFT JOIN '. $this->_wpdb->prefix .'users u
                        ON u.ID=a.member_id
                        LEFT JOIN '. $this->_wpdb->prefix .'hdflvvideoshare_med2play p
                        ON p.media_id=a.vid
                        LEFT JOIN '. $this->_wpdb->prefix .'hdflvvideoshare_playlist pl
                        ON pl.pid=p.playlist_id
                        '.$where ."
                        ORDER BY ". $order . ' '.$orderDirection."
                        LIMIT $offset, $limit";
                return $this->_wpdb->get_results($query);
            }//function for getting search videos ends

    Now find public function video_edit($videoId) { and replace with the following function.

    public function video_edit($videoId) {
                global $current_user, $wpdb;
                if (isset($videoId) && !current_user_can('manage_options')) {
                    $user_id = $current_user->ID;
                    $video_count = $wpdb->get_var("SELECT count(*) FROM $this->_videotable WHERE vid = $videoId and member_id = $user_id");
                    if ($video_count == 0) {
                        wp_die( __( 'You do not have permission to access this page.' ) );
                    }
                }
                //function for getting single video starts
                return $this->_wpdb->get_row("SELECT a.*,b.tags_name FROM " . $this->_videotable . " as a LEFT JOIN " . $this->_wpdb->prefix . "hdflvvideoshare_tags b ON b.media_id=a.vid WHERE a.vid ='$videoId'");
            }

    If you are still facing the same issue feel free to contact us.

    karthikeyani

    (@karthikeyani)

    Hi Damz101,

    1. How do i allow registered user to upload videos to the gallery

    ##) We have integrated member upload option in our latest package and it is under testing. You can wait for this option in our next release. If you want this feature urgently, please follow the above steps mentioned in this thread correctly.

    2. How do i get the videos to play? the videos in the demo just takes me back to the home page of my site

    ##) Please share your site link. So that we can check from our end and assist you accordingly.

    Damz101

    (@damz101)

    I will get back to you

    Damz101

    (@damz101)

    1. What is suppose to happen when i add this code?
    2. i created a few categories i added a video to one category. on the video home page i see the thumbnail but when i click it i hear the audio but not seeing the video. Also the video doesn’t show in the all videos tab.

    Screenshot:

    https://finditcarscanada.ca/Screen%20Shot%202013-11-24%20at%209.58.15%20PM.png

    karthikeyani

    (@karthikeyani)

    Hi,

    1) If you follow the above code, you can also allow your users to post videos in your site.

    2) Please open \wp-content\plugins\contus-video-gallery\front\views\videohome.php

    width="' . $settingsData->width . '" height="' . $settingsData->height . '"

    and replace with the following code.

    style="width:' . $settingsData->width . 'px; height:' . $settingsData->height . 'px;"

    Now open \wp-content\plugins\contus-video-gallery\front\views\videoshortcode.php and find <embed and find the below code in the same line.

    width="' . $width . '" height="' . $height . '"

    and replace with the following code.

    style="width:' . $width . 'px; height:' . $height . 'px;"

    If you are still facing the same issue, feel free to contact us.

    Damz101

    (@damz101)

    Thanks a lot that worked.

    1. the video player on the video home page gives an error.
    2. Added the code above but haven’t seen much difference where user upload is concerned its the same as before. Where registered user goes to dashboard and add videos.

    screenshot:

    https://finditcarscanada.ca/Screen%20Shot%202013-11-25%20at%2011.32.42%20PM.png

    karthikeyani

    (@karthikeyani)

    Hi,

    1) I think still you haven’t modify the code in video home page. Please open \wp-content\plugins\contus-video-gallery\front\views\videohome.php

    width="' . $settingsData->width . '" height="' . $settingsData->height . '"

    and replace with the following code.

    style="width:' . $settingsData->width . 'px; height:' . $settingsData->height . 'px;". If you have changed this code then you will not get this error https://finditcarscanada.ca/Screen%20Shot%202013-11-25%20at%2011.32.42%20PM.png. I have checked your site and noticed that it is under construction mode. So I cannot able to check from my end. Please modify the above mentioned changes and let me know still if you are facing the same issue.

    2) Regarding member upload option, please note that upload page is same for both admin and members. But member cannot view, edit, delete all the videos uploaded in your site. Whereas Admin can manage all the videos in his site. Hope you understand.

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

    Damz101

    (@damz101)

    it works thank you. if anything else i’ll post again

    Damz101

    (@damz101)

    is there a way i can show each video category on a separate page?

    karthikeyani

    (@karthikeyani)

    Hi,

    Please refer the following link https://screencast.com/t/8drI7883zD for your reference. If you have any other queries feel free to post here.

    Damz101

    (@damz101)

    why is that whenever i go to all videos im not seeing the videos i uploaded?

    karthikeyani

    (@karthikeyani)

    Hi,

    Please contact our support team at https://apptha.com. So that we can check from our end and assist you accordingly.

    Thread Starter hoa.buiduy

    (@hoabuiduy)

    Hi,
    How members show them videos when they login and go to video manager?

    Hi,

    If you are using latest version of video gallery 2.5, then once the user logged in, they can able to see their videos. They can only able to view, edit, and delete their own videos.

    If you are using less than video gallery version 2.5, member uplaod option is not available. Please check and let me know your thoughts.

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

    Thread Starter hoa.buiduy

    (@hoabuiduy)

    Hi,
    When i update the version 2.5.
    No video was shown.

    any one has same problem?

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Member upload video’ is closed to new replies.