Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 18, 20186 yr [edited] Hi all, many thanks for this supercool service! This is the behavior that I'd want to have: Someone posts a Comment, that contains a reference to an external image (url) BEFORE to save the comment, i want to check the url through a php function (in order to check the image compliance) IF the check is ok, then save the comment as is on the DB IF not, change the url with a marker What i am asking you, is to know if and where in the invision src code I can find the place in which i can put my control? sorry for my not deep knowledge in the ipb src
October 18, 20186 yr Answering the title: Lazy Loading should be a stock feature of the upcoming 4.4 release later this year. Just wait for that. Not sure what describe in the post itself. Check an image call with PHP? Check for what?
October 18, 20186 yr Author 32 minutes ago, opentype said: Answering the title: Lazy Loading should be a stock feature of the upcoming 4.4 release later this year. Just wait for that. Not sure what describe in the post itself. Check an image call with PHP? Check for what? Sorry, i will try to explain better. This is the behavior that I'd want to have: Someone posts a Comment, that contains a reference to an external image (url) BEFORE to save the comment, i want to check the url through a php function (in order to check the image compliance) IF the check is ok, then save the comment as is on the DB IF not, change the url with a marker Sorry for changing the concept, but it should be more clear now. Thx!
October 18, 20186 yr Https? Something else? Can you give a high level overview of what your defining as image compliance for your community? There is imageproxy that serves images via https through your board URL in case someone posts a non https link. Keeps your pages from breaking with mixed content. If this is what you're after, it's a simple setting.
October 18, 20186 yr Author 24 minutes ago, Aiwa said: Https? Something else? Can you give a high level overview of what your defining as image compliance for your community? There is imageproxy that serves images via https through your board URL in case someone posts a non https link. Keeps your pages from breaking with mixed content. If this is what you're after, it's a simple setting. non porno images 😄
October 18, 20186 yr Yeah, no setting for that... You can hook into the content before it is saved to the DB and remove questionable content or flag the content for moderation, it's more difficult to do on the fly while the content is being generated by the user.
October 18, 20186 yr Your best option would be to create a hook on \IPS\Text\Parser to overwrite _parseImgElement(). This will allow you to manipulate the entire <img> element.
October 18, 20186 yr 1 hour ago, opentype said: How would you check that with PHP? I think he is referring to the image host (url)
October 18, 20186 yr Author 2 hours ago, A Zayed said: I think he is referring to the image host (url) Yes, basically in that way. just before the save, if the post contains an url, then i can call a service, then save the content if compliant what i need is to know where to override the “save” method 4 hours ago, Aiwa said: Yeah, no setting for that... You can hook into the content before it is saved to the DB and remove questionable content or flag the content for moderation, it's more difficult to do on the fly while the content is being generated by the user. This is what Iwant to do,just before the save...any hint in how can I hook into the content? many thx guys!
October 19, 20186 yr 17 hours ago, J1897 said: This is what Iwant to do,just before the save...any hint in how can I hook into the content? 20 hours ago, bfarber said: Your best option would be to create a hook on \IPS\Text\Parser to overwrite _parseImgElement(). This will allow you to manipulate the entire <img> element.
October 19, 20186 yr 23 hours ago, J1897 said: non porno images 😄 Are you looking to determine if the image itself is 'porno' or whether the source of the image is a porn site?
October 26, 20186 yr Author On 10/19/2018 at 2:27 PM, Nathan Explosion said: Are you looking to determine if the image itself is 'porno' or whether the source of the image is a porn site? the first one
October 26, 20186 yr You might need a good AI suite/API in that case. This is an interesting use case for AI APIs. Something like this maybe: https://cloud.google.com/blog/products/gcp/filtering-inappropriate-content-with-the-cloud-vision-api
November 1, 20186 yr Author Agresti, i ma trying to understand how to override the method that u have mentioned before,thx!
Archived
This topic is now archived and is closed to further replies.