vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - vbRides ? Garage (https://vborg.vbsupport.ru/showthread.php?t=313438)

ozzy47 12-31-2014 01:55 AM

Quote:

Originally Posted by I.G.O.T.A. (Post 2529651)
You around anymore?

I think he is a bit tied up with his personal life ATM.


Quote:

Originally Posted by Action-N (Post 2522653)
Been having a little trouble getting the time to work on this product. I got a new puppy, the high energy kind that if it doesn't get enough attention it starts to chew on my arm.


I.G.O.T.A. 12-31-2014 02:40 PM

Quote:

Originally Posted by ozzy47 (Post 2529677)
I think he is a bit tied up with his personal life ATM.

I see that. ;)

Keyser Soze 01-07-2015 02:11 PM

I am currently trying to use this addon in my forum and have noticed that the author doesn't use the usual vbulletin way to create the breadcrumb-navbits (he is inserting custom arrow-images).
I have coded a custom recursive function that makes perfect use of vbulletins breadcrumb-navbits. You just have to replace the function getRidesNavBar in functions_vbrides.php with the following function:
PHP Code:

function getRidesNavBarArray($navbitsarray$catid$lastnavbit) {
    global 
$db$vbulletin$vbphrase$vboptions$navbitsarray;
    
    if (
$catid 0) {
        return 
'';
    }
    
    
$qry $db->query_read("SELECT * FROM ".TABLE_PREFIX."vbrides_categories WHERE id = $catid AND active = 1");
    
$row $db->fetch_array($qry);

    
$seolink 'vbrides.php?do=main&catid=' $row['id'];
    
    if (
count($navbitsarray) == 0) {
        
// add custom lastnavbit if supplied
        
if (!empty($lastnavbit)) {
            
$navbitsarray = array($seolink => $row['name'], '' => $lastnavbit);
        } else {
            
$navbitsarray = array('' => $row['name']);
        }
    }    else {
        
$navbitsarray array_merge(array($seolink => $row['name']), $navbitsarray);
    }

    
// still have parents?
    
if ($row['parentid'] != 0) {
        
getRidesNavBarArray($navbitsarray$row['parentid'], $lastnavbit);
    }    
    return 
$navbitsarray;


And you will have to call this function in vbrides.php a little bit differently 2 times:
PHP Code:

$navbits array_merge($navbitsgetRidesNavBarArray(array(), $catid$ride['title'])); 

and
PHP Code:

$navbits array_merge($navbitsgetRidesNavBarArray(array(), $ride['categoryid'],  $ride['title'])); 

After doing these 3 changes, you will see a breadcrumb in your forum's layout and not with these custom arrows that might not match your forum's style.

P.S.: Thanks for this great addon!

Keyser Soze 01-07-2015 02:15 PM

Another suggestion to the addon-author: you could parse the video-ID of Youtube-videos from Youtube-URLs with this little function (that I have found using Google) which will make it much more intuitive for users to add a youtube-link to their ride-profile because they no longer will have to add the exact embed url and can also add the usual URL from their browser's address bar:
PHP Code:

/*
 * Function to parse the id from all different types of Youtube Embed Codes and Youtube Urls
 *
 * @author Andreas Grundner
 * @date 22.07.2011
 * @licence freeware
 * @param string youtube url, embed code, share code, channel code ...
 * @return string youtube_id
 */
function getYoutubeId($sYoutubeUrl) {
 
    
# set to zero
    
$youtube_id "";
    
$sYoutubeUrl trim($sYoutubeUrl);
 
    
# the User entered only the eleven chars long id, Case 1
    
if(strlen($sYoutubeUrl) === 11) {
        
$youtube_id $sYoutubeUrl;
        return 
$sYoutubeUrl;
    }
 
    
# the User entered a Url
    
else {
 
        
# try to get all Cases
        
if (preg_match('~(?:youtube.com/(?:user/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu.be/)([^"&?/ ]{11})~i'$sYoutubeUrl$match)) {
            
$youtube_id $match[1];
            return 
$youtube_id;
        }
        
# try to get some other channel codes, and fallback extractor
        
elseif(preg_match('~http://www.youtube.com/v/([A-Za-z0-9-_]+).+?|embed/([0-9A-Za-z-_]{11})|watch?v=([0-9A-Za-z-_]{11})|#.*/([0-9A-Za-z-_]{11})~si'$sYoutubeUrl$match)) {
 
            for (
$i=1$i<=4$i++) {
                if (
strlen($match[$i])==11) {
                    
$youtube_id $match[$i];
                    break;
                }
            }
            return 
$youtube_id;
        }
        else {
            
$youtube_id "No valid YoutubeId extracted";
            return 
$youtube_id;
        }
    }


If you want to call this function in vbrides.php, do it this way:
PHP Code:

$html_video .= '<iframe width="280" height="158" src="//www.youtube.com/embed/' getYoutubeId($ride['video']) . '" frameborder="0" allowfullscreen></iframe>'


Keyser Soze 01-08-2015 07:53 AM

There's a small bug in vbrides_usercp.php that prevents the comments-counter for a ride-entry from decreasing after a moderator has deleted a comment. That means that the comment-counter does not represent the correct number of comments for an entry as soon as one comment will be deleted. To fix this, you only have to change one single character:

Open vbrides_usercp.php and replace
PHP Code:

if ($comments['state'] == 'visible'

with
PHP Code:

if ($comment['state'] == 'visible'


romaszek 01-19-2015 03:17 PM

Quote:

Originally Posted by Keyser Soze (Post 2531011)
Another suggestion to the addon-author: you could parse the video-ID of Youtube-videos from Youtube-URLs with this little function (that I have found using Google) which will make it much more intuitive for users to add a youtube-link to their ride-profile because they no longer will have to add the exact embed url and can also add the usual URL from their browser's address bar:
PHP Code:

/*
 * Function to parse the id from all different types of Youtube Embed Codes and Youtube Urls
 *
 * @author Andreas Grundner
 * @date 22.07.2011
 * @licence freeware
 * @param string youtube url, embed code, share code, channel code ...
 * @return string youtube_id
 */
function getYoutubeId($sYoutubeUrl) {
 
    
# set to zero
    
$youtube_id "";
    
$sYoutubeUrl trim($sYoutubeUrl);
 
    
# the User entered only the eleven chars long id, Case 1
    
if(strlen($sYoutubeUrl) === 11) {
        
$youtube_id $sYoutubeUrl;
        return 
$sYoutubeUrl;
    }
 
    
# the User entered a Url
    
else {
 
        
# try to get all Cases
        
if (preg_match('~(?:youtube.com/(?:user/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu.be/)([^"&?/ ]{11})~i'$sYoutubeUrl$match)) {
            
$youtube_id $match[1];
            return 
$youtube_id;
        }
        
# try to get some other channel codes, and fallback extractor
        
elseif(preg_match('~http://www.youtube.com/v/([A-Za-z0-9-_]+).+?|embed/([0-9A-Za-z-_]{11})|watch?v=([0-9A-Za-z-_]{11})|#.*/([0-9A-Za-z-_]{11})~si'$sYoutubeUrl$match)) {
 
            for (
$i=1$i<=4$i++) {
                if (
strlen($match[$i])==11) {
                    
$youtube_id $match[$i];
                    break;
                }
            }
            return 
$youtube_id;
        }
        else {
            
$youtube_id "No valid YoutubeId extracted";
            return 
$youtube_id;
        }
    }


If you want to call this function in vbrides.php, do it this way:
PHP Code:

$html_video .= '<iframe width="280" height="158" src="//www.youtube.com/embed/' getYoutubeId($ride['video']) . '" frameborder="0" allowfullscreen></iframe>'


Thank you for that. How is it used?

giaguaro 02-06-2015 10:02 AM

i have to substitute my VB Pro Garage because it's no longer supported.
I was wondering if i can import the old users/rides/images from the old mod into this new one.
Thanks a lot

llecount 02-16-2015 01:25 AM

Quote:

Originally Posted by giaguaro (Post 2536425)
i have to substitute my VB Pro Garage because it's no longer supported.
I was wondering if i can import the old users/rides/images from the old mod into this new one.
Thanks a lot

I am wondering this as well.

cdoyle 03-12-2015 07:34 PM

Quote:

Originally Posted by llecount (Post 2537639)
I am wondering this as well.

Same here, it would be great to not lose the ones we already have.

Has there been any other updates to this mod? I'm really hoping to move to a better garage soon.

PaulProe 03-18-2015 03:09 AM

I am investigating this plugin and have run into an issue of approvals. Maybe I can't see the forest for all the trees in the way.

I post vehicle with information and it shows up. But it shows as un-approved. Where do I go to approve the post?

Then when I log out and come back, the vehicle doesn't show up in the list. Any ideas of what I'm doing wrong?

Thanks

Paul


All times are GMT. The time now is 09:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01407 seconds
  • Memory Usage 1,802KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete