PDA

View Full Version : Multiple Cars/Garages for vBGarage


noppid
01-24-2005, 04:42 PM
I wrote some code today. I'm using some code snippets and the basic logic that magnus sent me. I believe the author was Action-N and magnus. Thanks again to both of them for sharing. We needed some logic, code, and templates to do this addition and again they cheerfully provided them.

vBGarage public release will be an adaptation using the above logic, some edited code, and some edited templates. If you have seen those branchs of the code, you may see some similarities and some differences in the adaptation.

You can see what I have so far at my Computer Rigs Forum (http://www.cpurigs.com/forums/vbgarage.php). I have two garages set up to view. I really need a few testers to register and login to test using the garage to provide feedback on addition work.

There are database changes, template changes, template additions, and an updated vbgarage.php so far. URL's are also affected by including/passing addition variables.

Comments are needed in this thread, please give us your two sense and we'll see where the chips fall.

Here's the list of changes so far...

// New vbgarage.php

// New vB file edits
Who's online instructions will be included

// Database changes

Table: vbgarage_comments
added field `vbgarageid`
added index on field `vbgarageid`

Table: vbgarage_users
dropped Primary Index on field `userid`
added field `garageid` int(10) unsigned NOT NULL auto_increment,
added index PRIMARY KEY (`garageid`),
added index KEY `userid` (`userid`)

Table: vbgarage_images
added field `id` smallint(6) unsigned NOT NULL default '0',
added index KEY `id` (`id`),
added index KEY `userid` (`userid`)

// templates changed

vbgarage_editgarage
vbgarage_editimagebits
vbgarage_imagebits
vbgarage_latestbits
vbgarage_listbits
vbgarage_viewgarage
vbgarage_commentbits
vbgarage_listgarage
vbgarage_popup

// template additions

vbgarage_editparkedbits
vbgarage_parkedbits
vbgarage_parkedlist
vbgarage_randombits
vbgarage_inactive_warning
vbgarage_error

//new settings
vbgwysiwyg
grouptitle = vbgarage
value = 1
default = 1
optioncode = yesno
displayorder = 60
advanced = 0
volatile = 0

// new phrases
Globals
vbgarage_alert_off = The Garage is Currently Turned OFF!!! Only Admins can see the Garage!
vbgarage_parked_cars = Car List
vbgarage_gallery = Photo Gallery
vbgarage_add_edit = (Add/Edit your Car)

Setting Phrases
setting_vbgwysiwyg_desc = Use the WYSIWYG Editor?
setting_vbgwysiwyg_title = Editor Options

// images
Two new images
forums/images/misc/deletegarage.gif
forums/images/misc/editgarage.gif


Thanks for your time.

cinq
01-24-2005, 11:32 PM
Here's what I am using for mine ( well not exactly, i changed it quite a bit, but this should present the gist of the table structures. )


#
# Table structure for table `vbgarage_comments`
#

CREATE TABLE `vbgarage_comments` (
`id` int(10) unsigned NOT NULL auto_increment,
`garageid` int(10) unsigned NOT NULL default '0',
`username` varchar(50) NOT NULL default '',
`pagetext` text NOT NULL,
`dateline` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1;

# --------------------------------------------------------

#
# Table structure for table `vbgarage_images`
#

CREATE TABLE `vbgarage_images` (
`imageid` int(10) unsigned NOT NULL auto_increment,
`garageid` int(10) unsigned NOT NULL default '0',
`name` varchar(50) NOT NULL default '',
`data` longblob NOT NULL,
`type` varchar(50) NOT NULL default '',
PRIMARY KEY (`imageid`)
) TYPE=MyISAM AUTO_INCREMENT=1;

# --------------------------------------------------------

#
# Table structure for table `vbgarage_ratings`
#

CREATE TABLE `vbgarage_ratings` (
`rateid` int(10) NOT NULL auto_increment,
`garageid` int(10) NOT NULL default '0',
`userid` int(10) NOT NULL default '0',
`rating` int(10) NOT NULL default '0',
PRIMARY KEY (`rateid`)
) TYPE=MyISAM AUTO_INCREMENT=1;

# --------------------------------------------------------

#
# Table structure for table `vbgarage_users`
#

CREATE TABLE `vbgarage_users` (
`garageid` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`text` text,
`lastactivity` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`garageid`)
) TYPE=MyISAM AUTO_INCREMENT=1;

noppid
01-24-2005, 11:54 PM
Here's what I am using for mine ( well not exactly, i changed it quite a bit, but this should present the gist of the table structures. )




Appreciate it, but I'm done. The list above reflects what I did, not intened to do. ;)

In case you're interested, here's what the tables look like...


CREATE TABLE `vbgarage_users` (
`userid` int(10) unsigned NOT NULL default '0',
`year` varchar(50) NOT NULL default '',
`make` varchar(50) NOT NULL default '',
`model` varchar(50) NOT NULL default '',
`text` mediumtext NOT NULL,
`lastactivity` int(10) unsigned NOT NULL default '0',
`garageid` int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (`garageid`),
KEY `userid` (`userid`)
) TYPE=MyISAM



CREATE TABLE `vbgarage_images` (
`vbgarageid` smallint(6) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`id` smallint(6) unsigned NOT NULL default '0',
`name` varchar(50) NOT NULL default '',
`data` longblob NOT NULL,
`type` varchar(50) NOT NULL default '',
`thumb` longblob NOT NULL,
PRIMARY KEY (`vbgarageid`),
KEY `id` (`id`),
KEY `userid` (`userid`)
) TYPE=MyISAM

CREATE TABLE `vbgarage_comments` (
`id` int(10) unsigned NOT NULL auto_increment,
`vbgarageid` int(10) unsigned NOT NULL default '0',
`username` varchar(50) NOT NULL default '',
`pagetext` mediumtext NOT NULL,
`dateline` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `vbgarageid` (`vbgarageid`)
) TYPE=MyISAM

cinq
01-25-2005, 12:32 AM
Opps.
What kind of comments are you looking for then ?

noppid
01-25-2005, 12:47 AM
Opps.
What kind of comments are you looking for then ?

You're right, I was not very clear. I need some folks to go to my computer site and beat on the garage there for testing.

Thanks

noppid
01-26-2005, 04:02 PM
OK folks, I can't call this new code tested till I get some folks to try it out. I'm not ready to let anyone beta test it yet and I have no immediate plans for release, but I need help debugging.

Come on over to http://www.cpurigs.com/forums please and register and test the multicar vBGarage.

P.S. Upgrading to multicar mode will require vBGarage 4.0.0 to have been installed first.

oly51
01-26-2005, 11:35 PM
Just uploaded "Multiples" to the test page.
Only issue, After you upload the image, you are taken back to the Submit screen. Hit "Submit' and you remain at that screen. It does not take you to the garage so you don't know if it uploaded or not.

Works great otherwise. I'll give it a shot whenever you are ready! :D

Also noticed that when you click on the thumb, the google ads are in front of the full size image.

noppid
01-27-2005, 01:32 AM
Just uploaded "Multiples" to the test page.
Only issue, After you upload the image, you are taken back to the Submit screen. Hit "Submit' and you remain at that screen. It does not take you to the garage so you don't know if it uploaded or not.

Works great otherwise. I'll give it a shot whenever you are ready! :D

Also noticed that when you click on the thumb, the google ads are in front of the full size image.

You know if the image was uploaded because it appears in the uploaded images list on the edit page you are taken back to. Then I have edited my directions next to that panel to let the users know to click on members garages to exit that page. This way you can upload a few images in a row easily.

What browser are you using when you see the ads in front of the full size image? I cannot duplicate that in IE or Firefox.

Thanks

oly51
01-27-2005, 02:16 AM
What browser are you using when you see the ads in front of the full size image? I cannot duplicate that in IE or Firefox.
ThanksOpera 7.54 (It does work ok on IE)

noppid
01-27-2005, 02:24 AM
Interesting. That may be a show stopper? The script is from 2003. I wonder if there is an update or similar more current version?

oly51
01-27-2005, 10:00 AM
Works perfectly now. I like the header changes.

noppid
01-27-2005, 04:00 PM
Works perfectly now. I like the header changes.

Joeychgo and I worked on that till 4:30am. The idea of the title and headers was his and is for SEO optimization.

We also nixed the DHTML popup as it is inconsistant in drawing itself and while it looks cool, without a full frame, it just didn't look right to us.

Joe gave me a long list of to do's that I'm going to address to enhance things before we even consider a release. That time is not going to be too soon.

But let me remind you, the next version will require 4.0.0 to be installed to upgrade to multi garage.

noppid
01-31-2005, 07:16 PM
The list of changes has been updated. The first post in this thread is basically what will need to be done to upgrade to multi garage/car mode.

Take a look at that we have so far... http://www.cpurigs.com/forums/vbgarage.php

We need more feedback please.

nexialys
02-04-2005, 10:21 PM
feedbacks.. we NEED this, how can we feedback something we can't play with ?!

release that multi-garage hack, we will evaluate and help on coding extensions if needed... ;) ;0)

noppid
02-04-2005, 10:36 PM
feedbacks.. we NEED this, how can we feedback something we can't play with ?!

release that multi-garage hack, we will evaluate and help on coding extensions if needed... ;) ;0)

Easier said then done. You see how this is going, 30 installs and only an upgrader and converter revision? That's how the next release is supposed to be too. I don't want to be a slave to code that folks need fixed on live sites cause we missed a bug that is hard to work out.

It would be appreciated if folks would go to the computer site in my signature and register and test the new version. We can have problems there and not really effect anyone.

I'm not hawking for membership, I never expect to see you guys again after it works, we need testers.

Thanks

nexialys
02-05-2005, 11:16 AM
i never knew you needed us to register to test... btw, i never test on others boards, i take the codes and test it on my own server, because i'm "so intense" .. ;)

i'll wait for the release of the files to test it, so if you want me to test on my side, just shoot me the files... ;)

noppid
02-05-2005, 02:47 PM
i never knew you needed us to register to test... btw, i never test on others boards, i take the codes and test it on my own server, because i'm "so intense" .. ;)

i'll wait for the release of the files to test it, so if you want me to test on my side, just shoot me the files... ;)

Well, if no one tests it, it won't be debugged. If no one registers, no one can debug the add and edit and wysiwyg.

I would say with the help I have now, it will be another month.

trackpads
02-05-2005, 08:48 PM
Ok, done.

Problem #1

How do you edit/remove a photo from your garage once uploaded? I uploaded the wrong pic but cant get it to remove.

Problem #2

Large images break the page. Is there a way to make a certain max width?

Problem #3

How do we completely remove a garage?

Looks good so far!!

noppid
02-05-2005, 09:58 PM
Ok, done.

Problem #1

How do you edit/remove a photo from your garage once uploaded? I uploaded the wrong pic but cant get it to remove.

Problem #2

Large images break the page. Is there a way to make a certain max width?

Problem #3

How do we completely remove a garage?

Looks good so far!!

1) You need to click edit/add your computer on forumhome or from the menu in your user control panel. Then on the right of the list you will see buttons for delete and edit.

You also found a bug, when you view your garage you should see an edit and delete link, that is fixed.

2) That's gonna take some JAVA I believe. Someone said they could help with Java on popups, maybe we can set some help here too.

Or

We could add resizing of pics on upload. Only larger to Smaller by width is what I'm thinking.

3) See number one.

Thanks for your help, it is appreciated.

4) I don't like what quote and code tags do either.

trackpads
02-05-2005, 10:59 PM
Ok, just noticed something else. The comments are displaying backwards, ie. most recent first. Any way to reverse that?

Also, it works perfectly for large JPG uploads:

http://www.cpurigs.com/forums/vbgarage.php?do=view&id=241&garage=48

But gifs are a problem:

http://www.cpurigs.com/forums/vbgarage.php?do=view&id=241&garage=47

Is there a way to allow more than one image in the garage when you create it? Right now you have to go back and edit, add a pic, edit again, add another pic etc etc

noppid
02-05-2005, 11:30 PM
Ok, just noticed something else. The comments are displaying backwards, ie. most recent first. Any way to reverse that?

Also, it works perfectly for large JPG uploads:

http://www.cpurigs.com/forums/vbgarage.php?do=view&id=241&garage=48

But gifs are a problem:

http://www.cpurigs.com/forums/vbgarage.php?do=view&id=241&garage=47

Is there a way to allow more than one image in the garage when you create it? Right now you have to go back and edit, add a pic, edit again, add another pic etc etc

If we sort the other way, the first page fills up and looks dead. I know it's the oposite of threads, but at least the garage looks active. It's not for conversation, it's for comments.

Of course there is a way to do multiple uploads, I just don't have the time for
adding it. But it's a cool idea.

The GIF is not the problem, the quotes and code in the text are. I have not decided how to deal with that yet.

Thanks again for taking the time to try things out.

trackpads
02-05-2005, 11:45 PM
If we sort the other way, the first page fills up and looks dead. I know it's the oposite of threads, but at least the garage looks active. It's not for conversation, it's for comments.

Great point. Your right, better this way.

The GIF is not the problem, the quotes and code in the text are. I have not decided how to deal with that yet.

Oh okay, because the penguin is humongous, but when you click the pop up to see larger size it is small and normal.

-Jason

noppid
02-06-2005, 12:13 AM
Oh okay, because the penguin is humongous, but when you click the pop up to see larger size it is small and normal.

-Jason

Yes, that is a problem with browser resizing, smaller pics can be really streched.

Maybe some suggestions will roll in before we just let it be.

I checked the streching of the width of the text side. That is caused by vB php tags. I doubt many will use those.

i never knew you needed us to register to test... btw, i never test on others boards, i take the codes and test it on my own server, because i'm "so intense" .. ;)

i'll wait for the release of the files to test it, so if you want me to test on my side, just shoot me the files... ;)

I enabled full size images for guests. How about a comment on the layout on your mac?

Thanks

WhisperPntr
02-06-2005, 02:14 PM
Hi there. I'm really happy with what you're doing as I've been anxious to get a gallery for my own forum. Because I know how it can feel "alone" when coding, I'll be happy to help with debugging and whatever needs you may have.

But before I begin... do you prefer we type here or there when we see something? I will type here but may type there under vbgarage if I see something.

Last note, my name will be corapanther and just for clarification's sake I'm a she not he ;)

djjeffa
02-06-2005, 02:29 PM
Any I deal when this hack will be released?
Iv been looking for this hack for about 6 months lol
Good luck guys and keep up the good work.
If ya hook me up with the codding ill test it on my site :)

WhisperPntr
02-06-2005, 02:30 PM
Hey there. I think the code is awesome but there are a few things I managed to break or noticed needed a teeny bit of fixing. ;)

First, the description on the uploaded images for some reason disfigures the look on mozilla. My resolution is set at 1280x1024 and that may have something to do with it...though I do prefer it to be a wee bit smaller! ;)

Second, I managed to break the model area by including php code.

I'll get on more stuff later. it's already 12:30 here in hong kong so I need a bit of beauty sleep :)

Looks absolutely wonderful thus far and if there's anything else you want us/me to do please don't hesitate to say it!

noppid
02-06-2005, 03:27 PM
Hey there. I think the code is awesome but there are a few things I managed to break or noticed needed a teeny bit of fixing. ;)

First, the description on the uploaded images for some reason disfigures the look on mozilla. My resolution is set at 1280x1024 and that may have something to do with it...though I do prefer it to be a wee bit smaller! ;)

Second, I managed to break the model area by including php code.

I'll get on more stuff later. it's already 12:30 here in hong kong so I need a bit of beauty sleep :)

Looks absolutely wonderful thus far and if there's anything else you want us/me to do please don't hesitate to say it!

Exactly what version on you running? 3.11? 3.11-3.0.5? 4.0.0? 4.0.1? 4.0.2?

Any I deal when this hack will be released?
Iv been looking for this hack for about 6 months lol
Good luck guys and keep up the good work.
If ya hook me up with the codding ill test it on my site :)

Thanks for the help. However I have no clue as to when I can give out code.

nexialys
02-06-2005, 03:31 PM
why everybody on a PC think that the layout on a Mac is completely different and need to be debugged ?! damn.. when it's not working on a Mac, it's not compliant, that's all.. ;)

noppid
02-06-2005, 03:41 PM
why everybody on a PC think that the layout on a Mac is completely different and need to be debugged ?! damn.. when it's not working on a Mac, it's not compliant, that's all.. ;)

Well I'm trying to be polite since you're giving suggestions and seem to want to help, even though you won't register. ;)

I've implementesd the -1 thing in the phrases you suggested and thought ya may have wanted to give more feedback where possible.

So, having said that. The layout works in IE and FF for me and validates as XHTML valid, so I consider it done.

Thanks.

Rick Sample
02-06-2005, 04:02 PM
Very nicely done so far, just noticed when you click on an image, you have to register first! Like that Ideal!

A bit off topic, but if its not to much trouble, how did you get the google ads in their under the users list of modifications on their personal page? I'd like to put a <hr> break in ther like you have, then under that, list some paid links of some sort!

noppid
02-06-2005, 04:31 PM
Very nicely done so far, just noticed when you click on an image, you have to register first! Like that Ideal!

A bit off topic, but if its not to much trouble, how did you get the google ads in their under the users list of modifications on their personal page? I'd like to put a <hr> break in ther like you have, then under that, list some paid links of some sort!

It's just template edits in the correct places, not difficult. My motorcycle site is running 4.0.3 and my computer site is running the upcoming vBGarage (4.1.0?). Depending on which site you are referring to, the google ads do go in different places, but with a little more detail, we could get ya going.

For the upcoming release, I'm considering leaving markers in the code as comments to suggest the google placement. Honestly, the template were rewritten to be specifically more SEO friendly and target the ads. Thanks to JoeyChgo for his time and suggestions doing the optimization!

Rick Sample
02-06-2005, 04:47 PM
It's just template edits in the correct places, not difficult. My motorcycle site is running 4.0.3 and my computer site is running the upcoming vBGarage (4.1.0?). Depending on which site you are referring to, the google ads do go in different places, but with a little more detail, we could get ya going.

For the upcoming release, I'm considering leaving markers in the code as comments to suggest the google placement. Honestly, the template were rewritten to be specifically more SEO friendly and target the ads. Thanks to JoeyChgo for his time and suggestions doing the optimization!


Ah ok, something like this with the google ads, but it will host regular text links instead of the google ads!
http://www.cpurigs.com/forums/vbgarage.php?do=view&id=3&garage=46

I've not upgraded to any newer version, so I'm not sure if that will make a difference or not?

noppid
02-06-2005, 05:24 PM
In vbgarage_viewgarage find...

$data[text]

add below...

<hr />
<!-- ad here -->

Rick Sample
02-06-2005, 07:07 PM
In vbgarage_viewgarage find...

$data[text]

add below...

<hr />
<!-- ad here -->


THANKS! worked wonderfully: http://www.muscle-mustangs.com/forums/vbgarage.php?do=view&id=422

noppid
02-06-2005, 07:51 PM
You're welcome.

WhisperPntr
02-07-2005, 02:13 AM
Hey when you said what version do you mean browser? I'm currently using mozilla firefox 1.0 in specific
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

noppid
02-07-2005, 02:26 AM
Hey when you said what version do you mean browser? I'm currently using mozilla firefox 1.0 in specific
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I mean what version of vbgarage.

WhisperPntr
02-08-2005, 01:45 PM
I mean what version of vbgarage.

Umm...I'm testing the one on your computer rigs forum and I have not installed my own vbgarage.

also I posted as corapanther and submitted the cookie monster jpg, etc.

noppid
02-08-2005, 01:57 PM
Umm...I'm testing the one on your computer rigs forum and I have not installed my own vbgarage.

also I posted as corapanther and submitted the cookie monster jpg, etc.

Ah OK, I've dealt with those issues you pointed out... I think. Should be in a previous posts.

Thanks

WhisperPntr
02-09-2005, 07:58 AM
Actually thank *you* for the hard work! Oh and I just checked the other fixes. It looks great now that the php and other code tags don't warp the page.

Is there anything in particular on vbgarage you want us to debug? If not I'll just go ahead and test things at random.

noppid
02-09-2005, 10:43 AM
Actually thank *you* for the hard work! Oh and I just checked the other fixes. It looks great now that the php and other code tags don't warp the page.

Is there anything in particular on vbgarage you want us to debug? If not I'll just go ahead and test things at random.

Appreciate the help.

Mostly we need eyes on the output and the new editing stuff tested. Especially since I added a load of file handling stuff last night. If there is a file upload issue now, you should get a relative error message.

I have the uploads at 1MB currently. I'm gonna lower it to 64K to play with the pic errors.

Thanks

noppid
02-11-2005, 03:27 AM
I wrote the installer for a 3.1.0 beta release tonight.

The beta upgrade will entail...


Running the beta upgrader which...

Performs all DB updates of columns and indexes
Installs a new ACP setting
Installs the new Phrases
Installs 6 new templates

Running the vbg_convert script to assign images garage ids
Updating the existing nine templates (full replacements)
Installing the new vbgarage.php


I have done the first part on my live M/C forums with the upgrader. This part modifies the DB and installs the new setting, setting phrases, new templates, and global phrases. It is rerunable and reports what is going on pretty good.

I will modify the remaining templates and go live tomorrow. (I hope)

That will leave 4.0.3 behind for me and my focus will be on 4.1.0.

4.0.3 will continue to be supported because it will be necessary to have installed 4.0.3 to install 4.1.0. (For now. I will probably write a full installer for 4.1.0)

The beta will be posted when I finish converting my live M/C forums.

ToastBusters
02-11-2005, 10:41 PM
Do you know by any chance when this will be released?

noppid
02-11-2005, 11:04 PM
Do you know by any chance when this will be released?

https://vborg.vbsupport.ru/showthread.php?t=76158

Maybe tonight as beta. Seems to work, but there of course will be things I didn't catch yet.

ToastBusters
02-11-2005, 11:06 PM
https://vborg.vbsupport.ru/showthread.php?t=76158

Maybe tonight as beta. Seems to work, but there of course will be things I didn't catch yet.
Cool, lookin forward to it.

noppid
02-11-2005, 11:27 PM
Cool, lookin forward to it.

I'll probably zip it up and post it.

You need to have 4.0.3 installed and working. Then the upgrade is real easy. You run three seperate files and then upload the new vbgarage.php.

Of course there is the edit and save a pharse thing to do and the checking of the ACP settings, but it should be an easy upgrade.

Do a backup and have your forums closed when you perform the upgrade.

Rick Sample
02-12-2005, 03:13 PM
I'll probably zip it up and post it.

You need to have 4.0.3 installed and working. Then the upgrade is real easy. You run three seperate files and then upload the new vbgarage.php.

Of course there is the edit and save a pharse thing to do and the checking of the ACP settings, but it should be an easy upgrade.

Do a backup and have your forums closed when you perform the upgrade.


So when this new release with the multiple garages gets out, will we have to have 4.0.3 installed, or will we be able to uprade our current version dirctly to 4.0.3? (I'm running the very first version)

noppid
02-12-2005, 03:16 PM
So when this new release with the multiple garages gets out, will we have to have 4.0.3 installed, or will we be able to uprade our current version dirctly to 4.0.3? (I'm running the very first version)

It's out in the beta section as vBG 4.1.0 beta.

You can upgrade from any 4.0.x version and should be ok.

WhisperPntr
02-26-2005, 12:54 AM
Sorry for being away. was kinda caught up in a lot of stuff! I'll install it and then go ahead and debug it when i have more time

LuBi
06-12-2005, 06:21 AM
Has anyone been able to remove the multi car functionality from release 4.1.0 r5 ..? I'd like to diable and or remove it..?