Helpful Information
 
 
Category: vBgarage
having clickable link in postbit for users with a garage!

how can i do this?
can someone give me the exact code?

In postbit_legacy, whereever you want it to appear, add this code:


<!-- added garage code here -->
<a href="http://www.muscle-mustangs.com/forums/vbgarage.php?do=view&id=$userinfo[userid]"><smallfont>View my Mustang</smallfont></a>
<!-- end garage code-->

but replace my http://www.muscle-mustangs.com/forums with your exact URL and change, View My Mustang to "my garage" or whatever you would like the text to say!

This will work in 4.0.0. This will not work in the new version as empty garages are no longer viewable.

Any comments are welcome. Nothing is set in stone.

is there anyway of checking if theres a car in the garage or if its empty?
i'd rather not have clickable links for all members, just the ones that have a car?

is there anyway of checking if theres a car in the garage or if its empty?
i'd rather not have clickable links for all members, just the ones that have a car?

There is, but you don't want to do it just yet. I have to take a close look at this one or we could add 20 queries to the post loop and I'm not about to cache the entire vbg user table either.

I'm no mysql expert, but what I tried is a LEFT join on the vbguser table in the query that gets the posts. Problem is, there is more then one record per user in vbg. So you see posts duplicated for a user for every garage they have. I will try to figure this out. Maybe someone out there will be kind enough to give a hint.

Of course I could add a field to the vB user table and make it real easy, but I won't commit to DB mod of a vB table.

I have both the Timeslip Database and vBGarage 4.0.0 installed. Under the avatar in the postbit I had it where it displayed the Ride that is identified in the timeslip database. I have now added it so that display also links to the rides garage. I don't have multigarage set up yet, I don't think it will interact properly with the timeslip database. You can see it in use at http://www.rdtiburon.com.

Here is my code...

<a href="http://www.rdtiburon.com/forums/vbgarage.php?do=view&id=$userinfo[userid]"><smallfont><if condition="$post['field50']"><div>Ride: $post[field50]</div></if></smallfont></a>

In the next version, you can use this in postbit and get a parked list with random photos.

http://www.cpurigs.com/forums/vbgarage.php?do=viewparked&id=USERID

Users with no garage will output no photos and no garages to the list.

No Garage:
http://www.cpurigs.com/forums/vbgarage.php?do=viewparked&id=22

Invalid user ID's will display the same with an invalid username message.

INVALID:
http://www.cpurigs.com/forums/vbgarage.php?do=viewparked&id=55555

User id zero or blank throw an error message.

can't you just have a variable that counts the amount of times the userid is present in the vbgarage, and if its > 0 have a column in the vbgarageusers "`hasgarage` - default 0", set it to 1.










privacy (GDPR)