Skip to content

Add: photo comments retreival#74

Open
lolalalol wants to merge 2 commits intoPiwigo:masterfrom
lolalalol:master
Open

Add: photo comments retreival#74
lolalalol wants to merge 2 commits intoPiwigo:masterfrom
lolalalol:master

Conversation

@lolalalol
Copy link

Simple way to keep Flickr's comments when importing.
Comments are HTML, maybe there's a way to convert them in Piwigo's format.
But it did the job.

@lolalalol
Copy link
Author

please... for the next ones who want to leave Flickr.

@lolalalol
Copy link
Author

For HTML to BBCode, maybe this function will help :
https://gist.github.com/yehchge/7f42f839c9140165dd504464cd0592ec

@ClaudiaLev
Copy link

I think it is legally questionable to copy Flickr's comments to another website.

@lolalalol
Copy link
Author

For a personnal use (not public), it could be fine to do a full copy of contents.
Sometimes comments are best as the pictures ;)

INSERT INTO '.COMMENTS_TABLE.'
(author, author_id, anonymous_id, content, date, validated, validation_date, image_id, website_url, email)
VALUES (
\''.$com['authorname'].'\',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use pwg_db_real_escape_string()? What if a name contains malicious SQL?

\''.$com['authorname'].'\',
NULL,
\''. FLICKR2PIWIGO.'\',
\''.$com['_content'].'\',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably use pwg_db_real_escape_string().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants