https://www.icyphoenix.com/viewtopic.php?f=28&t=8873
-----------------------------------
TopoMotoV3X
Wed 02 Jan, 2013 17:30

[MOD] Avoid Renaming Files (dload.php) 2.0.0.86
-----------------------------------
Hello everyone, this mod can be set from ACP/Downloads/Configuration lets you choose whether or not to rename the files that are uploaded from the download section on your server.

 [img]http://www.icyphoenix.com/files/images/3404/view_acp_configuration_en.png[/img] 

The affected files for this mod are as follows:

[i]
root/adm/
[b]admin_pa_settings.php[/b]

root/includes/pafiledb/
[b]functions_pafiledb.php[/b]

root/language/lang_italian/
[b]lang_admin_pafiledb.php[/b]

templates/common/acp/
[b]pa_admin_settings.tpl[/b][/i]

Including the insertion of the appropriate field (by query) in the table, ip_pa_config of your database.

Nothing changed for the download of the file, you will always have the name of origin, even if, in the case of duplicate names, in the title of the second file will be added a series of random numbers, to avoid overwriting them.

Below is an example of three files with the same name, seen in the database:

[img]http://www.icyphoenix.it/files/images/222/view_database_pa_files_table.png[/img]

I also added controls for capital letters and spaces, which are not always interpreted correctly by the network.

[color=orange][size=10][i]Special thanks:[/i][/size]
[i][size=10]MaxWeb, Limun, mort.[/size][/i][/color]

[size=14][url=http://www.icyphoenix.it/dload.php?action=file&file_id=91][b][i]Download[/i][/b][/size]

Enjoy!  :mryellow:


-----------------------------------
mort
Fri 04 Jan, 2013 09:37

Re: [MOD] Avoid Renaming Files (dload.php) 2.0.0.86
-----------------------------------
Mate,

You are going to make it difficult for people to use this MOD.  :shock: 

Just consider that someone already has made a few changes or added other MODS - Without the [i]"Code changes"[/i] the MOD will be dead in the water.

:(


-----------------------------------
TopoMotoV3X
Fri 04 Jan, 2013 15:22

Re: [MOD] Avoid Renaming Files (dload.php) 2.0.0.86
-----------------------------------
Although I doubt that someone made changes to the files that pertain to this Mod... every piece of code modified and added by me, is identified by the marking "Avoid Renaming" which is code added or modified for this MOD.

 [img]http://www.icyphoenix.com/files/images/3404/2013_01_04_152551.png[/img]


-----------------------------------
mort
Sat 05 Jan, 2013 12:05

Re: [MOD] Avoid Renaming Files (dload.php) 2.0.0.86
-----------------------------------
Yep! well that would make it somewhat easier to dig it out.  :mricy:


-----------------------------------
TopoMotoV3X
Sat 05 Jan, 2013 23:38

Re: [MOD] Avoid Renaming Files (dload.php) 2.0.0.86
-----------------------------------
Good advice bro! 
I added a file in the package with the instructions to create this MOD on existing files. :wink:


-----------------------------------
mort
Sun 06 Jan, 2013 03:09

Re: [MOD] Avoid Renaming Files (dload.php) 2.0.0.86
-----------------------------------
[i][MOD] Avoid Renaming Files (dload.php) 2.0.0.86 [/i]

[b][size=14][strike]4/10[/strike] 10/10[/size][/b]  :mrgreen:


-----------------------------------
TheSteffen
Tue 15 Jan, 2013 09:54

Re: [MOD] Avoid Renaming Files (dload.php) 2.0.0.86
-----------------------------------
[quote user="TopoMotoV3X" post="57932"]Nothing changed for the download of the file, you will always have the name of origin, even if, in the case of duplicate names, in the title of the second file will be added a series of random numbers, to avoid overwriting them.[/quote]

Looks great TopoMotoV3X. 
Do you think random numbers are the best way for duplicate names?
Would it be easy to change to uploaded servertime?
shout_20130115_095623.zip


