Thank Count - Thanks for posts
Thank Count
TL:DR - I'd like to show a simple thank count on a post, rather than a list of thankers? how can I do this?
It doesn't seem immediately possible to do this? I'm not worried about showing images... all I need is a number somewhere on the post...
I'm going to be running a suggestions topic, and I need a way of monitoring which suggestions are preferred.
Many thanks,
Steve D.
It doesn't seem immediately possible to do this? I'm not worried about showing images... all I need is a number somewhere on the post...
I'm going to be running a suggestions topic, and I need a way of monitoring which suggestions are preferred.
Many thanks,
Steve D.
-
- Registered User
- Posts: 4
- Joined: Tue Jul 23, 2013 8:37 pm
Re: Thank Count
Well, if you're familiar with the old MOD edits instructions era, here's just a quick hack:
Save both files, purge the cache. Expected result is like that:
Code: Select all
OPEN
ext\gfksx\thanksforposts\core\helper.php
FIND
'THANKS_FROM' => $this->language->lang('THANK_FROM'),
AFTER, ADD
'POST_THANKS_COUNT' => $this->get_thanks_number($row['post_id']) ?: '',
OPEN
ext\gfksx\thanksforposts\styles\prosilver\template\event\viewtopic_body_postrow_post_notices_after.html
FIND
<dt>{{ postrow.THANK_TEXT }}{{ postrow.POST_AUTHOR_FULL }}{{ postrow.THANK_TEXT_2 }}</dt>
<dd>{{ postrow.THANKS }}</dd>
REPLACE WITH
<a href=# class="button" title="{{ lang('THANK_POST_SHORT') }}">
<i class="icon fa-heart fa-fw" style="color: red" aria-hidden="true"></i>{{ postrow.POST_THANKS_COUNT }}
</a>
-
- Extensions Development Team
- Posts: 3951
- Joined: Wed Oct 25, 2006 12:46 pm
- Location: Siberia, Russian Federation
Re: Thank Count
Buy me a coffee
Hire me for your phpBB board.
Introducing Mobile Upgrade! *Make your phpBB board like an app!
O Belde • ThatTowns*for sale*$2250
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
Hire me for your phpBB board.
Introducing Mobile Upgrade! *Make your phpBB board like an app!
O Belde • ThatTowns*for sale*$2250
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
-
- Registered User
- Posts: 1447
- Joined: Fri Jul 24, 2020 11:30 pm
- Location: Turkiye
- Name: Halil
Re: Thank Count
This is a great hack, but if I'm correct, it makes the heart a clickable link that just sends you to the top of the screen? Ideally this link would show a list of all the users that have liked that post. Or not be a link at all and just an image... maybe I'm missing something.
The other thing that would make this extension much better would be if there was a way to easily disable notifications for Thanks removal. I have seen the option to disable all notifications, but I would still like notifications of Thanks. Currently, the user can choose not to receive notifications for Thanks removal, but it should be an Admin setting.
The other thing that would make this extension much better would be if there was a way to easily disable notifications for Thanks removal. I have seen the option to disable all notifications, but I would still like notifications of Thanks. Currently, the user can choose not to receive notifications for Thanks removal, but it should be an Admin setting.
-
- Registered User
- Posts: 2
- Joined: Tue Apr 02, 2024 6:50 am
Re: Thank Count
This can be done with html vs css edits. I thought about it too, but then it didn't seem so necessary. But at first this idea excited me like you. So this can be done with some edits right now.wingmanfoilclub wrote:Ideally this link would show a list of all the users that have liked that post.
But the extension asks you to enter a certain number for the list of likes. Maybe typing 99999999 will work
Buy me a coffee
Hire me for your phpBB board.
Introducing Mobile Upgrade! *Make your phpBB board like an app!
O Belde • ThatTowns*for sale*$2250
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
Hire me for your phpBB board.
Introducing Mobile Upgrade! *Make your phpBB board like an app!
O Belde • ThatTowns*for sale*$2250
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
-
- Registered User
- Posts: 1447
- Joined: Fri Jul 24, 2020 11:30 pm
- Location: Turkiye
- Name: Halil
Re: Thank Count
I would love to use this, thank you! Where do we put this?rxu wrote:Well, if you're familiar with the old MOD edits instructions era, here's just a quick hack:
Save both files, purge the cache. Expected result is like that:Code: Select all
OPEN ext\gfksx\thanksforposts\core\helper.php FIND 'THANKS_FROM' => $this->language->lang('THANK_FROM'), AFTER, ADD 'POST_THANKS_COUNT' => $this->get_thanks_number($row['post_id']) ?: '', OPEN ext\gfksx\thanksforposts\styles\prosilver\template\event\viewtopic_body_postrow_post_notices_after.html FIND <dt>{{ postrow.THANK_TEXT }}{{ postrow.POST_AUTHOR_FULL }}{{ postrow.THANK_TEXT_2 }}</dt> <dd>{{ postrow.THANKS }}</dd> REPLACE WITH <a href=# class="button" title="{{ lang('THANK_POST_SHORT') }}"> <i class="icon fa-heart fa-fw" style="color: red" aria-hidden="true"></i>{{ postrow.POST_THANKS_COUNT }} </a>
Edit: oh do I just follow the instructions as written?
-
- Registered User
- Posts: 6
- Joined: Thu Jul 11, 2024 1:44 am
Re: Thank Count
Yes.defvenom wrote:oh do I just follow the instructions as written?
-
- Extensions Development Team
- Posts: 3951
- Joined: Wed Oct 25, 2006 12:46 pm
- Location: Siberia, Russian Federation
Re: Thank Count
Could you please help with ajax compatibility. This number ({{ postrow.POST_THANKS_COUNT }}) doesn't change when clicking "like" or "take like back". Is it posible to make it work?rxu wrote:Well, if you're familiar with the old MOD edits instructions era, here's just a quick hack:
-
- Registered User
- Posts: 130
- Joined: Mon Nov 09, 2009 7:11 pm
- Location: Paraguay