Back to vBulletin 3.0 Add-Ons

vBGarage v3.1.1 (now with GD-Lib support!)
Mod Version: 1.00, by magnus

This modification is in the archives.
vB Version: 3.0.0 Rating: (12 votes - 4.75 average) Installs: 371
Released: 09 Apr 2004 Last Update: 14 Apr 2004 Downloads: 450
Not Supported DB Changes  

***CLICK HERE FOR vB3.0.5 INSTALLER/UPDATE

Spoiler (click to open)


With The consent of Magnus, here's an update for vBulletin 3.0.5

This update encompasses 3 things.
  • Install instructions: update of the /includes/init.php edit and a note about new update option in installer
  • The installer: New update option for fixing the ACP options after vB updates
  • Operating script: Agressive and redundant striping of HTML/PHP codes in text input fields
  • Unimplemented and not supported: GZ compression of images (installer and script)

The install instructions reflect a change we have found necessary in init.php since the original version was written. There is now an additional note on one new option to the installer that is for repairing vBgarage after vBulletin updates.

The operating script is updated. The mods attempt to stop injection attacks on the text input fields. Two methods thought to be useful in this attempt were used. One was from php.net and the other directly from vB code. They seem to do the job.

However, nothing is guaranteed! These updates are tested and in use on two boards though. Click either of the links in my signature to see a live demo.

If you attempt to use this code you should do a full backup of your database. Do not assume it will work perfectly, things can go wrong. Backup your database! Back it up twice. Download a copy.

Having said that, here's the files...
Attached Files
File Type: zip 3.0.5 update.zip (10.0 KB, 402 views)

Close
***


vBGarage v3.1.1 (now with GD-Lib support!)

Description
This hack will allow your users to create a virtual garage where they can store photos, details, etc.. about their vehicle (this can be modified to suit forums of other interests).

Latest Uploads will be displayed on Garage List.

Forum users can now leave comments in member garages.

Admin functions are available in the AdminCP.

This version contains the ability to limit access by usergroup(s). All templates are 100% XHTML Verified!

Information
Tested and developed on vB 3.0.0 Gold.

Requires
GD 2.0+ Library

Demo
http://www.sffba.net/forum/vbgarage.php?do=list (Temporary)

This hack, as like the rest of my hacks, are FREE. However, if you enjoy this hack and feel the need to donate something for my time you can do so by clicking the icon below:
https://www.paypal.com/xclick/business=magnux%40adelphia.net&no_note=1&tax=0&currency_code=USD

*NOTE: Those who donate are explicitly granted permission to remove the "Powered by" information from the vBGarage footer.

*NOTE: When donating, please include your forum url. Thanks!

Version History
v3 - Initial release. Let's hope I don't have alot of entries here.
v3.0.1 - Added GD-Lib Support!
v3.1.0 - Added User Comments, Latest Uploads on Garage List, AdminCP Options
v3.1.1 - Added ability for Admin to "edit" users' garages. Use ImageCopyResampled(); over ImageCopyResized(); for better thumbnail quality.

Planned Features
- Multiple entries per user.
- Possible integration with Photopost/Coppermine/etc..

If you use this, please click

* Installation script by John



UPGRADES

v3.1.0 -> v3.1.1 UPGRADE INSTRUCTIONS

Spoiler (click to open)


v3.1.0 -> v3.1.1 UPGRADE INSTRUCTIONS

1. Download vbgarage311.zip (which is attached to the first post).

2. Extract and upload vbgarage.php from the archive and upload it to your server, overwriting your existing copy.

3. In vbgarage_editgarage:

FIND:
HTML Code:
$bbuserinfo[username]
REPLACE with:
HTML Code:
$user[username]
FIND:
HTML Code:
$logincode
REPLACE with:
HTML Code:
<if condition="$bbuserinfo[userid] == $id">$logincode</if>
FIND:
HTML Code:
	<input type="hidden" name="do" value="edit" />
Add BELOW:
HTML Code:
	<input type="hidden" name="id" value="$id" />
4. In vbgarage_viewgarage:

FIND:
HTML Code:
	<td class="tcat" colspan="2"><b>$user[username]'s $data[year] $data[make] $data[model]</b><if condition="$bbuserinfo[usergroupid]==6">&nbsp;<span class="smallfont">[<a href="$vboptions[bburl]/vbgarage.php?do=delgarage&amp;id=$data[userid]">$vbphrase[delete]</a>]</a></span></if></td>
REPLACE with:
HTML Code:
	<td class="tcat" colspan="2"><b>$user[username]'s $data[year] $data[make] $data[model]</b><if condition="$bbuserinfo[usergroupid]==6">&nbsp;<span class="smallfont">[<a href="$vboptions[bburl]/vbgarage.php?do=delgarage&amp;id=$data[userid]">$vbphrase[delete]</a>]&nbsp;[<a href="$vboptions[bburl]/vbgarage.php?do=editgarage&amp;id=$data[userid]">$vbphrase[edit]</a>]</span></if></td>
Done !!

Added Features in v3.1.1
  • Admin "edit" garage displayed on garage view.
  • Fixed missing require_once(); call.

Close


v3.0.1 -> v3.1.0 UPGRADE INSTRUCTIONS

Spoiler (click to open)


v3.0.1 -> v3.1.0 UPGRADE INSTRUCTIONS

1. Download vbgarage_upgrade310.php (which is attached to this post) and upload it to your ADMINCP directory.

2. Download vbgarage.php (which is attached to this post) and upload it to your ROOT directory, overwriting your existing copy.

3. Follow the instructions in vbgarage_update_readme.txt (which is also attached to this post)

Done !!

Added Features in v3.1.0
  • User Comments in garages
  • Latest Uploads displayed on Garage List
  • Admin "delete" garage, displayed on Garage View.
  • AdminCP option configuration, no need to edit the .PHP file.
Attached Files
File Type: php upgrade_vbgarage310.php (7.1 KB, 53 views)
File Type: php vbgarage.php (12.5 KB, 31 views)
File Type: txt vbgarage_update_readme.txt (6.9 KB, 44 views)

Close


v3.0 -> v3.0.1 UPGRADE INSTRUCTIONS

Spoiler (click to open)


v3.0 -> v3.0.1 UPGRADE INSTRUCTIONS (enable GD-Lib support!)

1. Download the vbgarage301.zip from the http://www.vbulletin.org/forum/showpost.php?p=498255&postcount=1, and upload the new vbgarage.php to your forum ROOT directory, overwriting the old one.

2. Edit the vbgarage_editimagebits TEMPLATE:

REPLACE with:
(be sure to leave a SPACE after the closing </td>)
HTML Code:
<td class="alt2" valign="bottom"><img src="$vboptions[bburl]/vbgarage.php?do=thumb&amp;width=100&amp;id=$image[vbgarageid]" alt="$image[name]" /><br />
<center><input type="checkbox" name="delete$image[vbgarageid]">$vbphrase[delete]</center>
</td> 
3. Edit the vbgarage_imagebits TEMPLATE:

REPLACE with:
(be sure to leave a SPACE after the closing </a>)
HTML Code:
<a style="cursor:pointer; cursor-hand" href="vbgarage.php?do=popup&amp;image=$vboptions[bburl]/vbgarage.php?do=getimage&amp;id=$image[vbgarageid]" onclick="PopupPic(this.href); return false;" target="_blank"><img src="$vboptions[bburl]/vbgarage.php?do=thumb&amp;width=175&amp;id=$image[vbgarageid]" alt="$image[name]" border="0" /></a> 
Done !!

Close




MODIFICATIONS/ADD-ONS

1. Add "Who's Online" Location

Spoiler (click to open)


Add "Who's Online" Locations

In includes/functions_online.php:

FIND:
PHP Code:
        case 'bugs':
            
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], 'Bugs'); // Don't report 'bugs' as needing to be translated please :p
            
break; 
Add BELOW:
PHP Code:
        case 'vbgarage':
            
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], $vbphrase[vbgarage]);
            break; 
FIND:
PHP Code:
    case 'bugs.php':
        
$userinfo['activity'] = 'bugs';
        break; 
Add BELOW:
PHP Code:
    case 'vbgarage.php':
        
$userinfo['activity'] = 'vbgarage';
        break; 
Done!

Close
by magnus

2. Organize Your vBGarage Templates

Spoiler (click to open)


Organize Your vBGarage Templates

In includes/adminfunctions_templates:

FIND:
PHP Code:
    'subscription' => $vbphrase['group_paid_subscriptions'], 
Add BELOW:
PHP Code:
// START VBGARAGE HACK
    
'vbgarage' => $vbphrase['vbgarage'],
// END VBGARAGE HACK 
You will now have a "vBGarage Templates" Category, which can be expanded and contracted, in your Template Editor. This is a nice little tweak which will clean up your template editor, Lord knows it's probably a mess.

Close
by magnus

3. Increase Thumbnail Image Quality (v3.1.1 and older)

Spoiler (click to open)


Increase Thumbnail Image Quality (v3.1.1 and older)

Quote by Envy-UK
Have you found anything relating to the quality of the thumbnails?
Actually, yes.

In vbgarage.php:

FIND:
PHP Code:
    imagecopyresized($thumb['data'],$thumb['file'],0,0,0,0,$width,$thumb['height'],ImageSX($thumb['file']),ImageSY($thumb['file'])); 
REPLACE with:
PHP Code:
    imagecopyresampled($thumb['data'],$thumb['file'],0,0,0,0,$width,$thumb['height'],ImageSX($thumb['file']),ImageSY($thumb['file'])); 
That should increase thumbnail quality quite a bit.

Close
by magnus

4. Alphabetize Garage List

Spoiler (click to open)


Alphabetize Garage List

Actually, I take that back. Yes, you CAN alphabatize your listing very easily using LEFT JOIN.

In vbgarage.php:

FIND:
PHP Code:
        SELECT FROM " . TABLE_PREFIX . "vbgarage_users ORDER BY userid ASC LIMIT $pos,$perpage 
REPLACE with:
PHP Code:
        SELECT vbgarage_users.*,user.username FROM vbgarage_users LEFT JOIN user ON vbgarage_users.userid user.userid ORDER BY username ASC LIMIT $pos,$perpage 
Done!

Close
by magnus

5. Add "Latest Uploads" to FORUMHOME

Spoiler (click to open)


Quote by joeychgo
lets say the forum home page --- ??? can you point me in the right direction? im totally lost now........
In index.php:

FIND:
PHP Code:
// ### WELCOME MESSAGE ################################################# 
Add ABOVE:
PHP Code:
// START VBGARAGE HACK
// ### VBGARAGE #########################################################
$result_latest $DB_site->query(
    SELECT vbgarage_images.* 
    FROM " 
TABLE_PREFIX "vbgarage_images 
    ORDER BY vbgarage_images.vbgarageid DESC 
    LIMIT 5 
"
); 
     
while (
$latest $DB_site->fetch_Array($result_latest)) 

    eval(
'$latestbits .= "' fetch_template('vbgarage_latestbits') . '";'); 


$DB_site->free_result($result_latest); 
// END VBGARAGE HACK 
FIND:
PHP Code:
    'forumhome_subforumseparator_post'
); 
REPLACE with:
PHP Code:
    'forumhome_subforumseparator_post',
    
'vbgarage_latestbits'
); 
In template FORUMHOME:

FIND:
HTML Code:
$navbar
Add BELOW:
HTML Code:
<!-- START VBGARAGE HACK -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
	<td class="tcat" colspan="5"><b>$vbphrase[vbgarage_latest_uploads]</b></td>
</tr>
<tr>
$latestbits
</tr>
</table>
</td></tr></table>
<!-- END VBGARAGE HACK -->
That should do it.

Close
by magnus

6. EvilLS1's Timeslip Database Integration

Spoiler (click to open)


If you are like me and use both Magnus's VB Garage Hack, and you also use EvilLs1's TIMESLIP DATABASE then you're going to love this!

Simply edit your 'vbgarage_viewgarage' template this way:

FIND:
Code:
<td class="alt2" width="60%">$data[text]

Add right after:

Code:
<!-- performance stats block by SVTOA -->
<br>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>My $data[year] $data[model] Performance Stats</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="!$user['userid']">
<else />
<if condition="$user[field55] !='00.00'">
<b>My Best ET: <font color="red">$user[field55]</font>
<else />
This member has not added ET data to their vB Garage.
</if>
</if>
</span>
</td>
</tr>
<!-- best mph field -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$user[field56] !='00.00'">
<b>My Best MPH: <font color="red">$user[field56]</font>
</if>
</span>
</td>
</tr>
<!-- rwhp field -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$user[field51] !='0.0'">
<b>My RWHP: <font color="red">$user[field51]</font>
</if>
</span>
</td>
</tr>
<!-- best 60 foot time -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$user[field52] !='0.000'">
<b>My Best 60 foot time: <font color="red">$user[field52]</font>
</if>
</span>
</td>
</tr>
</td>
</tr>
</table>
<br/>
<!-- End PERFORMANCE STATS BLOCK -->

DONE!!!!

Now if a member has filled out the timeslip database "vehicle profile" fields, the info will display in this custom block! If they have not filled out the ET field, then all that will display is the message "This member has not added ET data to their vB Garage." (which you can edit to say whatever you want)

If they do not fill out the other fields, they simply will not display.

You do not have edit the field id's with this mod because EvilLS1's hack configures those fields the same on every board.

ENJOY!!!

Close
by SVTOA

7. Installer/Uninstaller

Spoiler (click to open)


Replace your install_vbgarage file with the one I've uploaded. I have added an uninstaller in this version that will remove all the database entries. You'll still need to undo template an file edits which shouldn't be to bad. I'm sure other people will want this anyway, but I still don't think it will fix your problem, Yuneek.
Attached Files
File Type: php install_vbgarage.php (23.6 KB, 87 views)

Close
by Action-N

8. vBulletin 3.0.5 Compatible Installer/Update

Spoiler (click to open)


With The consent of Magnus, here's an update for vBulletin 3.0.5

This update encompasses 3 things.
  • Install instructions: update of the /includes/init.php edit and a note about new update option in installer
  • The installer: New update option for fixing the ACP options after vB updates
  • Operating script: Agressive and redundant striping of HTML/PHP codes in text input fields
  • Unimplemented and not supported: GZ compression of images (installer and script)

The install instructions reflect a change we have found necessary in init.php since the original version was written. There is now an additional note on one new option to the installer that is for repairing vBgarage after vBulletin updates.

The operating script is updated. The mods attempt to stop injection attacks on the text input fields. Two methods thought to be useful in this attempt were used. One was from php.net and the other directly from vB code. They seem to do the job.

However, nothing is guaranteed! These updates are tested and in use on two boards though. Click either of the links in my signature to see a live demo.

If you attempt to use this code you should do a full backup of your database. Do not assume it will work perfectly, things can go wrong. Backup your database! Back it up twice. Download a copy.

Having said that, here's the files...
Attached Files
File Type: zip 3.0.5 update.zip (10.0 KB, 402 views)

Close
by

Download

This modification is archived and cannot be downloaded.

Supporters / CoAuthors

  • Action-N
  • noppid

Screenshots

       

 


vblts.ru supports vBulletin®, 2022-2024