We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Extension: nGen File Field for FieldFrame

Development and Programming

Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

The issue I posted above is now resolved.

       
Cem Meric's avatar
Cem Meric
210 posts
16 years ago
Cem Meric's avatar Cem Meric

Fred, we have a situation where I have to import large chunk of data using CSVGrab. When entries are manually done we get below data which has its own format to hold data.

a:1:{i:0;a:4:{i:3;s:51:"test name1";i:5;s:8:"test phone1";i:1;s:11:"test email1";i:2;s:0:"";}}
a:1:{i:0;a:4:{i:3;s:60:"test name2";i:5;s:8:"test phone2";i:1;s:12:"test email2";i:2;s:0:"";}}
a:1:{i:0;a:4:{i:3;s:61:"test name3";i:5;s:8:"test phone3";i:1;s:5:"test email3";i:2;s:0:"";}}

Can you please explain how those variables are constructed? e.g. s:8, s:12, s:60 etc. is there a pattern?

       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

@Cem This appears to be more of an FF Matrix question and not specific to the File fieldtype. However what you are seeing is a serialized array. You would need to serialize the data prior to inputting it into the DB. Since EE stores the matrix in one field a bit of magic needs to be done in order to reverse the process or directly store a new entry. I’m not very familiar with CSVGrab so not sure how this would work. Feel free to PM me if you’d like and I can try to help more if I can.

       
Cem Meric's avatar
Cem Meric
210 posts
16 years ago
Cem Meric's avatar Cem Meric
@Cem This appears to be more of an FF Matrix question and not specific to the File fieldtype. However what you are seeing is a serialized array. You would need to serialize the data prior to inputting it into the DB. Since EE stores the matrix in one field a bit of magic needs to be done in order to reverse the process or directly store a new entry. I’m not very familiar with CSVGrab so not sure how this would work. Feel free to PM me if you’d like and I can try to help more if I can.

I’ve just noticed that Fred and thank you for replying. As per your knowledge while creating nGen File Field, do you control some parts of data related to your field or is it purely FF Matrix that controls how data is constructed?

       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

@Cem It’s a little of both. FF Matrix builds it’s array using what the various field types build. File field stores data in it’s own array currently (soon will only be a file name) which is in turn is stored by FF Matrix. Hope that makes sense.

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4

Hi there

When I upload a file that alredy exists, I get the following error:

Notice: Undefined offset: 1 in /home/xxx/public_html/backend/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 411

after that the stylesheet is out of place, but when I refresh everything is in place again. file uploaded, thumb created… it’s a minor bug, just to let you know…

cheers stefan

       
AJP's avatar
AJP
311 posts
16 years ago
AJP's avatar AJP

I needed to use this extension on a MSM enabled site, and found that in the custom field settings, it doesn’t denote which site you’re on for file upload destinations. I changed the select_upload_destinations function to the following to get Site labels. (i did not add any default settings however. I’ll polish it up and repost when I do that).

  • just added the site specific name and labels to the query so it selects that info as well, ordering by site_id, then name.
$dls = $DB->query("SELECT exp_upload_prefs.id, exp_upload_prefs.name, exp_sites.site_name, exp_sites.site_label, exp_sites.site_id FROM exp_upload_prefs, exp_sites WHERE exp_sites.site_id = exp_upload_prefs.site_id ORDER BY exp_sites.site_id, exp_upload_prefs.name ASC");
        foreach($dls->result as $dl)
        {
            $selected = ($dl['id'] == $current_option) ? " selected=\"true\"" : "";
            $block .= "<option value=\"{$dl['id']}\"$selected>{$dl['site_label']} - {$dl['name']}</option>";
        }
       
Nico Smit's avatar
Nico Smit
48 posts
16 years ago
Nico Smit's avatar Nico Smit

I hope new version will come with some of the functionalities of Mark Huot’s File extension, such as options as Clean Filenames and Rewrite Filenames.

       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

New release v.0.9.5

http://www.ngenworks.com/software/ee/ngen-file-field/

• New feature: Select an existing file • Delete or de-associate: Now that you can use an existing file, you can either remove a file from the server (even if other entries use it) or just remove it from use with a particular entry via a new delete interface • MH File compatability: can now be a drop in replacement for single file uploads. NOTE! This will not work with fields that have multiple files uploaded. You will need to migrate those fields to an FF Matrix • File data is no longer stored as an array • Thumbnails are automatically create for use in the CP • “thumbs” directory under the upload directory for the field will be created to store the thumbnails • Image detection has been improved for thumbnail display - only GIF/JPG/PNG will show thumbnails

       
Casey Reid's avatar
Casey Reid
82 posts
16 years ago
Casey Reid's avatar Casey Reid

Before I update, are there any compatibility issues with updating over the previous version due to how the data was stored in an array and now is not? Will my existing file upload data still work fine or be converted over to the new storing method?

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4
…

hi there, I’ve just uploaded the new files, now I don’t see the new features… &-) I deleted the old files and re-uploaded…

edit.. Ahh I see, on your homepage there’s only the 0.9 version? care to give the 0.9.5 link?

       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

@outline4 sorry, about that! Forgot to change the link. The site has been updated.

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill

The new features are brilliant!

I’ve uploaded this to 2 different installs and seem to have some strange behavior. On one site which has both a FF Matrix field(w/nGen File) and a seperate nGen File Field, when I click “Use an Existing File” the link seems to jump to the top of the page, but nothing happens.

On the 2nd install, using just a FF Matrix(w/nGen File) the 1st row works perfectly. When I try to add a second row, I get the same behavior as above. If I fill in another field in the 2nd row and save, I can then use the nGen File’s “Use an Existing File” control. The options that pop up next to the trash icon (also really nice idea) also fail under the same conditions.

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4
The new features are brilliant! I’ve uploaded this to 2 different installs and seem to have some strange behavior. On one site which has both a FF Matrix field(w/nGen File) and a seperate nGen File Field, when I click “Use an Existing File” the link seems to jump to the top of the page, but nothing happens. On the 2nd install, using just a FF Matrix(w/nGen File) the 1st row works perfectly. When I try to add a second row, I get the same behavior as above. If I fill in another field in the 2nd row and save, I can then use the nGen File’s “Use an Existing File” control. The options that pop up next to the trash icon (also really nice idea) also fail under the same conditions.

yes, if you want to choose an existing file within a matrix, you can only do it with the top row… but.. it’s working… hell yeah! woudn’t have thougth this possible… gREAT extension!!

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4

Uaah.. and I get a line in the frontend for every entry I made:

Notice: Undefined index: file_name in /home/xxx/public_html/backend/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 556

how should I proceed when I have files thar are already uploaded? cheers stefan

       
First 6 7 8 9 10 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.