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

Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Here’s a quick piece of PHP code that I posted the other day to someone needing height and width.

<?php
$imageurl ="/{file-url}";
list($width, $height, $type, $attr) = getimagesize("$imageurl");
?>

You can then spit out the height or width using :

<?php
echo $width;
echo height;
?>

Hope it helps a bit.

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Scrap that I really should note that it was on this very page that I already posted this information 😉

I could have sworn it was another thread and didn’t immediately see it above just then. Sorry!

Anyway that code should work for that sort of thing for anyone who needs it.

Best wishes,

Mark

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill
Also, this more like a feature request but is there way to access previously uploaded images/files as a selection rather then uploading the same file with an automatically changed name. Say, we’ve got two entries on the same category and I want them to have the same image as their default image or even on the same entry (see attached image)

I second this. I do a fair amount of work with non-profit local news sites that reuse images all the time so it would be great to have the option of using a link to a previous image. Thanks for considering it as a feature request. This is an awesome addition to a brilliant extension.

       
GDmac - expocom's avatar
GDmac - expocom
350 posts
16 years ago
GDmac - expocom's avatar GDmac - expocom

Wow, this is a great add-on, i was fighting this afternoon with Mark Huot’s older file-extension but this is a great solution. I do have a question, or actually a request.

I’m currently building a site where the editors have to upload larger press-images (3000x2000 pixels) and it looks like the thumbnail on the publish-edit page is showing the full image scaled down with CSS. Would it be possible to automatically generate a thumbnail and be able to use that in the CP and on front-end for preview purposes?

Regards, GDmac

       
elemental's avatar
elemental
77 posts
16 years ago
elemental's avatar elemental

@shinka + @Sean C. Smith

If you still have a publish/edit blank page, what is the limit memory for PHP. Fred suggesetd turning on the PHP errors and in my casr it was clear that the default 8M memory_limit was the couse of the error. The extension requested amore than.

TO check the PHP memory_limit go to CP Home › Admin › Utilities › PHP Info and search for memory_limit.

       
Cem Meric's avatar
Cem Meric
210 posts
16 years ago
Cem Meric's avatar Cem Meric
Anyone up for posting a tutorial/screencast?

I’ve made a quick demo video using FF Matrix and nGen File Field in ExpressionEngine. I might give you some tips.

       
gridonic's avatar
gridonic
231 posts
16 years ago
gridonic's avatar gridonic

The video seems nice, but it also seems to have an emphasis on “quick” as to me, it’s like runs like fast-forward. I cannot see anything apart from flashing pictures 😊

       
Cem Meric's avatar
Cem Meric
210 posts
16 years ago
Cem Meric's avatar Cem Meric
The video seems nice, but it also seems to have an emphasis on “quick” as to me, it’s like runs like fast-forward. I cannot see anything apart from flashing pictures 😊

Yes, you’re right on the “quick” part. Did you have “HD” on? That might help.

       
gridonic's avatar
gridonic
231 posts
16 years ago
gridonic's avatar gridonic

Turning HD off solves the problem. Thanks!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Another way to get around it is to (once the video starts streaming) hold back the playback head for a second or so and pull it back to the beginning of the video. This should then get it to play at the correct speed regardless of HD or not 😉

Just thought it might help a bit.

       
Cem Meric's avatar
Cem Meric
210 posts
16 years ago
Cem Meric's avatar Cem Meric
Another way to get around it is to (once the video starts streaming) hold back the playback head for a second or so and pull it back to the beginning of the video.

I usually called that “time for a cuppa” 😊

       
mmjaeger's avatar
mmjaeger
78 posts
16 years ago
mmjaeger's avatar mmjaeger

After installing the extensions, I’m getting the following error when trying to save a new post:

MySQL ERROR:

Error Number: 1064

Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1

Query: SELECT * FROM exp_upload_prefs WHERE id =

Does anybody have an idea what’s wrong.

thank you

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

I too get an intermittent error when image exists on upload location

Notice: Undefined offset: 1 in D:\Programs\XAMPP_1.6.7\htdocs\system\extensions\fieldtypes\ngen_file_field\ft.ngen_file_field.php on line 411

Warning: Cannot modify header information - headers already sent by (output started at D:\Programs\XAMPP_1.6.7\htdocs\system\extensions\fieldtypes\ngen_file_field\ft.ngen_file_field.php:411) in D:\Programs\XAMPP_1.6.7\htdocs\system\core\core.functions.php on line 296

Image is uploaded fine but file field doesn’t have the information.

There is also another issue when one deletes the row entirely. This doesn’t trigger file deletion from the server.

       
Danny T.'s avatar
Danny T.
426 posts
16 years ago
Danny T.'s avatar Danny T.

I wasn’t even aware that this was able to delete the file from the server when a row, etc. is removed.

On another note, is anybody aware of whether nGen File Field uploads the files the same way as the stock EE one? What I mean is, when I publish a new entry and upload a new file, I tell it place the URL only into the custom field and it places my file upload destination in curly braces { } before the file name.

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

@Cem Meric Thanks for creating the demo video! I’m sure it will be helpful to many.

       
1 2 3 4 5 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.