Hi all.
Could you please help me with following problem:
If I need to copy some article from another web site, I can just copy it to clipboard and then paste into CKEditor - it's great and straightforward enough for the user.
The only problem here is that images are still referring to original site - and it's no good, since hot links are discouraged. The question is, how could I deal with it?
The "brute force" solution would be to save all images locally and then upload/insert them in the CKEditor. But it's extremely inconvenient, and in if there are 10-15 images in the article - it becomes a total nightmare. No user will do this.
So I suppose it should be some automated solurion, which will do the following:
1) Parse HTML and find all tags with non-local source
2) Upload all images mentioned in these tags
3) Change the tags appropriately to reference local copy of the image
Actually, I'm not sure whether it should be a part of CKEditor module or maybe just Input filter.
Anyway, maybe there is some common solution for this problem? Probably someone already dealt with it?
Just don't want to reinvent the wheel...
Thanks!
Comments
Dont you ever think about
Dont you ever think about having original content, rather than "copying and pasting" content from other people's websites?
You are asking for a module that will facilitate leeching other people's works, and most probably breaking many copyrights including on images.
In the long run, having your own original content that you made with your own hands, and hard work is better than taking other people's content.
I have my own site, my own content and one thing that bothers me the most, is people who feel they have the right to take my words and pose them as their own.
Well, in my case it has
Well, in my case it has nothing to do with copyrights.
What I want to create is a community website and there a 2 scenarios when I need this copy/paste functionality:
1. An author want to post his article on several sites. With this functionality, he can compose it once uploading all images one-by-one and then just copy/paste to other sites.
2. There is an article which contains info that should be propagated (announces, appeals etc) and according to site's policy content could be freely copied if a link to original site and/or author's name are provided.
I suppose both of them are completely legal and by any means offensive.
So I'm more interested in technical side of this question, not the ethical one.
Technical Question need Technical Answer :)
My friend,
I think you need a HTML DOM parser which can go and fetch content from other site. In that you have to mention url only using php.
http://simplehtmldom.sourceforge.net/
This may be a partial solution.
[Technical Question need Technical Answer :) ]
Thanks for your technical
Thanks for your technical answer :)
Although I do not need a possibility to fetch content from url with php, this parser could be used in custom Input filter to find images and change their links.
So thanks for your help.
Still hope to find all-in-one solution,,,