When attempting to upload files (v3.1.1), I encountered the error message: “There was a problem uploading file.ext.” Error reporting showed that the issue was that the absolute file path was concatenated onto itself, resulting in a nonsensical path consisting of two absolute paths stuck end to end. I fixed it by changing lines 699 and 700 to:
$server_path = preg_match("/^\//", $server_path)==0?$server_path:$server_path;
$server_path = preg_replace("/^\/|\/$/", '', $server_path).'/';
This has had the side effect of causing the save to crash to a blank page, which seems to be caused by the resize function. I tried disabling the image resizing in the “File Upload Preferences” area with no luck, but commenting out the contents of the resize function made things error and crash free.
Ideally, I’d like to have the option to use the resizing capability, so if anyone has any suggestions, I’d appreciate it.
Also, I’m having trouble with MySQL error 1062 when attempting to update the “File Upload Preferences.” Disabling the File extension fixes this, but that’s no good if I need to change the extension-specific preferences. So far, I’ve been having to edit the “ext_mh_file” table by hand. This problem has been mentioned here before, but no solution has come up.
What would it take to get this extension to support sorting?
I want to do three things when using variable pairs: • Sort by random order • Sort by order specified in entry* • Specify a limit for files/images displayed
I dug around the bowels of the extension, but I don’t know if I should start poking around without knowing exactly what I’m doing. 😊
So what are my options here?
I’m using Mark’s File Extension in conjunction with the imgsizer plugin for uploading hi-res photos and being able to use the at any size, eg for thumbnails, and it’s working very well.
My only annoyance is that if the File Extension is set to display thumbnails, when you upload a large file it displays that file in the img tag, rather than a shrunk down thumb version. So if you upload a large photo, it is then immediately downloaded in full as the CP page refreshes. It is resized purely by the height=”” and width=”” attributes on the img tag - quite clunky!
Any way of fixing this?
http://www.davenportdesign.net/fm/
Code:
{photo_upload}<a href="http://{file_path}">{file_thumb_path}</a>{/photo_upload}
Output:
<a href="http://{file_path}">{file_thumb_path}</a>
The tags inside my file custom field are not being parsed. Any ideas? I’ve used this extension before with much success, but it doens’t seem to work now. (The only thing different, perhaps, is that I have not installed EE in the root directory? … it’s in /fm/)
On another note, obviously this extension is very useful, and is helping us create websites much more intuitive and feature rich for our clients – yet Mark Huot has received no monetary compensation. I would gladly contribute to Mark if he would continue development of this extension…
The tags inside my file custom field are not being parsed. Any ideas? I’ve used this extension before with much success, but it doens’t seem to work now. (The only thing different, perhaps, is that I have not installed EE in the root directory? … it’s in /fm/)
Try {file_url} and {file_thumb_url} instead of “path”.
Hi Phil,
Not sure if there are any built in methods or variables to do that in the module, others may know different on that though but I use this piece of PHP to find mine at the moment.
<?php
$imageurl ="http://www.avshutter.com/images/photos/image-detail/{photos-download-url}";
list($width, $height, $type, $attr) = getimagesize("$imageurl");
?>
You can then use one of :
<?php echo $height?>
<?php echo $width?>
to get what you need.
Unfortunately this does mean that you need to have PHP turned on in your template.
On another note does anyone know how to just get hold of the file_name or file_url when just using a single file upload. When you use multiple uploads then you can use those variables from within a variable pair but when you use single file upload mode then you can only get at the full URL to the file. I know that I can use the Extract URL Plus plugin to get at this but in a certain case this is not possible with what I am doing or more truthfully really gets quite messy with the template code so was just wondering if there is any variable hiding in there for getting the file_url when in single file upload mode?
Best wishes,
Mark
but when you use single file upload mode then you can only get at the full URL to the file.
That’s not my experience. You can use the single variable or variable pair no matter if you’ve enabled single or multiple uploads. Just use the pair, put in those variables, and it’ll loop once.
Well now that’s just plain weird!! Just tried this again (I absolutely promise I did try that before) and now it is working!!
I must have had something else weird going on in the template as I tried that first but it just kept on bringing back the full URL to the file for me.
All very weird. Thanks for letting me know that it works for you as it made me try it out again!!! 😉
Best wishes,
Mark
Hey guys,
So I’m a n00b strait up - so I really appreciate any help here.
I have the extension installed fine, but I guess I don’t really know how to implement it inside a template. So a basic example would be awesome. I have dug through the majority of the posts here, but everything I have tried renders nothing on the page.
I also tried using the EE entriestag to pull in specific entries from a dedicated weblog(so the users can just change the image in the weblog… but that didn’t work either (I have successfully brought content in from a weblog…) but I must be doing something wrong!
the weblog code looks like this -
{exp:weblog:entries weblog="front_images" disable="catgories|member_data|pagination|trackbacks" entry_id="8" }
{page_body}
{/exp:weblog:entries}
also, if there is a better way to allow a user to just change out an image that is going to stay in the same spot, let me know. Basically i just don’t know much about EE yet, and any help would be wonderful. Thanks so much!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.