Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 01-28-2014, 01:01 AM
Action-N's Avatar
Action-N Action-N is offline
 
Join Date: Jan 2002
Location: Pasco, WA
Posts: 225
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #22  
Old 01-28-2014, 10:59 AM
MrD's Avatar
MrD MrD is offline
 
Join Date: Aug 2003
Location: Germany/NRW
Posts: 419
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #23  
Old 02-01-2014, 01:38 PM
MrD's Avatar
MrD MrD is offline
 
Join Date: Aug 2003
Location: Germany/NRW
Posts: 419
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Scott,
i ask Hoffi and he take a look in his old Files.
I have the Permission, to convert the Addon to VB4.
Reply With Quote
  #24  
Old 02-02-2014, 04:47 PM
Action-N's Avatar
Action-N Action-N is offline
 
Join Date: Jan 2002
Location: Pasco, WA
Posts: 225
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 [DATE]1391369191[/DATE] at [TIME]1391369191[/TIME] ---------------

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.


Code:
    // 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_height,$image_ext,$new_image,$thumbdir,$dest_imagename,$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();
                }
            }
        }
    }
Reply With Quote
  #25  
Old 02-03-2014, 06:34 AM
KenDude KenDude is offline
 
Join Date: Jul 2006
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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....
Reply With Quote
Благодарность от:
MrD
  #26  
Old 02-03-2014, 08:27 AM
MrD's Avatar
MrD MrD is offline
 
Join Date: Aug 2003
Location: Germany/NRW
Posts: 419
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Ken,
3K Cars are a lot.
How many Modifications have you?
Reply With Quote
  #27  
Old 02-03-2014, 01:30 PM
Action-N's Avatar
Action-N Action-N is offline
 
Join Date: Jan 2002
Location: Pasco, WA
Posts: 225
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #28  
Old 02-08-2014, 06:58 PM
Action-N's Avatar
Action-N Action-N is offline
 
Join Date: Jan 2002
Location: Pasco, WA
Posts: 225
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Attached Images
File Type: jpg ScottH454-1970-Chevrolet-Camaro 2014-02-08 11-51-35.jpg (95.0 KB, 0 views)
Reply With Quote
  #29  
Old 02-10-2014, 02:54 PM
KenDude KenDude is offline
 
Join Date: Jul 2006
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MrD View Post
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...
Reply With Quote
  #30  
Old 03-25-2014, 03:31 PM
KenDude KenDude is offline
 
Join Date: Jul 2006
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How's the work coming?
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 11:27 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
  • Page Generation 0.04333 seconds
  • Memory Usage 2,291KB
  • Queries Executed 14 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete