[ABD] Giphy Embed

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
splicker
Registered User
Posts: 35
Joined: Fri Jul 10, 2020 2:39 pm
Contact:

[ABD] Giphy Embed

Post by splicker »

Extension Name: Giphy Embed

Author: Splicker

Extension Description:
This is a simple extension which adds a new tab next to Attachments/Polls where you can search for GIF's from Giphy and then click them to add to your post. Uses jQuery so all the hard stuff is done on client side so not to bog down your server/hosting.

Features include:
- Change rating in ACP to only show age/site appropriate gifs
- Show GIF's in compact layout or full layout with scrollable container
- Can load more gifs from search and go back through search
- Hover over GIF to see its animation
- Click GIF to add to your post
giphy1.png
giphy3.png
giphy2.png

This extension uses the [img] BBCode to show GIFs in your posts.

You will need your own API KEY which you can get by creating an APP here: https://developers.giphy.com/docs/api

Extension Version: 1.0.0

Extension Download: Download File
Last edited by splicker on Sun May 02, 2021 11:33 am, edited 1 time in total.
Splicker Snap responsive template theme for phpBB.
If you need support for my extensions please post in the extension discussion or visit SplickerSnap.com.
deninho32
Registered User
Posts: 183
Joined: Tue May 21, 2019 8:57 am
Contact:

Re: [3.3][RC] Giphy Embed

Post by deninho32 »

Works really well on 3.3.2. Nice extension!
phpBB 3.3.7 | PHP Version 8.2.4 | Milk Theme
User avatar
wads24
Registered User
Posts: 662
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: [3.3][RC] Giphy Embed

Post by wads24 »

Just a question...

Why are the search results not animated gifs?
Thanks in advance for a reply.
User avatar
Onnozel Manneke
Registered User
Posts: 145
Joined: Mon Feb 01, 2021 8:37 pm
Location: Walhalla
Name: Loki Heimdall
Contact:

Re: [3.3][RC] Giphy Embed

Post by Onnozel Manneke »

wads24 wrote: Thu Apr 22, 2021 6:39 pm Just a question...

Why are the search results not animated gifs?
They are, on mouseover.
phpBB NL Extension translations on request.
Visit: https://www.phpbbnl.be

Image
User avatar
wads24
Registered User
Posts: 662
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: [3.3][RC] Giphy Embed

Post by wads24 »

Onnozel Manneke wrote: Thu Apr 22, 2021 8:46 pm
wads24 wrote: Thu Apr 22, 2021 6:39 pm Just a question...

Why are the search results not animated gifs?
They are, on mouseover.
Ok. I'm using a mobile device.

Would I just remove the hover in css to animate all?
Thanks in advance for a reply.
User avatar
Onnozel Manneke
Registered User
Posts: 145
Joined: Mon Feb 01, 2021 8:37 pm
Location: Walhalla
Name: Loki Heimdall
Contact:

Re: [3.3][RC] Giphy Embed

Post by Onnozel Manneke »

Nice extension! But would it be possible to add the hardcoded text in the language file?
Like: 'title' => 'Giphy Embed Settings',

And:

Code: Select all

                        <option value="g" <!-- IF GE_RATING eq 'g' -->selected="selected"<!-- ENDIF -->>(G) Kid Safe</option>
                        <option value="pg" <!-- IF GE_RATING eq 'pg' -->selected="selected"<!-- ENDIF -->>(PG) May contain mild profanity</option>
                        <option value="pg-13" <!-- IF GE_RATING eq 'pg-13' -->selected="selected"<!-- ENDIF -->>(PG-13) May contain moderate profanity</option>
                        <option value="r" <!-- IF GE_RATING eq 'r' -->selected="selected"<!-- ENDIF -->>(R) Includes adult themed images</option>
And:

Code: Select all

<p>Extension designed and created by Splicker &copy; 2021 - <br />For support or custom modifications please visit the website at <a href="https://www.splickersnap.com" target="_blank">SplickerSnap.com</a></p>
Also, <br /> should be changed to <br>

And add 'MORE' => 'More', in the language file, that's missing ;)
phpBB NL Extension translations on request.
Visit: https://www.phpbbnl.be

Image
User avatar
Onnozel Manneke
Registered User
Posts: 145
Joined: Mon Feb 01, 2021 8:37 pm
Location: Walhalla
Name: Loki Heimdall
Contact:

Re: [3.3][RC] Giphy Embed

Post by Onnozel Manneke »

wads24 wrote: Thu Apr 22, 2021 8:52 pm
Onnozel Manneke wrote: Thu Apr 22, 2021 8:46 pm
wads24 wrote: Thu Apr 22, 2021 6:39 pm Just a question...

Why are the search results not animated gifs?
They are, on mouseover.
Ok. I'm using a mobile device.

Would I just remove the hover in css to animate all?
Open: /ext/splicker/giphyembed/styles/all/template/event/overall_footer_after.html

Try to replace:

Code: Select all

				output += '<img class="giphyimg<!-- IF GE_SCROLL --> giphyheight<!-- ENDIF -->" src="'+gifObject.images.fixed_height_still.url+'" loading="lazy" data-animate="'+gifObject.images.fixed_height.url+'" data-still="'+gifObject.images.fixed_height_still.url+'" data-state="still"/>';
With:

Code: Select all

				output += '<img class="giphyimg<!-- IF GE_SCROLL --> giphyheight<!-- ENDIF -->" src="'+gifObject.images.fixed_height_downsampled.url+'" loading="lazy" data-animate="'+gifObject.images.fixed_height.url+'" data-still="'+gifObject.images.fixed_height_downsampled.url+'" data-state="still"/>';
Should work, but it's not my ext :lol:
phpBB NL Extension translations on request.
Visit: https://www.phpbbnl.be

Image
deninho32
Registered User
Posts: 183
Joined: Tue May 21, 2019 8:57 am
Contact:

Re: [3.3][RC] Giphy Embed

Post by deninho32 »

That does the trick 8-)
phpBB 3.3.7 | PHP Version 8.2.4 | Milk Theme
User avatar
splicker
Registered User
Posts: 35
Joined: Fri Jul 10, 2020 2:39 pm
Contact:

Re: [3.3][RC] Giphy Embed

Post by splicker »

wads24 wrote: Thu Apr 22, 2021 6:39 pm Just a question...
Why are the search results not animated gifs?
I just thought that by having the images load as static images helps them to load faster and not bog down your resources and waiting times so much. They do animate on mouseover so you can see then in action before choosing which ones to use. Gifs are also fully animated once added to your posts, they're only static when searching.


@Onnozel Manneke I'll take a look at those language edits, much appreciated for the feedback ;)
Splicker Snap responsive template theme for phpBB.
If you need support for my extensions please post in the extension discussion or visit SplickerSnap.com.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][RC] Giphy Embed

Post by 3Di »

splicker wrote: Fri Apr 23, 2021 10:36 am I just thought that by having the images load as static images helps them to load faster and not bog down your resources and waiting times so much. They do animate on mouseover so you can see then in action before choosing which ones to use. Gifs are also fully animated once added to your posts, they're only static when searching.
That's the correct behaviour, as it should be.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
potku
Registered User
Posts: 980
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: [3.3][RC] Giphy Embed

Post by potku »

This is a fun one, thanks. :)
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx
andreask
Registered User
Posts: 752
Joined: Fri Feb 27, 2009 6:13 pm
Name: Andreas

Re: [3.3][RC] Giphy Embed

Post by andreask »

Hi,

I was trying to make an ext and then some good Samaritan point me your creation.
Unfortunately my js skills is very limited so I had stuck several times on several problems.
Anyways, perhaps it would be a good idea to capture "enter".
As I said i suck on js but this is how I did it.

Code: Select all

input.addEventListener('keydown', function (e) {
 if (e.keyCode == '13')
        {
            e.preventDefault();
        }
        ...
}
Can't say if this is the proper way.
Right now on your ext if I press enter it submits the form. Perhaps instead it could run the search script?
In any case I looked your js and it's magnificent. I don't know why I came up with such complicated script.
Actually I know, lack of experience. I wish I had a mentor! :(
Good work!
Thanks for the ext!

p.s. I also removed the Funny cats from value and instead I used placeholder.
Here is what I am working on right now...
Inactive User Manager for phpBB
Give it a try...
If you would like to buy me a bier ;) for my work I will drink it on a hot summer day and thank you!!!
User avatar
splicker
Registered User
Posts: 35
Joined: Fri Jul 10, 2020 2:39 pm
Contact:

Re: [3.3][RC] Giphy Embed

Post by splicker »

andreask wrote: Sat May 01, 2021 7:12 pm Hi,

I was trying to make an ext and then some good Samaritan point me your creation.
Unfortunately my js skills is very limited so I had stuck several times on several problems.
Anyways, perhaps it would be a good idea to capture "enter".
As I said i suck on js but this is how I did it.

Code: Select all

input.addEventListener('keydown', function (e) {
 if (e.keyCode == '13')
        {
            e.preventDefault();
        }
        ...
}
Can't say if this is the proper way.
Right now on your ext if I press enter it submits the form. Perhaps instead it could run the search script?
In any case I looked your js and it's magnificent. I don't know why I came up with such complicated script.
Actually I know, lack of experience. I wish I had a mentor! :(
Good work!
Thanks for the ext!

p.s. I also removed the Funny cats from value and instead I used placeholder.
My JS skills aren't brilliant either but I've added this functionality and also updated the language files. Updated the download link. Let me know if you have any issues.
Splicker Snap responsive template theme for phpBB.
If you need support for my extensions please post in the extension discussion or visit SplickerSnap.com.
Mesto
Registered User
Posts: 40
Joined: Mon Jul 27, 2009 12:29 am

Re: [3.3][RC] Giphy Embed

Post by Mesto »

Thank you for your nice work.

Is it possible to get it in quick replay with abbc3 or in abbc3 at all?
https://www.phpbb.com/customise/db/exte ... bcode_box/

Kind regards
phpBB: 3.3.4
PHP: 7.4.18
Style: aero, prosilver, Absolution, SoftBlue
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][RC] Giphy Embed

Post by 3Di »

splicker wrote: Thu Apr 15, 2021 11:53 am This extension uses the [img] BBCode to show GIFs in your posts.
If you implement the s9e AutoImage plugin there is no need to use that BBCode at all.

So this line
$(".gifpanel").on("click", ".giphyimg", function(){ insert_text('[img]' + $(this).attr("src") + '[/img]');});
could simply be
$(".gifpanel").on("click", ".giphyimg", function(){ insert_text($(this).attr("src"));});

Untested, pure theory. :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Locked

Return to “Abandoned Extensions”