WordPress.org

Ready to get started?Download WordPress

Forums

WORDPRESS VIDEO GALLERY
[resolved] Member upload video (32 posts)

  1. hoa.buiduy
    Member
    Posted 10 months ago #

    Hi all,
    How can I make a page for members add their video.
    Who can give me a idea.

    Thank all.

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

  2. karthikeyani
    Member
    Posted 10 months ago #

    Hi,

    By default our plugin will support add videos option for the following user roles "Editor", "Administrator", "Super User". To enable this option for "subscriber", Please install "User Role Editor" plugin and set the access level to "Edit_pages" for subscriber and open the file in the path \wp-content\plugins\contus-video-gallery\admin\views\video\video.php and find the code "<div class="admin_short_video_info">". Now add the following code above "<div class="admin_short_video_info">"

    <?php
    function get_current_user_role() {
    global $current_user;
    get_currentuserinfo();
    $user_roles = $current_user->roles;
    $user_role = array_shift($user_roles);
    return $user_role;
    };
    $user_role = get_current_user_role();
    if($user_role!='subscriber'){
    ?>

    No w close the curly braces after the form tag "</form>"

    <?php } ?>

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

  3. hoa.buiduy
    Member
    Posted 10 months ago #

    Hi Karthikeyani,
    I did it and it work very well.
    How can I move the member add video page to front folder?
    (Or Show videos page only)
    Thank u so much.

  4. karthikeyani
    Member
    Posted 10 months ago #

    Hi,

    Please note that, you cannot move the member add video page to front folder. Add video page will be displayed in admin panel and we can restrict the pages to the members using user role. If you have used the above mentioned steps, the restricted users can access only the add video page. If he try to access the other pages, it will display restricted access error message.

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

  5. hoa.buiduy
    Member
    Posted 10 months ago #

    Hi,
    When I do with your step.
    It works ok, But the Page menu still show. How can I hide it?
    And when user add video. The add category button should be hided.

    Thank u

  6. karthikeyani
    Member
    Posted 10 months ago #

    Hi,

    Please open \wp-content\plugins\contus-video-gallery\admin\views\video\addvideo.php and find onclick="playlistdisplay()". Now you can find the below code.

    <a style="cursor:pointer" onclick="playlistdisplay()"><?php _e('Create New', 'video_gallery') ?></a></h4>

    Replace with the following code.

    <?php
            function get_current_user_role() {
        global $current_user;
        get_currentuserinfo();
        $user_roles = $current_user->roles;
        $user_role = array_shift($user_roles);
        return $user_role;
    };
    $user_role = get_current_user_role();
    if($user_role!='subscriber'){
    ?>
    <a style="cursor:pointer"  onclick="playlistdisplay()"><?php _e('Create New', 'video_gallery') ?></a>
    <?php } ?>
    </h4>

    Now "Add category" will be restricted to the members. But please note that you cannot hide the menu. When you click on the menu, it will display "All Videos" Page only.

  7. hoa.buiduy
    Member
    Posted 10 months ago #

    Hi,
    My mean is the Pages management page ( on left menu) should hide. Show only All Videos page.
    Because I still see it appear.

    Thank :D

  8. karthikeyani
    Member
    Posted 10 months ago #

    Hi,

    It is not possible to hide the "video gallery" menu in the left side http://screencast.com/t/nBBlXgTs5D4e. If you try to hide the menu, then member cannot have an option to go to add videos page.

  9. hoa.buiduy
    Member
    Posted 10 months ago #

    Hi K,
    I would like to hide the "Pages" menu item above "Video Gallery" item.
    http://content.screencast.com/users/duyhoa07k4038/folders/Images/media/3787ef1e-5f8b-49ed-92e3-cf657c1e069c/2013-10-23_1149.png

    You can see the orange rectangle

    Thank

  10. karthikeyani
    Member
    Posted 10 months ago #

    Hi,

    Please open \wp-content\plugins\contus-video-gallery\hdflvvideoshare.php and find function videogallery_addpages() { inside the function you can find the below code.

    add_menu_page("Video Gallery", "Video Gallery", 'edit_pages', "video", "videogallery_menu", APPTHA_VGALLERY_BASEURL . "/images/apptha.png");
        add_submenu_page("video", "Video Gallery", "All Videos", 'edit_pages', "video", "videogallery_menu");
        add_submenu_page("", "New Videos", "", 'edit_pages', "newvideo", "videogallery_menu");

    replace with the following code.

    add_menu_page("Video Gallery", "Video Gallery", 'read', "video", "videogallery_menu", APPTHA_VGALLERY_BASEURL . "/images/apptha.png");
        add_submenu_page("video", "Video Gallery", "All Videos", 'read', "video", "videogallery_menu");
        add_submenu_page("", "New Videos", "", 'read', "newvideo", "videogallery_menu");

    Please deactivate the "User Role Editor" plugin in your admin and check.

  11. hoa.buiduy
    Member
    Posted 10 months ago #

    I fixed it.
    Thank u so much, karthikeyani

  12. karthikeyani
    Member
    Posted 10 months ago #

    Hi,

    Happy to hear that you have fixed it. If you have any other queries feel free to contact us.

  13. Saptadeep Bhowmik
    Member
    Posted 9 months ago #

    Thank you, Karthikeyani.

    But I have two questions :

    1. What you have said,by that a user can publish or un-publish anyone else's video.
    What is the solution for that ?

    2. Can we use a moderator here, so that any user can flag any video if found inappropriate and moderator can act upon?

  14. karthikeyani
    Member
    Posted 9 months ago #

    Hi,

    Please note that user cannot edit, publish/ Unpublish and view other's video. Admin only can access the all the videos. We are on the progress of integrating member upload option in our plugin. So, this feature will be available in our next release.

  15. Saptadeep Bhowmik
    Member
    Posted 9 months ago #

    Thank you, Karthikeyani.

    But when a user is going to the video gallery, then all the videos posted by all users are available for view at the bottom of the page.

    Also, they have option to publish or un-publish them.

  16. Damz101
    Member
    Posted 9 months ago #

    i cant seem to get this plugin to work.

    1. How do i allow registered user to upload videos to the gallery
    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 HELP!!!

  17. karthikeyani
    Member
    Posted 9 months ago #

    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.

  18. karthikeyani
    Member
    Posted 9 months ago #

    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.

  19. Damz101
    Member
    Posted 9 months ago #

    I will get back to you

  20. Damz101
    Member
    Posted 9 months ago #

    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:

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

  21. karthikeyani
    Member
    Posted 9 months ago #

    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.

  22. Damz101
    Member
    Posted 9 months ago #

    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:

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

  23. karthikeyani
    Member
    Posted 9 months ago #

    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 http://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.

  24. Damz101
    Member
    Posted 9 months ago #

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

  25. Damz101
    Member
    Posted 9 months ago #

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

  26. karthikeyani
    Member
    Posted 9 months ago #

    Hi,

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

  27. Damz101
    Member
    Posted 9 months ago #

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

  28. karthikeyani
    Member
    Posted 9 months ago #

    Hi,

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

  29. hoa.buiduy
    Member
    Posted 8 months ago #

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

  30. karthikeyani
    Member
    Posted 8 months ago #

    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.

Reply »

You must log in to post.

About this Plugin

About this Topic