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
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
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.
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
@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.
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.
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.
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
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.
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.