Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
CND Garage add-on: Show cars in postbit Details »»
CND Garage add-on: Show cars in postbit
Version: 1.01, by flup flup is offline
Developer Last Online: Nov 2021 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.7.x Rating:
Released: 01-20-2009 Last Update: 01-20-2009 Installs: 18
Uses Plugins Template Edits
 
No support by the author.

This plugin is made for the CND Garage system (click) and will display the cars a user has in his garage. If there are no cars in the users garage, there wont be displayed anything

EDITS / UPLOADS / IMPORTS
- 1 plugin import
- 1/2 template edits

INSTALLATION GUIDE
First of all, import the plugin using: admincp -> Plugins & Products -> Download / Upload Plugins, the import form is on the bottom of the page.

After that, edit your postbit and/or postbit_legacy templates and find:
HTML Code:
<div>
$vbphrase[posts]: $post[posts]
</div>
Below it add:
HTML Code:
<if condition="$show[garage_cars]"><div><small><b><a href="garage.php?do=user_garage_view&id=$post[userid]">$post[musername]'s Garage</a></b>:<br />$post[garage_cars]</small></div></if>
RESULT
See the attached screenshot for the result, of course this one is customized to fit my forum style

VERSIONS
  • 1.00 - Vehicles order by date of adding to the CND Garage
  • 1.01 - Order of the vehicle list by putting the main vehicle on top followed by the other/previous vehicles

CUSTOM TEMPLATE EDIT GUIDE
If you have a custom style, you can use these codes in your postbit templates:

To display the link to a users garage:
HTML Code:
<a href="garage.php?do=user_garage_view&id=$post[userid]">$post[musername]'s Garage</a>
To display the users cars (+ links to the cnd garage car page):
HTML Code:
$post[garage_cars]
Both can be placed between the following tags, these check if there are any cars found for the users:
HTML Code:
<if condition="$show[garage_cars]">
and
HTML Code:
</if>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-23-2009, 12:45 AM
recklessop recklessop is offline
 
Join Date: Apr 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks like EXACTLY what we have been waiting for
Reply With Quote
  #3  
Old 01-23-2009, 06:39 AM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems that it was already released under cnd itself (at their forums), however it looks a bit different as mine checks wether you actually have cars in your garage, if not - it won't display anything.

I'm not sure how their plugin works, but at least this was a good test for me to start getting used to the plugin system of vB :P
Reply With Quote
  #4  
Old 01-23-2009, 08:43 AM
Haltech Haltech is offline
 
Join Date: Mar 2008
Location: Ca
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I own the CND Garage but since half of my users are IE7 guys, they cant even use the garage, which is a shame. i added your plugin for the post bit anyhow, no issues. Thanks.
Reply With Quote
  #5  
Old 01-23-2009, 09:31 AM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How come? I haven't had any messages from users that it wouldn't work in IE7 .. http://www.clubpunto.nl/garage.php is the link to my garage.. guess I'm gonna check this out for myself anyhow, perhaps I can find a fix

I disabled a lot of features for now, but the things I can find in the first couple of pages is only a template error.
While viewing my own vehicle, it showed the 'Add as primary' button next to a photo instead of above, which kinda stretched my website to wide. Other than that, everything seems to go find (submit forms, image uploads, viewing vehicles/modifications).
Reply With Quote
  #6  
Old 02-26-2009, 06:37 AM
Blackheart_72 Blackheart_72 is offline
 
Join Date: Dec 2007
Location: UK
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic mod fella, works just as i want it to.
Reply With Quote
  #7  
Old 03-14-2009, 12:24 PM
River_rush River_rush is offline
 
Join Date: Mar 2004
Location: Basingstoke
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Missing the table prefix from the xml code, it works if you edit the line after // Get Cars from database to read

Code:
$cars = $this->registry->db->query("SELECT uv.vehicle_id, model.model, make.make FROM " . TABLE_PREFIX . "garage_user_vehicle uv, " . TABLE_PREFIX . "garage_makes make, " . TABLE_PREFIX . "garage_models model WHERE uv.make_id = make.id AND uv.model_id = model.id AND uv.user_id = '".$post[userid]."' ORDER BY uv.main_vehicle DESC");
if($this->registry->db->num_rows($cars) > 0) {
Reply With Quote
  #8  
Old 03-16-2009, 02:09 AM
Redzzand Redzzand is offline
 
Join Date: Jan 2009
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by River_rush View Post
Missing the table prefix from the xml code, it works if you edit the line after // Get Cars from database to read

Code:
$cars = $this->registry->db->query("SELECT uv.vehicle_id, model.model, make.make FROM " . TABLE_PREFIX . "garage_user_vehicle uv, " . TABLE_PREFIX . "garage_makes make, " . TABLE_PREFIX . "garage_models model WHERE uv.make_id = make.id AND uv.model_id = model.id AND uv.user_id = '".$post[userid]."' ORDER BY uv.main_vehicle DESC");
if($this->registry->db->num_rows($cars) > 0) {
where can this be found? what file?

Edit: Found it under Plugins & Products >> Plugin Manager >> Edit "Show CND Cars in Postbit" >> Plugin PHP Code

Edit 2: Thanks a million for this code! With this code, it works on 3.8.1 PL1!!!
Reply With Quote
  #9  
Old 03-18-2009, 04:08 AM
ArchangelX ArchangelX is offline
 
Join Date: Feb 2006
Location: Oahu, HI
Posts: 298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a bunch! Works even on 3.5!
Reply With Quote
  #10  
Old 03-21-2009, 01:59 AM
externalaw.com externalaw.com is offline
 
Join Date: Nov 2008
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

we found an IE fix, this product is not working if you use Cyb New Posts hack
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04417 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (6)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete