Results 1 to 10 of 20

Thread: Runtimes on videos show 1:00

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    15

    Default

    Hey ramius thanks for your reply. I saw your site takeofftube.com and it shows the correct runtime on the video thumbnails . Did you change the template?.

    R your sites generating enough revenue?. try doing some more seo :)

    Support ticket is still open lets see what happens.

  2. #2
    Join Date
    Sep 2010
    Posts
    15

    Default

    Hey ramius did you site's duration problem get fixed?.

  3. #3
    Join Date
    Jan 2008
    Posts
    216

    Default

    Hi,
    my site is working nice, the duration problem its only relative to YouTube embedded videos. Vshare is not able to take and display proper lenght from YouTube at the moment.

  4. #4

    Default

    This will fix the duration problem of Bulk import (v2.7).

    Open admin/import_bulk_process.php

    Add this code:
    Code:
    $video_length = sec2hms($video_info['video_duration']);
    after
    Code:
    $seo_name = seo_name($video_info['video_title']);
    Thanks.

  5. #5
    Join Date
    Sep 2010
    Location
    Pokhara Nepal
    Posts
    49

    Default but it did not work and i saw some times mentioned in the other variables.

    Quote Originally Posted by vshare2 View Post
    This will fix the duration problem of Bulk import (v2.7).

    Open admin/import_bulk_process.php

    Add this code:
    Code:
    $video_length = sec2hms($video_info['video_duration']);
    after
    Code:
    $seo_name = seo_name($video_info['video_title']);
    Thanks.
    i used thsi code and tried but still the same. there is time mentioned in some variables in the same php file please check the code below. do we need to get new code? for this file or still the same?
    codes:
    Code:
     
    <?php
    /******************************************************************************
    *
    * COMPANY: BuyScripts.in
    * PROJECT: vShare Youtube Clone
    * VERSION: 2.7
    * LISENSE: vShare YouTube Clone License Agreement
    * WEBSITE: vShare Video Sharing Script, YouTube Clone Script
    *
    * This program is a commercial software and any kind of using it must agree 
    * to vShare license.
    *
    ******************************************************************************/
    require '../include/config.php';
    require '../include/class.upload_remote.php';
    require '../include/functions_seo_name.php';
    require '../include/class.tags.php';
    require '../include/class.bulk_import.php';
    require '../include/youtube.php';
    require 'Zend/Loader.php';
    Zend_Loader::loadClass('Zend_Gdata_YouTube');
    check_admin_login();
    $imported_sites = array(
    'youtube'
    );
    if (isset($_POST['submit']))
    {
    $video_id = isset($_POST['video_id']) ? $_POST['video_id'] : array();
    $user_name = isset($_POST['user_name']) ? $_POST['user_name'] : '';
    $channel_id = isset($_POST['channel_id']) ? (int) $_POST['channel_id'] : 0;
     
    $sql = "SELECT * FROM `users` AS u,`channels` AS c WHERE
    u.user_name='" . mysql_clean($user_name) . "' AND
    c.channel_id='" . (int) $channel_id . "'";
    $result = mysql_query($sql) or mysql_die($sql);
     
    if (mysql_num_rows($result) > 0)
    {
    $tmp = mysql_fetch_assoc($result);
    $user_id = $tmp['user_id'];
     
    for ($i = 0; $i < count($video_id); $i ++)
    {
    if (! BulkImport::checkImported($video_id[$i], $_POST['import_site']) && in_array($_POST['import_site'], $imported_sites))
    {
    $sql = "INSERT INTO `import_track` SET
    `import_track_unique_id`='" . mysql_clean($video_id[$i]) . "' ,
    `import_track_site`='" . mysql_clean($_POST['import_site']) . "'";
    $result = mysql_query($sql) or mysql_die($sql);
     
    if ($_POST['import_site'] == 'youtube')
    {
    $video_url = 'http://www.youtube.com/watch?v=' . $video_id[$i];
    $video_info = BulkImport::getYoutubeVideoInfo($video_id[$i]);
    }
     
    if ($_POST['import_method'] == 'embed')
    {
    $video_length = sec2hms($video_info['video_duration']);
    $seo_name = seo_name($video_info['video_title']);
     
    $sql = "INSERT INTO `videos` SET
    `video_user_id`='" . (int) $user_id . "',
    `video_title`='" . mysql_clean($video_info['video_title']) . "',
    `video_description`='" . mysql_clean($video_info['video_description']) . "',
    `video_keywords`='" . mysql_clean($video_info['video_keywords']) . "',
    `video_seo_name`='" . mysql_clean($seo_name) . "',
    `video_channels`='0|" . mysql_clean($channel_id) . "|0',
    `video_type`='" . mysql_clean('public') . "',
    `video_duration`=1,
    `video_length`='01:00',
    `video_add_time`='" . $_SERVER['REQUEST_TIME'] . "',
    `video_add_date`='" . date('Y-m-d') . "',
    `video_active`='1',
    `video_approve`='$config[approve]'";
     
    $result = mysql_query($sql) or mysql_die($sql);
    $vid = mysql_insert_id();
     
    $upload = new upload_remote();
    $upload->vid = $vid;
    $upload->url = $video_url;
    $upload->debug = 1;
     
    if ($config['approve'] == 1)
    {
    $current_keyword = mysql_clean($video_info['video_keywords']);
    $tags = new Tags($video_info['video_keywords'], $vid, $user_id, "0|$channel_id|0");
    $tags->add();
    $video_tags = $tags->get_tags();
    $sql = "UPDATE `videos` SET
    `video_keywords`='" . mysql_clean(implode(' ',$video_tags)) . "' WHERE
    `video_id`='" . (int) $vid . "'";
    mysql_query($sql) or mysql_die($sql);
    }
     
    if ($_POST['import_site'] == 'youtube')
    {
    $upload->youtube();
    }
    }
    else
    {
    $sql = "INSERT INTO `process_queue`SET
    `user`='" . mysql_clean($user_name) . "',
    `title`='" . mysql_clean($video_info['video_title']) . "',
    `description`='" . mysql_clean($video_info['video_description']) . "',
    `keywords`='" . mysql_clean($video_info['video_keywords']) . "',
    `process_queue_upload_ip`='" . User::get_ip() . "',
    `type`='public',
    `channels`='0|" . mysql_clean($channel_id) . "|0',
    `status`='0',
    `url`='" . mysql_clean($video_url) . "'";
    $result = mysql_query($sql) or mysql_die($sql);
    }
    }
    }
    }
     
    $keyword = isset($_POST['keyword']) ? $_POST['keyword'] : '';
    $page = isset($_POST['page']) ? (int) $_POST['page'] : 1;
     
    $redirect_url = VSHARE_URL . '/admin/import_bulk.php?keyword=' . $keyword . '&user_name=' . $user_name . '&channel=' . $channel_id . '&page=' . $page;
    redirect($redirect_url);
    }
    This is the code in my server currently. please help.
    Nepal's Largest video community portal. share wisely at WWW.CLONEVIDEOS.COM

  6. #6
    Join Date
    Sep 2010
    Posts
    20

    Default

    Quote Originally Posted by vshare2 View Post
    This will fix the duration problem of Bulk import (v2.7).

    Open admin/import_bulk_process.php

    Add this code:
    Code:
    $video_length = sec2hms($video_info['video_duration']);
    after
    Code:
    $seo_name = seo_name($video_info['video_title']);
    Thanks.
    Do the step above of vshare2

    Now , do 1 more step

    PHP Code:
    Then 
    find 
    01:00   --->   replace by '{$video_length}' 

    it should be :  `video_length`='{$video_length}',   on line 76 
    I tried and it worked on my site !!

  7. #7

    Default

    This is the full source code of admin/import_bulk_process.php(v2.7)
    Code:
    <?php
    /******************************************************************************
     *
     *   COMPANY: BuyScripts.in
     *   PROJECT: vShare Youtube Clone
     *   VERSION: 2.7
     *   LISENSE: http://buyscripts.in/vshare-license.html
     *   WEBSITE: http://buyscripts.in/youtube_clone.html
     *
     *   This program is a commercial software and any kind of using it must agree
     *   to vShare license.
     *
     ******************************************************************************/
    
    require '../include/config.php';
    require '../include/class.upload_remote.php';
    require '../include/functions_seo_name.php';
    require '../include/class.tags.php';
    require '../include/class.bulk_import.php';
    require '../include/youtube.php';
    require 'Zend/Loader.php';
    Zend_Loader::loadClass('Zend_Gdata_YouTube');
    
    check_admin_login();
    
    $imported_sites = array(
        'youtube'
    );
    
    if (isset($_POST['submit']))
    {
        $video_id = isset($_POST['video_id']) ? $_POST['video_id'] : array();
        $user_name = isset($_POST['user_name']) ? $_POST['user_name'] : '';
        $channel_id = isset($_POST['channel_id']) ? (int) $_POST['channel_id'] : 0;
        
        $sql = "SELECT * FROM `users` AS u,`channels` AS c WHERE
                u.user_name='" . mysql_clean($user_name) . "' AND
                c.channel_id='" . (int) $channel_id . "'";
        $result = mysql_query($sql) or mysql_die($sql);
        
        if (mysql_num_rows($result) > 0)
        {
            $tmp = mysql_fetch_assoc($result);
            $user_id = $tmp['user_id'];
            
            for ($i = 0; $i < count($video_id); $i ++)
            {
                if (! BulkImport::checkImported($video_id[$i], $_POST['import_site']) && in_array($_POST['import_site'], $imported_sites))
                {
                    $sql = "INSERT INTO `import_track` SET
                           `import_track_unique_id`='" . mysql_clean($video_id[$i]) . "' ,
                           `import_track_site`='" . mysql_clean($_POST['import_site']) . "'";
                    $result = mysql_query($sql) or mysql_die($sql);
                    
                    if ($_POST['import_site'] == 'youtube')
                    {
                        $video_url = 'http://www.youtube.com/watch?v=' . $video_id[$i];
                        $video_info = BulkImport::getYoutubeVideoInfo($video_id[$i]);
                    }
                    
                    if ($_POST['import_method'] == 'embed')
                    {
                        $video_length = sec2hms($video_info['video_duration']);
                        $seo_name = seo_name($video_info['video_title']);
                        
                        $sql = "INSERT INTO `videos` SET
                               `video_user_id`='" . (int) $user_id . "',
                               `video_title`='" . mysql_clean($video_info['video_title']) . "',
                               `video_description`='" . mysql_clean($video_info['video_description']) . "',
                               `video_keywords`='" . mysql_clean($video_info['video_keywords']) . "',
                               `video_seo_name`='" . mysql_clean($seo_name) . "',
                               `video_channels`='0|" . mysql_clean($channel_id) . "|0',
                               `video_type`='" . mysql_clean('public') . "',
                               `video_duration`='" . (int) $video_info['video_duration'] . "',
                               `video_length`='" . mysql_clean($video_length) . "',
                               `video_add_time`='" . $_SERVER['REQUEST_TIME'] . "',
                               `video_add_date`='" . date('Y-m-d') . "',
                               `video_active`='1',
                               `video_approve`='$config[approve]'";
                        
                        $result = mysql_query($sql) or mysql_die($sql);
                        $vid = mysql_insert_id();
                        
                        $upload = new upload_remote();
                        $upload->vid = $vid;
                        $upload->url = $video_url;
                        $upload->debug = 1;
                        
                        if ($config['approve'] == 1)
                        {
                            $current_keyword = mysql_clean($video_info['video_keywords']);
                            $tags = new Tags($video_info['video_keywords'], $vid, $user_id, "0|$channel_id|0");
                            $tags->add();
                            $video_tags = $tags->get_tags();
                            $sql = "UPDATE `videos` SET
                                   `video_keywords`='" . mysql_clean(implode(' ',$video_tags)) . "' WHERE
                                   `video_id`='" . (int) $vid . "'";
                            mysql_query($sql) or mysql_die($sql);
                        }
                        
                        if ($_POST['import_site'] == 'youtube')
                        {
                            $upload->youtube();
                        }
                    }
                    else
                    {
                        $sql = "INSERT INTO `process_queue`SET
                               `user`='" . mysql_clean($user_name) . "',
                               `title`='" . mysql_clean($video_info['video_title']) . "',
                               `description`='" . mysql_clean($video_info['video_description']) . "',
                               `keywords`='" . mysql_clean($video_info['video_keywords']) . "',
                               `process_queue_upload_ip`='" . User::get_ip() . "',
                               `type`='public',
                               `channels`='0|" . mysql_clean($channel_id) . "|0',
                               `status`='0',
                               `url`='" . mysql_clean($video_url) . "'";
                        $result = mysql_query($sql) or mysql_die($sql);
                    }
                }
            }
        }
        
        $keyword = isset($_POST['keyword']) ? $_POST['keyword'] : '';
        $page = isset($_POST['page']) ? (int) $_POST['page'] : 1;
        
        $redirect_url = VSHARE_URL . '/admin/import_bulk.php?keyword=' . $keyword . '&user_name=' . $user_name . '&channel=' . $channel_id . '&page=' . $page;
        redirect($redirect_url);
    }
    Try this,

    Thanks

  8. #8
    Join Date
    Sep 2010
    Location
    Pokhara Nepal
    Posts
    49

    Default Thanks it works

    Quote Originally Posted by vshare2 View Post
    This is the full source code of admin/import_bulk_process.php(v2.7)
    Code:
    <?php
    /******************************************************************************
     *
     *   COMPANY: BuyScripts.in
     *   PROJECT: vShare Youtube Clone
     *   VERSION: 2.7
     *   LISENSE: http://buyscripts.in/vshare-license.html
     *   WEBSITE: http://buyscripts.in/youtube_clone.html
     *
     *   This program is a commercial software and any kind of using it must agree
     *   to vShare license.
     *
     ******************************************************************************/
    
    require '../include/config.php';
    require '../include/class.upload_remote.php';
    require '../include/functions_seo_name.php';
    require '../include/class.tags.php';
    require '../include/class.bulk_import.php';
    require '../include/youtube.php';
    require 'Zend/Loader.php';
    Zend_Loader::loadClass('Zend_Gdata_YouTube');
    
    check_admin_login();
    
    $imported_sites = array(
        'youtube'
    );
    
    if (isset($_POST['submit']))
    {
        $video_id = isset($_POST['video_id']) ? $_POST['video_id'] : array();
        $user_name = isset($_POST['user_name']) ? $_POST['user_name'] : '';
        $channel_id = isset($_POST['channel_id']) ? (int) $_POST['channel_id'] : 0;
        
        $sql = "SELECT * FROM `users` AS u,`channels` AS c WHERE
                u.user_name='" . mysql_clean($user_name) . "' AND
                c.channel_id='" . (int) $channel_id . "'";
        $result = mysql_query($sql) or mysql_die($sql);
        
        if (mysql_num_rows($result) > 0)
        {
            $tmp = mysql_fetch_assoc($result);
            $user_id = $tmp['user_id'];
            
            for ($i = 0; $i < count($video_id); $i ++)
            {
                if (! BulkImport::checkImported($video_id[$i], $_POST['import_site']) && in_array($_POST['import_site'], $imported_sites))
                {
                    $sql = "INSERT INTO `import_track` SET
                           `import_track_unique_id`='" . mysql_clean($video_id[$i]) . "' ,
                           `import_track_site`='" . mysql_clean($_POST['import_site']) . "'";
                    $result = mysql_query($sql) or mysql_die($sql);
                    
                    if ($_POST['import_site'] == 'youtube')
                    {
                        $video_url = 'http://www.youtube.com/watch?v=' . $video_id[$i];
                        $video_info = BulkImport::getYoutubeVideoInfo($video_id[$i]);
                    }
                    
                    if ($_POST['import_method'] == 'embed')
                    {
                        $video_length = sec2hms($video_info['video_duration']);
                        $seo_name = seo_name($video_info['video_title']);
                        
                        $sql = "INSERT INTO `videos` SET
                               `video_user_id`='" . (int) $user_id . "',
                               `video_title`='" . mysql_clean($video_info['video_title']) . "',
                               `video_description`='" . mysql_clean($video_info['video_description']) . "',
                               `video_keywords`='" . mysql_clean($video_info['video_keywords']) . "',
                               `video_seo_name`='" . mysql_clean($seo_name) . "',
                               `video_channels`='0|" . mysql_clean($channel_id) . "|0',
                               `video_type`='" . mysql_clean('public') . "',
                               `video_duration`='" . (int) $video_info['video_duration'] . "',
                               `video_length`='" . mysql_clean($video_length) . "',
                               `video_add_time`='" . $_SERVER['REQUEST_TIME'] . "',
                               `video_add_date`='" . date('Y-m-d') . "',
                               `video_active`='1',
                               `video_approve`='$config[approve]'";
                        
                        $result = mysql_query($sql) or mysql_die($sql);
                        $vid = mysql_insert_id();
                        
                        $upload = new upload_remote();
                        $upload->vid = $vid;
                        $upload->url = $video_url;
                        $upload->debug = 1;
                        
                        if ($config['approve'] == 1)
                        {
                            $current_keyword = mysql_clean($video_info['video_keywords']);
                            $tags = new Tags($video_info['video_keywords'], $vid, $user_id, "0|$channel_id|0");
                            $tags->add();
                            $video_tags = $tags->get_tags();
                            $sql = "UPDATE `videos` SET
                                   `video_keywords`='" . mysql_clean(implode(' ',$video_tags)) . "' WHERE
                                   `video_id`='" . (int) $vid . "'";
                            mysql_query($sql) or mysql_die($sql);
                        }
                        
                        if ($_POST['import_site'] == 'youtube')
                        {
                            $upload->youtube();
                        }
                    }
                    else
                    {
                        $sql = "INSERT INTO `process_queue`SET
                               `user`='" . mysql_clean($user_name) . "',
                               `title`='" . mysql_clean($video_info['video_title']) . "',
                               `description`='" . mysql_clean($video_info['video_description']) . "',
                               `keywords`='" . mysql_clean($video_info['video_keywords']) . "',
                               `process_queue_upload_ip`='" . User::get_ip() . "',
                               `type`='public',
                               `channels`='0|" . mysql_clean($channel_id) . "|0',
                               `status`='0',
                               `url`='" . mysql_clean($video_url) . "'";
                        $result = mysql_query($sql) or mysql_die($sql);
                    }
                }
            }
        }
        
        $keyword = isset($_POST['keyword']) ? $_POST['keyword'] : '';
        $page = isset($_POST['page']) ? (int) $_POST['page'] : 1;
        
        $redirect_url = VSHARE_URL . '/admin/import_bulk.php?keyword=' . $keyword . '&user_name=' . $user_name . '&channel=' . $channel_id . '&page=' . $page;
        redirect($redirect_url);
    }
    Try this,

    Thanks
    The above code works like champ thank you.
    Nepal's Largest video community portal. share wisely at WWW.CLONEVIDEOS.COM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •