|
Replies:
13
-
Pages:
1
-
Last Post:
13 Mar 23, 15:20
Last Post By: AndreWolff
|
|
|
Posts:
1,159
Registered:
14-Dec-2007
|
|
|
Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 13:15
|
|
|
I have see many times that after the upload of an album, you see another display as showed locally.
In the Advance tab was Page extension '.htm' used, but the output folder did contain an old 'index.html' file. The 'index.html' file apparently gets a priority over an 'index.htm' file, so that is why you see a different album.
So my request is:
Delete automatically an 'index.html' file if the album contains an 'index.htm' file and delete automatically an 'index.htm' file if the album contains an 'index.html' file.
Or remove the Page extension field and use always the '.html' extension.
|
|
|
Posts:
8,216
Registered:
31-Jan-2006
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 15:14
in response to: AndreWolff
|
|
|
This is has been on my "list" for almost a decade, but with regard to switching between .html and .php. A user might have good technical reasons for making that switch.
Switching from .html to .htm is pointless.
|
|
|
Posts:
1,159
Registered:
14-Dec-2007
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 15:16
in response to: JeffTucker
|
|
|
Switching from .html to .htm is pointless.
Could be, but .htm is the default value on my system.
|
|
|
Posts:
3,474
Registered:
18-Oct-2002
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 15:32
in response to: AndreWolff
|
|
|
I'll consider this. Still haven't found out a tight way to implement it safely though.
|
|
|
Posts:
8,216
Registered:
31-Jan-2006
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 15:45
in response to: davidekholm
|
|
|
I'll consider this. Still haven't found out a tight way to implement it safely though.
I can envision a way to do it safely, but it might be very inefficient.
In short, if an output directory contains two files with the same base name, but with different extensions, kill the file whose extension doesn't match the current project setting's choice of extension. But you'd have to restrict it to the "server executable" extensions - php, html, etc. There are about 15 of them. Otherwise, the presence of mydog.html, mydog.php, and mydog.jpg would result in only one survivor, instead of two!
ETA: Even that doesn't take care of the situation in which a user switches from index.html to default.php. Without doing an ungodly amount of bookkeeping, you couldn't get that right. In that case, I'd just throw the user to the wolves.
|
|
|
Posts:
1,159
Registered:
14-Dec-2007
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 15:50
in response to: JeffTucker
|
|
|
Don’t make it complicated, check only for .htm and .html files.
|
|
|
Posts:
8,216
Registered:
31-Jan-2006
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 16:02
in response to: AndreWolff
|
|
|
Don’t make it complicated, check only for .htm and .html files.
You don't know what PHP files are, do you?
|
|
|
Posts:
3,820
Registered:
4-Aug-2006
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 16:27
in response to: JeffTucker
|
|
|
It might be easier to pop up a warning dialogue and provide an external tool that will delete all files of a particular extension.
|
|
|
Posts:
8,216
Registered:
31-Jan-2006
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
10 Mar 23, 16:33
in response to: RobM
|
|
|
It might be easier to pop up a warning dialogue and provide an external tool that will delete all files of a particular extension.
I like that idea. This is not something that users would be doing regularly, switching extensions from one project to the next. It's much more likely to be a one-shot thing. Detect the switch, offer the tool, then move on, without burdening the 99.9% of users who never change these settings.
|
|
|
Posts:
1,159
Registered:
14-Dec-2007
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
13 Mar 23, 12:12
in response to: RobM
|
|
|
It might be easier to pop up a warning dialogue and provide an external tool that will delete all files of a particular extension.
That is also OK, but where can I find that tool?
|
|
|
Posts:
3,474
Registered:
18-Oct-2002
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
13 Mar 23, 12:46
in response to: AndreWolff
|
|
|
|
It hasn't been written yet, but here is one:
(Check out the source code. It should be very clear)
|
|
|
Posts:
1,159
Registered:
14-Dec-2007
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
13 Mar 23, 12:53
in response to: davidekholm
|
|
|
Ok, but jAlbum does not yet generate the pop-up saying that there is both a index.htm and index.html file!
If that is done I can decide to do a Make All to solve the problem without a special tool.
|
|
|
Posts:
3,820
Registered:
4-Aug-2006
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
13 Mar 23, 14:53
in response to: AndreWolff
|
|
|
The pop up is not really required, it was just an initial thought. Anyone who changes the setting before making an album won’t have the problem. Anyone who has already made an album and changes the setting must know there will be orphan files. All users really need is the tool.
|
|
|
Posts:
1,159
Registered:
14-Dec-2007
|
|
|
Re: Prevent that the output folder contains an index.htm and an index.html file
Posted:
13 Mar 23, 15:20
in response to: RobM
|
|
|
The pop up is not really required, it was just an initial thought. Anyone who changes the setting before making an album won’t have the problem. Anyone who has already made an album and changes the setting must know there will be orphan files. All users really need is the tool.
I totally disagree with you!
If it is corrected automatically in jAlbum, the popup is indeed not required, but if you have to use a special tool, the popup is a must!
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|