Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
impreovement needed in image uploader

 
Reply to topic    Forum Index » Suggestions View previous topic
View next topic
impreovement needed in image uploader
Author Message
nam



Joined: 23 Dec 2006
Posts: 141

Post impreovement needed in image uploader Reply with quote
I think the image manager needs some improvements:

- When you upload an image but anther image with the same file name is there, it does not notify and just replaces the images. It should show a message and stop such problem.

- I prefer to have all the images of all the users in the same folder, but there is a problem, that anyone can remove/rename images even if they are uploaded by the administrator. This is dangerous and I want that only administaor could remove images, or others could delete the images which uploaded by themselves.
Mon Sep 29, 2008 1:04 am View user's profile Send private message
Guest








Please login to hide the ads.

nam



Joined: 23 Dec 2006
Posts: 141

Post Reply with quote
Still waiting for an answer from someone.
Sun Oct 05, 2008 6:32 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
1. Change this:
Code:
if ((file_exists($folder.'/'.$image) and $overwrite) or $allowed_upload){


to this:
Code:
if ($allowed_upload){
         if(file_exists($folder.'/'.$image) and !$overwrite){exit($image.' already exists.');}


2. Change this:
Code:
if ($member['level'] > 2 and ($action == 'remove' or $action == 'rename')){
   $action = '';
}


to this:
Code:
if ($member['level'] > 1 and ($action == 'remove' or $action == 'rename')){
   $action = '';
}

Thu Oct 09, 2008 5:38 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 141

Post Reply with quote
Thank you very much.

Problem one is over.

But the second problem is although somehow solved, but not in a nice way, because still a writer can see the "remove", "rename", "move to" text buttons but when click on them, nothing show up.

Either these buttons should not be shown to users who do not have permission to use, or at least a message should be displayed saying they are not authorized to do so.
Thu Oct 09, 2008 10:31 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 141

Post Reply with quote
I played a bit more and discovered more problems with your code:

- Now every file you upload (even if it does not exist on the server) the message ". already exists." is shown, although actaully is uploaded.

- Now when you upload more than one image at once, nothing will be uploaded if only one file among them is already exist.
Thu Oct 09, 2008 10:49 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
I can understand you. But unfortunately, I don't have the time to modify the script until you are completely satisfied.

To only show the button to the admin do it like this:
Code:
<?php
if($member['level'] == 1){ //You can change the number: 1 = Admin, 2 = Editor, 3 = Writer, 4 = Commenter
?>

Here comes the button code.

<?php
}
?>

The buttons are around line 630.
Fri Oct 10, 2008 6:57 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 141

Post Reply with quote
Thanks, I will try,

But what about this problem:

- Now every file I upload (even if it does not exist on the server) the message ". already exists." is shown, although actaully it is uploaded.
Fri Oct 10, 2008 9:55 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 141

Post Reply with quote
nam wrote:

- Now every file I upload (even if it does not already exist on the server) the message ". already exists." is shown, although actaully it is uploaded.


I am still unable to solve this problem which is very annoying. Anyone can help please?
Tue Oct 14, 2008 5:24 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 141

Post Reply with quote
Dear FI-DD, may I have your attention to this problem? I think there is a small problem which I can't figure out from your code.



nam wrote:
nam wrote:

- Now every file I upload (even if it does not already exist on the server) the message ". already exists." is shown, although actaully it is uploaded.


I am still unable to solve this problem which is very annoying. Anyone can help please?

Thu Oct 16, 2008 7:59 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
You already have my attention for the last 45 minutes. Wink

It seems to be a bigger problem because I'm not able to solve it. I'm afraid you have to change it back as it was before. Sorry.
Thu Oct 16, 2008 8:07 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 141

Post Reply with quote
FI-DD wrote:
You already have my attention for the last 45 minutes. Wink

It seems to be a bigger problem because I'm not able to solve it. I'm afraid you have to change it back as it was before. Sorry.



Thank you very much for your time and attention. I will go with it, no problem if the message is displayed each time I upload an image.
Thu Oct 16, 2008 8:23 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Suggestions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.