vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBgarage (https://vborg.vbsupport.ru/forumdisplay.php?f=104)
-   -   having clickable link in postbit for users with a garage! (https://vborg.vbsupport.ru/showthread.php?t=75409)

aussiev8 01-30-2005 08:48 AM

having clickable link in postbit for users with a garage!
 
how can i do this?
can someone give me the exact code?

Rick Sample 01-30-2005 12:29 PM

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

PHP 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!

noppid 01-30-2005 01:56 PM

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.

aussiev8 02-03-2005 09:39 AM

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?

noppid 02-03-2005 03:53 PM

Quote:

Originally Posted by aussiev8
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.

javageek 02-03-2005 05:54 PM

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>

noppid 02-03-2005 09:58 PM

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.

aussiev8 02-08-2005 03:25 AM

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
  • Page Generation 0.01131 seconds
  • Memory Usage 1,731KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete