![]() |
CND Garage add-on: Show cars in postbit
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> 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> See the attached screenshot for the result, of course this one is customized to fit my forum style :) VERSIONS
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> HTML Code:
$post[garage_cars] HTML Code:
<if condition="$show[garage_cars]"> HTML Code:
</if> |
This looks like EXACTLY what we have been waiting for
|
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 |
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.
|
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). |
Fantastic mod fella, works just as i want it to. :)
|
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"); |
Quote:
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!!! |
Thanks a bunch! Works even on 3.5!
|
we found an IE fix, this product is not working if you use Cyb New Posts hack
|
All times are GMT. The time now is 12:02 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:
|