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
(2020-11-03, 05:34 PM)bhuto Wrote: i use this {$post['tyl_unumrtyls']} to show number of like received in postbit
but i want to show it also in index page  what is the code for it?

You probably should use {$mybb->user['tyl_unumrcvtyls']}.
Reply
dumb question about the converter again, how does it work ? Smile
i mean, do i have to manually export the old Database table from the old forum and import it in the new one ? and then run the converter (i think i need to edit something inside the converter.php
i think my old field in the old database its called: bedankt or anything like that.....
maybe someone can shortly explain what exactly to do, please....

thank you in advance....
greets
andi
Reply
(2020-11-04, 07:47 AM)Sectomy Wrote: dumb question about the converter again, how does it work ? Smile

You load it in your browser at http(s)://your-forum-domain/converter.php. It then looks in your database for the tables of the two alternative thank-you/like plugins that it knows (they are named - after the prefix defaulting to mybb_ - thx and post_likes). If it finds one or the other, then it queries the thank-yous/likes out of it and stores them into this plugin's thank-you/like table (named - again, after any prefix defaulting to mybb_ -g33k_thankyoulike_thankyoulike).

It won't work for any other tables/databases unless you add them to the script.

(2020-11-04, 07:47 AM)Sectomy Wrote: i mean, do i have to manually export the old Database table from the old forum and import it in the new one ? and then run the converter (i think i need to edit something inside the converter.php

You need to provide some sort of access to the old database table, whether that's via connecting to it in PHP via a database API as a separate database to the MyBB one, or, as you suggest, manually importing the old table into your MyBB database, which would make things easier as you could then just use MyBB's database functions to pull rows out of it, as the converter.php script does already, e.g., see lines 16-19, and 39-42.

(2020-11-04, 07:47 AM)Sectomy Wrote: i think my old field in the old database its called: bedankt or anything like that.....
maybe someone can shortly explain what exactly to do, please....

Perhaps you mean table rather than field? In any case, you simply need to add another else if block to converter.php from line 59, based on one or the other of the previous blocks (16-37 and 39-58), and customised for your table and its columns. If you need more help, just let us know.

Actually, I've just realised: my description above assumes that the post IDs and user IDs of your old database have been imported as-is, so that they correspond directly to those in the MyBB database into which you've imported them. If that's not the case, then the converter.php script is not going to be adequate.
Reply
So did the upgrade to the latest version and it's not showing the "likes received" number. Any suggestions?

And it's not in my live site so please don't ask for any link. But here is a screenshot.

[Image: Capture.jpg]
[url=https://poetandpoem.com/interpretation-death-not-proud-donne][/url]
Reply
(2020-11-04, 12:47 PM)vk_knight Wrote: So did the upgrade to the latest version and it's not showing the "likes received" number. Any suggestions?

Perhaps you didn't run "Find Updated Templates" after upgrading?

In any case, my suggestion is to update in template thankyoulike_postbit_author_user the variable {$post['tyl_unumrcvtyls']}{$post['tyl_unumrtyls']} to {$post['tyl_unumrcvtyls_fmt']}.
Reply
So, changed in thankyoulike_postbit_author_user

to like this
{$lang->tyl_given}: {$post['tyl_unumtyls_fmt']}
<br />
{$lang->tyl_rcvd}: {$post['tyl_unumrtyls_fmt']}

It did nothing. Did refresh a couple of times!!! Still the number received isn't showing.
Reply
You've got a typo in the second $post entry:

tyl_unumrcvtyls_fmt not tyl_unumrtyls_fmt (that is, you're missing the characters 'cv' ).
Reply
Okay now it's fine. Thanks..

One more query. Can it be make like this "Likes: **" instead of which is now "Likes Received: ** in ** posts" ??
Reply
(2020-11-04, 01:24 PM)vk_knight Wrote: Okay now it's fine. Thanks..

No worries. I've created an issue about this on GitHub: https://github.com/mybbgroup/Thank-you-l...issues/272

(2020-11-04, 01:24 PM)vk_knight Wrote: One more query. Can it be make like this "Likes: **" instead of which is now "Likes Received: ** in ** posts" ??

Without making changes to the plugin, you could simply switch to the variable {$post['tyl_unumrcvtyls']} (remember the "cv"!) [ETA: actually, a better choice of variables is {$post['tyl_unumrcvtyls_self_rem']}, since that accounts for any removal of self-likes from the count if you have set the relevant plugin setting (otherwise it is identical to {$post['tyl_unumrcvtyls']}], however, there would be two drawbacks to that:

  1. It wouldn't format the number with commas for thousands, e.g., 1234 would display like that, rather than as 1,234.
  2. It wouldn't format the number according to the new setting we've added, "Received likes styling ranges".

Otherwise, we'd need to modify the plugin again to provide formatting for that variable for you.
Reply
Hi,

thank you.
Ive imported all the Thank you stuff in my Database, so ive some other "field" names, so i need to change it in the script, or ?
can i just change the fields to the matching one in the old Thanx system ?
this is what it looks like from the old system:

   
sorry, im a totally noob in databases Smile but ill just try and error Smile
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)