Forumlar / Cotonti / Extensions / [Release] Import v2.1

12>>>

Mass import files to PFS

GHengeveld
#1 2009-02-11 04:19
This is a modified version of the Import plugin by Neocrome.

Features:
- Import files from FTP into the PFS

New in v2.0:
- Automatic resizing of images (config option)
- Choose which files to import
- Remove user-id in filename (config option)
- Add timestamp in filename (config option)
- Fully localisable (includes EN and NL language files)
- Various bugfixes

Changes in v2.1:
- Added limit to the number of imports in one go, to prevent a server time-out.

Installation:
- Extract and upload the files
- In the root of your Cotonti site, create a folder named 'import'
- Go to Admin > Plugins > Import > Install all

Usage:
- Upload files to /import with FTP
- Go to your PFS and create a folder where the files will go
- Go to Admin > Tools > Import
- Select the files to import
- Select the folder where the files should go and submit

> Download (v2.1)

Bu konu Koradhil tarafından düzenlendi(2009-02-11 07:16, 15 yıllar önce)
Antar
#2 2009-02-11 05:54
Nice one.
Russian langfile: http://www.cotonti.com/datas/users/import.ru.lang_22.rar

Just an idea to discuss:
How about an option to import files straight into pages, to desired category?
I mean automaticly fill in the title (filtering "_", "-" "." and the ".rar"), the url field the file exist to "yes"?

It could help to quickly create file repository using pages.
GHengeveld
#3 2009-02-11 06:59
UPDATE! Download file has been updated to v2.1

Changes in v2.1:
- Added limit to the number of imports in one go, to prevent a server time-out.

Please make sure you re-install the plugin, because there are some new config values.

I tested this with a bunch of images (1280x960) and found that the limit for basic usage lies somewhere around 60 (on my localhost with 30sec timeout), and with image resize on it lies around 20 images before timeout. Default values are now 50 for basic usage and 15 when resize = on. On a real webserver you may actually have to set this even lower, depending on the server CPU speed and load. You can safely experiment with this, but you might encounter an error and if it terminates mid-process, the last file could be broken or not resized (if resize=on).

@Antar: Please update the language file for v2.1 so I can safely add it.
The pages thing is an interesting option, but personally I don't feel it's really a needed addition. Besides, there is the 'datas/html' folder to import pages. I think that system should be updated to support files.

Bu konu Koradhil tarafından düzenlendi(2009-02-11 07:18, 15 yıllar önce)
medar
#4 2009-02-11 15:06
Please call plugins clear. "Import" - it is too general. Import where ? To SQL ? To users ? To pages ? To plugins ?

"importtopfs" for example - it is better name.
rangjungyeshe.ru
GHengeveld
#5 2009-02-11 17:31
I agree, but I simply used the name of the original plugin, so I didn't choose it. Something like Mass file import would be better.
donP
#6 2009-02-11 17:40
When a real html (via browser) import would be released?
In the actual way, only webmasters (with FTP access) can mass-import files (to \import folder and then to the desired location)... but what about the ability to import great numbers of files directly from the browser? Actually, one user can import 8 files at time in his filespace, and only parsing any single filename in one textfield per-time... it isn't an encouraging manner... specially when a user wants to create a photogallery...
Another thing... if this plugin remains a tool-plugin it's impossible to give users access to it without granting also access to the whole Administration Panel... :-/ it would be most useful like a standard plugin with normal rights assignements...
in [color=#729FCF][b]BLUES[/b][/color] I trust
pieter
#7 2009-02-11 17:40
Nice job Koradhil, I will check it for all my pictures.
So I can move my gallery to Cotonti.

BTW: @admins You should get the "Plugin maker" group instead of translator.
... can we help you ...
Trustmaster
#8 2009-02-11 17:48
Translators have more stars, because they are in the Team :-D
May the Source be with you!
GHengeveld
#9 2009-02-11 17:51
@donP: This is best achieved by uploading a zip file and extract it on the server. Even better would be to have a virtual explorer window, but that would be quite complex to build.
Antar
#10 2009-02-11 18:24
you have an error in download url, should be http://www.dutchcotonti.com/datas/users/import_v2.1_2.rar i believe.
Anyway, i did not found any change since previous version. maybe i just downloaded wrong file?
GHengeveld
#11 2009-02-12 04:29
The file you posted is OK, its the latest version.
Lissbol
#12 2009-10-12 23:15
Does Import v2.2 work properly on the latest release ?
LISSBOL Designs
TeknoGroup
#13 2009-11-28 20:14
thanx you
GHengeveld
#14 2009-11-29 07:00
@Lissbol: Not 100% sure, but it will probably work fine if you're not using physical folders (new PFS feature in trunk).
pieter
#15 2010-02-15 15:16
I tried this on cotonti 0.6.6 but got the following errors:

Warning: require(system/config.extensions.php) [function.require]: failed to open stream: No such file or directory in /home/k3098kru/public_html/broens/plugins/import/import.php on line 47

Warning: require(system/config.extensions.php) [function.require]: failed to open stream: No such file or directory in /home/k3098kru/public_html/broens/plugins/import/import.php on line 47

Fatal error: require() [function.require]: Failed opening required 'system/config.extensions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/k3098kru/public_html/broens/plugins/import/import.php on line 47

On line 47 he asks for : require('system/config.extensions.php');

But is it not there anymore. Where did it move to?

Added 3 minutes later:

I copied an old one and it works, but out-of-the-box it will not work.
... can we help you ...

Bu konu pieter tarafından düzenlendi(2010-02-15 15:24, 14 yıllar önce)

12>>>