Page 1 of 1
Component Idea: Import Content from files
Posted: Thu Aug 23, 2007 4:59 pm
by quiquedcode
Plz move this topic to correct forum, in case I posted here incorrectlyHi guys
When I saw this topic
http://forum.joomla.org/index.php/topic ... cseen.htmlI searched the joomla extensions site, but could not find someone that can do this
- Allow user to specify a FTP folder in his website. This folder should contain htm files, doc files, pdf files, etc.
(another option would be to have a listing of files from X folder) so user can ctrl+select the files he wants to import
- Once user specifies a folder, he should specify which Category should the files be imported into
The process would be:
- Take first file, get its filename
- Take the file contents, by reading it, by using a PDF php class (when file is PDF) ... etc.
- Create a new content item into the category specified, with the title=filename and content=contents_read_from_file
Of course, the new content item must be created using SQL and inserted into the content table
As I'm not familiar with component programming, I think it would be nice to have such component, am I wrong ?
It is just an Idea I've got
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 2:45 pm
by tjay
Wow that sounds pretty useful. I wonder what the feasibility would be.
Maybe one of our Joombie mentors can shine some light on if this is possible, and if it is something new coders could handle?
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 3:56 pm
by seadap
Perhaps I'm a little off but can't you do the same thing with the media manager in the admin section? Or are you wanting to give this access to your users?
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 5:40 pm
by quiquedcode
Hi guys
@tjay
I'm going through the tutorials available for learning component development, but my actual knowledge for this isn't enough yet, although I know php very well
@seadap
I'd only use the file uploading feature of the media manager. The idea is to upload an htm/doc/pdf file, and extract its contents for creating a new content item from it, therefore I'd not need to keep it after uploaded, it would be deleted after content item was created.
Also, the files imported from the ftp folder, would be deleted after this task was finished... (with a checkbox allowing to keep them)
I wish to know enough to make it, because I think it is useful, and I think it would be a "quick" development, because I've seen some pdf/doc/file classes for php that would help a lot
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 6:12 pm
by tjay
Importanting the document content itself would not be that hard, but you still have all the other fields in the content table to contend with.
Like author
Published status
cat ID
Sec ID
so on and so forth
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 6:15 pm
by quiquedcode
You're right tjay, but these options should be available before importing, with checkboxes or radiobuttons
- Author would be choosen automatically, by getting the logged user info
- published status = select list
- section = select list
- category = select list
a good idea would be to have the same section/category selector as available in the WYSIWYG editors
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 10:33 pm
by seadap
quiquedcode, are you trying to suggest building a new component or is this just a coding question?
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 11:27 pm
by quiquedcode
seadap
I'm posting a general idea so someone (with enough knowledge about custom joomla component programming skills) can develop this component
I think this could be an useful addition...
If I had enough joomla coding skills, I'd do it by myself... I've just started reading about this some days ago, but still not enough
I'll try playing and putting code in a "blank skeleton" component I got from a tutorial
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 11:34 pm
by seadap
No problem Q. I just wanted to make sure we were in the right forum. This area is for people learning to code. If you want to have someone build it for you perhaps we can move this to where they're more likely to see it
over here.
Re: Component Idea: Import Content from files
Posted: Fri Aug 24, 2007 11:49 pm
by quiquedcode
Well, I think professional services are more for the ones who need a solution and want to pay someone for getting coded quickly
In this case, this is an idea I got. I don't need it, but I think it will be very useful
See ya
Re: Component Idea: Import Content from files
Posted: Sat Aug 25, 2007 1:17 am
by seadap
I didn't mean to run you off Q. I just wanted to make sure the right eyeballs were seeing your ideas.
Re: Component Idea: Import Content from files
Posted: Sat Aug 25, 2007 10:53 am
by quiquedcode
seadap wrote:I didn't mean to run you off Q. I just wanted to make sure the right eyeballs were seeing your ideas.
lol, no prob man, thanks
Re: Component Idea: Import Content from files
Posted: Tue Aug 28, 2007 6:26 am
by MvBrakel
Well nice idea indeed, bit complex for the 101's though.
I have build this for our own CMS at work, so i know how to build it. It's not hard at all but there are some very important cons in this component.
The list i can support:
*.txt
And all other binaries
*.pdf
PDF lib allows to do this
*.doc
No text formatting though
To parse *.doc files with formatting u need an extra php extension. Seeing most people don't have access to their host shell i don't think this would be good to spend time on.
I'll look into parsing more file types.