Likes should no longer refresh the page.

Our resident dev experts very own corner of the forum. A place to find Mintys mods and workloads.
Post Reply
User avatar
Minty
Respected Member
Posts: 3963
Joined: Sat Apr 18, 2020 7:21 pm
Has thanked: 5680 times
Been thanked: 2163 times
Status: Offline

Likes should no longer refresh the page.

Post by Minty »

Like many of you (pun intended) using the 'like' button was fecking annoying when it refreshes the page and you have to wait until you can continue with the post etc.

So I have changed this to now work with AJAX and it will no longer refresh the page. Instead a small popup message will show to indicate that the like has been accepted:-
image.png
Hopefully it should work in all themes etc. but let me know if there are any issues etc as this is my first attempt at writing a phpBB extension. @Nanook you can disable it under customise ;o)

Limitations are:-
  • Un-liking still refreshes the page due to the confirmation requirement. Not many people will decide to unlike so I don't think changing this is worth the effort.
  • Liked text (under the post) is not updated until the page is actually refreshed. Again no biggy and not really worth the effort to fix? Unless it is really required??
See what you all think but personally I think it is much better.
You do not have the required permissions to view the files attached to this post.
These users thanked the author Minty for the post (total 16):
TommyT (Fri Aug 21, 2020 5:45 am) • Sage (Fri Aug 21, 2020 6:00 am) • TTL (Fri Aug 21, 2020 6:13 am) • The Aspie Toker (Fri Aug 21, 2020 6:17 am) • MrMan (Fri Aug 21, 2020 6:33 am) • Nanook (Fri Aug 21, 2020 6:48 am) • Marcus (Fri Aug 21, 2020 7:12 am) • Elijah Growz (Fri Aug 21, 2020 7:24 am) • Mrs Beefheart (Fri Aug 21, 2020 8:39 am) • ohlordyeah_420 (Fri Aug 21, 2020 9:48 am) • Bulls (Fri Aug 21, 2020 9:50 am) • flip (Fri Aug 21, 2020 10:01 am) • kbag (Fri Aug 21, 2020 10:31 am) • WhIpLaSh (Fri Aug 21, 2020 11:41 am) • GMO (Fri Aug 21, 2020 11:56 am) • MommaB (Thu Sep 10, 2020 8:01 pm)

TommyT
Known User
Posts: 2051
Joined: Tue Oct 15, 2019 4:56 am
Location: Orion Arm of the Milky Way galaxy
Has thanked: 1596 times
Been thanked: 1370 times
Status: Offline

Re: Likes should no longer refresh the page.

Post by TommyT »

Ooooooo! It Works!
These users thanked the author TommyT for the post (total 4):
Minty (Fri Aug 21, 2020 6:20 am) • Keeno (Fri Aug 21, 2020 10:24 am) • kbag (Fri Aug 21, 2020 10:33 am) • Elias (Fri Aug 21, 2020 11:49 am)
Purple Punch From Seedstockers
The other day when I was high I solved one of the world's greatest problems.
Unfortunately five minutes later I forgot what I was doing.

User avatar
TTL
Known User
Posts: 2105
Joined: Tue Mar 31, 2020 8:18 pm
Has thanked: 1528 times
Been thanked: 1276 times
Status: Offline

Re: Likes should no longer refresh the page.

Post by TTL »

That’s awesome!
These users thanked the author TTL for the post (total 3):
Minty (Fri Aug 21, 2020 6:21 am) • Keeno (Fri Aug 21, 2020 10:22 am) • kbag (Fri Aug 21, 2020 10:33 am)

User avatar
The Aspie Toker
GR420 Leg End
Posts: 14748
Joined: Tue Oct 24, 2017 7:45 pm
Location: Your mother's bedroom.
Has thanked: 8903 times
Been thanked: 5069 times
Status: Offline

Re: Likes should no longer refresh the page.

Post by The Aspie Toker »

At last. Thank you.
These users thanked the author The Aspie Toker for the post (total 3):
Minty (Fri Aug 21, 2020 6:21 am) • Keeno (Fri Aug 21, 2020 10:24 am) • kbag (Fri Aug 21, 2020 10:33 am)
Never give advice. Wise men don't need advice. Fools won't take it.

User avatar
Nanook
Respected Member
Posts: 9825
Joined: Thu Jan 01, 1970 2:33 am
Location: My nest
Has thanked: 645 times
Been thanked: 950 times
Contact:
Status: Offline

Re: Likes should no longer refresh the page.

Post by Nanook »

thank you minty 😁
These users thanked the author Nanook for the post (total 2):
Minty (Fri Aug 21, 2020 7:09 am) • kbag (Fri Aug 21, 2020 10:33 am)
The quieter you become, the more you are able to hear.

User avatar
Minty
Respected Member
Posts: 3963
Joined: Sat Apr 18, 2020 7:21 pm
Has thanked: 5680 times
Been thanked: 2163 times
Status: Offline

Re: Likes should no longer refresh the page.

Post by Minty »

Elijahgrowz wrote:
Fri Aug 21, 2020 7:26 am
Well @Minty we all gotta be good at something and boy do you do well at this
Thought people might like the little change - the old way was so annoying
These users thanked the author Minty for the post (total 2):
Elijah Growz (Fri Aug 21, 2020 8:59 am) • kbag (Fri Aug 21, 2020 10:32 am)

User avatar
Bulls
Coco Grower
Posts: 8623
Joined: Tue Oct 10, 2017 5:39 am
Location: Cagliari
Has thanked: 929 times
Been thanked: 1805 times
Contact:
Status: Offline

Re: Likes should no longer refresh the page.

Post by Bulls »

You sir are a superstar.

That was something that really annoyed me personally
These users thanked the author Bulls for the post (total 2):
kbag (Fri Aug 21, 2020 10:32 am) • Minty (Fri Aug 21, 2020 10:52 am)

User avatar
Point 5
Respected Member
Posts: 3761
Joined: Mon Dec 02, 2019 9:19 pm
Location: UK
Has thanked: 555 times
Been thanked: 3289 times
Status: Offline

Re: Likes should no longer refresh the page.

Post by Point 5 »

@Minty keep up the good work!!!

Ive got a bottle of bubbly waiting for automation launch that i cant wait to open
These users thanked the author Point 5 for the post (total 2):
kbag (Fri Aug 21, 2020 10:32 am) • Minty (Fri Aug 21, 2020 10:52 am)
Whoever said the best things in life are free blatantly grew their own pot
:puff puff:

User avatar
flip
Known User
Posts: 2078
Joined: Tue Apr 21, 2020 11:07 am
Has thanked: 2652 times
Been thanked: 1598 times
Status: Offline

Re: Likes should no longer refresh the page.

Post by flip »

Great change! This really crapped out my phone before!
These users thanked the author flip for the post (total 2):
kbag (Fri Aug 21, 2020 10:32 am) • Minty (Fri Aug 21, 2020 10:52 am)
I am the wisest man alive, for I know one thing, and that is that I know nothing

User avatar
Keeno
Site Admin
Posts: 25512
Joined: Sat Oct 07, 2017 10:11 pm
Has thanked: 10550 times
Been thanked: 17044 times
Contact:
Status: Offline

Re: Likes should no longer refresh the page.

Post by Keeno »

Minty, you mate are a fooking legend!
These users thanked the author Keeno for the post (total 2):
kbag (Fri Aug 21, 2020 10:32 am) • Minty (Fri Aug 21, 2020 10:53 am)

Post Reply

Return to “Mintys Nerdy Corner”