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
  #12  
Old 04-22-2009, 03:31 PM
Jamey Jamey is offline
 
Join Date: Apr 2009
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to make a couple adjustments...installed! Thanks.
Reply With Quote
  #13  
Old 08-21-2009, 02:53 PM
corsacrazy's Avatar
corsacrazy corsacrazy is offline
 
Join Date: May 2002
Location: london
Posts: 854
Благодарил(а): 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) {

hmm even with this mod i still get an error using latest vb 3.8
Reply With Quote
  #14  
Old 09-14-2009, 05:20 PM
NTMID8 NTMID8 is offline
 
Join Date: Feb 2004
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Had this working great but it stopped working with one of the latest revisions of CND. I'm on CND 2.0.5 now and no longer showing in postbit, so something has changed with the conditional maybe?
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 04:31 AM.


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.03891 seconds
  • Memory Usage 2,244KB
  • Queries Executed 20 (?)
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
  • (1)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
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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_postinfo_query
  • fetch_postinfo
  • 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