Thread Rating:
  • 13 Vote(s) - 4.08 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Thank You/Like System v3.4.2 + MyAlerts and Tapatalk support
Hey, I'm glad the fix worked.

Re your missing custom CSS as mentioned in the thread on your forum: when you uninstalled the plugin, the thankyoulike.css stylesheet would have been deleted from all themes too, so if that's where you had customised the styling of the list of likers, then unfortunately it is now lost. Hopefully you can recover it from a backup or recreate it.
Reply
How can we show the like part with avatar.
Like the picture below.

[Image: 5uYyiy.png]
Reply
The plugin currently doesn't support this out-of-the-box, but you can hack it to achieve it. Here's a start at that hack. Line numbers assume you've got the latest version of the plugin, 3.3.6, installed.

In the file inc/plugins/thankyoulike.php:
  1. Append , u.avatar to line 1673 (which is the first line of a SELECT database query).
  2. Insert around line 1695 the line $avatar = format_avatar($tyl['avatar']);
Make corresponding changes in the thankyoulike.php file in the base directory:
  1. Append , u.avatar to line 419 (which is the first line of a SELECT database query).
  2. Insert around line 433 the line $avatar = format_avatar($tyl['avatar']);
Then edit the thankyoulike_users template and replace its contents with something like this (tinker to get your preferred look):

<a href="{$profile_link}" class="smalltext" title="{$tyl['username']}"><img alt="" src="{$avatar['image']}" style="width: 25px; height: 25px; border-radius: 12.5px;" /></a>

You can probably take it from there, but if you need more help with getting it exactly right then just ask.
Reply
There is one more problem.
When hovering over the avatar, only the username appears. What time and date does not appear.
Reply
Try this:

In both files you previously edited, just a few lines below where you added the line starting with $avatar, you'll see a couple of lines starting with $datedisplay_. Insert this line after them in each file:

$datedisplay_plain = my_date($mybb->settings[$prefix.'dtformat'], $tyl['dateline']);

Then update the same thankyoulike_users template that you edited previously so that it now consists in this:

<a href="{$profile_link}" class="smalltext" title="{$tyl['username']} ({$datedisplay_plain})"><img alt="" src="{$avatar['image']}" style="width: 25px; height: 25px; border-radius: 12.5px;" /></a>
Reply
(2020-09-26, 03:32 PM)Laird Wrote: Try this:

In both files you previously edited, just a few lines below where you added the line starting with $avatar, you'll see a couple of lines starting with $datedisplay_. Insert this line after them in each file:

$datedisplay_plain = my_date($mybb->settings[$prefix.'dtformat'], $tyl['dateline']);

Then update the same thankyoulike_users template that you edited previously so that it now consists in this:

<a href="{$profile_link}" class="smalltext" title="{$tyl['username']} ({$datedisplay_plain})"><img alt="" src="{$avatar['image']}" style="width: 25px; height: 25px; border-radius: 12.5px;" /></a>

It looks good now. Thank you man.
Reply
No problem. If I get motivated I'll try to add out of the box support for this to the plugin, otherwise next time you upgrade you'll need to add the same lines of code again.
Reply
@Laird - I had been busy, so thank you for your great support! I really like this idea, maybe we should add it into the TYL Smile
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
Yes, I think we should, @Eldenroot. Nice to hear from you!
Reply
New version 3.3.7 is released!

This release contains quite a lof of fixes, enhancements and two new features. We recommend everybody to update.

Changelog:
[FEATURE] - Add coloration of thx/like counter based on amount of received thx/like (postbit and member_profile), including simple settings with CSS support - by @lairdshaw
[FEATURE] - Display users' avatars instead of usernames in thx/like list - by @lairdshaw
[ENHANCEMENT] - Display date and time (User's profile - Top liked/thanked post) - by @lairdshaw
[ENHANCEMENT] - Display "Continue reading" for post content (User's profile - Top liked/thanked post) - by @lairdshaw
[ENHANCEMENT] - Improve displaying of thx/like counter, including support for coloration feature (User's profile - Top liked/thanked post) - by @lairdshaw
[ENHANCEMENT] - Do not display unwanted links in member profile page - if the user has no thx/likes -> no "Search" link is displayed - by @lairdshaw
[FIX] - Do not use hard-coded comma for $comma variable - by @lairdshaw
[FIX] - Eliminate duplicate code in thankyoulike.php - by @lairdshaw
[FIX] - Move the creation of the Master stylesheet from installation to activation - by @lairdshaw

Thank you very much @Laird (aka @lairdshaw) for your great contribution and time, without you this would not be possible!


DOWNLOAD from the MyBB Extend site:
Extend MyBB - Download Thank You/Like System+MyAlerts & Tapatalk support

If you like our work, please add a "STAR" on MyBB Extend site Smile
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)