![]() |
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:
PHP Code:
|
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? |
Quote:
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... 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/vbgara...ewparked&id=22 Invalid user ID's will display the same with an invalid username message. INVALID: http://www.cpurigs.com/forums/vbgara...arked&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.
|
All times are GMT. The time now is 12:30 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|