36 of 39
36
File
Posted: 18 August 2008 02:04 AM   [ Ignore ]   [ # 631 ]  
Summer Student
Total Posts:  26
Joined  04-14-2008

Hi,

I have a problem with the last File extension. I’ve explained my problem here.

In short:
When an error occures while uploading a file (to large, filename exists, ...). Expression engine cleared my dates to 1970-1-1

Hope somebody can help me!

Thanks!

Profile
 
 
Posted: 19 August 2008 01:09 AM   [ Ignore ]   [ # 632 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  228
Joined  11-16-2004

Anybody able to resolve the issue with the settings now showing up in 3.1.1 in the admin > utilities > extensions?

There’s a glitch in the extension where those settings can be hidden sometimes, and you have to set them via the database. Where are you setting auto?

I can’t find where to set them in the database either.

Help!

 Signature 

T. Payton
OneCreative | Albuquerque, NM

Profile
 
 
Posted: 19 August 2008 01:43 AM   [ Ignore ]   [ # 633 ]  
Summer Student
Total Posts:  26
Joined  04-14-2008

These settings are not shown under utilities but I can help you with the database-item:

name_database > exp_mh_file

In this table you can set all the settings from a particular upload preference (exp_upload_prefs)

Profile
 
 
Posted: 19 August 2008 09:57 AM   [ Ignore ]   [ # 634 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  228
Joined  11-16-2004

Ouch. I think I will hold off on upgrading to File 3. I’ll just make due with version 2. I hate to be dependent on modifying a database table directly.

Thanks for the help!

 Signature 

T. Payton
OneCreative | Albuquerque, NM

Profile
 
 
Posted: 20 August 2008 08:46 AM   [ Ignore ]   [ # 635 ]  
Summer Student
Total Posts:  4
Joined  01-22-2008

I am having a problem with using the File Extension on Windows Server 2003. I’ve used the default Upload File function provided by Expression Engine and that works.

However any time I use the File Extension’s File field, I get an error:

Image – There was a problem uploading <name of file>.

1) I’ve tried giving Everyone permissions (equivalent to Unix permissions 777) for ALL my directories. This didn’t fix the problem, so I am thinking it’s not a permissions problem.

2) I’ve made the preferences for The File Upload Location to the least possible, ie. I set to Do not resize image, do not allow multiple downloads etc., but it still doesn’t work.

3) GD2 is installed and enabled according to phpinfo.

Any suggestions from anyone who has got this working on Windows Server 2003?

Profile
 
 
Posted: 20 August 2008 12:45 PM   [ Ignore ]   [ # 636 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  06-27-2008

hi I’m having difficulties with resizing the images.
I have tested several setups and run into problems with each…

1. I can’t switch to “Do not resize” in file upload prefs. That’s bizard, but if I don’t specify anything in the max width or max height, the file is untouched…

settings:

allowed file types [images]
maximum image height []
maximum image width []
allow multiple [yes]
show thumbnails [yes]
clean filenames [no]
rewrite filenames [no]
resize images [I can’t switch it to “do not resize” it goes back to “auto”]
keep originals [yes]
delete from server [yes]


2. I get very poor results from resizing images. I would like to automatically strech my images to the given values in file upload preferences, but I get very poor results. and I don’t know where I could tweek the settings. has anyone obtained good results?

settings:

allowed file types [images]
maximum image height [344]
maximum image width [700]
allow multiple [yes]
show thumbnails [yes]
clean filenames [no]
rewrite filenames [no]
resize images [stretch]
keep originals [no]
delete from server [yes]

I discuss this on antother thread aswell:
http://expressionengine.com/forums/viewthread/72506/

3. I would need some sorting possibilities within the variable pair in the template. is there a sort tag somewhere?
like {image_file sort=“asc”}{file_url}{/image}. is there another way to sort them?
I would like to display the last uploaded image as the first… this makes sense if I contiually add pictures to the same post… this would be really helpful!

greetings
stefan

Profile
 
 
Posted: 20 August 2008 12:53 PM   [ Ignore ]   [ # 637 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  323
Joined  03-18-2007

I’m not sure why you can’t set the do not resize setting. Does it error or just not change? Can you try changing it directly in the database?

As far as the quality goes, this post earlier in the thread can help:
http://expressionengine.com/forums/viewreply/335581/

And there’s no sorting built in. To sort them, you can run the loop into a php array and then reverse the array.

Profile
 
 
Posted: 20 August 2008 01:44 PM   [ Ignore ]   [ # 638 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  06-27-2008
slapshotw - 20 August 2008 12:53 PM

As far as the quality goes, this post earlier in the thread can help:
http://expressionengine.com/forums/viewreply/335581/

It really did save me a lot of work!
that’s great! seems very important, so I’ll post the code again. (for me the file component was useless until I changed this code)

Change from:

if(@imagegif($dst_img, $dst) !== false) {}
else if(@imagejpeg($dst_img, $dst) !== false) {}
else if(@imagepng($dst_img, $dst) !== false) {}


Change to:

if(@imagejpeg($dst_img, $dst) !== false) {}
else if(@imagegif($dst_img, $dst) !== false) {}
else if(@imagepng($dst_img, $dst) !== false) {}


This will take care of your problem and save your jpeg as a true jpeg. The default image size is set to 60% quality (this is medium in Photoshop)… if you want it set to a higher quality add the number below. (90 means 90% image quality)

if(@imagejpeg($dst_img, $dst, 90) !== false) {}

thank you so much!
stefan

Profile
 
 
Posted: 20 August 2008 02:21 PM   [ Ignore ]   [ # 639 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  323
Joined  03-18-2007

In the database, it’s the exp_mh_file table.

For php—I don’t have a lot of time now so this php may be wrong and/or sloppy, but the general idea is (php must be set to *output*):

<?php
    $picURLS
= "{produkte-bilder backspace="1"}{file_url}|{/produkte-bilder}";
    
$picNames = "{produkte-bilder backspace="1"}{file_name}|{/produkte-bilder}";
    
    
$picURLArray = explode("|",$picURLS);
    
$picNameArray = explode("|",$picNames);
    
    
array_reverse($picURLArray);
    
array_reverse($picNameArray);
    
    for (
$i = 0; $i < count($picURLArray), $i++) {
        
echo "<li><img ></li>";
    
}
?>

Profile
 
 
Posted: 21 August 2008 03:25 AM   [ Ignore ]   [ # 640 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  06-27-2008
slapshotw - 20 August 2008 02:21 PM

In the database, it’s the exp_mh_file table.

For php—I don’t have a lot of time now so this php may be wrong and/or sloppy, but the general idea is (php must be set to *output*):

<?php
    $picURLS
= "{produkte-bilder backspace="1"}{file_url}|{/produkte-bilder}";
    
$picNames = "{produkte-bilder backspace="1"}{file_name}|{/produkte-bilder}";
    
    
$picURLArray = explode("|",$picURLS);
    
$picNameArray = explode("|",$picNames);
    
    
array_reverse($picURLArray);
    
array_reverse($picNameArray);
    
    for (
$i = 0; $i < count($picURLArray), $i++) {
        
echo "<li><img ></li>";
    
}
?>

I’m unshure where to put this… do I have to replace it with the following code? or do I have to put it below?

{produkte-bilder}
    
<li><img src="{file_url}" title="{file_name}" border="0"></li>
{/produkte-bilder}

from my point of view and what I understand in php (basically nothing) there is something missing in the echo line? but then, I understand nothing…

thanks already for your time! I would like to offer you a drink! next time you’re in switzerland for shure!
stefan

Profile
 
 
Posted: 21 August 2008 09:45 AM   [ Ignore ]   [ # 641 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  323
Joined  03-18-2007

You’d replace it to make your pictures reverse.

And it looks like the forum stripped out my echo code when I escaped slashes. Try this, without escaping:

echo '<li><img src="'.$picURLArray[$i].'" title="'.$picNameArray[$i].'" border="0"></li>';

Profile
 
 
Posted: 21 August 2008 10:13 AM   [ Ignore ]   [ # 642 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  06-27-2008
slapshotw - 21 August 2008 09:45 AM

You’d replace it to make your pictures reverse.

And it looks like the forum stripped out my echo code when I escaped slashes. Try this, without escaping:

echo '<li><img src="'.$picURLArray[$i].'" title="'.$picNameArray[$i].'" border="0"></li>';

hi thanks a lot!
it does work, but it takes the same order wink
how can you count from the last to the first in the “for” loop?

this must be real easy for you? a braina for me grin
thanks so much already!

Profile
 
 
Posted: 21 August 2008 10:17 AM   [ Ignore ]   [ # 643 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  06-27-2008

I did it myself grin

<ul id="home_img">
                
<?php
                    $picURLS
= "{home-foto backspace="1"}{file_url}|{/home-foto}";
                    
$picNames = "{home-foto backspace="1"}{file_name}|{/home-foto}";
                    
                    
$picURLArray = explode("|",$picURLS);
                    
$picNameArray = explode("|",$picNames);
                    
                    
array_reverse($picURLArray);
                    
array_reverse($picNameArray);
                    for (
$i = count($picURLArray)-1; $i > -1; $i--) {
                    
echo '<li><img src="'.$picURLArray[$i].'" title="'.$picNameArray[$i].'" border="0"></li>';
                    
}
                ?>
            
</ul>

it’s such a relief for me!
thank you very very much!
highly apreciated!

stefan

Profile
 
 
Posted: 21 August 2008 10:18 AM   [ Ignore ]   [ # 644 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  323
Joined  03-18-2007

I told you my php would be sloppy…let’s try this one more time…

Edit: looks like you got it!

Profile
 
 
Posted: 24 August 2008 05:25 PM   [ Ignore ]   [ # 645 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1055
Joined  06-05-2007

I get this error often, even when the files are uniquely named:

... – The file ‘7322d4c98742b28e6f642782ef7f9ff2.jpg’ already exists, please rename your file before uploading it to the server. ( Automagically rename this file the next time it’s uploaded?)

I’m using this tool for a number of custom fields on my publish page.

Haven’t searched through the 36 pages of posts to this thread for the answer, but does anybody know of a fix?

 Signature 

grantmx | designs - design | development | photography | consulting | ee pro profile

Profile
 
 
Posted: 24 August 2008 06:04 PM   [ Ignore ]   [ # 646 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  323
Joined  03-18-2007

Do you have it set to automatically rename files on upload?

Profile
 
 
Posted: 24 August 2008 07:18 PM   [ Ignore ]   [ # 647 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1055
Joined  06-05-2007

Hmmm…where might that be?  Documentation aint’ exactly that through.  Thanks!

 Signature 

grantmx | designs - design | development | photography | consulting | ee pro profile

Profile
 
 
Posted: 24 August 2008 07:20 PM   [ Ignore ]   [ # 648 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1055
Joined  06-05-2007

Ah. Rewright file names…Yes. its enabled.

 Signature 

grantmx | designs - design | development | photography | consulting | ee pro profile

Profile
 
 
   
36 of 39
36
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64905 Total Logged-in Users: 52
Total Topics: 81843 Total Anonymous Users: 29
Total Replies: 440033 Total Guests: 277
Total Posts: 521876    
Members ( View Memberlist )