Looking for a component that displays gif without having to go to the site of the gif

Craig Finn Posted in General Discussion 6 years ago

When adding a gif, I have to click on the link to view the gif. i would like to add a gif in a comment and it show without me having to go to the gif site.

Replies
us Rishi B Replied 6 years ago

add the function replaceimageswithembeds() to components/OssnWall/ossncom.php from here: https://gist.github.com/xbansh33/527f08a94c434b4a39872e57a6017a4e

then just call the new function in this file: components/OssnWall/plugins/default/wall/templates/wall/user/item.php

note that this is for wall posts. As I said in my previous post, you can probably make similar modifications to OssnComments to get the same functionality working in comments.

us Craig Finn Replied 6 years ago

The function /publichtml/components/OssnWall/ossncom.php is already in OssnWall. Are you saying I need to rename or call the function from item.php. Thanks for all of your help.

us Rishi B Replied 6 years ago

I think what he means is that he wants to put something like "http://my.url.to/image.gif" in a comment and have the image display rather than the link to it. I came up with a way to do this for regular posts which you can read about here: https://www.opensource-socialnetwork.org/discussion/view/2913/direct-links-to-images-in-wall-posts

you should be able to use pretty much the same code in the OssnComments class to get the functionality you want.

German Michael Zülsdorff Replied 6 years ago

Ossn supports jpg, png and gif images by default, there's no additional component needed.
Maybe something went wrong with your gif, in doubt turn on error logging and check the log file.
Detailed instructions (case B) are available in
https://www.opensource-socialnetwork.org/wiki/view/1101/how-to-report-a-bug-error