PDA

View Full Version : New "garage" Add-On


Action-N
01-13-2014, 03:53 AM
Hello, I have been working on a new add-on that I'm close enough to share some screenshots. I have been wanting to build a vbgarage since I first started with vbulletin an first worked on something with Magnus ten years ago. We've had a few mods that have come an now appear to be gone so it was time I get motivated. It was Christeris new addons that had the style an layout I dreamed of doing that inspired me to create this new add-on. He has since abandon his work an given ozzy47 his code. He has given me permission to use Christeris code to build a new garage add-on called "vbRides".

Below is a link to a folder on my server with some full size screenshots (No demo until image code finished). I've posted concept images in another thread, but everything in these are real an working features. Some things that aren't shown are the extra photo placement an HTML5 audio. You can see the images are the default nophoto ones an that is the part I have left to finish. Just handling image an audio uploads to file folder, code is already in place for showing them.

http://www.action-network.com/images/vbRides_Screenshots/

To answer some sure questions the hot rod specific fields a coded into the script as that was what my vision was to build. However there all phrased to allow changing. The four sections can be turned off if you use it for something else an don't need all the fields.

I build it styled around the blogs look an used the style variables in the templates. Haven't tried it but that means if any skin that customized the blog will also work for vbRides. No having to edit a bunch of css for this add-on.

I have looked through the other garage mods threads an taking ideas from them to know what I should build in to vbRides. I didn't want to over do it like the one did, but if you can see anything it should have post in this thread. I'll try an keep a compiled list in this post to keep track.

Update Jan 26th: I spent some time cleaning up the code, one thing to make it work, another to make it proper for public use. In doing so I noticed the css inclusions where hacked in so that led me to switch the templates over to the GENERIC SHELL template an learn how to include css properly. Have that much done an working, also think that will help with cross vb versions if it uses the shell of it's own version.

Then I spent some night working on on the breadcrumb code an that was time consuming. It's working for now, still might need more work to make it all work like original vb code.

Getting there with adding types to additional photos, it's not updating or adding the new field. If I manually add it to the database it works. Comments was gonna get redone so I could have admin/moderator editing an delete for comments.

So bare with me as I continue to work on this, I've spent every moment outside of work an sleep working on this project. I want it done more than anyone, but also don't want a bazillion "it don't work" posts when I release it. That an I don't want version bug fixes cluttering up the install file.



Demo: http://www.action-network.com/vbrides.php
Demo Account vbrides:W5K9VK

To Do List

Determine how to handle youtube link like where to put it.


P.S. This post belongs in the Hatchery but new coders are not aloud to post.


Update July 22: Posting a prerelease version to get initial feedback an how it installs for different people.

bosanci28
01-13-2014, 04:10 AM
Looks really nice layout!

Now, regarding the pictures , the user can upload only 5 ? from what i see in the picture? or
can more if allowed within the admin area cp?

Thanks.

Action-N
01-13-2014, 04:14 AM
yeah you can set how many by user group. It's just built to handle five at once. I also want to add image type like engine, interior, to them to show with the corresponding section.

bosanci28
01-13-2014, 04:22 AM
Ok, I see ! Thanks for that info.

Action-N
01-19-2014, 05:04 AM
Finally had a break through with image upload an thumb photo creation which was the major one. Now I'm cleaning up that code an getting the options implemented from the admin settings. Still have to setup the new links for the images to show but that should be easy. Then I can upload a demo to my site an create a demo account for people here. Assuming no issues with permissions it'll probably be ready to send out to a few testers.

SPEEDKILLZ
01-19-2014, 05:32 AM
Nice, can't Wait

bosanci28
01-19-2014, 06:18 PM
waiting patiently .... to test it...

Action-N
01-19-2014, 07:09 PM
Well then guess it's time to share the link then. Has some issues to work out with it going to my live forum. But you'll get the idea an something to look at, just expect some kinks. Like the pages inherited a text align center command from somewhere. Also couldn't make up my mind about where to have the path for photos, in a stylevar or as an option. Guess I'm going with option an deleted style var, but that broke the image links. So will work on those first an then make a demo user to post here. Set unregistered to view for now atleast.

http://www.action-network.com/vbrides.php

SPEEDKILLZ
01-19-2014, 07:15 PM
Getting this error when trying to view thread on your forum

Warning: require_once([path]/vbrides/includes/functions.php) [function.require-once]: failed to open stream: No such file or directory in [path]/vbrides/hooks/add_rides_postbit.php on line 3

Fatal error: require_once() [function.require]: Failed opening required '/home/actionne/public_html/vbrides/includes/functions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/actionne/public_html/vbrides/hooks/add_rides_postbit.php on line 3

Action-N
01-19-2014, 07:25 PM
thanks, I also renamed that function file an moved it.

SPEEDKILLZ
01-19-2014, 07:46 PM
thanks, I also renamed that function file an moved it.

No problem. I asked a question here if you know https://vborg.vbsupport.ru/showthread.php?t=236888&page=72

TheLastSuperman
01-20-2014, 04:10 AM
When viewing the details: http://www.action-network.com/vbrides.php?do=viewride&rideid=12

I think beside each Category title that is bolded, should be a thumbnail for one picture of that part of the car then when they click the little thumb it opens up via pop-up to view larger version etc... actually scratch that make the thumb on the right of the title because not many will have a nice pic of the bottom of their car on a lift/other so that way for example to the right of Interior a little thumbnail would appear and to the right of Engine and Transmission a little thumbnail of a a picture they took of under the hood.

Edit: Or even restyle the titles with CSS make a border w/ rounded corners around the image that extends over the text on the right.

Action-N
01-20-2014, 04:40 AM
Yeah it could use some visual to brake up all the text. I actually intended to add types to the photos so I could do something like that. I saw both other garage add-ons had that an it'll be smart if I do too. Shouldn't be to hard, just adding another field along side photo title. I'd probably just use the same template used for the main additional photos in the ride 1.
Thanks for the input.

matthewd5
01-21-2014, 01:59 AM
Looks nice...

Matthew

Action-N
01-21-2014, 02:51 AM
Hi matthew an thanks. Guess you edited your post, but in response to the version sent to my email I know there are other garage type add-ons out there. Reference in the title was to better describe my add-on so people know what it's for. Mine is named vbrides, but in the mod itself it's referred to as just Rides.

In regard to you saying the other garage add-on works well, then you must not be familiar with it.

noppid
01-21-2014, 12:25 PM
Good luck. It's hard work.

MrD
01-26-2014, 12:14 PM
Hi,
it?s looks good :)
Are there Importers from other Addons (vbprogarage,Timeslips)?
i have an Garage with 811 Cars, and have interest for the Rides Addon.
Is it possible to Translate it in German?

blind-eddie
01-26-2014, 03:24 PM
Very nice!! What is the chance of making this for vb3.8?

Action-N
01-26-2014, 03:45 PM
Wow MrD, that is a lot of cars to have in there an probably many angry members to have to start over. I do plan on trying to build some importers. Wasn't sure since mine will have many more fields to further customize the garages that the other scripts don't have.

For translations, I've used phrases on everything I could. Some places don't seem to support a phrase like the back end areas. So as long as the admin understands some english there should be no problems when using in a foreign language.

Ah Eddie, nobody taking care of you 3.8rs. I think that would be like writing a completely new mod, but I did see a thread list on some 3.8 add-ons that work in 4.0. An now I think about it many off the 4.0 stuff is modified 3.8 so might not be to difficult. I'll definitely look into it.

MrD
01-27-2014, 08:24 AM
Hi Scott,
nice to hear that.
I Use the vbprogarage at this Time.
If i used vb 3.x i used a Garage from "Hoffi" that have an Feature, called Car of the Month/Year.
It create automatic a Poll, if the user allowed that in their Garage.

Maybe it?s a good feature for your Ride ;)

If you wan?t a "Tester and Translator" you can ask me :D

Action-N
01-28-2014, 01:01 AM
I looked up Hoffi an found one website with what must be it. Was pretty empty so wasn't much to see.

Was interesting to think about a poll for car of the month. I do have something started, while not 100% what the goal is to choose a random vehicle from each category an insert it into a field within the category table. So a featured block can be shown at the top of the page featuring a car from that particular category. This is done with cron so it can happen whenever you set the timer to run, daily, monthly, an probably yearly.

MrD
01-28-2014, 10:59 AM
Hi Scott,
i take a look in my old files.
Maybe i found it.
Or i ask Hoffi, it´s a good friend from me.
Write me a PN with your Mailadress.

MrD
02-01-2014, 01:38 PM
Hi Scott,
i ask Hoffi and he take a look in his old Files.
I have the Permission, to convert the Addon to VB4.

Action-N
02-02-2014, 04:47 PM
Another status update. Been working on getting image type working, finally got it to add an update into the database. Then when it come time to attach to a section, stupified. Think what I worked on the week before was not the way to go.

I keep breaking the code an spend days trying to figure out what I did. My advice to anyone developing a mod backup your files before a session or attempt to change something around.

Once I figure out what I messed up this time I will post some code to get help with something. On my add/edit form the additional photos input still sends an empty array when nothing was entered in the input field, then once the array is processed breaks since it doesn't find any info. Probably a simple conditional to check for if incoming is empty but I tried that in a few spots an it just skips to the next error check.

--------------- Added 1391369191 at 1391369191 ---------------

Okay here is the bit of code from saving additional photos. As mentioned I added the " AND $image_ext != '' " to the first error I get and it gets me to the file upload error. It still uploads the photos that where submitted through the input field, so the error is from it going to the next number in the array. I'm stumped, an could use some help. Might even be as simple as taking out the error redirects.




// Manage additional photos
if ($_FILES['photoname'])
{
$files = array();
foreach ($_FILES['photoname'] as $k => $l)
{
foreach ($l as $i => $v)
{
if (!array_key_exists($i, $files))
{
$files[$i] = array();
}
$files[$i][$k] = $v;
}
}

// Counter for Titles
$counter = 0;
foreach ($files as $file)
{
// Get image name
$imagename = @basename($file['name']);

// Image name of temp uploaded photo
//$tmp_imagename = realpath($vbulletin->options['vbrides_photo_path']) . '/tmp/' . @basename($file['tmp_name']);
//echo $tmp_imagename;

// Check image extention an make it lowercase
$image_ext = strtolower(end(explode(".", $file['name'])));
$allowed_exts = explode(', ', $vbulletin->options['vbrides_photo_exts']);
if (!@in_array($image_ext, $allowed_exts) AND $image_ext != '')
{
$vbulletin->url="vbrides_usercp.php?" . $vbulletin->session->vars['sessionurl'] . "do=addedit&rideid=$rideid";
eval(print_standard_redirect('vbrides_invalid_data _ext', true, true));
}

// Destination imagename, rename if set to
if ($vbulletin->options['vbrides_photo_rename'])
{
$dest_imagename = md5(uniqid(rand(), true)) . '.' . $image_ext;
} else {
$dest_imagename = $imagename . '.' . $image_ext;
}

// Get size
$imagesize = intval($file["size"]); // filesize($tmp_imagename);
// Make sure file size is ok
$maxsize = $vbulletin->options['vbrides_photo_size'];
if ($maxsize > 0 && $maxsize*1024 < $imagesize)
{
$vbulletin->url="vbrides_usercp.php?" . $vbulletin->session->vars['sessionurl'] . "do=addedit&rideid=$rideid";
eval(print_standard_redirect('vbrides_invalid_data _size', true, true));
}

// Upload the full image first
$new_image = $photodir . 'full/' . $dest_imagename;

if (!@move_uploaded_file($file['tmp_name'] , $new_image))
{
$vbulletin->url="vbrides_usercp.php?" . $vbulletin->session->vars['sessionurl'] . "do=addedit&rideid=$rideid";
eval(print_standard_redirect('vbrides_invalid_data _upload', true, true));
} else {
// Resize photo
// Get current size
list($width, $height) = getimagesize($new_image);

// Size thumb photo
$photo_thumb_size = photoResize($width,$height,$vbulletin->options['vbrides_thumb_width']);
$thumb_width = $photo_thumb_size['0'];
$thumb_height = $photo_thumb_size['1'];
createImage($width,$height,$thumb_width,$thumb_hei ght,$image_ext,$new_image,$thumbdir,$dest_imagenam e,$vbulletin->options['vbrides_photo_quality']);

$counter ++;
$is_image = getimagesize($new_image);
if (!$is_image)
{
// Uninstall photo from ride photo directories
if(file_exists($photodir . "$dest_imagename")) unlink($photodir . "$dest_imagename");
if(file_exists($photodir . 'thumb/' . "$dest_imagename")) unlink($photodir . 'thumb/' ."$dest_imagename");
if(file_exists($photodir . 'full/' . "$dest_imagename")) unlink($photodir . 'full/' ."$dest_imagename");
} else {
// Get title & type
$title = $db->escape_string($vbulletin->GPC["phototitle"][$counter]);
$type = $db->escape_string($vbulletin->GPC["phototype"][$counter]);

// Insert new photo
$db->query_write("UPDATE ".TABLE_PREFIX."vbrides_rides SET photos=photos+1 WHERE id = $rideid");
$db->query_write("INSERT INTO ".TABLE_PREFIX."vbrides_photos SET rideid = '$rideid', photoname = '$dest_imagename', title = '$title', type = '$type'");
$photoid = $vbulletin->GPC['id'] = $db->insert_id();
}
}
}
}

KenDude
02-03-2014, 06:34 AM
I have almost 3,000 cars in vbgaragepro and have been unable to reach Dylan about it's future, anyone talked to him?

I would be interested in vbrides if it is going to be supported AND if it can import from vbgaragepro, no way I'm asking 3000 users to start over again.... :)

MrD
02-03-2014, 08:27 AM
Hi Ken,
3K Cars are a lot.
How many Modifications have you?

Action-N
02-03-2014, 01:30 PM
Oh wow I can't believe the garage can handle that many entries. I definitely will need to build some importers. I have way more option to fill in with mine so they'll still want to update their cars afterwards. Right now I'm still trying to design adding the types to photos so they can be shown in the specif section. Thought I was getting somewhere, but now starting a different approach. Then I'll be reworking the comments system so admins can edit/moderate them. Then it'll be just building people some modules for their cms an forum side block. I feel I'm pretty close an will have something to blow away the other garage add-ons.

Dylan works for Dragonbyte Tech an has for awhile now, he posts here under their name. You can look through their threads an look for his name in the signature. I don't expect a future for his garage from the posts I've seen about it. From what I've read about DbT they don't let their coders have outside projects.

As for me supporting my project I'm not going anywhere that I expect. I'll support what I can.

Action-N
02-08-2014, 06:58 PM
Looks like I finally tackled adding the image type feature. After about a week or more of trying to foresee the need to support versatility allowing admin entered image types I gave up an did hard coded types to match the sections I already was using. Result was being finished in a few hours. Doh! Posting a screenshot as I haven't updated the demo script in awhile.

Next project is advanced comment system for adding, deleting, moderating. Then I can get back to adding the "fluff" features.

KenDude
02-10-2014, 02:54 PM
Hi Ken,
3K Cars are a lot.
How many Modifications have you?

I miss spoke, there are over 5,000 cars in the garage currently, haven't counted the mods, but lots of those as well I'm sure...


It is just frustrating me that I was running 3.0.7 full version and upon upgrading to 3.0.9 I lost features because I guess I have a non-full version now. Still trying to reach Dylan...

KenDude
03-25-2014, 03:31 PM
How's the work coming?

Mattie Num Nums
04-13-2014, 09:28 PM
Hows this going?

Action-N
04-16-2014, 03:18 AM
Well shoot, haven't been getting notices when there are posts in this thread. Was going to make an update thinking everyone give up on me, but see there was life. I've still been working on this project nearly everyday still. The comments took a long time, but was now finished with major components. Had to build some blocks for the cms an thought I could release what I had for some initial testing to some people. Was then just cleaning things up an fixing any issues before doing so an is where I'm at now. So to update my progress I'm getting very close now, goal is by the end of the month.

bosanci28
04-16-2014, 03:37 AM
Nice to hear from you again!, I was thinking your left too... anyway, let me know when we can do some testing.
Thanks

KenDude
07-15-2014, 01:20 AM
Whatever happened to this??

Action-N
07-21-2014, 02:51 AM
Hey Guys, Has been awhile I know an sorry about that. Did burn out after uploading to my live website an had more issues. Finally figured I better upload what I have since the main structure should be finished. Anyway gonna post the file for anyone who was following this thread so you give it a test run before I post it as a mod.

There still might be some issues with the ride of the day feature so that might act weird, but the rest should be ready. Also I never had anyone use the add-on on my website so haven't done any load testing yet.

Uploaded a version(vbRides_1.0.1) that took out the widget part for now.
Version(vbRides_1.0.2) added the widget back in. Was using the name of the widget (ExecPhp) before. My LAN board used the names, but my live website has a number code for the class. So I manually set the widgetid for 12 as that seems consistent between the two.

KenDude
07-21-2014, 06:26 PM
Hey Guys, Has been awhile I know an sorry about that. Did burn out after uploading to my live website an had more issues. Finally figured I better upload what I have since the main structure should be finished. Anyway gonna post the file for anyone who was following this thread so you give it a test run before I post it as a mod.

There still might be some issues with the ride of the day feature so that might act weird, but the rest should be ready. Also I never had anyone use the add-on on my website so haven't done any load testing yet.

Does it have the ability to import vehicles, mods, businesses, etc. from vbgarage pro?

--------------- Added 1405971533 at 1405971533 ---------------

Tried to install and upon importing the product HTML received an error message that said:


Invalid value '' for 'widgettypeid'

Right after it was trying to add the Widget Member Rides

My only choice is to "Go Back" on it.

I don't see anything showing up so I'm assuming it did not install correctly, I see no Nav menu, etc. (not sure where it should show up exactly anyway)

Action-N
07-22-2014, 12:33 AM
If I can get things stable then I would work on import scripts. If I where to do a vbgarage pro would you be able to get the sql structure an a couple complete data tables?

After installing you'll have to set usergroup for the mod. Tried getting it to set when installed but don't appear to work right.

KenDude
08-11-2014, 05:15 PM
If I can get things stable then I would work on import scripts. If I where to do a vbgarage pro would you be able to get the sql structure an a couple complete data tables?

After installing you'll have to set usergroup for the mod. Tried getting it to set when installed but don't appear to work right.

Have you fixed the install process so it doesn't bomb out with an error? If so I'm happy to install and take a look at it and then give you feedback about how I'd prefer importing was done. Yes I can provide you with SQL format for the tables if that helps.

Action-N
08-11-2014, 06:10 PM
Yes did done an released it in the mod section. Thread titled "vbRides -garage" or vbride link in my signature goes to the mod thread now. After a couple bug releases I think it should be set for awhile.