J1897 Posted October 18, 2018 Share Posted October 18, 2018 [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 Link to comment Share on other sites More sharing options...
opentype Posted October 18, 2018 Share Posted October 18, 2018 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? Link to comment Share on other sites More sharing options...
J1897 Posted October 18, 2018 Author Share Posted October 18, 2018 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! Link to comment Share on other sites More sharing options...
Aiwa Posted October 18, 2018 Share Posted October 18, 2018 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. Link to comment Share on other sites More sharing options...
J1897 Posted October 18, 2018 Author Share Posted October 18, 2018 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 😄 Link to comment Share on other sites More sharing options...
Aiwa Posted October 18, 2018 Share Posted October 18, 2018 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. Link to comment Share on other sites More sharing options...
opentype Posted October 18, 2018 Share Posted October 18, 2018 1 hour ago, J1897 said: non porno images 😄 How would you check that with PHP? Link to comment Share on other sites More sharing options...
bfarber Posted October 18, 2018 Share Posted October 18, 2018 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. Link to comment Share on other sites More sharing options...
A Zayed Posted October 18, 2018 Share Posted October 18, 2018 1 hour ago, opentype said: How would you check that with PHP? I think he is referring to the image host (url) Link to comment Share on other sites More sharing options...
J1897 Posted October 18, 2018 Author Share Posted October 18, 2018 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! Link to comment Share on other sites More sharing options...
bfarber Posted October 19, 2018 Share Posted October 19, 2018 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. Link to comment Share on other sites More sharing options...
Nathan Explosion Posted October 19, 2018 Share Posted October 19, 2018 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? Link to comment Share on other sites More sharing options...
J1897 Posted October 26, 2018 Author Share Posted October 26, 2018 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 Link to comment Share on other sites More sharing options...
bfarber Posted October 26, 2018 Share Posted October 26, 2018 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 Link to comment Share on other sites More sharing options...
J1897 Posted November 1, 2018 Author Share Posted November 1, 2018 Agresti, i ma trying to understand how to override the method that u have mentioned before,thx! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.