![]() |
GFYcat embed - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Resources (https://community.mybb.com/forum-8.html) +--- Forum: MyCodes (https://community.mybb.com/forum-117.html) +--- Thread: GFYcat embed (/thread-148601.html) |
GFYcat embed - p00lz - 2013-12-04 this can probably be improved upon, but I couldnt find this anywhere and made my own MyCode for it in a quick 10 minute session this morning. http://gfycat.com/ Could probably expand in the future to replace all .gif's links posted with; "gfycat.com/fetch/" before a url will automatically fetch and convert it. eg: gfycat.com/fetch/http://mygif.myhost.com/image.gif I think I may be able to whip a plugin up to do that but my php skills are minimal. WHY USE IT? gfy are far smaller than .gifs (and have some other uses) so on gif-heavy forums you can save your members some bandwidth Requirements; This somewhere in the template
GFYcan link example; http://gfycat.com/SelfreliantSingleFlyinglemur Gif Size: 4.3 MB Gfy Size: 457.8 kB Compression: 9.6 to 1 We only want the part after the slash, so we use; Regular Expression;
Replacement:
and then this code will embed it;
Any suggestions or improvements would be welcome. edit; fixed the Expression, as it wouldnt embed anything with the http |