Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: kelvincool on August 30, 2014, 05:16:29 PM

Title: Say Thanks
Post by: kelvincool on August 30, 2014, 05:16:29 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=3898)

Say Thanks provides the ability for users to thank posts.

Requirements

This mod requires PHP 7.4.10 or above.

Postgresql users: this mod requires v9+ for the stats page

Additional Notes and known limitations


Translation Credits
Croatian - ameo
Italian - Ninja ZX-10RR
German - larry007
Russian - Sergey
Persian - roza
Norwegian - Svendsen
Spanish - d3vcho
Turkish - gevv

Thank you icons created by rsetiawan - Flaticon (https://www.flaticon.com/free-icons/thank-you)
Icon courtesy of Yusuke Kamiyamane (http://www.iconfinder.com/icondetails/27245/24/fine_good_hand_ok_thumb_thumbs_up_up_icon)
Tick and cross icon courtesy of Pixel Mixer (https://www.iconfinder.com/iconsets/basicset)
Loading icon courtesy of Preloaders.net

Support
Support for this modification can be found in the support topic.



(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.creativecommons.org%2Fl%2Fby%2F3.0%2F80x15.png&hash=e2441d8ee83709b284e795913d60f5b7dfdd41f4) (http://creativecommons.org/licenses/by/3.0)
This work is licensed under a Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0)
Title: Re: Say Thanks
Post by: akbora on August 30, 2014, 05:27:37 PM
This mod is good well how can we get back thanks after give say thanks. This is important
Title: Re: Say Thanks
Post by: kelvincool on August 31, 2014, 05:20:57 PM
When you say thanks to someone it's not something that you take back so I didn't include such an option, also I wanted to keep the mod simple for maintainability. If there's enough demand for it then I'll add it in.
Title: Re: Say Thanks
Post by: Gallardo994 on September 06, 2014, 12:54:29 PM
Installing the mod has no problems, all tests pass, but when it finishes the installation, there is no effect at all. Trying to uninstall the mod causes a long list of errors for every file. Checking changed files, the mod has changed nothing at all.
Title: Re: Say Thanks
Post by: Steve on September 06, 2014, 04:09:48 PM
Odd. It works perfectly for me.
Title: Re: Say Thanks
Post by: kelvincool on September 06, 2014, 05:23:18 PM
That's pretty strange. Some questions that will help debug:

Which version of smf are you using?
Are you running with PHP 5.3+?
Are you using the default theme?
Did it create the two tables messages_thanks and messages_thanks_stats?
What errors are you getting?
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on September 17, 2014, 10:23:22 AM
Doesn't work 100% to me, the icon is missing, it didn't copy it at all in the destination folder and when I tried to put my own image and renaming it to "thank.png" it didn't show anyway :/
Title: Re: Say Thanks
Post by: kelvincool on September 17, 2014, 01:49:30 PM
OK answer the same questions I posted above and I'll see if I can recreate.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on September 17, 2014, 02:08:34 PM
2.0.8
Yes
Yes
Doesn't matter but yes
None

EDIT: P.s. the installation was successful.
Title: Re: Say Thanks
Post by: kelvincool on September 17, 2014, 03:08:47 PM
I guess those questions didn't really help as much as I thought they would. You're basically running the same set up as me when I develop this.

Follow up questions:

Are your themes folder permissions set correctly? Specifically the folder /Themes/default/images/theme/

That's the only reason I can think of for it not to copy the icon correctly. Have you had any issues with other mods copying icons into the theme folder? The php logs at the time of the installation might give some idea on what the error might be.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on September 17, 2014, 03:51:21 PM
No dude you didn't get it and i might have explained myself badly... I tried to put an image manually but it didn't show up either that way! :O logs showed nothing :(
Title: Re: Say Thanks
Post by: kelvincool on September 17, 2014, 04:02:14 PM
So if you put this into your browser (with your own website domain of course):

http://youwebsite.com/Themes/default/images/theme/thank.png

Do you get anything back? How about:

http://youwebsite.com/Themes/default/images/theme/thank.png.png
or
http://youwebsite.com/Themes/default/images/theme/quote.png

I would say check the permissions on that image you uploaded and check the permissions on the theme folder too. That's of course if you are running with linux and not windows. Would be interested to know if you have any issues with other mods trying to write to that folder.
Title: Re: Say Thanks
Post by: swaggaderby on September 17, 2014, 04:10:55 PM
@Kelvin please is der a way the mod can be set to set a list of the highest people thanked?
Title: Re: Say Thanks
Post by: kelvincool on September 17, 2014, 04:22:41 PM
@swaggaderby you mean as part of the forum stats, eg on the same page as Top 10 posters, Top 10 boards, etc...?

If people want that as a feature I can certainly put that into the next version.
Title: Re: Say Thanks
Post by: swaggaderby on September 17, 2014, 04:37:33 PM
As top10 just like this pic attached
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on September 17, 2014, 04:51:05 PM
Well I just tried it again and... It didn't work when I tried to install it but when I uploaded an image renamed to "thank.png" it worked... I probably made a mistake with the upload last time, still it doesn't copy the image by default. It says it does but in fact he doesn't do that... Ah the permissions are 775 so way higher than necessary there.
Thanks for the help anyway :) sorry if I haven't been completely accurate the first time.
Title: Re: Say Thanks
Post by: ameo on September 30, 2014, 11:49:01 AM
As a good boy I am, I've translated this lil script from English to Croatian.


So you can include it if you like, or whoever likes it on my language, can use it.
It's attached. Also you can find it on pastie: say thanks (http://pastie.org/private/ietnabcaid91zao6owkicw) -   Cheers!  :)
Title: Re: Say Thanks
Post by: Apllicmz on October 07, 2014, 12:29:21 PM
iam done portugues files any news send MP
Thank you
Title: Re: Say Thanks
Post by: Steve on October 07, 2014, 04:29:32 PM
Why not just attach it so anyone who wants it can grab it right away without having to wait? :)
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on October 08, 2014, 09:39:57 AM
Quote from: Steve on October 07, 2014, 04:29:32 PM
Why not just attach it so anyone who wants it can grab it right away without having to wait? :)
+1
Title: Re: Say Thanks
Post by: Steve on October 11, 2014, 08:44:21 PM
Is this searchable? In other words, is there a way for people to search for the posts they've been thanked for?
Title: Re: Say Thanks
Post by: H0 modelspoor on October 24, 2014, 09:32:13 AM
Is it possible to change the words somehow into dutch??
Title: Re: Say Thanks
Post by: ForumMix on November 06, 2014, 12:57:38 PM
I use version 2.0.9 and had no problems with the installation. I use the original theme of the Curve. But I cannot up either text or icon.

What should I do so this can be seen in a post?
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 06, 2014, 01:11:55 PM
Quote from: Steve on October 11, 2014, 08:44:21 PM
Is this searchable? In other words, is there a way for people to search for the posts they've been thanked for?
Missed it... No it isn't if Google doesn't indexes it.

Quote from: H0 modelspoor on October 24, 2014, 09:32:13 AM
Is it possible to change the words somehow into dutch??
Missed either...
Just edit the language file?

Quote from: ForumMix on November 06, 2014, 12:57:38 PM
I use version 2.0.9 and had no problems with the installation. I use the original theme of the Curve. But I cannot up either text or icon.

What should I do so this can be seen in a post?
You surely messed up somewhere since it's not really possible if it did work with no errors... Perhaps flushing your cache (especially if you are using Cloudflare or similar services..).
Title: Re: Say Thanks
Post by: ForumMix on November 06, 2014, 01:48:34 PM
Emptied the cash and all, but it still does not work.
Title: Re: Say Thanks
Post by: ForumMix on November 06, 2014, 03:34:43 PM
Now damn it works. But can someone translate the text displayed on the posts to Swedish?     ;)
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 06, 2014, 04:56:03 PM
Quote from: ♦ Ninja ZX-10RR ♦ on November 06, 2014, 01:11:55 PM
Quote from: H0 modelspoor on October 24, 2014, 09:32:13 AM
Is it possible to change the words somehow into dutch??
Missed either...
Just edit the language file?
I add that it might be useful to be posted so it can be added to the mod itself... I might translate it to Italian, too...
Title: Re: Say Thanks
Post by: Arnox_S on November 09, 2014, 01:17:41 AM
Hey. Arnox here. I was looking all over for a Thanks or a Like system which would not display the total number of Thanks one has received on the forum in everyone's posts. Unfortunately I couldn't find one. HOWEVER, after figuring a couple things out about SMF mods, I configured this mod to what I need. (Doesn't display total number of Thanks one's received on the forum in every user's posts.)

I decided to upload my work here in case anyone was looking for the same thing. I really hope some people will find it to be what they're looking for.

Note: I DO NOT OFFER ANY SUPPORT FOR THIS MODDED VERSION OF A MOD. I give it to you AS IS and assume no responsibility for any damage (unlikely) that this may cause to one's forum or hosting.
Title: Re: Say Thanks
Post by: Steve on November 09, 2014, 09:16:58 AM
Then what does it do? Just display that so and so thanked this post with no indications in the mini-profile?
Title: Re: Say Thanks
Post by: kelvincool on November 09, 2014, 12:30:20 PM
Hello everyone,

New version of the mod is coming out in a few days, if anyone is doing translations, I've attached the latest language file. If you want your language included, reply with an attachment to this topic. Many thanks!

QuoteIs this searchable? In other words, is there a way for people to search for the posts they've been thanked for?

I've looked into perhaps adding a show thanked posts on the show posts page in the profile area but I don't think it's going to be worth the effort to be honest. Showing a list of posts seems quite intensive, not sure how much benefit anyone will get out of it.

@Arnox, bit of weird modification you've done, what's the reason behind hiding the thanked count?
Title: Re: Say Thanks
Post by: Steve on November 09, 2014, 01:02:20 PM
As for the searchability, I totally understand and thank you for considering it. :)
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 09, 2014, 02:47:44 PM
:D
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 10, 2014, 09:40:47 AM
Wait... How to remove a given thanks? I am not able to find it anywhere but there is such an option in the language file ???
Title: Re: Say Thanks
Post by: kelvincool on November 10, 2014, 02:44:39 PM
That would be because it is part of the new version  :)

If there was a thank you button I would thank you for your translations  :D
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 10, 2014, 03:00:08 PM
Aaaaaaahhhh that's much more clear now :P well you're welcome and thank you as well for the explanation :) waiting for the new version :D
Inserting it into the language file was smart though, you anticipated the translations so you don't need to repack it multiple times, nice dude!
Title: Re: Say Thanks
Post by: Arnox_S on November 12, 2014, 01:51:19 AM
Quote from: kelvincool on November 09, 2014, 12:30:20 PMI've looked into perhaps adding a show thanked posts on the show posts page in the profile area but I don't think it's going to be worth the effort to be honest. Showing a list of posts seems quite intensive, not sure how much benefit anyone will get out of it.

@Arnox, bit of weird modification you've done, what's the reason behind hiding the thanked count?

Actually, for the above, for my forum, members have been requesting that they're able to see which topics are thanked. I guess it's just very nice to see and would look forward to such a feature myself.

As to it not displaying the number of Thanks in people's mini-profiles, it's so the scramble to be Thanked doesn't dominate forum topics and discussions. When people have to put in even just a tiny bit of effort to see one's number of Thanks, the number becomes much less important and there's no excessive focus on getting Thanks anymore and it also discourages Thanks spamming.
Title: Re: Say Thanks
Post by: kelvincool on November 15, 2014, 05:14:45 PM
Hello everyone,

Sorry for the delay, I've been working on putting in the show thanked posts feature. I'm attaching a new language file so if you want to be in the release, reply with edited attachment. The release is pretty much ready to go so I'll wait a couple of days for translations to come in before I upload it.

Thanks
Title: Re: Say Thanks
Post by: JimZA on November 16, 2014, 03:06:05 PM
Just like to say that this is probably one of the best mods I've added to my forum!

Runs OK under 2.0.9 and I'm looking forward to seeing updates.

The ability to turn the thanks system off for certain boards would be most welcome...

Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 16, 2014, 03:13:41 PM
Quote from: JimZA on November 16, 2014, 03:06:05 PM
The ability to turn the thanks system off for certain boards would be most welcome...
Good idea to me... On a code basis you could take inspiration from the Topic Solved one which has a setting to enable via boards options (admin edit). If you consider this I willl update the translation once again, np :)
Title: Re: Say Thanks
Post by: kelvincool on November 16, 2014, 06:05:13 PM
Quote from: JimZA on November 16, 2014, 03:06:05 PM
The ability to turn the thanks system off for certain boards would be most welcome...

That's an interesting feature, what's the reason for limiting the thanking system to certain boards?
Title: Re: Say Thanks
Post by: Steve on November 16, 2014, 06:29:23 PM
Quote from: kelvincool on November 15, 2014, 05:14:45 PMThe release is pretty much ready to go so I'll wait a couple of days for translations to come in before I upload it.

Is it difficult to upload a new version? Just curious as I know nothing about these things and I'm hella impatient. :P
Title: Re: Say Thanks
Post by: kelvincool on November 16, 2014, 06:43:28 PM
It's not difficult, I only delayed it to sqeeze more features in. One of which is the one you wanted so if anything you should be happy I delayed it  :laugh:
Title: Re: Say Thanks
Post by: Steve on November 16, 2014, 06:45:46 PM
Okay okay ... I'm happy! :D
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 16, 2014, 06:53:46 PM
Quote from: kelvincool on November 16, 2014, 06:05:13 PM
Quote from: JimZA on November 16, 2014, 03:06:05 PM
The ability to turn the thanks system off for certain boards would be most welcome...

That's an interesting feature, what's the reason for limiting the thanking system to certain boards?
To me it would be useful for instance with boards dedicated to regulations and stuff like that where you don't really need to thank the administrator for having posted it ;) that's IMO, of course.
Title: Re: Say Thanks
Post by: kelvincool on November 16, 2014, 07:08:20 PM
That's the opposite for me, I like getting thanked for posting announcements, rules and other regulation stuff  ;D
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 17, 2014, 01:15:08 AM
In my case it is better if I get thanked for posting solutions to something or even informations XD but I get your point :P up to you anyway :)
Title: Re: Say Thanks
Post by: JimZA on November 17, 2014, 06:41:21 AM
Quote from: kelvincool on November 16, 2014, 06:05:13 PM
Quote from: JimZA on November 16, 2014, 03:06:05 PM
The ability to turn the thanks system off for certain boards would be most welcome...

That's an interesting feature, what's the reason for limiting the thanking system to certain boards?

We use our forum as a staff meeting room and it contains information from training information to price changes etc. There are one or two areas where there is one single post usually pointing a new staff member to a link etc., so the minimum we have on these "new user" pages the better - well until they are used to the system.

Many of our staff members are at best only basically PC literate and it's initially an uphill struggle... :)

One thing I love about 'Say Thanks' is that if a member leaves, their thanks go with them... I had an issue with Thank'O'Matic where it would leave the members name in black.



Title: Re: Say Thanks
Post by: kelvincool on November 19, 2014, 05:50:19 PM
Hi Everyone,

New version 1.1 is up now.

@JimZA, sound reasoning. Shall consider the feature for next release. On the thanks leaving with the member, I can't take any credit for that, that wasn't a conscious design decision  ;D
Title: Re: Say Thanks
Post by: Steve on November 19, 2014, 05:52:53 PM
Awesome. Thanks!
Title: Re: Say Thanks
Post by: JimZA on November 20, 2014, 03:38:43 AM
This may sound a silly question but do I need to uninstall 1.02 ?

If so, will previous data be lost ?
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 20, 2014, 04:39:01 AM
@kelvincool
Could you kindly parse the modifications you have made? Because I have a bunch of stuff failing and I wouldn't like to do all the edits in reverse... If you want you can send those in private, it's not a problem :)
Thanks in advance also for the update :)
Title: Re: Say Thanks
Post by: Arantor on November 20, 2014, 09:11:32 AM
Why can't you do it? The mod site will tell you the changes a mod makes, if you edit it that is really your problem, not the mod author's.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 20, 2014, 09:49:08 AM
I mean the edits from 1.0 to 1.1 not the actual edits, there is no compare function and I would like to save about an hour checking each file to see what changes have been made, while the mod author should know it pretty well since he did those changes ;)
Title: Re: Say Thanks
Post by: Arantor on November 20, 2014, 09:50:35 AM
Again, you will have to do this yourself.

You have the edits from 1.0 in your package manager (since it can tell you the edits by clicking on the little paper icon), you have the edits for 1.1 on the mod site, and any changes you've made are your own business that you will have to figure out.
Title: Re: Say Thanks
Post by: kelvincool on November 20, 2014, 01:24:38 PM
Quote from: JimZA on November 20, 2014, 03:38:43 AM
This may sound a silly question but do I need to uninstall 1.02 ?

If so, will previous data be lost ?

SMF will ask you if you want to delete the data when you uninstall so it is safe to uninstall the old one and reinstall the new one without losing data.

@ ♦ Ninja ZX-10RR ♦, not entirely sure what you want, guessing you just want the differences between the install.xml files? Just download WinMerge and compare the two install.xml files to get the differences. Problem solved  :)

@Arantor, I appreciate you looking out for mod authors, we can be a bit too nice sometimes, it's always difficult to say no  ;D
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 20, 2014, 02:14:30 PM
Never actually thought about using Notepad++ that way ;D yeah I noticed the changes. Looks like you rewrote like half of the mod so I will have to do all that painful work again *sigh*, will try tomorrow morning, I'll let you know if I'll see any bugs ;) thanks :)
Title: Re: Say Thanks
Post by: JimZA on November 21, 2014, 02:24:02 AM
Sadly, 1.1 crashed my system with cryptic messages saying that my database was 2.01 and I'm running SMF 2.09.

I removed 1.0 and reinstalled 1.02 and this now gives 'Say Thanks' five times across the top of the post and if you press the button it shows post has been thanked at least five times!

We're now running without any Thanks system but I'll take the board offline on Sunday and will try to correct the errors.

I'm guessing that some of the files have inadvertently been patched multiple times?

Any suggestions on what files to look at?

Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 21, 2014, 02:47:07 AM
That didn't happen on my test forum... Strange. Very strange. When you installed it was it failing somewhere? Did you actually uninstall the previous version before installing the newer one with no errors even at uninstall?
Plus... No link nor accurate quote of the error :/ can't possibly help more :/

@kelvincool I will update the translation again in a while, I have seen some strings were not translated... I just need to manually uninstall and then reinstall *sigh*
Title: Re: Say Thanks
Post by: kelvincool on November 21, 2014, 04:02:47 AM
Quote from: JimZA on November 21, 2014, 02:24:02 AM
Sadly, 1.1 crashed my system with cryptic messages saying that my database was 2.01 and I'm running SMF 2.09.

I removed 1.0 and reinstalled 1.02 and this now gives 'Say Thanks' five times across the top of the post and if you press the button it shows post has been thanked at least five times!

We're now running without any Thanks system but I'll take the board offline on Sunday and will try to correct the errors.

I'm guessing that some of the files have inadvertently been patched multiple times?

Any suggestions on what files to look at?

Very strange. Can you have a look in your error logs, it's under Mainteinance -> Logs

@ ♦ Ninja ZX-10RR ♦, you could get away with just changing the Modifications.italian.php files without reinstalling, just make sure to make the changes in languages.xml so when you come to uninstall it'll do it properly.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 21, 2014, 04:34:35 AM
Ah I know that kelvin, I meant that I will post them for you to update the package with the updated strings ;) I'll begin to work on it right now (manually uninstall and reinstall), had a ton of moderation duties to do on a friend's site.
I'll let you know in my next message and there will be the translation included. The mod has no errors on my test site so... Fingers crossed.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 21, 2014, 05:28:43 AM
Painful. I uninstalled the old version manually and strange enough the newer version was able to install with no failures... ???
Well anyway not quite good I get 3 errors spamming the error log, only the withdraw checkbox has the tick. (Just FYI on how to duplicate it).

QuoteType of error: Undefined
http://vige.altervista.org/forum/index.php?action=stats
8: Undefined index: saythanks_hide_thanks_stats
File: blahblah/Themes/default/Stats.template.php
Line: 332

   
QuoteType of error: Undefined
http://vige.altervista.org/forum/index.php?action=profile;area=summary;u=2
8: Undefined index: saythanks_hide_thanks_count_in_profile
File: blahblah/Themes/default/Profile.template.php
Line: 148


QuoteType of error: Undefined
http://vige.altervista.org/forum/index.php?topic=76.0
8: Undefined index: saythanks_hide_thanks_count_on_post
File: blahblah/Themes/default/Display.template.php
Line: 399

Had to disable the evaluation of templates in order to see the actual error.
SMF 2.0.9, a boatload of other mods installed although they don't seem to interfere with this one seeing the errors.

The updated italian translation is attached :) EDIT: attachments fixed, stupid notepad...
Title: Re: Say Thanks
Post by: kelvincool on November 21, 2014, 12:23:27 PM
I know what's causing that, to fix just tick all the boxes and save, then untick the ones you don't want and save again.

I need to put some initialisation of those settings in the install so they get a default value.

I'll put out a minor release to fix this as well as include the translations.

Still puzzled by JimZA's error, I tried installing 1.0.2, then uninstalling and installing 1.1 and uninstalling and reinstalling 1.0.2. Don't get any errors and certainly not getting thanks 5 times with a click.  :-\
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 21, 2014, 12:49:49 PM
Oh, got it I'll try it later now I'm off to dinner (already called), thanks for the tip :P and thanks for the update when it will come out...
Same here though, can't really reproduce the issue explained by JimZA...
Title: Re: Say Thanks
Post by: kelvincool on November 21, 2014, 01:41:23 PM
@JimZa, is this the error you were getting: http://www.simplemachines.org/community/index.php?topic=529384.msg3757748#msg3757748

This guy's problem was space but yours might not be, depends on what the message at the beginning was.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 21, 2014, 01:47:09 PM
*looks* like your tip worked anyway :) just randomly clicked everything and I'm not getting errors :D
Title: Re: Say Thanks
Post by: kelvincool on November 21, 2014, 08:22:11 PM
New version with the settings fix and complete Italian translations has been released.

In the end I didn't actually initialize the settings, just changed the checks in the code instead as it seems that is the correct "SMF" way to do it. I got really confused when SMF wouldn't let me update any of settings to 0  ???
Title: Re: Say Thanks
Post by: br360 on November 21, 2014, 08:38:51 PM
Nice mod kelvin. Would there be an easy way to maybe separate the "The following users thanked this post:" part from the rest of the post that is being thanked? (like the line that separates someone's signature from their post)

It would be nice to be able to have the thanked list be separate so it doesn't look like it's part of the original post.


Title: Re: Say Thanks
Post by: kelvincool on November 21, 2014, 09:06:03 PM
It's easy enough to do but with another line seperator after the signature, seems like line overload down there so I'm not sure. (see attachment)
Title: Re: Say Thanks
Post by: Steve on November 21, 2014, 09:46:01 PM
Shouldn't there be a link to the mod in the first post?
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 22, 2014, 02:06:04 AM
Quote from: Steve on November 21, 2014, 09:46:01 PM
Shouldn't there be a link to the mod in the first post?
;D He probably removed it to update it and then forgot to put it back: http://custom.simplemachines.org/mods/index.php?mod=3898 ;)

Quote from: br360 on November 21, 2014, 08:38:51 PM
Nice mod kelvin. Would there be an easy way to maybe separate the "The following users thanked this post:" part from the rest of the post that is being thanked? (like the line that separates someone's signature from their post)

It would be nice to be able to have the thanked list be separate so it doesn't look like it's part of the original post.
If you want you can easily add a css separator, hint: at the bottom of index.css ;) (border-top: 1px solid #color) if you want :)
Title: Re: Say Thanks
Post by: larry007 on November 22, 2014, 09:01:19 AM
Quote from: ♦ Ninja ZX-10RR ♦ on November 22, 2014, 02:06:04 AM

Quote from: br360 on November 21, 2014, 08:38:51 PM
Nice mod kelvin. Would there be an easy way to maybe separate the "The following users thanked this post:" part from the rest of the post that is being thanked? (like the line that separates someone's signature from their post)

It would be nice to be able to have the thanked list be separate so it doesn't look like it's part of the original post.
If you want you can easily add a css separator, hint: at the bottom of index.css ;) (border-top: 1px solid #color) if you want :)

I put -> border-top: 1px dotted #444; in the css. I find it pretty.... look picture

/* Styles for Say Thanks mod
------------------------------------------------------- */
.thank_you_button {
background: url("../images/theme/thank.png") no-repeat transparent;
}

.thanks {
padding-top:20px;
}

.thanks span {
font-weight:bold;
        border-top: 1px dotted #444;
}


I have added the german files, perhaps you can use/integrate this in your mod.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 22, 2014, 10:09:39 AM
Thanks larry :) or better... Danke mein freund (know some words in German due to Rammstein songs) ^_^
Title: Re: Say Thanks
Post by: Steve on November 22, 2014, 10:29:02 AM
Quote from: ♦ Ninja ZX-10RR ♦ on November 22, 2014, 02:06:04 AMHe probably removed it to update it and then forgot to put it back ...

Yea, I know. I was just reminding him to put it back. :D


As for the dotted line, I tried it and didn't care for it but a solid line looks nice to me (just my personal preference) but it extends beyond the semicolon which I'd rather it didn't do.

Thanks for the info though. :)
Title: Re: Say Thanks
Post by: br360 on November 23, 2014, 03:00:27 PM
I originally added another line, but agree with Kelvin that it could be separator overkill. ;)

I was playing with it a bit more, and was able to add a box around the "following users that..."

css/index.css

Find-
.thanks span {
    font-weight:bold;


Replace with-
.thanks span {
    font-weight:bold;
    background-color: #e7e7e7;
    margin-bottom: 2px;
    border: 1px solid #ADADAD;
    padding: 4px;
    margin-bottom: 5px;
    margin-top: 5px;


Gives this-

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi62.tinypic.com%2F2ijlsva.png&hash=71443c99bb587d45c76054060a55b7898a21b778)
Title: Re: Say Thanks
Post by: Steve on November 23, 2014, 03:24:42 PM
Now that's nice! Would it be difficult to remove the space after the semi-colon or barring that, adding a space before the first name that shows after the box?
Title: Re: Say Thanks
Post by: br360 on November 23, 2014, 04:12:20 PM
Thanks Steve.

Sure, just add-
margin-right: 5px;
after-
margin-bottom: 2px;

The 5px; is the separator part, so based on your preference, you can change that number around to be able to separate the list of people that thanked the post from the box.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 23, 2014, 05:10:46 PM
@Steve
Give it a go you won't regret it ;)
margin-right: 7px;
border: 1px solid #FF7A00;
border-radius: 5px;
padding-left: 5px;
padding-top: 2px;
padding-bottom: 2px;

Perhaps choose a different color first, that one is for my default theme :P
EDIT: lol ninja'd I had my gf studying and left this page opened for an hour ;D

Btw you could also add an hover effect by adding a new class and.. Oh well it follows!

.thanks span:hover
{
   background: #FFFFFF;
}

And even more effects if you want ;) at least that's what I'm going to add... My default theme is being extremely customized and re-coded in its css so yeah I want hover effects! ;D

Still special thanks to the user Fortytwo who taught me how to handle this stuff a while ago :)
Title: Re: Say Thanks
Post by: kelvincool on November 23, 2014, 06:29:56 PM
Quote from: larry007 on November 22, 2014, 09:01:19 AM
I have added the german files, perhaps you can use/integrate this in your mod.

Many thanks larry007, new release with your translations now.

Thanks Steve for reminding me to put that link back in by the way  :)
Title: Re: Say Thanks
Post by: Steve on November 23, 2014, 06:32:11 PM
You're welcome my friend. :)

@ br360 and the Ninja ...

This is what I have now and it looks wonderful:

.thanks span {
color: #595959;
font-weight:bold;
background-color: #b1b1b1;
margin-right: 7px;
border: 1px solid #FF7A00;
border-radius: 5px;
padding-left: 5px;
padding-top: 2px;
padding-bottom: 2px;
}


(that's for the Gray Style skin btw)

Thanks to both of you!! :D
Title: Re: Say Thanks
Post by: JimZA on November 24, 2014, 04:27:10 AM
A list of file that are modified would be great, then I can go back and fix our forum...

The new version runs with six 'Say Thanks' across the top and if you click on any of these the post gets a list six times over of who thanked the post...

There are also several Admin functions that are now blank white screen like 'Modification Settings' for example. Hopefully, replacing these files will fix the issue??

Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 24, 2014, 04:46:14 AM
Hm.
Perhaps sharing customizations to people looking for advice (the ones above) would have been kind in the first place...
If you parse the modification you will get the edits that have been made, the main thing is that I already tried myself to update the mod that way but believe me it will be WAY faster for you if you note the edits you have made on paper, blindly uninstall the mod and update it - more or less half of the code was re-written in the last update.
Title: Re: Say Thanks
Post by: kelvincool on November 24, 2014, 01:07:22 PM
Quote from: JimZA on November 24, 2014, 04:27:10 AM
A list of file that are modified would be great, then I can go back and fix our forum...

The new version runs with six 'Say Thanks' across the top and if you click on any of these the post gets a list six times over of who thanked the post...

There are also several Admin functions that are now blank white screen like 'Modification Settings' for example. Hopefully, replacing these files will fix the issue??

The six buttons across the top are very odd, sounds like it tried to install six times for whatever reason. The Modification Settings is a strange one too. I tried replicating the issue by messing around with the hooks in the database but can't get any of the symptoms you describe.

The files that have been changed are:

1.0.2

Themes/default/Display.template.php
Sources/ManageMaintenance.php
Sources/Load.php
Themes/default/Profile.template.php
Themes/default/css/index.css

1.1

Themes/default/Display.template.php
Sources/ManageSettings.php
Sources/ManageMaintenance.php
Sources/Load.php
Sources/Profile-View.php
Sources/Stats.php
Themes/default/Profile.template.php
Themes/default/Stats.template.php
Themes/default/css/index.css
Themes/default/languages/Modifications.english.php

Replacing these files should alleviate some of your issues, you might want to uninstall the mod first to get it off the list of installed mods before you go about replacing the files. Did you check what errors you were getting in your error log?
Title: Re: Say Thanks
Post by: JimZA on November 24, 2014, 03:44:06 PM
The good news is replacing:


Themes/default/Display.template.php
Sources/ManageSettings.php
Sources/ManageMaintenance.php
Sources/Load.php
Sources/Profile-View.php
Sources/Stats.php
Themes/default/Profile.template.php
Themes/default/Stats.template.php
Themes/default/css/index.css
Themes/default/languages/Modifications.english.php

Has fixed all of the forum Admin errors and Modification Settings now displays fine!

Still if I reinstall Say Thanks 1.1.1 it still displays multiple 'Say Thanks' across the top of the post and multiple thanked by at the bottom of the post...

The error logs are clean apart from Guest logon errors!!

The theme in use here is "Fresh Looks" I'm not sure that this would be an issue??

We are getting somewhere :)

Title: Re: Say Thanks
Post by: kelvincool on November 24, 2014, 04:11:10 PM
Freshlooks as in this one? http://custom.simplemachines.org/themes/index.php?lemma=2497

If so I doubt it would cause an issue, that theme doesn't override many templates at all.

How many buttons is it showing now? Would you be able to attach the Display.template.php? Would be interested to see if it's actually tried inserting multiple buttons into the file. I can't see why it would though.
Title: Re: Say Thanks
Post by: JimZA on November 25, 2014, 03:12:45 AM
Hi Kelvincool!

Yes, that's the theme in red and it has never caused an issue before...

I've quickly reinstalled 'Say Thanks' V1.1.1 and the attached are the results...

Just as a footnote, the Likes system is just the default Karma system renamed to Like, it's not a mod as such...
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 25, 2014, 04:17:21 AM
Definitely an issue with the theme, at least funny ;D

Like Kelvincool said, please attach your display.template.php or get rid of those by deleting the duplicated strings ;) hint: they should be the first and third edits that have been made to the file, if you parse the mod (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3898;attach=237628;smf_version=2.0.9) you will see where :)
Title: Re: Say Thanks
Post by: JimZA on November 25, 2014, 01:47:55 PM
Yes! Fixed thanks for the pointers!!

Seems I had two display.template.php files for some odd reason...

Once I changed the correct one, everything was fixed!! :)

Title: Re: Say Thanks
Post by: Ninja ZX-10RR on November 25, 2014, 02:01:24 PM
Glad that you sorted it out then :)
Title: Re: Say Thanks
Post by: kelvincool on November 26, 2014, 06:27:20 PM
Glad you fixed it JimZA!

In other news, I've reuploaded 1.1.2 with revised German translations by larry007.
Title: Re: Say Thanks
Post by: keyboard on November 30, 2014, 09:12:07 AM
Awesome Mod !!!!!!   I have installed an earlier version and have been successfully  been using it with great success.....  I have a very generous database of activity.... The Users really like this and so do I.

I would like to install the newest version. The fact that there will be a list of top 10 List is very attractive to all of us.  My concern is , will I lose all the prior thanks if I install the latest version ?

I should add that I am using the default theme with minimal Mods.

Thanks
Ron
Title: Re: Say Thanks
Post by: Steve on November 30, 2014, 09:27:40 AM
Quote from: keyboard on November 30, 2014, 09:12:07 AMMy concern is , will I lose all the prior thanks if I install the latest version ?
Quote from: kelvincool on November 20, 2014, 01:24:38 PM
Quote from: JimZA on November 20, 2014, 03:38:43 AMThis may sound a silly question but do I need to uninstall 1.02 ?

If so, will previous data be lost ?

SMF will ask you if you want to delete the data when you uninstall so it is safe to uninstall the old one and reinstall the new one without losing data.
Title: Re: Say Thanks
Post by: keyboard on November 30, 2014, 10:03:07 AM
Ok..  I will give it a shot     I truly do not want to lose previous data.....
Title: Re: Say Thanks
Post by: kelvincool on November 30, 2014, 10:07:38 AM
Quote from: keyboard on November 30, 2014, 10:03:07 AM
Ok..  I will give it a shot     I truly do not want to lose previous data.....

If you're concerned with data loss, back up your database before you do anything. It's good practise to be doing regular backups anyway.
Title: Re: Say Thanks
Post by: keyboard on November 30, 2014, 11:08:14 AM
That is sound advice.....I have been putting this off for a long time and flirting with disaster .....Can you point me in the right direction to do this.
Title: Re: Say Thanks
Post by: kelvincool on November 30, 2014, 11:15:17 AM
http://wiki.simplemachines.org/smf/Backup

If you're a bit more techie you can set up a cron job to backup your database and email it to you on a daily basis. It's not difficult to set up but you do need access to your server.
Title: Re: Say Thanks
Post by: keyboard on November 30, 2014, 11:18:28 AM
Thanks... That is Golden advice and I shall heed it !!!!!
Title: Re: Say Thanks
Post by: keyboard on November 30, 2014, 01:52:17 PM
Sorry to bug you again.... I have made a backup........and went to uninstall the mod  ..... Please look at the attachment and tell me if I am ok to proceed with the uninstall..
Title: Re: Say Thanks
Post by: kelvincool on November 30, 2014, 02:16:15 PM
I'm guessing you must have installed another mod after this one that happened to change the same line in Display.template.php

If you click on the icon next to replace that failed that will tell you which line it's trying to replace. If you want to uninstall you will need to either do the failed step manually or uninstall the other mod first and uninstall this one then install them again.
Title: Re: Say Thanks
Post by: keyboard on November 30, 2014, 02:24:45 PM
Please check your PM
Title: Re: Say Thanks
Post by: Rioux on December 01, 2014, 03:46:49 PM
Hey Kelvincool,

Presently, I work on french translation for your Say Thanks !!  ;D
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on December 01, 2014, 03:51:16 PM
Quote from: Rioux on December 01, 2014, 03:46:49 PM
Hey Kelvincool,

Presently, I work on french translation for your Say Thanks !!  ;D
Waiting for it myself :) Merci mon ami :D (mon français de l'école :P)
Title: Re: Say Thanks
Post by: kelvincool on December 02, 2014, 01:10:20 PM
Quote from: Rioux on December 01, 2014, 03:46:49 PM
Hey Kelvincool,

Presently, I work on french translation for your Say Thanks !!  ;D

Awesome, look forward to including it in the release  :)
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on December 02, 2014, 02:04:58 PM
I was wondering how much messy it could be to create a French translation with all those accents in utf8...
Title: Re: Say Thanks
Post by: Arantor on December 02, 2014, 02:45:27 PM
Easier than doing it in 7-bit safe with entities. If you want it in UTF-8, just copy it from here once saved.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on December 02, 2014, 03:49:00 PM
You don't say? :P of course I'll do that :) I might provide some Hungarian translations as well if a friend of mine will help me (and he is very much likely going to do that since he is a wiki translator already - wikipedia, not smf wiki).
Title: Re: Say Thanks
Post by: Arantor on December 02, 2014, 07:21:37 PM
Yup, because this forum is UTF-8, anything posted should also be converted by the browser into UTF-8 as it gets saved in a post.

Notable exceptions are the 4-byte emoji used by iPhones and whatnot which MySQL doesn't support properly.
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on December 02, 2014, 08:04:13 PM
I knew those exceptions, you mentioned when you were talking about the EXIF implementation (yeah, I somehow "understand" something :))

Btw I was wondering about it since French has a *lot* of accents, as well as German... Those are messy IMHO. Italian is rather simple, English even more tbh, not many accents just need to escape the " ' " and that's basically it.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on December 26, 2014, 09:08:15 AM
I'm getting test failed on this:

(Find)
LEFT JOIN {db_prefix}membergroups AS pg ON (pg.id_group = mem.id_post_group)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)';
}
elseif ($set == 'minimal')


(Add Before)LEFT JOIN {db_prefix}messages_thanks_stats AS mts ON (mts.id_member = mem.id_member)

I attempted to go ahead with it but it caused problems with the 'profile' page (possibly as I'm using ultimate profile?)
Title: Re: Say Thanks
Post by: kelvincool on December 26, 2014, 10:47:42 AM
Not surprised it caused problems on the profile page, probably would do the same even if you weren't using ultimate profile. You need to manually do that step to resolve the issue or uninstall the conflicting mod first, install this one and re-install the conflicting one.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on December 26, 2014, 11:33:45 AM
the problem is I don't have the line:

LEFT JOIN {db_prefix}membergroups AS pg ON (pg.id_group = mem.id_post_group)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)';
}
elseif ($set == 'minimal')


to be able to add anything before it :(

I'm using a lot of different MOD's so finding the problem could take a while :(
Title: Re: Say Thanks
Post by: kelvincool on December 26, 2014, 11:40:05 AM
Oh boy that's going to make things 10x harder. So one of your mods has rewritten that whole query, can you see anything that looks vaguely similar in that file?
Title: Re: Say Thanks
Post by: 420Connect.co.uk on December 26, 2014, 11:47:41 AM
eek :(

I'm having a look and copying parts of the code I am missing to try and find the new version I have but can't seem to find it :(

attached is my Load.php

It's maybe easier to spot if you know what you're looking at :P
Title: Re: Say Thanks
Post by: kelvincool on December 26, 2014, 12:05:43 PM
I've attached a version with the changes made, you can see what changes have been made by doing a diff (winmerge or notepad++, etc..) with your current version. You can try using my edited version but if you want to uninstall you best keep your original one so you can go back easily. I deliberately named it Load2 so you don't replace it by accident.

Looks like the conflicting mod is something to do with membership groups.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on December 26, 2014, 12:19:11 PM
Thanks for having a go Kelvin,

unfortunately that version still caused:

Database Error
Unknown column 'mts.thanks_count' in 'field list'
File: /home/name/public_html/forum/Sources/Load.php
Line: 1009

when I visit 'profile' it also screws up my simple portal blocks? :S
Title: Re: Say Thanks
Post by: kelvincool on December 26, 2014, 12:31:20 PM
Oops missed a left join. Try this one.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on December 26, 2014, 12:34:29 PM
Yaaaaaaaaaay!  :D

(https://images.duckduckgo.com/iu/?u=http%3A%2F%2Fimages3.wikia.nocookie.net%2F__cb20130526160442%2Faustinally%2Fimages%2Ff%2Ffa%2FKiss_emoticon.png&f=1)

it seems to be working! :D

The only other part is adding it into ultimate profile but I should be able to manage that as I've transferred other custom parts from mods..

Thank you again kelvin! :)
Merry Christmas!
Title: Re: Say Thanks
Post by: larry007 on January 03, 2015, 06:14:09 AM
Hi

when you have a topic closed, an you see this topic as a normal member,  there is no thank.png on top, only the two words "Say thanks"

Have a look please  ;)
Title: Re: Say Thanks
Post by: kelvincool on January 03, 2015, 08:23:58 AM
Quote from: larry007 on January 03, 2015, 06:14:09 AM
when you have a topic closed, an you see this topic as a normal member,  there is no thank.png on top, only the two words "Say thanks"

Was hoping no one would notice so I could sneak fix this in the next release.  :laugh:

I only noticed it myself yesterday.
Title: Re: Say Thanks
Post by: larry007 on January 03, 2015, 10:41:14 AM
ok...

see your fix ;D
Title: Re: Say Thanks
Post by: larry007 on January 04, 2015, 10:38:50 AM
Quote from: kelvincool on January 03, 2015, 08:23:58 AM

Was hoping no one would notice so I could sneak fix this in the next release.  :laugh:

I only noticed it myself yesterday.

Hi

I see you have made a update but it isn't fixed.

1. normal member can see only the words in closed topics
2. next what I see - when board permission is on "only read" - it is the same how in point 1- whether topic closed or not.
Title: Re: Say Thanks
Post by: kelvincool on January 04, 2015, 10:45:00 AM
Sorry didn't make an update yet, I was only removing the old versions of the mod from the downloads.
Title: Re: Say Thanks
Post by: tranhiep_116 on January 04, 2015, 11:19:56 AM
thanks for this mod  :-*
Title: Re: Say Thanks
Post by: kelvincool on January 11, 2015, 05:48:27 PM
New version released.

1.2
Title: Re: Say Thanks
Post by: motosimak on January 12, 2015, 05:08:00 AM
is a mod that comes by default in 2.1?
Title: Re: Say Thanks
Post by: tranhiep_116 on January 12, 2015, 05:15:39 AM
Thanks, I help me more
Title: Re: Say Thanks
Post by: kelvincool on January 12, 2015, 01:58:39 PM
Quote from: motosimak on January 12, 2015, 05:08:00 AM
is a mod that comes by default in 2.1?

I think the one you are thinking of in 2.1 is the "like posts" feature, that is part of 2.1. This thanks mod is a little different although quite similar.
Title: Re: Say Thanks
Post by: larry007 on January 18, 2015, 03:50:11 AM
Hi

where can I find this in the backend of SMF - because I must see this to understand for german translate?!


$txt['saythanks_title'] = 'Hide by thanked count';
$txt['saythanks_hide_text'] = 'You require at least {thanks_needed} thanks, you need another {thanks_left} thanks.';
$txt['saythanks_desc'] = 'Hides post content based on thanked count.';
$txt['saythanks_input_title'] = 'Minimum thanked count';


.. one more question, - > When a Topic is closed, normal user can't say thank in this topic. You want that so or is there a setting somewhere?

Thank you
Title: Re: Say Thanks
Post by: kelvincool on January 18, 2015, 09:21:19 AM
Those bits only apply when you are also using my Hide Content (http://custom.simplemachines.org/mods/index.php?mod=4013) mod. That's where they show up.

Topics closed cannot be thanked, if people want that option I don't mind adding it in.
Title: Re: Say Thanks
Post by: larry007 on January 18, 2015, 11:00:25 AM
Quote from: kelvincool on January 18, 2015, 09:21:19 AM

Topics closed cannot be thanked, if people want that option I don't mind adding it in.

I would want it please....
Title: Re: Say Thanks
Post by: hugbear on January 29, 2015, 05:56:54 PM
Thank you for this mod!

I've been looking for ages for a Thank-O-Matic replacement and here it is.
One "little" feature request, if I may: would it be possible to have an option tp let visitors "Say Thanks"? There might be lots of people just browsing for some information and there's no reason the poster that provided it shouldn't get the passing-by appreciation. (There's one caveat though, some lame members might log out just to thank themselves so IP filtering might be appropriate...)
Title: Re: Say Thanks
Post by: kelvincool on January 31, 2015, 05:23:33 PM
Quote from: hugbear on January 29, 2015, 05:56:54 PM
Thank you for this mod!

I've been looking for ages for a Thank-O-Matic replacement and here it is.
One "little" feature request, if I may: would it be possible to have an option tp let visitors "Say Thanks"? There might be lots of people just browsing for some information and there's no reason the poster that provided it shouldn't get the passing-by appreciation. (There's one caveat though, some lame members might log out just to thank themselves so IP filtering might be appropriate...)

Enabling this for guests is no small job. IP filtering would be mandatory otherwise there's no way to tell if the guest has thanked the post already. I don't know, it would be difficult and mean restructuring the data to be based on IP and/or user id. It all falls apart quite quickly if your users all have dynamic IPs.
Title: Re: Say Thanks
Post by: motosimak on February 03, 2015, 05:13:36 AM
Hi!
Please add a theme reseller - http://www.simplemachines.org/community/index.php?topic=525855.0
Title: Re: Say Thanks
Post by: 420Connect.co.uk on February 04, 2015, 07:24:42 AM
If it's not too big a job a suggestion for this I'd like is when "Saying Thanks" if this could be done through ajax/somesortof-query - so it's "live" and doesn't refresh the page?
Title: Re: Say Thanks
Post by: kelvincool on February 04, 2015, 04:24:59 PM
Quote from: motosimak on February 03, 2015, 05:13:36 AM
Hi!
Please add a theme reseller - http://www.simplemachines.org/community/index.php?topic=525855.0

What do you want exactly, the mod works fine with this theme...

Quote from: 420connect.info on February 04, 2015, 07:24:42 AM
If it's not too big a job a suggestion for this I'd like is when "Saying Thanks" if this could be done through ajax/somesortof-query - so it's "live" and doesn't refresh the page?

I'm surprised no one asked for this sooner, I've been thinking about adding it in but I've been busy and was half considering leaving it until 2.1 since that has jquery. Will probably be in the next release along with that thing larry asked for.
Title: Re: Say Thanks
Post by: br360 on February 04, 2015, 04:35:14 PM
@kelvincool: Since this is a "thanks" mod, figured it was appropriate to thank you for not only the mod, but for how much you support your mods as well. It's very much appreciated.
Title: Re: Say Thanks
Post by: Dragon41673 on February 05, 2015, 09:01:37 PM
Hello,

I was trying to install this mod in to my forums, but there seems to be 2 issues with modifications to the stats.template.php files on the following themes...

Core - included with SMF 2.0.9
Back n Black - from Crip

Both tests come back as failed. I checked the parse against the code of those theme files in question, and the specific string you have listed for the parse are not completely there. The very tail end of it is...$txt['forum_history'], '...but the rest seems to be missing.

Is there any way to get this "Say Thanks" mod to work with those specific themes? I'm more than willing to send the current Stats.template.php file to them so they can take a look.

Thank you
Title: Re: Say Thanks
Post by: kelvincool on February 06, 2015, 05:14:02 PM
Quote from: br360 on February 04, 2015, 04:35:14 PM
@kelvincool: Since this is a "thanks" mod, figured it was appropriate to thank you for not only the mod, but for how much you support your mods as well. It's very much appreciated.

Many thanks br360, glad you're getting good use out of the mod.

Quote from: Dragon41673 on February 05, 2015, 09:01:37 PM
I was trying to install this mod in to my forums, but there seems to be 2 issues with modifications to the stats.template.php files on the following themes...

Core - included with SMF 2.0.9
Back n Black - from Crip

Is there any way to get this "Say Thanks" mod to work with those specific themes? I'm more than willing to send the current Stats.template.php file to them so they can take a look.

As per the description of the mod, the stats page does not support the core theme, Back n Black being a theme based on the core inherits the same issue. You can still install the mod without the stats page working if you want. I can add support for the core theme, the reason I didn't bother to begin with was because I didn't think many people used core anymore, default is a much better theme.
Title: Re: Say Thanks
Post by: Dragon41673 on February 06, 2015, 05:25:15 PM
I apologize, I must have passed over the comment that the CORE theme was not supported. I'll go back and re-read the whole first post again in case there is anything else I missed.

I didn't know that the Back n Black theme by crip was based off of the CIRE theme. With that said...99% of my users do use the Back n Black theme. I hate to ask...but would it be too much trouble to support these themes?

Thank you!
Title: Re: Say Thanks
Post by: Steve on February 07, 2015, 09:52:14 AM
I also have members using the core theme for some ungodly reason so it would be nice. :)
Title: Re: Say Thanks
Post by: kelvincool on February 14, 2015, 09:40:20 AM
New version released

1.2.1

@Dragon41673, please see instructions to enable for your custom theme, it's not perfect but it's the best solution I can come up with without specifically targeting every core-based theme in existence.
Title: Re: Say Thanks
Post by: Dragon41673 on February 14, 2015, 09:50:29 AM
Awesome...it worked! Thank you very much Kelvin!
Title: Re: Say Thanks
Post by: desiamerican26 on February 14, 2015, 10:30:39 AM
Hi Kelvin,

This is an amazing Mod and I have been looking for something like this too. I installed the Mod and didn't receive any errors either. But when I check the front end I don't see any icons in the post. Is there anything that I have to do specifically. I am running v2.0.9

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: kelvincool on February 14, 2015, 10:50:58 AM
Quote from: desiamerican26 on February 14, 2015, 10:30:39 AM
This is an amazing Mod and I have been looking for something like this too. I installed the Mod and didn't receive any errors either. But when I check the front end I don't see any icons in the post. Is there anything that I have to do specifically. I am running v2.0.9

What theme are you using?

This may be obvious, but you aren't looking at one of your own posts right?
Title: Re: Say Thanks
Post by: desiamerican26 on February 14, 2015, 10:52:07 AM
I am using Golove Gradient Theme.

Nope, I logged in with a different id and not admin? :-\
Title: Re: Say Thanks
Post by: kelvincool on February 14, 2015, 10:59:02 AM
Have you got a link to this theme? Can't find a download anywhere.
Title: Re: Say Thanks
Post by: desiamerican26 on February 14, 2015, 10:44:56 PM
This is where I got it from but now it shows an error when I clik on the mod link. Should I change the theme to something different ?

Please see the link below for the theme:

http://www.simplemachines.org/community/index.php?topic=529401.0
Title: Re: Say Thanks
Post by: kelvincool on February 15, 2015, 12:39:15 PM
That was the first link I came across, basically it means the author removed it from the site for some reason.

You can try changing the theme to something else and re-install the mod, that will at least tell us if it was a theme issue. Does it work on default theme right now?
Title: Re: Say Thanks
Post by: desiamerican26 on February 15, 2015, 01:48:58 PM
I didn't try it on the Default theme yet. I will soon try it on default and or also be trying on new theme.....Will update you soon.
Title: Re: Say Thanks
Post by: desiamerican26 on February 16, 2015, 09:17:21 PM
Hi Kelvin,

This one is working fine. The only issue I am getting is when I click on thanks, it get stuck on THANKING..... then one have to refresh the page to complete the action. I am not sure if that's how it should be. But that's a minor issue. Nothing to worry much.

Just a question, if its possible that Guests can view SAY THANKS too?

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 04:55:24 AM
Are you using IE8? Can you look at the error log?

Someone else asked about the guest thing too, my gut feeling is that it will be quite difficult to implement.
Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 05:22:05 AM
Hi

I have the same problem like "desiamerican26". I click on THANKING and it shows nothing - only when I refresh the Firefox browser I see under the post the entry

mhh   bug?

Can you take a look to this issue?
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 05:34:34 AM
@larry007, can you take a look at network log in firebug, right click and click Inspect Element, then click the Network tab, refresh the page and click the Say Thanks button, you should see a request at the bottom, click on it and then the response tab. Alternatively PM your site so I can try it out myself.

To be clear the ajax bit only updates the button it does not update the thankers list at the bottom of the post.
Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 05:39:08 AM
oh

I have tryed this first on my localhost. Can I do this also on localhost with firebug?
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 05:47:10 AM
Yes you can do it on localhost.
Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 05:51:47 AM
yes I did it... and now - but what do you need for an answer?

I think this is a little bit to hi for me

can help a screenshot?
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 05:53:52 AM
Paste what you see in the response. If you're seeing the thanking stuck then the response must be an error. Also can you check the error log in the admin section?
Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 06:18:27 AM
which one is the the response tab?

ok step by step
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 06:25:22 AM
Ok so you're in firebug already

Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 06:49:19 AM
{"result":"button","response":"<a href=\"http:\/\/localhost\/bwf1\/index.php?action=withdrawthank;msg=4637;topic=1747;member=164\" class=\"withdraw_thank_you_button_link\">Danke entziehen<\/a>"}


GET gen204?a=58&width=640&height=480

302 Moved Temporarily

google.com

276 B

173.194.112.49:443


60ms
GET activeview?id=osdim&avi=...26%23new&is=468,60&uc=2

200 OK

pagead2.googlesyndication.com

42 B

173.194.113.141:80


59ms
GET ViewportInfoService.GetV...c_._h4r12c&token=101954

200 OK

maps.googleapis.com

6,9 KB

173.194.65.95:443


76ms
GET ServiceLogin?service=map...th%3D640%26height%3D480

200 OK

accounts.google.com

20,6 KB

173.194.65.84:443


76ms
GET AuthenticationService.Au...dc_._k92rzg&token=33880

200 OK

maps.googleapis.com

57 B

173.194.65.95:443


44ms
GET ViewportInfoService.GetV...dc_._480uvf&token=85033

200 OK

maps.googleapis.com

3,7 KB

173.194.65.95:443


51ms
GET ua.categorize

200 Request has been forbidden by antivirus

google.com

0 B

173.194.112.49:443


1ms
GET gen_204?target=api&ev=ap...pro,src:apiv3,ts:987qli

204 No Content

maps.googleapis.com

0 B

173.194.65.95:443


43ms
GET csi?v=2&s=mapsapi3&actio...&vr=1&e=google-maps-pro

204 No Content

csi.gstatic.com

0 B

216.58.211.227:443


87ms
GET gen_204?target=api&ev=ap...pro,src:apiv3,ts:987qrg

204 No Content

maps.googleapis.com

0 B

173.194.65.95:443


43ms
GET from

200 Request has been forbidden by antivirus

google.com

0 B

173.194.112.49:443


1ms
GET from

200 Request has been forbidden by antivirus

google.com

0 B

173.194.112.49:443


1ms
GET from

200 Request has been forbidden by antivirus

google.com

0 B

173.194.112.49:443


GET index.php?action=thank;m...=1747;member=164;ajax=1

200 OK

localhost

194 B

[::1]:80


62ms
ParameterHeaderAntwortHTMLJSONCacheCookies
Quelltext anzeigen
Cache-Control private
Connection Keep-Alive
Content-Length 194
Content-Type text/html; charset=UTF-8
Date Tue, 17 Feb 2015 11:47:24 GMT
Expires Mon, 26 Jul 1997 05:00:00 GMT
Keep-Alive timeout=5, max=100
Last-Modified Tue, 17 Feb 2015 11:47:24 GMT
Pragma no-cache
Server Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11
X-Content-Type-Options nosniff
X-Powered-By PHP/5.5.11
X-XSS-Protection 1
x-frame-options SAMEORIGIN
Quelltext anzeigen
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language de,es;q=0.5
Connection keep-alive
Cookie PHPSESSID=opff8m3iq11ejn1vmock9jsqk6; MySQLDumper=v6rrb1fln6k5b5oob227t81js6; SMFCookie439=a%3A4%3A%7Bi%3A0%3Bs%3A2%3A%2262%22%3Bi%3A1%3Bs%3A40%3A%226203233de3eee1af32abc137acb2fa806c18a752%22%3Bi%3A2%3Bi%3A1613383786%3Bi%3A3%3Bi%3A0%3B%7D
Host localhost
If-Modified-Since Tue, 17 Feb 2015 11:46:07 GMT
Referer http://localhost/bwf1/index.php?topic=1747.msg4726
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0


I hope it is ok?
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 07:02:26 AM
That response looks fine to me. So that's not the problem, I'm sure it's to do with the javascript but you are using the same version of firefox as me so not really sure why it's different. Can you try the new version I just uploaded, I needed to get this out anyway to fix ie8 support.

1.2.2
Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 07:08:44 AM
yes I have tryed but it is the same, only when I refresh the browser I can see it in the post
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 07:12:03 AM
Quote from: larry007 on February 17, 2015, 07:08:44 AM
yes I have tryed but it is the same, only when I refresh the browser I can see it in the post

Is it still stuck on Thanking...?
Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 07:23:40 AM
Yes, I click on icon "SAY THANKS" now it change to "unthanks" icon but no entry in post... only when refresh browser
Title: Re: Say Thanks
Post by: kelvincool on February 17, 2015, 07:27:19 AM
Like I said in the previous post, the ajax does not update the thankers list. Good to know the button is changing to the unthanks now though. I will consider adding the thankers list to the ajax for the next release.
Title: Re: Say Thanks
Post by: larry007 on February 17, 2015, 07:57:38 AM
Ok... I wait for the new release..

It looks better when the list also refresh when I klick Thanks   ;)

How before....
Title: Re: Say Thanks
Post by: desiamerican26 on February 17, 2015, 07:10:10 PM
Quote from: larry007 on February 17, 2015, 05:22:05 AM
Hi

I have the same problem like "desiamerican26". I click on THANKING and it shows nothing - only when I refresh the Firefox browser I see under the post the entry

mhh   bug?

Can you take a look to this issue?

I guess then we can leave out the guest part....won't be an issue with that. I use chrome mostly. I will chek with the new updated version and will update you.
Title: Re: Say Thanks
Post by: desiamerican26 on February 17, 2015, 09:27:09 PM
Hi Kelvin,

I even updated the new version for this Mod. And we are encountering the same issue as before. Please check.

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: kelvincool on February 18, 2015, 07:14:41 PM
That's interesting, I know what the issue is, it's a conflict with your google analytics mod, I can resolve this conflict quite easily so wait for a new version.
Title: Re: Say Thanks
Post by: desiamerican26 on February 18, 2015, 09:02:08 PM
Hi Kelvin,

Ok Sure, I will wait for an update.

Also, I am not sure but I was just wondering if it's possible that like when we provide links for anything, is it possible for viewers to say "Thanks" to unlock the link.

Please see the below website for an example:

http://bolt.cd/board/f234/new-comics-releases-8-a-1023714/index8.html

After you Login and Register, you still have to click on Thanks button to unlock the link.

Please look into if anything like this is possible to do.

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: kelvincool on February 19, 2015, 04:14:58 AM
Of course it's possible, I've seen that sort of stuff in many forums, it's never made sense to me though, how can you thank something you haven't seen yet? You're thanking in advance, come to think of it I sometimes do that when I ask someone for help so maybe it does make sense.
Title: Re: Say Thanks
Post by: desiamerican26 on February 19, 2015, 07:08:47 AM
Please, if you can implement on that one. The only way to make it work that we provide cover pages or information of the product that we provides. You see if we don't provide the exact thing as shown then people won't bother next time. But too keep up the crowd we have to provide exactly the same. And we are not asking to pay us or anything just a little appreciation so that that encourages us to work more on what we doing. Usually people download without saying thanks....so that's why I was wondering. 

If you can make this work, please let me know....it would be a huge help.  :)

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: Steve on February 19, 2015, 08:32:04 AM
It's saying thanks for providing the content, not the actual content itself, yes?
Title: Re: Say Thanks
Post by: desiamerican26 on February 20, 2015, 08:47:40 PM
Quote from: Steve on February 19, 2015, 08:32:04 AM
It's saying thanks for providing the content, not the actual content itself, yes?

I didn't get your point Steve. I mean some people who I have try hard and their best to provide contents on site. And mostly users download and walk away without appreciating the effort. So, I been looking for something like this, if this can happen, it would be big help.
Title: Re: Say Thanks
Post by: Steve on February 21, 2015, 08:26:21 AM
I was just trying to clarify what you were asking for. Instead of (or in addition to) saying thanks for what is in the link, you want them to say thinks for providing the link in the first place in order for them to open it, right?
Title: Re: Say Thanks
Post by: desiamerican26 on February 22, 2015, 10:13:40 AM
Hi Steve,

Yup something like that. I do see download #'s going up but I don't see any appreciation for them. So, if they click thanks at least, that even counts for us.
Title: Re: Say Thanks
Post by: desiamerican26 on February 22, 2015, 04:35:40 PM
@Kelvin,

Would there be any update on this part?

Please Let me know.

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: kelvincool on February 22, 2015, 06:16:30 PM
No there is no update yet. There's a release in the works and it will be done when it's done.
Title: Re: Say Thanks
Post by: desiamerican26 on February 23, 2015, 08:08:40 PM
Ok Kool. Will Wait for the Release.

Thanks for the Update.  :)
Title: Re: Say Thanks
Post by: Petter B on February 24, 2015, 04:36:15 AM
This is a very nice mod. Good work!

Unfortunately, for me the button get stuck on "Thanking..."

IU
Quote from: kelvincool on February 17, 2015, 07:27:19 AM
Like I said in the previous post, the ajax does not update the thankers list. Good to know the button is changing to the unthanks now though. I will consider adding the thankers list to the ajax for the next release.

This would be great!
Title: Re: Say Thanks
Post by: Steve on February 24, 2015, 09:10:10 AM
Quote from: Petter B on February 24, 2015, 04:36:15 AMUnfortunately, for me the button get stuck on "Thanking..."

Start reading from here:

http://www.simplemachines.org/community/index.php?topic=527032.msg3793151#msg3793151
Title: Re: Say Thanks
Post by: kelvincool on February 24, 2015, 05:22:30 PM
Quote from: Petter B on February 24, 2015, 04:36:15 AM
Unfortunately, for me the button get stuck on "Thanking..."

Are you using a Google Analytics mod by SMF Customization Team by any chance?
Title: Re: Say Thanks
Post by: 420Connect.co.uk on February 25, 2015, 03:51:42 AM
I guess I'd need to ask yourself & the other mod others but, would you consider writing the code to have this mod work with a few other mods who provide their own section for leaving comments etc.

Ones I use, I'd like to combine:

SMF Packs Social Groups
Levertine Gallery
SMF Classifieds

possibly ultimate profile?

Title: Re: Say Thanks
Post by: kelvincool on February 25, 2015, 05:01:45 PM
Quote from: 420connect.info on February 25, 2015, 03:51:42 AM
I guess I'd need to ask yourself & the other mod others but, would you consider writing the code to have this mod work with a few other mods who provide their own section for leaving comments etc.

Ones I use, I'd like to combine:

SMF Packs Social Groups
Levertine Gallery
SMF Classifieds

possibly ultimate profile?

Unfortunately I'm going to have to say that's simply never going to happen.
Title: Re: Say Thanks
Post by: Petter B on February 26, 2015, 01:46:39 AM
Quote from: kelvincool on February 24, 2015, 05:22:30 PM
Quote from: Petter B on February 24, 2015, 04:36:15 AM
Unfortunately, for me the button get stuck on "Thanking..."

Are you using a Google Analytics mod by SMF Customization Team by any chance?
Yes I am. Do I have to remove it?
Title: Re: Say Thanks
Post by: kelvincool on February 26, 2015, 04:12:51 AM
Quote from: Petter B on February 26, 2015, 01:46:39 AM
Yes I am. Do I have to remove it?

No, the conflict will be resolved in the next release.
Title: Re: Say Thanks
Post by: jsx on March 03, 2015, 09:25:06 AM
@Kelvin

Immediately after installed modification Say Thanks 1.2.2, under quick reply appears such a bug:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi58.tinypic.com%2F14wanie.png&hash=e645f355922ce6ddacb91af56a25fd09294fdc77)

After refreshing the forum, this bug is disappearing. I just noticed it and I'm reporting it here, watch it.

@desiamerican26

QuoteAlso, I am not sure but I was just wondering if it's possible that like when we provide links for anything, is it possible for viewers to say "Thanks" to unlock the link.

Please see the below website for an example:

http://bolt.cd/board/f234/new-comics-releases-8-a-1023714/index8.html

After you Login and Register, you still have to click on Thanks button to unlock the link.

Please look into if anything like this is possible to do.

I'm approve your suggestion. By yourself a long time ago I'm searched such a modification, thanks to which after pressing thanks button hiden content will be unlocked, not only a link, but a content in text, link, image.

@Kelvin

I think that it will be good if you entered such a possibility into your modification, it's nothig wrong to try with this. This function would be useful.
Title: Re: Say Thanks
Post by: kelvincool on March 03, 2015, 01:14:30 PM
Quote from: jsgrom on March 03, 2015, 09:25:06 AM
@Kelvin

Immediately after installed modification Say Thanks 1.2.2, under quick reply appears such a bug:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi58.tinypic.com%2F14wanie.png&hash=e645f355922ce6ddacb91af56a25fd09294fdc77)

After refreshing the forum, this bug is disappearing. I just noticed it and I'm reporting it here, watch it.

The reason why you see that is because the css hasn't been refreshed from the browser cache yet so once you refreshed the latest css file was downloaded. I'll address this in the new release by abstracting the css into a standalone file instead of changing index.css.

Quote from: jsgrom on March 03, 2015, 09:25:06 AM
I think that it will be good if you entered such a possibility into your modification, it's nothig wrong to try with this. This function would be useful.

This is being looked into.
Title: Re: Say Thanks
Post by: desiamerican26 on March 03, 2015, 10:18:11 PM
Hi Kelvin,

Please see attached for the error that just bought to my attention by one user.
I am not sure if that's the issue that you probably already knew.

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: kelvincool on March 04, 2015, 04:09:35 AM
Quote from: desiamerican26 on March 03, 2015, 10:18:11 PM
Hi Kelvin,

Please see attached for the error that just bought to my attention by one user.
I am not sure if that's the issue that you probably already knew.

Thank You
Regards,
Nikhil

You've got a slightly different issue, the theme you are using uses a variant name for index.css so it's called index_blue.css. The mod has not applied the styles to this file so you are missing them. This should also be resolved in the next release since I'm moving the css into it's own file. For the moment you can copy the Say Thanks styles from index.css into index_blue.css and that should fix it until the next release.
Title: Re: Say Thanks
Post by: desiamerican26 on March 04, 2015, 07:27:59 AM
Ok Kool. Will Wait for the next release as it will be coming with lots of new features :)
Title: Re: Say Thanks
Post by: jsx on March 04, 2015, 09:45:11 AM
Quote from: kelvincool on March 03, 2015, 01:14:30 PM

The reason why you see that is because the css hasn't been refreshed from the browser cache yet so once you refreshed the latest css file was downloaded. I'll address this in the new release by abstracting the css into a standalone file instead of changing index.css.

This is being looked into.

Cool. All right. :)
Title: Re: Say Thanks
Post by: kelvincool on March 07, 2015, 06:45:06 PM
New release

1.3

Core-based users, remember to go through the instructions.
Title: Re: Say Thanks
Post by: Dragon41673 on March 07, 2015, 07:18:01 PM
Kevin...

If I have 1.2.1 installed, and am using a couple core themes & already have done the proper install steps for those themes...

Will installing 1.3 need anything else to install aside from uploading it in to the package manager?

Thank you!
Title: Re: Say Thanks
Post by: kelvincool on March 07, 2015, 08:08:38 PM
You will need to re-do those themes again, essentially you need to undo the css changes from last time and update the SayThanks.template.php with the new version and upload the new saythanks.css file into the css folder. No need to do the Stats.template.php file, have not made any changes to that file.
Title: Re: Say Thanks
Post by: Dragon41673 on March 07, 2015, 09:34:06 PM
Quote from: kelvincool on March 07, 2015, 08:08:38 PM
You will need to re-do those themes again, essentially you need to undo the css changes from last time and update the SayThanks.template.php with the new version and upload the new saythanks.css file into the css folder. No need to do the Stats.template.php file, have not made any changes to that file.

Oh boy...I hope I have the old files still! LOL
Title: Re: Say Thanks
Post by: desiamerican26 on March 07, 2015, 11:09:36 PM
Hi Kelvin,

This is amazing work. It's working faster when Clicked Thanks. Much better.

But the other thing I was wondering that the links are not hidden for viewers to say thanks to unlock.

I also checked on the Permission page but don't see anything.

I was thinking that it should mask over all the links once I install the Mod. Something like what I had before was Registered Links, when I installed that Mod, it masks over all the links that I had on site.

Please let me know.

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: ForumMix on March 08, 2015, 05:37:07 AM
I wonder where and which file to edit text? Have my forum on Swedish and would like to edit the text of this supplement in Swedish.

In version 1.0.2 so low this under-SayThanks.english.php
But where is this in this version?
Title: Re: Say Thanks
Post by: kelvincool on March 08, 2015, 05:44:05 AM
Quote from: desiamerican26 on March 07, 2015, 11:09:36 PM
But the other thing I was wondering that the links are not hidden for viewers to say thanks to unlock.

I also checked on the Permission page but don't see anything.

I was thinking that it should mask over all the links once I install the Mod. Something like what I had before was Registered Links, when I installed that Mod, it masks over all the links that I had on site.

That's not how the hide content plugin works, you have to remember that the other mod is a BBC mod, it's not going to hide anything unless the user specifies it in the post.

Quote from: ForumMix on March 08, 2015, 05:37:07 AM
I wonder where and which file to edit text? Have my forum on Swedish and would like to edit the text of this supplement in Swedish.

In version 1.0.2 so low this under-SayThanks.english.php
But where is this in this version?

All the language stuff is now in this file Modifications.english.php
Title: Re: Say Thanks
Post by: desiamerican26 on March 08, 2015, 01:09:27 PM
Hi Kelvin,

Ok, I thought there should be something within Say Thanks Mod that the people have to say thanks and unlock the files.

As for the Hide Content plugin, I just checked with one of the user, he posted in of the threads and Hid the Content, it did hide the content but one still need specific posts to unlock. It don't work with Say Thanks.

I am not sure that if I am getting the point right here....but the links aren't working with thanks Mod.

Please help me out here.

Thank You
Regards,
Nikhil
Title: Re: Say Thanks
Post by: kelvincool on March 08, 2015, 01:19:57 PM
Quote from: desiamerican26 on March 08, 2015, 01:09:27 PM
As for the Hide Content plugin, I just checked with one of the user, he posted in of the threads and Hid the Content, it did hide the content but one still need specific posts to unlock. It don't work with Say Thanks.

I am not sure that if I am getting the point right here....but the links aren't working with thanks Mod.

I don't really understand what the problem is from your description, can you give me an example, PM the link to the topic if you don't want to post it publically.
Title: Re: Say Thanks
Post by: Akira Tsukizawa on March 08, 2015, 01:27:49 PM
Good day.
Thanks for mod, its work good, but i have little problem. Sorry for my english, i try to explain with screens.
Forum version 2.0.9.
Say Thanks version 1.3

Mod installed
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.share.pho.to%2F9fcfc808_o.png&hash=f0cb92f7b2e062846f021dec4a58f69d0e442887)

Now we try Say thanks, and click that button
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.share.pho.to%2Fa74e3b4b_o.png&hash=fddc865f5e8a8240c54140231190eb81cb156247)

Yes, mod work correct, but, if i reset page, i recive..
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.share.pho.to%2Fc0dc9bc9_o.png&hash=a8dca185859f3e0b802ba43bffa0fa27f09a7050)
2 user thanked
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.share.pho.to%2F2d4d84ae_o.png&hash=c583b4ca79925a0e5053de7d922b7fc91fa24ffd)


Maybe i do something wrong? :-\
Title: Re: Say Thanks
Post by: kelvincool on March 08, 2015, 01:33:26 PM
Did it uninstall correctly before you updated?

Post up your Display.template.php
Title: Re: Say Thanks
Post by: desiamerican26 on March 08, 2015, 01:41:55 PM
hi kelvin,
i just sent you the msg. Please check.
Title: Re: Say Thanks
Post by: desiamerican26 on March 08, 2015, 02:44:56 PM
Perfeccttttt Mod I would Say....With the Help of Kelvin, this just works great.....Kudos to Kelvin and Team for this great Mod :)  8)
Title: Re: Say Thanks
Post by: desiamerican26 on March 08, 2015, 03:08:01 PM
hi Kelvin,

Please see your pm. Just one more question that I posted.

Thank You
Title: Re: Say Thanks
Post by: Akira Tsukizawa on March 08, 2015, 03:30:34 PM
Quote from: kelvincool on March 08, 2015, 01:33:26 PM
Display.template.php
Thank you! now it work perfect  :D
Title: Re: Say Thanks
Post by: kelvincool on March 08, 2015, 03:39:27 PM
Quote from: Akira Tsukizawa on March 08, 2015, 03:30:34 PM
Quote from: kelvincool on March 08, 2015, 01:33:26 PM
Display.template.php
Thank you! now it work perfect  :D

What did you do? Just remove the duplicate text? If you didn't uninstall the previous version cleanly before you installed the new version you will get duplicate code in a number of other places like the stats page or the profile page.
Title: Re: Say Thanks
Post by: Dragon41673 on March 08, 2015, 04:47:59 PM
Kevin...sorry, I forgot to ask, can I simply upload the new package and it will write over the old one, or do I need to uninstall the old package first?
Title: Re: Say Thanks
Post by: kelvincool on March 08, 2015, 04:57:44 PM
Uninstall the old one first and then upload the new one and install.
Title: Re: Say Thanks
Post by: Dragon41673 on March 08, 2015, 04:58:41 PM
Cool thank you!
Title: Re: Say Thanks
Post by: Dragon41673 on March 08, 2015, 05:53:36 PM
Kelvin...got an error & it has killed at least one thread...

The error states the following..

Fatal error: Call to undefined function template_saythanks_thanker() in
forum/Sources/SayThanks.php on line 315
Title: Re: Say Thanks
Post by: Dragon41673 on March 08, 2015, 05:57:18 PM
Smashes head in to desk...

Forget what I said...I didn't move a file over to my default theme from the core theme.

All is working now...sorry for any confusion.
Title: Re: Say Thanks
Post by: jsx on March 10, 2015, 04:47:36 AM
@Kelvin

How to activate this plugin?

"Hide content plugin for show content on thank"
Title: Re: Say Thanks
Post by: kelvincool on March 10, 2015, 05:42:15 AM
Quote from: jsgrom on March 10, 2015, 04:47:36 AM
@Kelvin

How to activate this plugin?

"Hide content plugin for show content on thank"

Have you got Hide Content (http://custom.simplemachines.org/mods/index.php?mod=4013) installled? If you do, you enable the plugin on the settings page for that mod.
Title: Re: Say Thanks
Post by: jsx on March 10, 2015, 09:45:49 AM
@Kelvin

I thought that you would enter this function into the Say Thanks modification. On the previous site you wrote the list of changes in the version Say Thanks 1.3
Title: Re: Say Thanks
Post by: kelvincool on March 10, 2015, 09:52:33 AM
Quote from: jsgrom on March 10, 2015, 09:45:49 AM
@Kelvin

I thought that you would enter this function into the Say Thanks modification. On the previous site you wrote the list of changes in the version Say Thanks 1.3

The two mods work together to bring you this functionality, by itself Say Thanks has no idea what you want to hide, that is where Hide Content comes in and allows you to specify what content to hide.
Title: Re: Say Thanks
Post by: jsx on March 10, 2015, 02:34:15 PM
Quote from: kelvincool on March 10, 2015, 09:52:33 AM
The two mods work together to bring you this functionality, by itself Say Thanks has no idea what you want to hide, that is where Hide Content comes in and allows you to specify what content to hide.

All right. It's cool that you did this in Hide Content modification.
Title: Re: Say Thanks
Post by: kelvincool on March 23, 2015, 07:37:10 PM
New version released.

1.3.1
Title: Re: Say Thanks
Post by: Dragon41673 on March 23, 2015, 07:41:42 PM
I take it with the new version, I have to re-do all the manual updates for the Core themes?
Title: Re: Say Thanks
Post by: kelvincool on March 23, 2015, 07:46:29 PM
Yes, you will need to, if you are feeling particularly lazy you can just extract the SayThanks.php and paste it over the old one in the Sources directory, that's the only file that's changed in this release. The only issue doing that would be the version number won't update on the packages page.
Title: Re: Say Thanks
Post by: Dragon41673 on March 23, 2015, 07:55:59 PM
It's alright, I don't mind re-doing everything, it's just tedious. I wish there was a way to automate it, but I think I recall you saying it can't be done.
Title: Re: Say Thanks
Post by: Dragon41673 on March 23, 2015, 08:05:57 PM
FYI, I uninstalled the old one, installed the new version...and it works just fine without re-doing the manual changes!

Is it possible that when uninstalling, it skips the problem file for Back N Black, and it remained there after the uninstall, so when I installed the new one...that same file that is skipped/failed isn't touched so it's just taking over once done?
Title: Re: Say Thanks
Post by: kelvincool on March 23, 2015, 08:21:48 PM
Think you might be right, the problem file is Stats.template.php and it does indeed skip it on uninstall so you'll be fine doing that.
Title: Re: Say Thanks
Post by: Dragon41673 on March 23, 2015, 08:23:01 PM
Ok cool...I appreciate the help!
Title: Re: Say Thanks
Post by: DragoN_PT on March 24, 2015, 06:51:37 AM
Cool mod!

On install it gave me an error on Load.php witch i was able to fix looking at the Load2.php provided by kelvincool (thanks ^^). Now im getting the following error:


Undefined index: thanks xxx/Sources/Load.php
Line: 1316


Line 1316:  'thanks' => $profile['thanks'],

Any help?
Title: Re: Say Thanks
Post by: DragoN_PT on March 24, 2015, 09:03:16 AM
Quote from: DragoN_PT on March 24, 2015, 06:51:37 AM
Cool mod!

On install it gave me an error on Load.php witch i was able to fix looking at the Load2.php provided by kelvincool (thanks ^^). Now im getting the following error:


Undefined index: thanks xxx/Sources/Load.php
Line: 1316


Line 1316:  'thanks' => $profile['thanks'],

Any help?


Looks like we can't edit messages that have the code tag... Anyway, I was able to fix it.
Title: Re: Say Thanks
Post by: Steve on March 24, 2015, 09:23:55 AM
It's not the code tag. Editing is only allowed for a certain period of time. And glad you got it sorted.
Title: Re: Say Thanks
Post by: DragoN_PT on March 24, 2015, 11:11:44 AM
Ah, so that's it... Thanks for pointing it out.  ;)
Title: Re: Say Thanks
Post by: DragoN_PT on March 27, 2015, 11:11:35 AM
Need some help... After a webhost migration I'm able to access the site (simpleportal page) and all seems good. The problem lies on the forum were I get a:
Fatal error: Class 'SayThanks' not found in /xxx/Sources/Load.php(2323) : eval()'d code on line 439

After disabling the evaluation of templates I get a:
Fatal error: Class 'SayThanks' not found in /xxx/Themes/default/Display.template.php on line 439

Can anyone help me?
Title: Re: Say Thanks
Post by: kelvincool on March 27, 2015, 04:52:09 PM
Quote from: DragoN_PT on March 27, 2015, 11:11:35 AM
Need some help... After a webhost migration I'm able to access the site (simpleportal page) and all seems good. The problem lies on the forum were I get a:
Fatal error: Class 'SayThanks' not found in /xxx/Sources/Load.php(2323) : eval()'d code on line 439

After disabling the evaluation of templates I get a:
Fatal error: Class 'SayThanks' not found in /xxx/Themes/default/Display.template.php on line 439

Can anyone help me?

Guessing some of the files were not migrated, can you see if there's a SayThanks.php in the Sources directory?
Title: Re: Say Thanks
Post by: DragoN_PT on March 27, 2015, 05:14:46 PM
Yes there is. And the problem seems to be related with the display.template because I've uploaded one that I had from a previous backup and the forum loads fine. Just without the say_thanks features (and perhaps some from other mods since this backup was made when I had just a few mods installed).
Title: Re: Say Thanks
Post by: kelvincool on March 27, 2015, 05:20:55 PM
Do you have access to your database? Can you see what value you have for integrate_load_theme in the settings table?

Also check the permissions on the SayThanks.php file, perhaps it is not readable.
Title: Re: Say Thanks
Post by: DragoN_PT on March 27, 2015, 05:54:15 PM
As for the file its set for 644. As for the table i don't see any integrate_load_theme... Could that be the reason? Everything else seems to be working like accounts, post count and etc.

I can go and check folder by folder or/and re upload all the main folders...
Title: Re: Say Thanks
Post by: kelvincool on March 27, 2015, 05:59:32 PM
Does it say SayThanks is installed on the packages page?

How about in the table log_packages, do you see SayThanks in there with 0 for both member_removed and time_removed? Is the database from before you installed SayThanks?
Title: Re: Say Thanks
Post by: DragoN_PT on March 27, 2015, 06:24:51 PM
The DB was exported moments before we migrate our site so it was with the mod already installed.

Its listed as installed on the package list but on the DB I have 2 records about SayThanks. Probably the error lies here... One of those have both member_removed and time_removed set to 0 but the other has me as member_removed and a bunch of numbers in time_removed.
Title: Re: Say Thanks
Post by: kelvincool on March 27, 2015, 06:30:07 PM
That's fine, there will be multiple entries in there if you've installed previous versions.

It's definitely to do with the missing integrate_load_theme entry in the settings table, why it's missing is the question. I think at this point, your best bet is to uninstall the mod and re-install, the mod should add the entries back into the settings table.
Title: Re: Say Thanks
Post by: DragoN_PT on March 27, 2015, 06:35:21 PM
Isn't it easier just to migrate the DB again or that won't work? Because your mod is giving me some errors when I try to uninstall.
Title: Re: Say Thanks
Post by: kelvincool on March 27, 2015, 06:50:33 PM
You can try that again if you want, could be the export didn't work properly so it's worth a try. I'm guessing the errors on uninstall is to do with the manually modified Load.php.
Title: Re: Say Thanks
Post by: DragoN_PT on March 27, 2015, 07:49:52 PM
Ok. I've tried to re upload the DB with no success, the error was there again. I did uninstalled and re installed the mod and now everything seems to be working as it should.

Thanks for your time and patience, kelvincool.  ;)
Title: Re: Say Thanks
Post by: 420Connect.co.uk on April 03, 2015, 09:00:20 AM
I'm having a similar issue when I been rebuilding my forum..


I currently have the mod functioning as it should as far as I can tell but when I was installing it..

this part failed and when I tried to find it manually, still couldn't.. - I have a lot of MOD's installed that could have altered that part before but would like to add it in where it would be now..


Code (find) Select
LEFT JOIN {db_prefix}membergroups AS pg ON (pg.id_group = mem.id_post_group)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)';
}
elseif ($set == 'minimal')


Code (add before) Select
LEFT JOIN {db_prefix}messages_thanks_stats AS mts ON (mts.id_member = mem.id_member)
      in Load.php   

Attached is my Load.php if you wouldn't mind having a look!

Many thanks as always!
Title: Re: Say Thanks
Post by: DragoN_PT on April 03, 2015, 09:22:48 AM
Do as I did. Download the load2.php from kevincool on page 6 (the 2nd one!) and search for that part. Then just make your file similar to his and everything should work.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on April 03, 2015, 11:33:40 AM
Quote from: DragoN_PT on April 03, 2015, 09:22:48 AM
Do as I did. Download the load2.php from kevincool on page 6 (the 2nd one!) and search for that part. Then just make your file similar to his and everything should work.

Hahaha, Ironic it was myself that had the same issue back then!

Many thanks for pointing me back there though, I've just carried out the changes as kev made to my old Load and indeed it has fixed my issue! :D

woot!  ;D
Title: Re: Say Thanks
Post by: kelvincool on April 04, 2015, 09:27:49 AM
I wouldn't recommend using that one from page 6, that was a long time ago so it's missing a few bits and bobs. Not much but if you have used it then I would recommend just quickly giving it a check against the latest install.xml to make sure it has everything. I think there were changes to that in 1.2.
Title: Re: Say Thanks
Post by: DragoN_PT on April 04, 2015, 09:41:14 AM
I've installed the mod and the only part where the mod gave an error was that one 420connect.info talked about. I just used your file to change those particular lines the mod couldn't find. Would that be a problem?
Title: Re: Say Thanks
Post by: Klauser on April 06, 2015, 06:36:19 AM
Hello, If I want view the User Profile and there the comments

index.php?action=profile;area=showposts;sa=thanked;u=348

than this is giving an error in the logs ?

Thank you !

index.php?action=profile;area=showposts;sa=thanked;u=348
2: Illegal string offset 'id'
Datei: /homepages/Themes/default/SayThanks.template.php
Line: 84

<div id="thanker_list_' . $message['id'] . '" class="thanks smalltext"><span>' . $txt['saythanks_thanked'] . '</span>' . $list . '</div>';
Title: Re: Say Thanks
Post by: sunilimon on April 07, 2015, 05:23:34 PM
Hi!

Is there any possibility to add thanks option to tapatalk? Other thanks mod have this option. Thank you very much! :)
Title: Re: Say Thanks
Post by: kelvincool on April 07, 2015, 06:04:16 PM
Quote from: Klauser on April 06, 2015, 06:36:19 AM
index.php?action=profile;area=showposts;sa=thanked;u=348
2: Illegal string offset 'id'
Datei: /homepages/Themes/default/SayThanks.template.php
Line: 84

<div id="thanker_list_' . $message['id'] . '" class="thanks smalltext"><span>' . $txt['saythanks_thanked'] . '</span>' . $list . '</div>';


Thanks for reporting this, oddly enough I don't see the error in my logs, I can see what's caused it so I will put out a fix for this.

Quote from: sunilimon on April 07, 2015, 05:23:34 PM
Hi!

Is there any possibility to add thanks option to tapatalk? Other thanks mod have this option. Thank you very much! :)

I haven't used tapatalk before so I cannot comment at the moment I will take a look into it.

Quote from: DragoN_PT on April 04, 2015, 09:41:14 AM
I've installed the mod and the only part where the mod gave an error was that one 420connect.info talked about. I just used your file to change those particular lines the mod couldn't find. Would that be a problem?

That should be ok then if you were just fixing one error that failed to install.
Title: Re: Say Thanks
Post by: Kimmie on April 11, 2015, 01:03:09 PM
I know it was mentioned earlier but I don't see any updates for it. Will this be updated so that we can turn it off on boards it isn't needed for?
Title: Re: Say Thanks
Post by: kelvincool on April 11, 2015, 03:22:49 PM
Quote from: Kimmie on April 11, 2015, 01:03:09 PM
I know it was mentioned earlier but I don't see any updates for it. Will this be updated so that we can turn it off on boards it isn't needed for?

That feature has been implemented, check the settings page to disable on the boards you don't want it on.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on April 13, 2015, 07:42:39 PM
Quickly dropping 2 ideas / appreciated if you could share the code needed to achieve:

- Stuff I thanked page (similar to my thanked posts page)
- Stats block: 10 top thanked posts ( displays the 10 most 'thanked' posts)

Many thanks as always
Title: Re: Say Thanks
Post by: kelvincool on April 21, 2015, 02:18:13 PM
Quote from: 420connect.info on April 13, 2015, 07:42:39 PM
Quickly dropping 2 ideas / appreciated if you could share the code needed to achieve:

- Stuff I thanked page (similar to my thanked posts page)
- Stats block: 10 top thanked posts ( displays the 10 most 'thanked' posts)

Many thanks as always

Both of those are doable, I'm not a big fan of adding stats, they always have to come in pairs otherwise it looks really weird. Anyways I shall add that to the list of features to consider.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on April 22, 2015, 05:32:28 AM
Thanks for the reply & considering kelvin! :)

~ I've run into a bigger issue I'm hoping you've came across before..

I had moved a copy of my site to a new url and found everything appeared to be working as it should except when I went to post/save anything I got the 'Hacking Attempt...' message.. - I then discovered 'thanking' posts wasn't working anymore either and thought it could be the reason for the first messages..  anyway I've uninstalled it, and now am facing a white screen with "theme_template_error" displayed and can't seem to help the situation.. :'(

I parsed the mod and searched the files it makes edits to for anything with 'thank' remaining but nothing was to be found..  :-[
Title: Re: Say Thanks
Post by: kelvincool on April 22, 2015, 12:25:22 PM
Hacking attempt means somehow you're not going through index.php. Don't think the thanks mod should cause that, it doesn't do anything on post. Have you checked the error logs?
Title: Re: Say Thanks
Post by: 420Connect.co.uk on April 22, 2015, 12:59:44 PM
Sorry for thinking your mod might have been related!

My "Hacking attempt..." issue still exists after successfully removing it..

Can't see anything related to these issues from the log..

Could I be missing an index.php file or have mucked up one of them somewhere? possibly?

(Also to avoid high-jacking this thread appreciated if you've any ideas to reply here: http://www.simplemachines.org/community/index.php?topic=535753)

Cheers!
Title: Re: Say Thanks
Post by: desiamerican26 on April 23, 2015, 07:21:29 AM
Hello Friends,

I am unable to create a new topic in this thread. Any Help. I don't see the NEW TOPIC button. I have a question regarding email notification, when someone register on the site I don't get any notification on my email. I am attaching a screen shot of what I have set up as. Please let me know.

I am sorry that I am posting in this thread since I am unable to create a new topic.
Title: Re: Say Thanks
Post by: Steve on April 23, 2015, 08:10:51 AM
You can't create a topic in this section. It's for mod creators. Go to the support section and ask your question there. With over a hundred posts, I'm kinda surprised you don't know that. ;)

http://www.simplemachines.org/community/index.php?board=147.0

There have been a number of questions about not getting email notification if you want to try a quick search first. :)
Title: Re: Say Thanks
Post by: 420Connect.co.uk on April 23, 2015, 02:00:37 PM
Lots of these are appearing since reinstalling after getting my other issue sorted out..

would you mind having a check over my Load.php to check I've got the relevant parts in the right places..

I'm flooded with this in my logs:

Undefined index: thanks

for this line:

'thanks' => $profile['thanks'],


Many thanks as always!
Title: Re: Say Thanks
Post by: kelvincool on April 23, 2015, 03:11:46 PM
Just one little bit missing.
Title: Re: Say Thanks
Post by: 420Connect.co.uk on April 23, 2015, 03:14:51 PM
Thank you very much!

;)
Title: Re: Say Thanks
Post by: desiamerican26 on April 23, 2015, 09:37:23 PM
Quote from: Steve on April 23, 2015, 08:10:51 AM
You can't create a topic in this section. It's for mod creators. Go to the support section and ask your question there. With over a hundred posts, I'm kinda surprised you don't know that. ;)

http://www.simplemachines.org/community/index.php?board=147.0

There have been a number of questions about not getting email notification if you want to try a quick search first. :)

Thank You Steve. Well I don't ask for help much as SMF is very easy and great platform to use. But sometimes it's just something happens all of a sudden or cuz of other Mod's probably. I will do the research and hopefully I will get my answer with that  :)
Title: Re: Say Thanks
Post by: Dragon41673 on May 17, 2015, 12:20:28 PM
I'm currently in a host transfer, and the new host stated they found the following error...

Fatal error: Class 'SayThanks' not found in /home/ariesgam/public_html/forum/Sources/Load.php(2242) : eval()'d code on line 528

Any idea as to what it is before I go & update the site to be live?
Title: Re: Say Thanks
Post by: kelvincool on May 17, 2015, 02:07:56 PM
Two things to check:

1. Can you see SayThanks.php in the sources directory? Is it readable?
2. Can you see SayThanks.php in the value for integrate_pre_include in the settings table?
Title: Re: Say Thanks
Post by: Dragon41673 on May 17, 2015, 02:12:16 PM
#1 - Yes
#2 - I'm still pretty new at this, so that's like speaking a foreign language to me! LOL Where do I find "integrate_pre_include" at?
Title: Re: Say Thanks
Post by: kelvincool on May 17, 2015, 02:18:36 PM
Do you have access to phpmyadmin or similar? Guessing not...

Have you tried uninstalling it and reinstalling? If that variable was missing it'll be added back in on reinstall.
Title: Re: Say Thanks
Post by: Dragon41673 on May 17, 2015, 02:19:43 PM
Yes, I do, the host move is completed & I have full access. Doing a backup of the site post-move (got one pre-move too)...so I can check in a little while.
Title: Re: Say Thanks
Post by: Dragon41673 on May 17, 2015, 02:26:36 PM
Ok...I checked the old database from my old host & the new one from the new host...

The SayThanks.php is there in the new database in "integrate_pre_include" in the settings table.

So just re-install the mod?
Title: Re: Say Thanks
Post by: kelvincool on May 17, 2015, 02:38:08 PM
Is the path to the file correct in the value?
Title: Re: Say Thanks
Post by: Dragon41673 on May 17, 2015, 02:41:05 PM
It seems it's pointing to the old path on the old host.

I'm going to have lots of issues now aren't I because I moved hosts???
Title: Re: Say Thanks
Post by: kelvincool on May 17, 2015, 03:20:16 PM
Well, that's pretty much the only place the mod uses the absolute path like that so you should be able to just update that with the correct path. I would suggest doing a search in that table for any other variables using the old path.

I take it you've already used repair_settings.php when you moved hosts?
Title: Re: Say Thanks
Post by: Dragon41673 on May 17, 2015, 03:22:19 PM
Ok...I just had the new host company run a database wide change...but I was still getting the error...so...

I uninstalled the mod, and re-installed it, and it's not showing up. I went back to check my extra modifications I had to do for the "Back N Black" theme...and they are all there, so I'm not understanding why it's not showing up.
Title: Re: Say Thanks
Post by: Dragon41673 on May 17, 2015, 03:30:08 PM
Ok...never mind, I figured out the issue. I was going too fast & forgot to select Core & Back N Black for install.
Title: Re: Say Thanks
Post by: larry007 on May 23, 2015, 07:06:41 AM
Hi kelvincool

I miss the icon thank.png, please look at attachement picture. BUG?



I created the new german language files for your Ver. 1.3.1

utf8:

// Say Thanks Mod
//German translation for Ver 1.3.1 by larry007 , (http://www.simplemachines.org/community/index.php?action=profile;area=summary;u=130706)
$txt['saythanks_text'] = 'Sag Danke';
$txt['saythanks_thanked'] = 'Folgende Mitglieder bedankten sich: ';
$txt['saythanks_thankscount'] = 'Dankeschön';
$txt['saythanks_times'] = 'mal'; // e.g Thanked 7 times
$txt['saythanks_withdraw_thanks'] = 'Danke entziehen';
$txt['saythanks_settings'] = 'Say Thanks [MOD]';
$txt['saythanks_withdraw_thanks_settings_desc'] = 'Aktiviere "Danksagung entziehen"';
$txt['saythanks_hide_thanks_count_on_post_settings_desc'] = 'Verstecke Anzahl der Danksagung im Beitrag';
$txt['saythanks_hide_thanks_count_in_profile_settings_desc'] = 'Verstecke Anzahl der Danksagung im Profil';
$txt['saythanks_hide_thanks_stats_settings_desc'] = 'Verstecke TOP 10 in der Statistik';
$txt['saythanks_show_thanked_posts'] = 'Danksagungen'; // Tab title for showing all your posts that have been thanked
$txt['saythanks_most_thanked'] = 'Top 10 bedankte Mitglieder';
$txt['saythanks_most_thanks_given'] = 'Top 10 Danksager';
$txt['saythanks_disable_on_boards'] = 'Deaktiviere in individuellen Boards';
$txt['saythanks_title'] = 'Verberge nach Anzahl der Bedankungen';
$txt['saythanks_hide_text'] = 'Du brauchst eine bestimmte Anzahl von {thanks_needed} Bedankungen, du brachst noch {thanks_left} Bedankungen.';
$txt['saythanks_desc'] = 'Verstecke Beitragsinhalt abhängig von der Anzahl der gemachten Bedankungen.';
$txt['saythanks_thanked_title'] = 'Verberge bei Dankeschön';
$txt['saythanks_hide_thanked_text'] = 'Du musst dich Bedanken um den Beitrag zu sehen.';
$txt['saythanks_thanked_desc'] = 'Verstecke Beitragsinhalt abhängig von der Anzahl der gemachten Bedankungen.';
$txt['saythanks_input_title'] = 'Minimum an Dankeschön Anzahl';
$txt['saythanks_ajax_success'] = 'Bedankt';
$txt['saythanks_ajax_loading'] = 'Bedanken...';
$txt['saythanks_ajax_error'] = 'Beim Bedanken trat ein Fehler auf';
$txt['saythanks_ajax_guest'] = '<a href="' . $scripturl . '?action=login">Zum Bedanken des Beitrages musst du Eingeloggt sein</a>';
// Say Thanks Mod



non utf8:

// Say Thanks Mod
//German translation for Ver 1.3.1 by larry007 , (http://www.simplemachines.org/community/index.php?action=profile;area=summary;u=130706)
$txt['saythanks_text'] = 'Sag Danke';
$txt['saythanks_thanked'] = 'Folgende Mitglieder bedankten sich: ';
$txt['saythanks_thankscount'] = 'Dankeschön';
$txt['saythanks_times'] = 'mal'; // e.g Thanked 7 times
$txt['saythanks_withdraw_thanks'] = 'Danke entziehen';
$txt['saythanks_settings'] = 'Say Thanks [MOD]';
$txt['saythanks_withdraw_thanks_settings_desc'] = 'Aktiviere "Danksagung entziehen"';
$txt['saythanks_hide_thanks_count_on_post_settings_desc'] = 'Verstecke Anzahl der Danksagung im Beitrag';
$txt['saythanks_hide_thanks_count_in_profile_settings_desc'] = 'Verstecke Anzahl der Danksagung im Profil';
$txt['saythanks_hide_thanks_stats_settings_desc'] = 'Verstecke TOP 10 in der Statistik';
$txt['saythanks_show_thanked_posts'] = 'Danksagungen'; // Tab title for showing all your posts that have been thanked
$txt['saythanks_most_thanked'] = 'Top 10 bedankte Mitglieder';
$txt['saythanks_most_thanks_given'] = 'Top 10 Danksager';
$txt['saythanks_disable_on_boards'] = 'Deaktiviere in individuellen Boards';
$txt['saythanks_title'] = 'Verberge nach Anzahl der Bedankungen';
$txt['saythanks_hide_text'] = 'Du brauchst eine bestimmte Anzahl von {thanks_needed} Bedankungen, du brachst noch {thanks_left} Bedankungen.';
$txt['saythanks_desc'] = 'Verstecke Beitragsinhalt abhängig von der Anzahl der gemachten Bedankungen.';
$txt['saythanks_thanked_title'] = 'Verberge bei Dankeschön';
$txt['saythanks_hide_thanked_text'] = 'Du musst dich Bedanken um den Beitrag zu sehen.';
$txt['saythanks_thanked_desc'] = 'Verstecke Beitragsinhalt abhängig von der Anzahl der gemachten Bedankungen.';
$txt['saythanks_input_title'] = 'Minimum an Dankeschön Anzahl';
$txt['saythanks_ajax_success'] = 'Bedankt';
$txt['saythanks_ajax_loading'] = 'Bedanken...';
$txt['saythanks_ajax_error'] = 'Beim Bedanken trat ein Fehler auf';
$txt['saythanks_ajax_guest'] = '<a href="' . $scripturl . '?action=login">Zum Bedanken des Beitrages musst du Eingeloggt sein</a>';
// Say Thanks Mod
Title: Re: Say Thanks
Post by: kelvincool on May 23, 2015, 08:18:11 AM
Can you see thank.png in Themes\default\images\theme\? Is saythanks.css being used on the page?

Thanks for the german translation!
Title: Re: Say Thanks
Post by: larry007 on May 24, 2015, 03:42:01 AM
Yes the png file is in this folder.

and the saythanks.css file is in

Themes\default\css

and in

Themes\core\css

I use the Inferno theme and tryed to copy the saythanks.css in

Themes\inferno_20a\css

but it doesn't show the thank.png at all.
Title: Re: Say Thanks
Post by: kelvincool on May 24, 2015, 08:11:52 AM
@larry007, it seems you are using the saythanks.css that was meant for core themes only, I would suggest you extract the css from the zip again, as from the sounds of it, the one in default is the wrong one too.
Title: Re: Say Thanks
Post by: larry007 on May 25, 2015, 04:23:55 AM
Hi

sorry I do not know why but I played with the saythanks.css

I have copied the wrong css in the wrong folder back  :o

I did it again, the core css in the core folder and the other one in default..... now it works.

sorry for the trouble.....  8)
Title: Re: Say Thanks
Post by: kelvincool on May 25, 2015, 12:51:11 PM
1.3.2

I decided to replace the top 10 thankers with the top 10 thanked posts since it seemed a better fit and I didn't want to go with an odd numbered stats page.

Whilst doing this release I also looked into tapatalk support, what I've concluded is that the tapatalk themselves actually added in the support for the other thank mod into their mod. While I can possibly emulate the same code so that tapatalk sort of works, it would be quite flakey, I also haven't figured out how I can actually use tapatalk locally to do any testing. So basically it's probably not going to happen.
Title: Re: Say Thanks
Post by: Dragon41673 on May 25, 2015, 02:26:38 PM
kelvin...

Just wanted to say thank you for always updating this mod...that's great of you. Wild question, do you have plans on supporting SMF 2.1.x when it comes out?
Title: Re: Say Thanks
Post by: kelvincool on May 25, 2015, 03:23:42 PM
I don't foresee it being a lot of work to upgrade this to 2.1 so yes, most likely.
Title: Re: Say Thanks
Post by: Dragon41673 on May 25, 2015, 03:25:35 PM
Quote from: kelvincool on May 25, 2015, 03:23:42 PM
I don't foresee it being a lot of work to upgrade this to 2.1 so yes, most likely.

Awesome! That's really good to hear.
Title: Re: Say Thanks
Post by: Dragon41673 on May 25, 2015, 05:10:08 PM
kelvin...

Got an error now that doesn't allow me to get in to the stats page on my forum. Thanks to margarett & kindred who pointed me in the right direction to help me figure out why in this thread...

http://www.simplemachines.org/community/index.php?topic=536784.msg3814494#msg3814494

Here's the attached image
Title: Re: Say Thanks
Post by: kelvincool on May 25, 2015, 06:00:25 PM
Thanks for spotting that, uploaded new version with the fix.

1.3.3
Title: Re: Say Thanks
Post by: Dragon41673 on May 25, 2015, 06:10:52 PM
I can confirm it works! Thank you kelvin!
Title: Re: Say Thanks
Post by: Steve on May 25, 2015, 06:15:34 PM
How awesome is that? Problem to solution time = one hour. Hard to beat that. ;D
Title: Re: Say Thanks
Post by: Dragon41673 on May 25, 2015, 06:24:55 PM
Yep...kelvin is definitely on the ball today, especially since it's a holiday here in the U.S. (if he's located here).

Either way...awesome response & fix time!
Title: Re: Say Thanks
Post by: Steve on May 25, 2015, 06:35:01 PM
Since I've been here, kelvin has always been helpful and fixes any problems folks come up with as fast as possible. Pretty cool guy.

Okay, back to the thread. :P
Title: Re: Say Thanks
Post by: kelvincool on May 25, 2015, 06:37:34 PM
You guys are too much  :laugh:

Couldn't have done it without the quick bug spotting there, glad you spotted that before too many people downloaded the bugged version.

EDIT: just a bit of reassurance, I've added a test case to my regression pack to test this next time.  :)
Title: Re: Say Thanks
Post by: saurabh82 on June 08, 2015, 06:10:28 AM
I have installed plugin to my smf forum check here      forum . largearticle .com
But thank you button is not appearing.
What can be the problem?
here is my settings page
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F7ax1S1c.jpg&hash=4bbe163ccf92d41be4f98315c16a0bddac3daf80)
Title: Re: Say Thanks
Post by: kelvincool on June 08, 2015, 12:26:59 PM
I take it you don't have the mod installed anymore? I can't see any trace of the mod on your forum. One possible explanation - did you install the mod to your theme when you installed it?
Title: Re: Say Thanks
Post by: njtweb on June 08, 2015, 01:32:23 PM
I just installed this on the Flatline theme today. Still doing all of the config on my site but I don't see the thanks option.

http://minorleaguelegends.com/board/index.php/topic,1.0.html
Title: Re: Say Thanks
Post by: kelvincool on June 08, 2015, 02:01:39 PM
Quote from: njtweb on June 08, 2015, 01:32:23 PM
I just installed this on the Flatline theme today. Still doing all of the config on my site but I don't see the thanks option.

http://minorleaguelegends.com/board/index.php/topic,1.0.html

I see the thanks button just fine. By the way, you can't thank your own posts or guest posts.
Title: Re: Say Thanks
Post by: njtweb on June 08, 2015, 02:21:18 PM
Weird, I don't see you as registered? I tried in IE and FF not logged in and I don't see it.

EDIT***Now I see you registered. Ok, thanks
Title: Re: Say Thanks
Post by: kelvincool on June 08, 2015, 02:31:37 PM
I registered under a different alias  :)

The reason you can't see it is because it's members only, guest can't thank posts.
Title: Re: Say Thanks
Post by: njtweb on June 08, 2015, 02:36:07 PM
Got it. Thanks for your help!
Title: Re: Say Thanks
Post by: suhaneankit on June 13, 2015, 11:54:28 AM
Working perfect. Awesome (Y) :)
Title: Re: Say Thanks
Post by: kim_c on July 20, 2015, 07:29:13 AM
Need some help please. I have installed this mod on my SMF forum. It's showing up on the SMF default theme but not on the custom theme I installed. I have copied the files across to the custom theme (say thanks and stat template). Is there anything I missed?
Forum URL http://simpearls.co.uk/simpearls/ (http://simpearls.co.uk/simpearls/)
Thanks
Title: Re: Say Thanks
Post by: Steve on July 20, 2015, 08:57:52 AM
Did you do the theme specific edits?

http://custom.simplemachines.org/mods/index.php?mod=3898 (click 'parse')
Title: Re: Say Thanks
Post by: kim_c on July 20, 2015, 09:29:02 AM
Quote from: Steve on July 20, 2015, 08:57:52 AM
Did you do the theme specific edits?

http://custom.simplemachines.org/mods/index.php?mod=3898 (click 'parse')

Yes  :)
Title: Re: Say Thanks
Post by: yakyakyak on July 20, 2015, 11:56:49 AM
Thinking of installing this but confused ??? is there a specific php to call for the Like stats per se or is the stats simply displayed in Forum Stats collectively ?

Thanks
Title: Re: Say Thanks
Post by: kelvincool on July 20, 2015, 12:05:58 PM
Quote from: kim_c on July 20, 2015, 07:29:13 AM
Need some help please. I have installed this mod on my SMF forum. It's showing up on the SMF default theme but not on the custom theme I installed. I have copied the files across to the custom theme (say thanks and stat template). Is there anything I missed?
Forum URL http://simpearls.co.uk/simpearls/ (http://simpearls.co.uk/simpearls/)
Thanks

Got a test account?

Quote from: yakyakyak on July 20, 2015, 11:56:49 AM
Thinking of installing this but confused ??? is there a specific php to call for the Like stats per se or is the stats simply displayed in Forum Stats collectively ?

Thanks

Not sure what you are confused about, why are you refering to a php call, do you want to call the stats on some other page? The stats are displayed on the post, profile and on the forum stats page.
Title: Re: Say Thanks
Post by: yakyakyak on July 20, 2015, 12:17:23 PM
Quote from: kelvincool on July 20, 2015, 12:05:58 PM

do you want to call the stats on some other page?

Thanks for the quick reply, I was thinking about fitting it on on a Side Block.php

Do you have any stats block code available?
Title: Re: Say Thanks
Post by: kelvincool on July 20, 2015, 12:32:39 PM
The bit to get the stats is in the function SayThanks::setStats();

You may need to include SayThanks.php if it's not already included on the page. I should mention that the setStats function does 2 queries to get the stats so just be aware of that. After you call the function the data you want will be available in the $context.
Title: Re: Say Thanks
Post by: kelvincool on July 20, 2015, 01:17:34 PM
Quote from: kim_c on July 20, 2015, 09:29:02 AM
Quote from: Steve on July 20, 2015, 08:57:52 AM
Did you do the theme specific edits?

http://custom.simplemachines.org/mods/index.php?mod=3898 (click 'parse')

Yes  :)

Ok I've got access to your forum now, can you check if you definitely made the changes to Display.template.php? I noticed the Thanked count and the thanked list was also missing and they are both in that file too so it's most likely missing all the changes in that.
Title: Re: Say Thanks
Post by: kim_c on July 20, 2015, 02:31:06 PM
Thank you, I didn't see I had to change the display template. It's appearing now, but I have 2 thumbs up pics?
Title: Re: Say Thanks
Post by: kelvincool on July 20, 2015, 03:54:23 PM
You've copied the wrong SayThanks.template.php. The one you copied is meant to be used for the core theme. Copy the one at the root of the zip.
Title: Re: Say Thanks
Post by: kim_c on July 20, 2015, 04:05:01 PM
All working now, thanks very much for your help   :D
Title: Re: Say Thanks
Post by: yakyakyak on July 20, 2015, 04:13:43 PM
Thanks Kelvin its working a treat and some nice comments from forum Members already. My theme doesn't lend itself to the default colour code for the thank you text "The following users thanked this post:"

Can you point me to the edit please to change the colour.





Title: Re: Say Thanks
Post by: kelvincool on July 20, 2015, 05:22:30 PM
The style is in saythanks.css, I would recommend changing the style in your own css so when you update the style persists, eg:

.thanks span {
   color:red;
}
Title: Re: Say Thanks
Post by: Steve on July 20, 2015, 05:28:20 PM
I don't know if kelvin has incorporated this into the mod or not as I shamefully haven't updated to the latest version but you might find some nice looks to the thanks part by starting here: http://www.simplemachines.org/community/index.php?topic=527032.msg3765151#msg3765151 and read for about 9 or 10 posts. :)
Title: Re: Say Thanks
Post by: yakyakyak on July 20, 2015, 06:19:34 PM
Quote from: kelvincool on July 20, 2015, 05:22:30 PM
The style is in saythanks.css, I would recommend changing the style in your own css so when you update the style persists, eg:

.thanks span {
   color:red;
}

Perfect

Title: Re: Say Thanks
Post by: DragoN_PT on August 19, 2015, 11:53:50 PM
Hey Kevin. I run into a prob and i hope you can help me. I've copied my forum to another location and everything works fine except this mod because I get stuck on "Thanking..." and after investigating i got:

"Fatal error: Cannot redeclare class SayThanks in /xxx/Sources/SayThanks.php on line 18"

Can you help me find the solution?
Title: Re: Say Thanks
Post by: massillon on August 20, 2015, 11:29:49 AM
Quote from: DragoN_PT on August 19, 2015, 11:53:50 PM
Hey Kevin. I run into a prob and i hope you can help me. I've copied my forum to another location and everything works fine except this mod because I get stuck on "Thanking..." and after investigating i got:

"Fatal error: Cannot redeclare class SayThanks in /xxx/Sources/SayThanks.php on line 18"

Can you help me find the solution?

Did you check your server settings and make sure all the URLs are the new one?

Had this problem before.  Sometimes SMF is stubborn and won't let the old url go
Title: Re: Say Thanks
Post by: DragoN_PT on August 20, 2015, 11:36:15 AM
Yep. Settings are fine.
Title: Re: Say Thanks
Post by: massillon on August 20, 2015, 12:10:32 PM
Quote from: DragoN_PT on August 20, 2015, 11:36:15 AM
Yep. Settings are fine.

I've uninstalled, deleted, and reinstalled more times than I care to admit based on moving stuff around.   That includes the occasional complete reinstall of the forum too.
Title: Re: Say Thanks
Post by: kelvincool on August 20, 2015, 07:59:12 PM
Quote from: DragoN_PT on August 19, 2015, 11:53:50 PM
Hey Kevin. I run into a prob and i hope you can help me. I've copied my forum to another location and everything works fine except this mod because I get stuck on "Thanking..." and after investigating i got:

"Fatal error: Cannot redeclare class SayThanks in /xxx/Sources/SayThanks.php on line 18"

Can you help me find the solution?

If you have phpmyadmin, check your settings table, specifically:

SELECT value FROM yourdatabaseprefix_settings WHERE variable = 'integrate_pre_include';

If you see two references to SayThanks.php then there's your problem. To fix simply remove the old reference.
Title: Re: Say Thanks
Post by: DragoN_PT on August 21, 2015, 01:19:30 AM
After looking at that particular table it appear to have a bad path to the file. Thanks for the help man.  ;)
Title: Re: Say Thanks
Post by: margarett on October 02, 2015, 12:47:06 PM
Howdy

I needed a MOD which allowed to account for both "received" and "given" thanks and I modified yours to do it. It's not completely finished but the main part is close enough. If this is a variation which might have some interest to you just let me know ;)
Title: Re: Say Thanks
Post by: pro100sn on December 03, 2015, 10:29:53 AM
Hello! Translation Russian language program at scheduled?
Title: Re: Say Thanks
Post by: kelvincool on December 03, 2015, 02:00:51 PM
There is no Russian translation for this, if you want to do one, you can make your changes in languages.xml and attach it in the post and I'll add it to the package.
Title: Re: Say Thanks
Post by: pro100sn on December 04, 2015, 08:50:16 AM
I establish error knocks.
Apply Filter: Show error messages that address (URL)
http://za40.org/index.php?action=admin;area=modsettings;sa=saythanks
Apply Filter: Show error messages only to those
2: unserialize () expects parameter 1 to be string, array given
Apply Filter: Show errors only this file
File: /home/za40/za40.org/www/Sources/ManageServer.php


$context['config_vars'][$config_var[1]]['value'] = !empty($context['config_vars'][$config_var[1]]['value']) ? unserialize($context['config_vars'][$config_var[1]]['value']) : array();
Title: Re: Say Thanks
Post by: pro100sn on December 04, 2015, 11:25:49 AM
Quote from: kelvincool on December 03, 2015, 02:00:51 PM
There is no Russian translation for this, if you want to do one, you can make your changes in languages.xml and attach it in the post and I'll add it to the package.
Translated into Russian your mod. The file is attached.
Title: Re: Say Thanks
Post by: pro100sn on December 05, 2015, 02:52:33 AM
Wrote above error. She appears when I go into the settings of the mod.
Title: Re: Say Thanks
Post by: kelvincool on December 06, 2015, 07:09:19 AM
Thanks for the Russian translation! I've added it to the package, for future reference I had to separate it into it's own file language.russian.xml because the encoding wouldn't work with UTF-8.

About the error you are seeing, that is a known bug, it is a bug in SMF core, it has been fixed in SMF 2.1 but has not been backported to SMF 2.0. I think we will just have to live with it for now.
Title: Re: Say Thanks
Post by: keyboard on December 06, 2015, 12:51:55 PM
Hi
I have sent you a PM..... When you find some time, please read...

Ron
Title: Re: Say Thanks
Post by: keyboard on December 06, 2015, 06:20:44 PM
Disregard that last email  :)

Ron
Title: Re: Say Thanks
Post by: pro100sn on December 07, 2015, 05:16:55 AM
Quote from: kelvincool on December 06, 2015, 07:09:19 AM
Thanks for the Russian translation! I've added it to the package, for future reference I had to separate it into it's own file language.russian.xml because the encoding wouldn't work with UTF-8.

Happy to help!
Title: Re: Say Thanks
Post by: keyboard on December 07, 2015, 12:36:02 PM
My Users are complaining something to the effect of  "25 people have downloaded the file but only 12 people thanked me"........  Is there anyway that this mod can be hooked up to the downloads so that when anybody  downloads an attachment , a "Thanks" will be automatically issued.

I will happily pay for custom coding to do this....
Title: Re: Say Thanks
Post by: pro100sn on December 08, 2015, 04:58:54 AM
Found error in the Russian translation.
It must be so:
$txt['saythanks_show_thanked_posts'] = 'Сообщения, которые понравились пользователям';
$txt['saythanks_show_thank_by_user_posts'] = 'Сообщения, за которые поблагодарил пользователь';
Title: Re: Say Thanks
Post by: kelvincool on December 08, 2015, 02:17:43 PM
Thanks for that correction, I have updated the package with the new text.
Title: Re: Say Thanks
Post by: ruroni925 on December 09, 2015, 12:11:26 PM
I'm having a "thank o matic" to "say thanks" and I have several users with thanks and I will give their respective values manually

how to increase number the thanks for members?
Title: Re: Say Thanks
Post by: kelvincool on December 09, 2015, 03:29:00 PM
Quote from: ruroni925 on December 09, 2015, 12:11:26 PM
I'm having a "thank o matic" to "say thanks" and I have several users with thanks and I will give their respective values manually

how to increase number the thanks for members?

There's no way of setting the number of thanks manually, there is a messages_thanks_stats table that holds all the totals which you can edit but this table gets refreshed during forum maintenance so any changes you make will be reset.

Do you still have the thank_you_post table for thank o matic? It might be possible to import the entries from that table into the say thanks one.
Title: Re: Say Thanks
Post by: ruroni925 on December 09, 2015, 03:33:41 PM
Quote from: kelvincool on December 09, 2015, 03:29:00 PM
Quote from: ruroni925 on December 09, 2015, 12:11:26 PM
I'm having a "thank o matic" to "say thanks" and I have several users with thanks and I will give their respective values manually

how to increase number the thanks for members?

There's no way of setting the number of thanks manually, there is a messages_thanks_stats table that holds all the totals which you can edit but this table gets refreshed during forum maintenance so any changes you make will be reset.

Do you still have the thank_you_post table for thank o matic? It might be possible to import the entries from that table into the say thanks one.


where  find this table?
Title: Re: Say Thanks
Post by: kelvincool on December 09, 2015, 03:40:31 PM
Do you have phpmyadmin or some way to access your database?
Title: Re: Say Thanks
Post by: ruroni925 on December 09, 2015, 03:51:47 PM
Quote from: kelvincool on December 09, 2015, 03:40:31 PM
Do you have phpmyadmin or some way to access your database?

yes, where do I find it?
Title: Re: Say Thanks
Post by: kelvincool on December 09, 2015, 04:18:03 PM
Can you see it in your table list, it's called thank_you_post or smf_thank_you_post if you are using a prefix to your tables.

Or alternatively, run this query to see  if you get any results:

select * from thank_you_post;

or

select * from smf_thank_you_post;
Title: Re: Say Thanks
Post by: ruroni925 on December 09, 2015, 04:22:27 PM
Quote from: kelvincool on December 09, 2015, 04:18:03 PM
Can you see it in your table list, it's called thank_you_post or smf_thank_you_post if you are using a prefix to your tables.

Or alternatively, run this query to see  if you get any results:

select * from thank_you_post;

or

select * from smf_thank_you_post;

I found the table, I do?
Title: Re: Say Thanks
Post by: kelvincool on December 09, 2015, 04:38:29 PM
Ok before doing any of this please make sure to backup your database. I would highly recommend trialing this out on a local copy of your database first.

In order to do this you will have to make sure the messages_thanks table is empty, if it's not empty you can run this query to empty the table (NOTE, all thanks in Say Thanks will be deleted so if you've been using Say Thanks for a while all that thanks will be lost):

truncate table smf_messages_thanks

If your tables do not have the smf_ prefix just delete it from the query.

Next you will need to run the following query, again I've highlighted the prefix, if you aren't using it delete it before running it.

INSERT INTO smf_messages_thanks
  SELECT id_msg, id_member
  FROM smf_thank_you_post


This query will pull all the data from thanks o matic into the Say Thanks table.
Title: Re: Say Thanks
Post by: kelvincool on December 09, 2015, 04:47:31 PM
Worked out you can use this query if you don't want to lose existing Say Thanks data (you don't have to bother with the truncate query if using this one):

INSERT IGNORE INTO smf_messages_thanks
  SELECT id_msg, id_member
  FROM smf_thank_you_post
Title: Re: Say Thanks
Post by: ruroni925 on December 09, 2015, 05:30:27 PM
Quote from: kelvincool on December 09, 2015, 04:38:29 PM
Ok before doing any of this please make sure to backup your database. I would highly recommend trialing this out on a local copy of your database first.

In order to do this you will have to make sure the messages_thanks table is empty, if it's not empty you can run this query to empty the table (NOTE, all thanks in Say Thanks will be deleted so if you've been using Say Thanks for a while all that thanks will be lost):

truncate table smf_messages_thanks

If your tables do not have the smf_ prefix just delete it from the query.

Next you will need to run the following query, again I've highlighted the prefix, if you aren't using it delete it before running it.

INSERT INTO smf_messages_thanks
  SELECT id_msg, id_member
  FROM smf_thank_you_post


This query will pull all the data from thanks o matic into the Say Thanks table.

Testing on localhost and it worked.
Testing on my website
Title: Re: Say Thanks
Post by: bubus66 on January 25, 2016, 01:53:43 PM
Thanks to Say Hello installed up mode and is not the subject appears on the LCD and a small hand icon Thank you for what may be a problem. DarkLight101 theme I'm using, but the default topic does not appear.
Title: Re: Say Thanks
Post by: kelvincool on January 25, 2016, 04:55:31 PM
Can't really see much from that, did the mod install correctly into the theme? Any errors during installation? Do you have a link to DarkLight101 theme, can't find it in google. If possible you can PM the forum link with a test account to debug.
Title: Re: Say Thanks
Post by: roza on January 26, 2016, 07:43:06 AM
Thank you for this useful mod. I've been using this mod for a while and also have translated it to Persian(attached). I just have a question about the permissions for this mod. I do not see an option added to the user group permissions.
Title: Re: Say Thanks
Post by: kelvincool on January 26, 2016, 01:25:17 PM
Quote from: roza on January 26, 2016, 07:43:06 AM
Thank you for this useful mod. I've been using this mod for a while and also have translated it to Persian(attached). I just have a question about the permissions for this mod. I do not see an option added to the user group permissions.

There is no permissions implemented in the mod, no one's asked for it so currently by default every user can thank (except guests of course).

Many thanks for the persian translation, I shall add it to the current release. I take it you're ok to be credited as roza?
Title: Re: Say Thanks
Post by: roza on January 26, 2016, 06:04:54 PM
Thanks for quick replay.
QuoteI take it you're ok to be credited as roza?
Yeas I'm ok!
I have another question, sometimes when one clicks the thanks button, the mod remains in loading mood ("thanking ..." ) and just after reloading the page new thanks will be displayed on the post.Is this related to the server or connection speed?
Title: Re: Say Thanks
Post by: kelvincool on January 26, 2016, 07:26:57 PM
That could be any number of things, browser issue, server timeout, etc... if it's random and not consistent then it's more likely a server issue than a browser one. If you are using Firefox, get Firebug open before you click the thank button and see what the ajax call returns when it errors out, that will give an indication of what the problem is.
Title: Re: Say Thanks
Post by: kelvincool on January 27, 2016, 01:27:52 PM
Quote from: bubus66 on January 25, 2016, 01:53:43 PM
Thanks to Say Hello installed up mode and is not the subject appears on the LCD and a small hand icon Thank you for what may be a problem. DarkLight101 theme I'm using, but the default topic does not appear.

I have tried the theme and it works as expected, when you installed the mod did you definitely check the box for your theme? If you definitely did then I would say it's most likely a conflict with another mod you have installed.
Title: Re: Say Thanks
Post by: bubus66 on January 28, 2016, 05:23:56 AM
Thank you for checking what can mod? In the picture you can see what they are installed


(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fs5.postimg.org%2Fptczwpkhv%2FN_vtelen.jpg&hash=86eabdb6e8460dbaa2a61aeff2acdb427e308803) (http://postimg.org/image/ptczwpkhv/)
Title: Re: Say Thanks
Post by: kelvincool on January 28, 2016, 12:37:58 PM
Can you attach your Display.template.php for the DarkLight101 theme?
Title: Re: Say Thanks
Post by: bubus66 on January 29, 2016, 03:59:40 AM
Here's the Display.template.php see what is the problem?
Title: Re: Say Thanks
Post by: cepera on January 29, 2016, 08:23:12 AM
Thank you for your mod!
When press "thank you", at the bottom of the post - "null". After reloading the page - OK!
How to make mod work properly?

SMF 2.0.11
Title: Re: Say Thanks
Post by: kelvincool on January 29, 2016, 02:02:09 PM
Quote from: bubus66 on January 29, 2016, 03:59:40 AM
Here's the Display.template.php see what is the problem?

OK I replaced my template with yours and it still works so there's nothing wrong with the template itself. You're not trying to thank your own post are you?

Quote from: cepera on January 29, 2016, 08:23:12 AM
Thank you for your mod!
When press "thank you", at the bottom of the post - "null". After reloading the page - OK!
How to make mod work properly?

SMF 2.0.11

Need some more information, which browser are you using, a link to the forum with a test account to thank would be useful.
Title: Re: Say Thanks
Post by: bubus66 on January 29, 2016, 03:54:21 PM
Thank you again so I installed but not working, I'll do it, it will be mod pop it all up and you install the SMF Default Theme - Curve-l will operate.
Title: Re: Say Thanks
Post by: cepera on January 29, 2016, 05:28:35 PM
Quote from: kelvincool on January 29, 2016, 02:02:09 PM

Quote from: cepera on January 29, 2016, 08:23:12 AM
Thank you for your mod!
When press "thank you", at the bottom of the post - "null". After reloading the page - OK!
How to make mod work properly?

SMF 2.0.11

Need some more information, which browser are you using, a link to the forum with a test account to thank would be useful.

Well!
I sent you to access the forum in private.
The problem appears if the language of the forum - Russian. If you change to English - no problem.
Title: Re: Say Thanks
Post by: kelvincool on January 30, 2016, 07:39:39 AM
1.3.4

You were right it was a specific problem with handling Russian in json. Took a bit of work but got it to work eventually.
Title: Re: Say Thanks
Post by: cepera on January 30, 2016, 08:47:31 AM
Quote from: kelvincool on January 30, 2016, 07:39:39 AM
1.3.4

  • Fixed Russian issue with json
  • Added Russian UTF-8

You were right it was a specific problem with handling Russian in json. Took a bit of work but got it to work eventually.

Yes! Its OK now!
Thank you so much!
Title: Re: Say Thanks
Post by: bubus66 on January 30, 2016, 08:48:53 AM
kelvincool

Hey, so what is the problem re-installed just above the base template and have not even seen?
Title: Re: Say Thanks
Post by: kelvincool on January 30, 2016, 08:56:03 AM
Quote from: bubus66 on January 30, 2016, 08:48:53 AM
kelvincool

Hey, so what is the problem re-installed just above the base template and have not even seen?

Look at someone else's post, can you see the thanks button?
Title: Re: Say Thanks
Post by: bubus66 on January 30, 2016, 09:08:17 AM
Quote from: kelvincool on January 30, 2016, 08:56:03 AM
Quote from: bubus66 on January 30, 2016, 08:48:53 AM
kelvincool

Hey, so what is the problem re-installed just above the base template and have not even seen?

Look at someone else's post, can you see the thanks button?


Yes, it seems to me someone, why not?
Title: Re: Say Thanks
Post by: kelvincool on January 30, 2016, 09:32:57 AM
Quote from: bubus66 on January 30, 2016, 09:08:17 AM
Quote from: kelvincool on January 30, 2016, 08:56:03 AM
Quote from: bubus66 on January 30, 2016, 08:48:53 AM
kelvincool

Hey, so what is the problem re-installed just above the base template and have not even seen?

Look at someone else's post, can you see the thanks button?

Ok so you can see the thank button on someone else's post right? The reason you cannot see it on your own post is because you cannot thank your own post. You can only thank other people's posts.

Yes, it seems to me someone, why not?
Title: Re: Say Thanks
Post by: bubus66 on January 30, 2016, 11:25:53 AM
Thanks
Title: Re: Say Thanks
Post by: svendsen on July 11, 2016, 04:30:44 PM
Added Norwegian and Norwegian UTF8 to the language file.

Also wondering if there is a way to get the mode to work along side with TapaTalk and the link button there.
Title: Re: Say Thanks
Post by: kelvincool on July 17, 2016, 10:56:06 AM
Many thanks Svendsen for the Norwegian translation! Much appreciated!

Regarding TapaTalk, the same question was asked last year and I looked into it. The code that makes TapaTalk work with the other thank mod is built into the TapaTalk mod itself, there is nothing I can do to add support from my end.
Title: Re: Say Thanks
Post by: d3vcho on July 17, 2016, 11:47:44 AM
Hi! I added Spanish_es and Spanish_es-utf8 to the languages.xml

Great mod kelvincool. Hope it helps! :)
Title: Re: Say Thanks
Post by: jack_1985 on July 23, 2016, 09:09:44 AM
Hello! :)

I wanted to try out this mod but I stumbled upon a problem. The id of the member who "thanks" a post doesn't get saved in the database.
It's always 0. Does anyone have an idea what the problem might be?

Thanks in advance!

Title: Re: Say Thanks
Post by: kelvincool on July 23, 2016, 12:02:25 PM
Thank you d3vcho for the awesome Spanish contribution! I've added it to the mod.

@jack_1985, that's a strange one, anything in the error logs? Could take a look on the site if you're willing to PM me the URL and a test account. Do you have a lot of mods installed? Could be a conflict.
Title: Re: Say Thanks
Post by: badon on August 09, 2016, 02:26:59 AM
Quote from: kelvincool on December 09, 2015, 04:38:29 PM
Ok before doing any of this please make sure to backup your database. I would highly recommend trialing this out on a local copy of your database first.

In order to do this you will have to make sure the messages_thanks table is empty, if it's not empty you can run this query to empty the table (NOTE, all thanks in Say Thanks will be deleted so if you've been using Say Thanks for a while all that thanks will be lost):

truncate table smf_messages_thanks

If your tables do not have the smf_ prefix just delete it from the query.

Next you will need to run the following query, again I've highlighted the prefix, if you aren't using it delete it before running it.

INSERT INTO smf_messages_thanks
  SELECT id_msg, id_member
  FROM smf_thank_you_post


This query will pull all the data from thanks o matic into the Say Thanks table.

While I'm in the mood for saying "thanks", I just wanted to say I'm way impressed that you helped a user convert from an obsolete mod to your well-maintained mod. That's very reassuring.
Title: Re: Say Thanks
Post by: badon on August 09, 2016, 02:38:14 AM
I tried to retrieve this mod by downloading it from within SMF, using the "Browse" package server feature, but it does not appear in the list like it does on the website:

http://custom.simplemachines.org/mods/index.php?action=search;type=1;bool=and;asc;start=390

I attached screenshots of what I'm seeing from within my SMF system, and also another screenshot that shows where Say Thanks appears in the SMF mod site to demonstrate nothing appears broken here.

I deleted my package server and re-added it again using these instructions, but there's no change, your mod is still not shown:

http://wiki.simplemachines.org/smf/SMF2.0:Package_manager#Add_server
Title: Re: Say Thanks
Post by: kelvincool on August 09, 2016, 01:09:38 PM
Which version of SMF are you running? I can see it fine on mine. You have a lot of mods missing from your list, must be the version of SMF you are running.
Title: Re: Say Thanks
Post by: badon on August 09, 2016, 02:39:08 PM
I'm using 2.011.
Title: Re: Say Thanks
Post by: kelvincool on August 09, 2016, 02:56:55 PM
What URL are you using for the server? The suggested one on that page doesn't work for me. You can try using this one: http://custom.simplemachines.org/packages/mods
Title: Re: Say Thanks
Post by: badon on August 09, 2016, 03:56:29 PM
That URL works, thank you. I updated the wiki. Where did you find that URL?
Title: Re: Say Thanks
Post by: badon on August 09, 2016, 04:05:00 PM
It looks like neither URL has all of the mods, so I had to add both. I deleted the default URL, so I don't know what that was originally, but it had even fewer mods.
Title: Re: Say Thanks
Post by: kelvincool on August 09, 2016, 08:00:50 PM
The URL I found was the one that comes with the install. No idea why neither URL gets you everything.
Title: Re: Say Thanks
Post by: badon on August 09, 2016, 11:09:54 PM
Just tried to install, I got the following error:


15. Execute Modification ./Sources/Load.php Test failed
1. Add After ./Sources/Load.php Test successful
2. Add After ./Sources/Load.php Test successful
3. Add After ./Sources/Load.php Test successful
4. Add After ./Sources/Load.php Test successful
5. Add After ./Sources/Load.php Test successful
6. Add After ./Sources/Load.php Test successful
7. Add After ./Sources/Load.php Test successful
8. Add Before ./Sources/Load.php Test failed


Code: (Find) [Select]

LEFT JOIN {db_prefix}membergroups AS pg ON (pg.id_group = mem.id_post_group)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)';
}
elseif ($set == 'minimal')


Code: (Add Before) [Select]

LEFT JOIN {db_prefix}messages_thanks_stats AS mts ON (mts.id_member = mem.id_member)
Title: Re: Say Thanks
Post by: kelvincool on August 10, 2016, 10:02:05 AM
Looks like a conflict with another mod, you will have to do the edit manually to install the mod.

Do you want to attach your Load.php file and I'll see if I can work out which mod is conflicting, might be able to change the find to something else.
Title: Re: Say Thanks
Post by: badon on August 10, 2016, 03:33:50 PM
I just did a diff with WinMerge on my Load.php, and I think the conflict is coming from Display Additional Membergroups (http://custom.simplemachines.org/mods/index.php?mod=3805). Is it possible to make Say Thanks compatible with Display Additional Membergroups?
Title: Re: Say Thanks
Post by: kelvincool on August 11, 2016, 01:10:55 PM
I've uploaded a new version that should play nice with Display Additional Membergroups. Just remember to install Display Additional Membergroups first before Say Thanks, flip the order around when uninstalling.
Title: Re: Say Thanks
Post by: badon on August 13, 2016, 11:44:17 PM
It worked! Thank you!
Title: Re: Say Thanks
Post by: ashish101 on August 22, 2016, 08:16:47 PM
Hi Kelvin

Can this mod replace Thank-o-matic - http://www.simplemachines.org/community/index.php?topic=176565.0 . Any issues with large number of users using it?

Is it possible to import existing Thank-0-matic data?
Is it possible to automatic thank on an user's action? For ex. downloading an attachment?

Thanks for your time in advance :).
Title: Re: Say Thanks
Post by: Ninja ZX-10RR on August 22, 2016, 11:46:10 PM
Use search function please: http://www.simplemachines.org/community/index.php?action=search2;search=matic;topic=527032
Title: Re: Say Thanks
Post by: kelvincool on August 23, 2016, 03:10:51 PM
Yes this mod can replace Thank-o-matic, no reported issues with large numbers of users using it.

Yes it is possible to import Thank-o-matic data, see Ninja ZX-10RR's link and you will find the post where another user asked for the same thing.

No it is not possible to thank on user action at the moment.
Title: Re: Say Thanks
Post by: badon on August 24, 2016, 07:06:18 PM
It is currently difficult to find the posts that a user has been thanked-for. If a user can easily see which of their posts were thanked, and by who, it would encourage their participation on a forum. I've attached a series of 4 screenshots that illustrate exactly how to find that information. Note that there is nothing in the 1st and 2nd steps that tell a user they are navigating to see their thanked posts. In my own case, I found it by accident after giving up on trying to find it. I assumed it was not a feature of this mod, and I was preparing to request the feature.

Now that I know the feature is already there, it just needs to be easier to find. I suggest linking the "Thanked: 6 times" text in step #1 of my example, so it leads directly to the page shown in step #4. In the example, the URL format looks like this:

https://forum.coincompendium.com/index.php?action=profile;area=showposts;sa=thanked;u=1

So, only the user number in "u=1" would need to dynamically added to generate the link for the correct profile. I'm not sure exactly how to get that info, but I suspect it would be pretty easy to add this feature, since I assume you already grab the user number to use for other purposes in this mod. The only remaining thing to do is linkify the text with a scrap of HTML.

Correct me if I'm wrong.
Title: Re: Say Thanks
Post by: kelvincool on August 26, 2016, 05:41:55 AM
Thanks badon for that great suggestion, available in 1.3.6 now.
Title: Re: Say Thanks
Post by: badon on August 27, 2016, 05:10:59 PM
I don't get a red upgrade indicator in the package manager. It just shows green for version 1.3.5. Any guess why that might be? When I try to install it over top of the original, it errors-out on its own previous changes.
Title: Re: Say Thanks
Post by: kelvincool on August 28, 2016, 07:55:43 AM
I have no idea why the red upgrade indicator is not shown. Everything is marked correctly in the package-info and on the mod page. As for installing the new version, just uninstall the old one first and install the new one.
Title: Re: Say Thanks
Post by: badon on August 28, 2016, 09:30:18 PM
I just checked the package manager and now I have the red indicator for Say Thanks. I have no idea what changed. Maybe it was the attempt to install it that resulted in it being downloaded and SMF's version tracking information being updated. That would be a bug in SMF of some kind, probably...assuming it's not a problem with my config, of course.

About the new version, it now has the link, but it could use a style that makes it clear it's a link, like an underline, but that's trivial. As it is, it's a big improvement that ought to be effective in encouraging participation. Thank you very much!
Title: Re: Say Thanks
Post by: xxxbusinessc55 on August 30, 2016, 05:17:01 AM
Great! Thanks!
Title: Re: Say Thanks
Post by: kelvincool on August 31, 2016, 06:28:03 PM
Regarding the underline link style, that is completely dependent on the theme you are using. It wouldn't make any sense to force the style in the mod.
Title: Re: Say Thanks
Post by: badon on August 31, 2016, 06:44:13 PM
Quote from: kelvincool on August 31, 2016, 06:28:03 PM
Regarding the underline link style, that is completely dependent on the theme you are using. It wouldn't make any sense to force the style in the mod.

I didn't realize that. I agree, you're right, it shouldn't be tampered-with in the mod. I can change it in the theme instead, that should be trivial to customize manually if I decide it has to be done.
Title: Re: Say Thanks
Post by: badon on August 31, 2016, 07:09:06 PM
I have another feature idea for you. Now that we can see all the most recently thanked posts on a specific user's profile, I would like to see all the most recently thanked posts on the entire forum. It would be helpful to surface "hot topics" that aren't actually getting any replies, but they ARE getting a lot of thanks. The recent posts in the "Info Center" on the forum index is helpful for showing posting activity and moved topics, but much of that is noise, and better quality posts that are more popular could be found if recent thanks activity were shown too.

I think it would make sense to sort the posts by thanking date/time, but I don't know if the thanks time information is recorded by the Say Thanks mod. If not, then maybe it's not possible to add this feature until after thanking time data is collected.

A post could be sorted by date/time exactly the same way as it is done in the Recent Posts section in the Info Center, but after that, they can be sorted by the number of thanks they have. So, older posts that would normally drop off of the Recent Posts lists would be retained if they have enough thanks to remain in the "Recent Thanks" list.

For example, if there are 100 posts displayed in the "Recent Posts" section, the top 10 of them could displayed in the "Recent Thanks" section, sorted by the number of thanks they have received. That would invite more thanking activity for the best posts too, which would serve to reinforce the surfacing of the best posts at the top of the "Recent Thanks" section.

I'm not sure what the behavior should be if the "Recent Thanks" section is configured to show more posts than have actually been thanked recently. Is it difficult to grab some more older posts that wouldn't ordinarily show up in the "Recent Posts" section because they're too old? That would require the mod to query the database on its own, in addition to the normal database queries, which would impact performance. Maybe that could be configurable in a "Fill Recent Thanks with older posts" option, so it could be turned off if minimizing database queries is necessary for performance. Then, the "Recent Thanks" section might be empty sometimes if nothing in the "Recent Posts" has been thanked before they drop off the list.

I'm not sure how much work is involved in implementing this feature idea, but it's definitely much more work than simply linking the profile thanks count. However, I think the effort-to-benefit ratio might be just as good or better in terms of getting active registered users to participate by using the Say Thanks features, AND making those "thanks" useful to everyone who reads the forum, including guests, by surfacing posts that have them.

For now, the actively-posting users are the only ones that derive benefits from the Say Thanks mod. Since they can now easily see every post that has been thanked, they are getting more frequent feedback that encourages them to make similarly popular posts. Surfacing those posts for everyone would probably complete the fundamentally important feature set of the Say Thanks mod (the features that give the most benefits - the low hanging fruit).
Title: Re: Say Thanks
Post by: kelvincool on September 04, 2016, 05:11:55 PM
That idea is certainly something I've been considering, like you said it's not a simple feature to implement and will take time.
Title: Re: Say Thanks
Post by: aodio on November 02, 2016, 08:20:29 PM
Can you see the "say thanks" button when you're in Admin mode?
Title: Re: Say Thanks
Post by: kelvincool on November 03, 2016, 04:21:00 PM
Quote from: aodio on November 02, 2016, 08:20:29 PM
Can you see the "say thanks" button when you're in Admin mode?

What do you mean by Admin mode? Do you mean when you're logged in as admin? If so yes you canh still see Say Thanks button as it's available to everyone except guests.
Title: Re: Say Thanks
Post by: aodio on November 05, 2016, 06:02:24 PM
Quote from: kelvincool on November 03, 2016, 04:21:00 PM
Quote from: aodio on November 02, 2016, 08:20:29 PM
Can you see the "say thanks" button when you're in Admin mode?

What do you mean by Admin mode? Do you mean when you're logged in as admin? If so yes you canh still see Say Thanks button as it's available to everyone except guests.


All good ..works brilliantly now... forgot to tick apply to all themes at the bottom before install... cheers  ;)
Title: Re: Say Thanks
Post by: verano23 on November 06, 2016, 01:07:53 AM
Does this work with version 2.011 ?
Title: Re: Say Thanks
Post by: kelvincool on November 06, 2016, 06:35:43 AM
Quote from: verano23 on November 06, 2016, 01:07:53 AM
Does this work with version 2.011 ?

Yes it does.
Title: Re: Say Thanks
Post by: kelvincool on November 06, 2016, 06:49:53 AM
Quote from: aodio on November 06, 2016, 06:42:44 AM
Can't seem to find where to change the colour of the "total likes" font in member states side bar

Any ideas?

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi269.photobucket.com%2Falbums%2Fjj61%2Fcucinadio%2FLike%2520total_zpsytg7smvd.jpg&hash=a97649d9efbf94cdea9d1e8418a684690b0e4b16) (http://s269.photobucket.com/user/cucinadio/media/Like%20total_zpsytg7smvd.jpg.html)

cheers

That doesn't look like it's from Say Thanks mod? Unless you've customised the text? In any case the easiest way to resolve it is to add in some extra css into your theme's css file. It's probably that colour because it's a visited link.
Title: Re: Say Thanks
Post by: kelvincool on November 06, 2016, 07:12:17 AM
This is definitely not from Say Thanks mod, it looks like it's from Like Posts so you want to post here: http://www.simplemachines.org/community/index.php?topic=506743.0
Title: Re: Say Thanks
Post by: aodio on November 06, 2016, 07:14:19 AM
Oh Bugga!.. you are right ..lol

Sorry mate

Title: Re: Say Thanks
Post by: jm_araujo on December 28, 2016, 10:40:45 AM
Great work! Just added this to my forum and works great.

I've added a translation to Portuguese (ANSI and UTF-8) to 'languages.xml', find it attached.
Title: Re: Say Thanks
Post by: Romanj on February 28, 2017, 03:40:08 PM
I've tested and compared several similar mods. This one appeared best for my needs. Good, simple and stable (at least seems stable).
I'm going to use it on a working project. So I keep in mind there is a chance some day in future I'll move to SMF 2.1 hopefully.
Thanks (or likes) it is a kind of user data. It is a good idea to keep them while moving to a new engine version.

I dont know will this mod be available for 2.1 or not. So I want to make sure I will able to convert this "thanks" to inbuilt "likes" of 2.1.
I've checked and compared database tables for thanks of this mod and inbuilt 2.1 likes system. I found they are pretty much similar.

Say Thanks main table "smf_messages_thanks" columns:
id_msg   |   id_member

SMF 2.1 likes main table "smf_user_likes" columns:
content_type   |   content_id   |   id_member   |   like_time

id_msg = content_id. "content_id" - contains "msg" for all messages.
The only difference - in 2.1 there is additional column - time_like. The time when like was given.
So I'd like to save this data while using Say Thanks mod. With this I would have full data needed for 2.1 convertation in some future.

How to record "like_time" to DB:
Please tell me if this code is correct. I've checked and it works fine. Though I'm not a php-mysql pro, so I don't know if this 100% correct.

in SayThanks.php find:
$smcFunc['db_insert']('ignore' ,
'{db_prefix}messages_thanks',
array(
'id_msg' => 'int', 'id_member' => 'int'
),
array(
$msg, $user_info['id']
),
array('id_msg','id_member')
);


replace with:
$smcFunc['db_insert']('ignore' ,
'{db_prefix}messages_thanks',
array(
'id_msg' => 'int', 'id_member' => 'int', 'like_time' => 'int'
),
array(
$msg, $user_info['id'], time()
),
array('id_msg','id_member','like_time')
);


Column "like_time" at "smf_messages_thanks" table could be created manually with phpMyAdmin. Or by changing code at add_settings.php before first installation.


Ideas for author of this beautiful mod, how to make it even better:

- If you also add time of thanks column, it would be possible to add "most thanked post of the day" or "most thanked post of the week" functions.
- Ability to choose the groups of users who can and can't give thanks. Just to prevent manipulations when "fake" users with no posts give a lot of thanks.
Title: Re: Say Thanks
Post by: pocttopus on March 20, 2017, 05:53:05 AM
Hello folks,

I have an issue with this mod and I want to fix it. Forum version: 2.0.13 Mod version: 1.3.6
The mod is working actual, but in the administration panel it says that I can only delete the files from the server and there is red notification.
I went to delete it and again to install from beginning, but after that I need to replace some code in the "Profile.template.php" file.

The issue is that the code is not there to be replaced. Here is what I need to do:

(https://s14.postimg.org/v1cvdofy9/Capture8.png)

How can I solve this because I am making a migration of the forum to other host. When I run the forum locally the posts are missing. For now, I want to fix the issues when I am going to contact the support of the new host.
« Reply #1460 on: March 08, 2017, 09:13:24 am »

Fatal error: Class 'SayThanks' not found in D:\xampp\htdocs\smf\Sources\Load.php(2266) : eval()'d code on line 460
Title: Re: Say Thanks
Post by: aetherdan on March 22, 2017, 06:06:39 AM
Hi,

Would like to report a bug, can grant myself unlimited likes.

index.php?action=thank;msg=3580;member=273;topic=88

change the "msg=3580" to any number and continuously get thanks.

Tested it out and it will even work for post that haven't even been created yet.
Title: Re: Say Thanks
Post by: aetherdan on March 30, 2017, 03:21:26 AM
I assume this mod is no longer supported.
Title: Re: Say Thanks
Post by: pocttopus on March 30, 2017, 03:56:24 AM
Quote from: aetherdan on March 30, 2017, 03:21:26 AM
I assume this mod is no longer supported.
I think you're right!  :(
Title: Re: Say Thanks
Post by: GL700Wing on March 30, 2017, 07:01:46 AM
Quote from: aetherdan on March 22, 2017, 06:06:39 AM
Would like to report a bug, can grant myself unlimited likes.

index.php?action=thank;msg=3580;member=273;topic=88

change the "msg=3580" to any number and continuously get thanks.

Tested it out and it will even work for post that haven't even been created yet.
I must admit I would consider it highly unusual for a member to continually edit a URL string to boost the 'Thanks' count of another user.

That said the following code change should prevent this happening (it works on a test forum I've created - the member's 'Thanks' count doesn't increase and the message ID of the non-existent post isn't added to the database).

In the file ./Sources/SayThanks.php

Find:
if (empty($msg) || empty($topic) || empty($member) || (!empty($msg) && SayThanks::isPostOwner($msg))) {

Replace with:

// Make sure the post being thanked actually exists
$request = $smcFunc['db_query']('', '
SELECT id_member, id_topic
FROM {db_prefix}messages
WHERE id_msg = {int:id_msg}',
array(
'id_msg' => $msg,
'id_topic' => $topic,
'id_member' => $member,
)
);
$info = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

if (empty($info) || empty($msg) || empty($topic) || empty($member) || (!empty($msg) && SayThanks::isPostOwner($msg))) {
Title: Re: Say Thanks
Post by: dansal on August 02, 2017, 05:57:38 PM
Hi, great mod!!

I dont see here how list the last thanks of all users, ¿its possible?
Title: Re: Say Thanks
Post by: kim_c on October 22, 2017, 07:39:12 AM
The thanks string under posts is showing up twice, any idea why? Thanks
Title: Re: Say Thanks
Post by: kim_c on October 27, 2017, 01:17:46 PM
Is this mod no longer supported?  :-\
Title: Re: Say Thanks
Post by: Novice on January 03, 2018, 08:15:33 AM
I'd like to know the answer to that one myself. I just need it to function correctly in 2.0.15 as it did in versions previous to 2.014.
Title: Re: Say Thanks
Post by: jack001 on January 19, 2018, 05:39:56 AM
just installed it on my forum and works nice. Would like to have highest 3 thank you receiver on info center. How can i do that?
Title: Re: Say Thanks
Post by: kim_c on January 19, 2018, 10:59:01 AM
Quote from: jack001 on January 19, 2018, 05:39:56 AM
just installed it on my forum and works nice. Would like to have highest 3 thank you receiver on info center. How can i do that?

Mod is no longer supported so you probably won't receive an answer  :(
Title: Re: Say Thanks
Post by: dekatria on July 24, 2018, 08:14:06 AM
I have migrated my forum to new folder and new domain.
The stats are there and the option to thank, but when I press the "say thanks" link, it doesn't work - it goes on "loading mode" indefinitely.

Would uninstalling and reinstalling the mod be a good idea?
Title: Re: Say Thanks
Post by: -Rock Lee- on July 24, 2018, 11:36:26 AM
Quote from: dekatria on July 24, 2018, 08:14:06 AM
I have migrated my forum to new folder and new domain.
The stats are there and the option to thank, but when I press the "say thanks" link, it doesn't work - it goes on "loading mode" indefinitely.

Would uninstalling and reinstalling the mod be a good idea?

What I can think of is that the route is wrong to move it, it would be good to uninstall it and reinstall to correct this, otherwise it would be to look for the wrong route.

Regards!
Title: Re: Say Thanks
Post by: dekatria on July 24, 2018, 12:13:23 PM
I tried to uninstall and all hell broke lose.

I got the  theme_template_error

Hopefully the automatic backup saved me.

Then I tried to manually uninstall, error again.
Tried to reinstall, error again (class SayThanka ALREADY DEFINED IN SOURCES/SAYTHANKS.PHP etc.)

Now I'm stuck with a neither removed nor installed mod that doesn't work and when I try to either install or remove I get an error.

For example I have manually reversed all modifications to the files. But when I try to delete the additional files added by the mod I get an error, although the mod was not installed according to admin panel.

I believe it must be a modification in the db that causes the error and that while the theme is not installed the db asks for some file. I attack the add_settings.php which installs the mod and the remove_settings.php in case anyone would like to take a look and help me.
Title: Re: Say Thanks
Post by: dekatria on July 24, 2018, 02:32:39 PM
I have manually reversed all the changes and the package appears as not installed. But when I try to manually delete the SayThanksTemplate.php files I get an theme_template_error.

I believe something is requesting these files though the package appears as not installed.
Title: Re: Say Thanks
Post by: -Rock Lee- on July 24, 2018, 02:53:19 PM
At the moment of removing it, you have to extract the information from the database and it seems that there is some restro, try using the fix_packages (https://download.simplemachines.org/index.php?thanks;filename=fix_packages.php) to erase everything else. Also try to make a backup before touching any file ... I will try to do a local tests to see if I can reproduce the error and tell you more safe to do, sorry not to help more at this time.


Regards!
Title: Re: Say Thanks
Post by: dekatria on July 24, 2018, 03:25:55 PM
Thanks.

I would like someone who knows php to tell me what the install/uninstall files do, so I can do it manually.
Because when I delete the additional files manually I get an error.
Title: Re: Say Thanks
Post by: -Rock Lee- on July 24, 2018, 03:30:27 PM
By doing so it automatically removes it from several places without problems to the contrary manually does not remove all the code at one time generating an error ... Since there is a variable you are making this call to what you got, you would have to remove everything completely and if the error still persists, something must be removed or it was not removed correctly!


Regards!
Title: Re: Say Thanks
Post by: dekatria on July 24, 2018, 04:31:51 PM
When I try to re-install the package I get the error:

Fatal error: Cannot declare class SayThanks, because the name is already in use in /home/xxx/public_html/domain.com/Sources/SayThanks.php on line 17
Title: Re: Say Thanks
Post by: GigaWatt on July 24, 2018, 04:34:41 PM
The mod didn't "clean house" (Arantor likes to say that :)) well when it was uninstalled.

Do you have a backup before you installed the mod the first time?
Title: Re: Say Thanks
Post by: dekatria on July 24, 2018, 05:04:09 PM
Finally managed to fix the problem (I think).
In the DB there was an entry of the old address that created conflicts
Specifically `smf_settings`.`variable` = 'integrate_pre_include';
Title: Re: Say Thanks
Post by: belfa on July 25, 2018, 04:55:53 AM
It would be interesting to have the total of those who thanked the topic in addition to the username.

The following users have thanked this post: ......
Total: ....

Can you tell me how it's done? Thank you
Title: Re: Say Thanks
Post by: CyanGaming on August 07, 2018, 07:49:45 AM
I installed it, but now I can't access my forum, it just says:

" Not unique table/alias: 'mts' "

how can I remove this
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 05:58:01 AM
I can't remember what happened between now and my last post, but I got everything working again.

However, after moving to a new webhost, I now get the error:

"Class 'SayThanks' not found"

The error is located in the first post wrapper of every thread, and no other posts load but the first one. Anyone have any ideas on how to fix this? I tried removing the mod, but it didn't go away.
Title: Re: Say Thanks
Post by: -Rock Lee- on August 08, 2018, 10:40:06 AM
Quote from: CyanGaming on August 08, 2018, 05:58:01 AM
I can't remember what happened between now and my last post, but I got everything working again.

However, after moving to a new webhost, I now get the error:

"Class 'SayThanks' not found"

The error is located in the first post wrapper of every thread, and no other posts load but the first one. Anyone have any ideas on how to fix this? I tried removing the mod, but it didn't go away.

What version of PHP are you using? It is the common error that happens to me when changing server.


Regards!
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 10:50:21 AM
Quote from: Rock Lee on August 08, 2018, 10:40:06 AM
Quote from: CyanGaming on August 08, 2018, 05:58:01 AM
I can't remember what happened between now and my last post, but I got everything working again.

However, after moving to a new webhost, I now get the error:

"Class 'SayThanks' not found"

The error is located in the first post wrapper of every thread, and no other posts load but the first one. Anyone have any ideas on how to fix this? I tried removing the mod, but it didn't go away.

What version of PHP are you using? It is the common error that happens to me when changing server.


Regards!
I assume it's php 7.2 but I could be wrong, I'm not sure how to check it.
btw, what have you done in the past to fix this issue

thanks :)
Title: Re: Say Thanks
Post by: Arantor on August 08, 2018, 10:53:49 AM
SMF 2.0 does not support PHP 7.2.
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 11:02:32 AM
Then I have absolutely no idea, nor do I know how to check. Everything else works fine, this error just appears in the first post of every topic. Making it impossible to read and send forum posts
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 11:16:35 AM
which version should I be using with smf 2.0.15? 7.0?
Title: Re: Say Thanks
Post by: d3vcho on August 08, 2018, 11:31:05 AM
Yes, PHP 7.0 should work fine.
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 11:51:15 AM
so does anyone know how I can completely uninstall any trace of Say Thanks so that I can reinstall a working version?
Title: Re: Say Thanks
Post by: -Rock Lee- on August 08, 2018, 12:29:04 PM
Quote from: CyanGaming on August 08, 2018, 10:50:21 AM
I assume it's php 7.2 but I could be wrong, I'm not sure how to check it.
btw, what have you done in the past to fix this issue

thanks :)

As I suspect as you say above 2.0.x accepts up to 7.0 at least for now (sure later accept or not newer versions of 7.x). The first option I use is to use php 5.6 as much as possible but adapt the mod, although I do not always adapt it for work ... then look for other alternatives!


Regards!
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 12:47:39 PM
did switching to 5.6 fix the error for you?
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 12:49:38 PM
could this have something to do with the error I'm getting?

The amount of thanks on profile page is showing up twice:
(https://i.imgur.com/TpETIYQ.png)
Title: Re: Say Thanks
Post by: -Rock Lee- on August 08, 2018, 01:16:51 PM
At least for the moment it works without problems even if the time comes I will have to migrate yes or yes to a new version... If it appears twice, it is usually because the code is duplicated, it happens in most cases.


regards!
Title: Re: Say Thanks
Post by: CyanGaming on August 08, 2018, 01:40:00 PM
I don't think I'm going to change my php version, I'm most likely just going to delete everything and reinstall smf
Title: Re: Say Thanks
Post by: -Rock Lee- on August 08, 2018, 02:05:59 PM
Quote from: CyanGaming on August 08, 2018, 01:40:00 PM
I don't think I'm going to change my php version, I'm most likely just going to delete everything and reinstall smf

Even installing everything if the mod was not updated to work at least with php 7.0 will not work... of course unless you adapt to work with the new version.

regards!
Title: Re: Say Thanks
Post by: Brewster on August 26, 2018, 11:19:06 AM
Hi

I have installed this mod on a 2.0.15 forum I am running, but there doesn't seem to be any buttons to thank users. I can see that it is loading the javascript, css and images.

What can I do to troubleshoot this?

Thanks,
Joe
Title: Re: Say Thanks
Post by: Brewster on August 26, 2018, 11:28:49 AM
I'm guessing I am missing some div elements around each post
Title: Re: Say Thanks
Post by: Brewster on August 26, 2018, 12:18:41 PM
Found the issue!

Many of the replacements defined in install.xml failed in my Display.template.php because it could not find the text to be replaced. My template had been heavily customised, so I had to do the replacements manually.

Looks like it is working ok now.

Joe
Title: Re: Say Thanks
Post by: delta5 on September 20, 2018, 02:00:07 PM
How do you remove individual boards from the "disable on individual boards" list?
Title: Re: Say Thanks
Post by: FaKiR on January 17, 2019, 08:47:50 AM
Hi !

I installed this mod on a premium theme. All works but I have a weird issue.

On Stats page my footer isn't at bottom of the page it's in the middle and hide some stuff.

If I uninstall the mod the Stats page is good again (with footer in bottom)

Someone knows how to fix it ?
Title: Re: Say Thanks
Post by: Klauser on March 13, 2019, 02:06:46 PM
Any news about to update this realy great mod to 2.1rc1 and +?
Title: Re: Say Thanks
Post by: sittingduck on September 18, 2019, 05:02:51 AM
I'm running this mod in connection with Hide Content (https://custom.simplemachines.org/mods/index.php?mod=4013) on SMF 2.0.15 with the Curve and Boru themes.  It installed fine, and is working, but intermittently fails to refresh the page to reveal the hidden text. I see the round icon and nothing happens. The page must be refreshed manually. Sometimes it works great, sometimes it hangs up. Very strange. Any ideas or help would be appreciated.
Title: Re: Say Thanks
Post by: sirfpsycho on September 22, 2019, 12:59:21 AM
I want say thanks button on topic. currently all  replies has say thanks button. It should be only for topic. How to do?
Title: Re: Say Thanks
Post by: shadav on September 22, 2019, 02:01:29 PM
Quote from: sirfpsycho on September 22, 2019, 12:59:21 AM
I want say thanks button on topic. currently all  replies has say thanks button. It should be only for topic. How to do?
sorry but that's not what this mod does, and would probably need to be completely rewritten to do that....
Quote from: kelvincool on August 30, 2014, 05:16:29 PM
Say Thanks provides the ability for users to thank posts.

there was a mod I found that did that, but it is outdated for smf1.x and doesn't look like anyone made one for 2.x
you might want to ask in the Mod Requests (https://www.simplemachines.org/community/index.php?board=79.0) board, maybe someone will make it for you
Title: Re: Say Thanks
Post by: Armitax25 on November 14, 2019, 01:18:40 PM

Hello

I have a small problem with the module "Say Thanks" it appears in two times as you can see on this screen :
https://custom.simplemachines.org/mods/index.php?mod=3898

hxxp:pix.watch/thumb/529YRb/AuP4fk.png [nonactive]

I also look in the file modifications of the modules but I can not find anything

Someone would know how to get things done to help me?

Thank you
Title: Re: Say Thanks
Post by: Shambles on November 16, 2019, 12:26:36 PM
Looks like you attempted to install this mod twice.

Download and attach the Display.template.php file from your Themes\default folder and we can have a look at fixing it for you.
Title: Re: Say Thanks
Post by: dominioboys on March 21, 2020, 06:20:06 PM
how can I impose on the user that if he doesn't click I like he won't see the link I insert in the post?
Title: Re: Say Thanks
Post by: dominioboys on March 25, 2020, 08:32:37 AM
the mod works in part there must be something that blocks the execution of the thanks and in the various tests when there is no "hide" code it works regularly
I note this though:
in the install.xml file it only gives me to add codes before and after
but when i try to uninstall the mod it gives me this
code(search):
$context['hc_current_post'] = $row;
$autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
$modSettings['autoLinkUrls'] = "";
$context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg'], array('hide'));
$modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;
unset($context['hc_current_post']);
$context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg']);


replace:
$context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg']);


in fact in the code I have this:
a double string equal correct?
$context['hc_current_post'] = "preview";
$autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
$modSettings['autoLinkUrls'] = "";
$context['preview_message'] = parse_bbc($context['preview_message'], (isset($_REQUEST['ns']) ? 0 : 1), '', array('hide'));
$modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;
unset($context['hc_current_post']);
$context['preview_message'] = parse_bbc($context['preview_message'], isset($_REQUEST['ns']) ? 0 : 1);


so the code added, did not replace


and in the smf logs comes out this:
Call to undefined function template_hidecontent_wrapper(

and add this error:
File:/******/Sources/SayThanks.php

Errore: 2: offset stringa non valido 'id_msg'

URL: ?azione:post2;scheda-13;anteprima;xml

Title: Re: Say Thanks
Post by: jsx on April 06, 2020, 08:49:33 AM
How I can hide "Thanked: x times" for guests on the user's profile in the post?

Title: Re: Say Thanks
Post by: goldenstudios on April 21, 2020, 10:24:06 AM

how can I add the total number of thanks?
Title: Re: Say Thanks
Post by: teddy7 on September 23, 2021, 04:31:33 PM
Dyatlov Pass Forum → Administration Center → Modification Settings → Say Thanks

I can't change anything in "Disable on individual boards". What is it for?
Title: Re: Say Thanks
Post by: Diego Andrés on September 23, 2021, 05:26:48 PM
Quote from: teddy7 on September 23, 2021, 04:31:33 PMI can't change anything in "Disable on individual boards". What is it for?

You select them using ctrl + mouse 1 (click)
Title: Re: Say Thanks
Post by: jsx on November 24, 2021, 11:11:32 AM
Is there anybody able to create a tool that import the thanks from this modification to the thanks system in SMF 2.1?

@kelvincool is inactive on the forum.
Title: Re: Say Thanks
Post by: jsx on November 26, 2021, 05:26:11 AM
I thought the SMF 2.1 had a thanks system, but I was wrong.

Author of this modification is inactive so no one can adapt this modification to the 2.1 system.

@kelvincool we need you here. :)
Title: Re: Say Thanks
Post by: kelvincool on April 18, 2022, 10:40:43 AM
Updated this mod to work with SMF 2.1.1, it's all hook based now too  :)
Title: Re: Say Thanks
Post by: gevv on April 18, 2022, 01:39:17 PM
Quote from: kelvincool on April 18, 2022, 10:40:43 AMUpdated this mod to work with SMF 2.1.1, it's all hook based now too  :)

Thanks @kelvincool

"Hides post content"   How can I use this feature?  I didn't see a setting or anything related. (SMF 2.1.1)
Title: Re: Say Thanks
Post by: kelvincool on April 18, 2022, 03:42:33 PM
@gevv That was a feature that was enabled in conjunction with the Hide Content (https://custom.simplemachines.org/index.php?mod=4013) mod, that mod is not available for SMF 2.1.1, at least not yet. I'm not sure if I will update that since it wasn't really that popular.
Title: Re: Say Thanks
Post by: gevv on April 18, 2022, 03:58:18 PM
I understand. it would be nice to update  Thanks.
Title: Re: Say Thanks
Post by: Steve on April 19, 2022, 05:22:34 AM
Hmmm ... I get an error in the admin log when I click the thanks button. And nothing appears on the post.
action=thank;msg=217272;member=2;topic=12034;ajax=1;xml=1
Sources/SayThanks.php (Line 800)
Title: Re: Say Thanks
Post by: jsx on April 19, 2022, 05:38:13 AM
@kelvincool

Thank you so much for updating this mod to 2.1.1 - Now SMF 2.1 is richer because it has just that mod.

After updating the forum to SMF 2.1.1 how to import the distributed thanks to SMF 2.1.1?

Title: Re: Say Thanks
Post by: kelvincool on April 19, 2022, 06:31:59 AM
@Steve is there any other info on that error in the log? If you have access to your database, can you check if the table messages_thanks exists.

Another thing that will help is this, before clicking on the Say Thanks button do this first:

right click -> inspect -> network

Now click say thanks button

Notice the request should appear in the log, click on the request that matches the thank url (the one with action=thank or withdrawthanks)

Click on response tab on the right hand side and post the result here.

@jsx not sure what you mean by distributed thanks, you mean from v1.3.6? If so, you don't need to do anything, the tables haven't changed, as long as you didn't delete the tables when uninstalling the previous version the data will still be there.
Title: Re: Say Thanks
Post by: jsx on April 19, 2022, 06:59:44 AM
Quote from: kelvincool on April 19, 2022, 06:31:59 AM@jsx not sure what you mean by distributed thanks, you mean from v1.3.6? If so, you don't need to do anything, the tables haven't changed, as long as you didn't delete the tables when uninstalling the previous version the data will still be there.

Yes, I mean thanks from version 1.3.6

Thanks for the clarification.
Title: Re: Say Thanks
Post by: Steve on April 19, 2022, 10:51:51 AM
Quote from: kelvincool on April 19, 2022, 06:31:59 AM@Steve is there any other info on that error in the log? If you have access to your database, can you check if the table messages_thanks exists.

Another thing that will help is this, before clicking on the Say Thanks button do this first:

right click -> inspect -> network

Now click say thanks button

Notice the request should appear in the log, click on the request that matches the thank url (the one with action=thank or withdrawthanks)

Click on response tab on the right hand side and post the result here.
My mod guy says it uploaded to the wrong location somehow, though he didn't tell me where that was. He installed it manually and it works perfectly.

If you still want me to do those tests, let me know. I'll have to do it later as I'm limited on my typing time due to surgery yesterday.
Title: Re: Say Thanks
Post by: kelvincool on April 19, 2022, 11:14:40 AM
Don't think there's any need to do those tests if it's working now.
Title: Re: Say Thanks
Post by: Steve on April 19, 2022, 11:20:24 AM
But it's only working because it was installed manually. Doing it via Package Manager caused the error. But it's your call.  :)
Title: Re: Say Thanks
Post by: kelvincool on April 19, 2022, 11:40:10 AM
Ah I see, I wasn't sure what you meant by manually installing it. It would be interesting to see if you get the same error if you uninstalled it, deleted the tables and re-installed via package manager. I checked the database script with another mod and it looks pretty standard stuff so not sure exactly what's happened. Are you on postgres or mysql?

Don't feel obliged to do that test, if you got it installed manually and it's working it should be fine going forwards, database changes are pretty rare so any updates should install without issue.
Title: Re: Say Thanks
Post by: Steve on April 19, 2022, 03:52:52 PM
He said the SayThanks.php file wasn't present in my Sources folder for some reason.

As long as no one else is having a problem I think I'll leave things as they are.

Great update, btw.  ;D
Title: Re: Say Thanks
Post by: kelvincool on May 02, 2022, 09:06:47 AM
Hide Content (https://custom.simplemachines.org/index.php?mod=4013) mod is now available for SMF 2.1.1 so this mod has also been updated to support the latest version of that mod.
Title: Re: Say Thanks
Post by: gevv on May 02, 2022, 10:24:02 AM
Thanks  @kelvincool

Turkish translation

Note: "Thanked:" text in the profile does not change even though I translate it
Title: Re: Say Thanks
Post by: kelvincool on May 08, 2022, 04:12:43 PM
Just released v2.2.0, main changes for this release are:


I won't bother posting on the Hide Content topic but I released a new version of that too to include your Turkish translation @gevv. Thanks for the translation.
Title: Re: Say Thanks
Post by: gevv on May 08, 2022, 04:42:19 PM
@kelvincool   thanks for the update  👍
Title: Re: Say Thanks
Post by: hungarianguy on May 08, 2022, 04:43:10 PM
Can you tie this mod with the alerts? If someone thanks my posts I receive an alert that my post was thanked by this user.
Title: Re: Say Thanks
Post by: kelvincool on May 08, 2022, 04:49:37 PM
@hungarianguy Coincidentally enough I was thinking about that yesterday, I'll have a look into it.
Title: Re: Say Thanks
Post by: hungarianguy on May 08, 2022, 04:54:52 PM
Quote from: kelvincool on May 08, 2022, 04:49:37 PM@hungarianguy Coincidentally enough I was thinking about that yesterday, I'll have a look into it.

Thanks for considering it.
Title: Re: Say Thanks
Post by: Diego Andrés on May 08, 2022, 04:54:58 PM
Could you also add a custom hook in thank action for possible integrations with other mods?

Example: https://github.com/SychO9/smf-best-answer/blob/bc5752acd8cc86da8a03132da340c92765ab5ab9/Sources/BestAnswer/Actions.php#L121
Title: Re: Say Thanks
Post by: kelvincool on May 08, 2022, 05:04:05 PM
@Diego Andrés I'll add some in for the next release
Title: Re: Say Thanks
Post by: hungarianguy on May 15, 2022, 09:47:39 AM
When can we expect the next release?
Title: Re: Say Thanks
Post by: Steve on May 15, 2022, 12:45:22 PM
I just know you're going to get the stock answer ... 'When it's ready.' lol
Title: Re: Say Thanks
Post by: kelvincool on May 15, 2022, 01:21:52 PM
Ha, it's ready!

v2.3.0 is released


I toyed with the idea of enabling the alerts by default but wasn't sure everyone would want that on so right now it's up to the admins.

@Diego Andrés let me know if that hook is good enough or you need any other params passed through.
Title: Re: Say Thanks
Post by: Diego Andrés on May 15, 2022, 03:56:57 PM
That's great, thanks!
Title: Re: Say Thanks
Post by: wylekk on May 19, 2022, 09:55:33 AM
PHP: 7.4.28, версия MySQL: 10.1.48-MariaDB-0+deb9u2.
SMF 2.1.2

On the server there are errors in the profile, on OpenServer everything works :-\

Database Error

'admin_pasbb.b.id_board' isn't in GROUP BY
File: /home/----/public_html/Sources/SayThanks.php
Line: 535

'admin_pasbb.b.id_board' isn't in GROUP BY
File: /home/admin/web/-----/public_html/Sources/SayThanks.php
Line: 565
Title: Re: Say Thanks
Post by: Doug Heffernan on May 19, 2022, 10:13:31 AM
Quote from: wylekk on May 19, 2022, 09:55:33 AMPHP: 7.4.28, версия MySQL: 10.1.48-MariaDB-0+deb9u2.
SMF 2.1.2

On the server there are errors in the profile, on OpenServer everything works :-\

Database Error

'admin_pasbb.b.id_board' isn't in GROUP BY
File: /home/----/public_html/Sources/SayThanks.php
Line: 535

'admin_pasbb.b.id_board' isn't in GROUP BY
File: /home/admin/web/-----/public_html/Sources/SayThanks.php
Line: 565


This is related to this:

https://dev.mysql.com/doc/refman/8.0/en/group-by-handling.html

To fix it, find this code:

GROUP BY m.id_msg
And replace it with:

GROUP BY m.id_msg, b.id_board
if there will be a similiar error again, the solution is for each non-aggregated field to be grouped.

@kelvincool, another small issue that I noticed is that the $scripturl var has not been declaired as global in the language files. That threw an unindetified index scripturl message in my error log. Declairing the aforementioned var as global fixed it.
Title: Re: Say Thanks
Post by: kelvincool on May 19, 2022, 03:50:57 PM
@wylekk that's an interesting error, I think that must be occuring because you have ONLY_FULL_GROUP_BY enabled on your mysql config, I've not touched this bit of code for years and I believe mysql enabled this option by default a few years back. What's kind of interesting is I also have this enabled on my local version but I don't get any errors. Anyways should be a relatively simple fix of adding all the columns to the group by like @Doug Heffernan has suggested there.

@Doug Heffernan good spot on that global declaration, will be fixed in next release.
Title: Re: Say Thanks
Post by: wylekk on May 21, 2022, 06:39:35 AM
I made a converter for mod sitenx_2.3.0, transferred data from the tables smf_uzer_liks and smf_message. Disabled the built-in likes. Now users on the forum use the mod not from scratch. The mod is installed on the main site.
Title: Re: Say Thanks
Post by: kelvincool on May 23, 2022, 05:18:14 PM
v2.3.1 is released


@wylekk that's cool that you made a converter  :)
Title: Re: Say Thanks
Post by: wylekk on May 25, 2022, 09:15:26 AM
Quote from: kelvincool on May 23, 2022, 05:18:14 PMv2.3.1 is released

  • Fix for group by errors
  • Fix for $scripturl var in the language files


Everything works!

The converter below works on the Open Server, PHP7.1-7.4
File name - smf-art.php

  <?php
 
echo "<head> <style>
body {max-width:1224px; margin:auto;border:1px solid green; border-radius:10px;} 
.column {padding: 10px;}
.head{text-align:center; background-color: blue; color:white; border-radius:10px 10px 0 0; height: 65px;}
.bottom{text-align:center; background-color: blue; color:white; border-radius:0 0 10px 10px; height: 65px;}
.bott{color:red;}
</style></head>
<body>
<div class ='head'>Конвертер лайков форума smf212 на мод Say Thanks<br><br>
(Пожалуйста, проявите терпение, некоторые действия могут быть весьма долгими)</div>
 <div class ='bott'>сделано для сайта <a href=\"https://wylek.ru\">WYLEK.ru</a><br></div>


//--------------------------

  
  
$dblocation1 = "localhost";//сервер базы данных
  
$dbsmf = "smf211";//имя базы smf
  
$dbuser1 = "1234";//имя пользователя
  
$dbpasswd1 = "1234";//пароль от базы данных

  
$prefixsmf = "smf";//префикс таблиц SMF

//конект к базе
$dbcnx = mysqli_connect($dblocation1,$dbuser1,$dbpasswd1);
  if(!
$dbcnx)
  {
  exit("
Сервер базы данных $dbsmf сейчас недоступенПовторите попытку позже.");
  }
  
$db_select = mysqli_select_db($dbcnx$dbsmf);
  if(!
$db_select)
  {
  exit("
База данных $dbsmf недоступнаОбратитесь к администратору для решения проблемы.");
  }
echo ('<br>'); 
echo "
Соединение с базой $dbsmf установлено!" . PHP_EOL;
echo ('<br>');
echo "
Информация о сервере" . mysqli_get_host_info($dbcnx) . PHP_EOL;
echo ('<br>*******************************************<br>');


echo'<a href=?step27>1. Лайки</a> --><a href=?step28>2. Пересчёт</a><br><br>';    


//лайки----------------------------------------------------------------------------------
if(isset(
$_GET['step27']))
{

$i = 0;
mysqli_set_charset(
$dbcnx, "utf8");
//очистка
$query = "TRUNCATE TABLE {$prefixsmf}_messages_thanks";
$result = mysqli_query($dbcnx$query);
if(!
$result) { echo ("<br><br><font color=red>mysql вернула ошибку <br><textarea style='width: 300px; height: 200px'>".mysqli_error($dbcnx)."</textarea><brв коде <br><textarea style='width: 300px; height: 200px'>{$query}</textarea><br><br></font>");} else echo "<br><br>Таблица успешно очищена<br>";
//очистка

//создаем столбцы
$sql = mysqli_query($dbcnx, "ALTER TABLE {$prefixsmf}_messages_thanks ADD COLUMN id_member_to TEXT AFTER id_member");
$sql = mysqli_query($dbcnx, "ALTER TABLE {$prefixsmf}_messages_thanks ADD COLUMN id_msg5 TEXT AFTER id_msg");
    
  //вытягиваем данные из таблицы smf_user_likes            
$post = mysqli_query($dbcnx, "SELECT FROM {$prefixsmf}_user_likes WHERE content_type='msg'");            
        while (
$news = mysqli_fetch_array($post)) {
            
$id_member=$news['id_member'];
            
$like_time=$news['like_time'];
            
$content_id=$news['content_id'];

          
$i++;

$query = "INSERT INTO `{$prefixsmf}_messages_thanks` (`id_msg`, `id_member`, `date_thanked`) VALUES
('$content_id''$id_member''$like_time');";

    if (mysqli_query(
$dbcnx$query)) {        
          echo "";
    } else {

          echo "
<br><br>Error" . $query . "<br><br>" . mysqli_error($dbcnx);
    }
    }

//заполняем столбец единицей    
$sql = mysqli_query($dbcnx, "UPDATE {$prefixsmf}_messages_thanks SET id_msg5=1");//

//перекидываем ID кому лайкнули
$sql = mysqli_query($dbcnx, "UPDATE {$prefixsmf}_messages_thanks, {$prefixsmf}_messages \n"
. "
SET {$prefixsmf}_messages_thanks.id_member_to = {$prefixsmf}_messages.id_member \n"
. "
where {$prefixsmf}_messages_thanks.id_msg = {$prefixsmf}_messages.id_msg");

mysqli_close(
$dbcnx);    
echo "
<br /><span style='color: green;'>Перенос завершён!</span><br />";
echo "
<span style='color: green;'>Всего конвертировано $i лайков</span><br>";
echo "
<br><div style='text-align:center;'><a href='smf-art.php'><button>Продолжить</button></a></div></div><div class ='bottom'></body></div>";
}


//==============================================================================================
//пересчет
if(isset(
$_GET['step28']))
{

$i = 0;
mysqli_set_charset(
$dbcnx, "utf8");
//очистка
$query = "TRUNCATE TABLE {$prefixsmf}_messages_thanks_stats";
$result = mysqli_query($dbcnx$query);
if(!
$result) { echo ("<br><br><font color=red>mysql вернула ошибку <br><textarea style='width: 300px; height: 200px'>".mysqli_error($dbcnx)."</textarea><brв коде <br><textarea style='width: 300px; height: 200px'>{$query}</textarea><br><br></font>");} else echo "<br><br>Таблица успешно очищена<br>";
//очистка


  //вытягиваем данные из таблицы smf_messages    
$post = mysqli_query($dbcnx, "SELECT FROM {$prefixsmf}_messages where likes>0");            
        while (
$news = mysqli_fetch_array($post)) {
            
$id_member=$news['id_member'];

                      
$i++;

$query = "REPLACE  INTO `{$prefixsmf}_messages_thanks_stats` (`id_member`) VALUES
('$id_member');";

    if (mysqli_query(
$dbcnx$query)) {        
          echo "";
    } else {

          echo "
<br><br>Error" . $query . "<br><br>" . mysqli_error($dbcnx);
    }            
    }


//вставляем колличество лайков юзакам    
$sql = mysqli_query($dbcnx, "UPDATE {$prefixsmf}_messages_thanks_stats {$prefixsmf}_messages_thanks_stats_ SET thanks_count = ( SELECT sum(id_msg5FROM {$prefixsmf}_messages_thanks WHERE id_member_to={$prefixsmf}_messages_thanks_stats_.id_member)"); 

// удаляем временные столбцы    
$sql = mysqli_query($dbcnx, "ALTER TABLE {$prefixsmf}_messages_thanks drop COLUMN id_member_to");    
$sql = mysqli_query($dbcnx, "ALTER TABLE {$prefixsmf}_messages_thanks drop COLUMN id_msg5");



mysqli_close(
$dbcnx);    
echo "
<br /><span style='color: green;'>Перенос завершён!</span><br />";
echo "
<br><div style='text-align:center;'><a href='smf-art.php'><button>Продолжить</button></a></div></div><div class ='bottom'></body></div>";
}            
 
  ?>

Title: Re: Say Thanks
Post by: kelvincool on May 25, 2022, 06:01:51 PM
Released v2.3.2

Title: Re: Say Thanks
Post by: Steve on May 26, 2022, 07:22:44 AM
Thanks Kelvin.  :)
Title: Re: Say Thanks
Post by: sevamaster on June 19, 2022, 08:05:11 AM
Hello,
Just installed your mod, but it does not work. Thanks not added.
I have the following types of error:
Quotegnh73
 178.187.30.226
 31cf22bf7b1e3439be56e080f9539698
 http://dnray.com/index.php?pretty;board=specialty-hosting-and-markets;topic=send-text-messages-sms-online.0&amp;action=thank;msg=157;member=1;ajax=1;xml=1  Backtrace information

Type of error: General
Error messageSelect
The callable SayThanks::thank could not be called.

I have the only mod installed. It's Pretty URLs.

Probable the reason of error in this (Pretty URLs) mod.

Could you fix it? Or please say how to fix it.


Title: Re: Say Thanks
Post by: kelvincool on June 20, 2022, 05:43:51 AM
@sevamaster I'll look into this, need to get my local set up working with pretty urls. I'm pretty sure you can configure pretty urls to filter out Action urls which might get around this problem.
Title: Re: Say Thanks
Post by: sevamaster on June 20, 2022, 11:13:18 AM
Thank you kelvicool.
Please give me an example which actions I have to skip (filter)?
Title: Re: Say Thanks
Post by: kelvincool on June 20, 2022, 11:40:49 AM
The main 2 actions to skip are: thank and withdrawthank

I think you would just put thank,withdrawthank in the field Skip Actions List
Title: Re: Say Thanks
Post by: sevamaster on June 22, 2022, 01:31:46 AM
Hello kelvincool.

I added thank,withdrawthank in the field Skip Actions List. There is the same error.
I have even disabled Actions URL rewriting in the Pretty Urls settings. There is the same error.

Below there is Admin error log:

Quote178.187.30.226
 7d29bc951890ab9c0d49386c179066b0
 http://dnsray.com/index.php?pretty;board=specialty-hosting-and-markets;topic=what-is-affordable-backup-solutions.0&amp;action=thank;msg=134;member=13;ajax=1;xml=1  Backtrace information

Type of error: General
Error messageSelect
The callable SayThanks::thank could not be called.

And below server error_log:

[22-Jun-2022 00:20:24 America/Jamaica] PHP Fatal error:  Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, no array or string given in /home/seomaste/public_html/dnray.com/index.php:203
Stack trace:
#0 {main}
  thrown in /home/seosasmaste/public_html/dnray.com/index.php on line 203

Probably it (error_log above) says about function below:
// What function shall we execute? (done like this for memory's sake.)
call_user_func(smf_main());
Title: Re: Say Thanks
Post by: kelvincool on June 22, 2022, 06:55:07 PM
@sevamaster I finally got pretty urls installed locally, it's working fine on my setup, I actually think pretty urls is not the problem. What version of PHP are you using, I suspect it's probably to do with that.

Also are you using the latest version of this mod or are you still using 1.3.6?

Can you try using this version of SayThanks.php if you are using the latest version, it goes in the Sources directory.
Title: Re: Say Thanks
Post by: sevamaster on June 24, 2022, 03:14:28 AM
Hi kelvincool,

PHP Version 8.1.7
10.3.35-MariaDB

Say Thanks v2.3.2
SMF 2.1.2

I replaced original SayThanks.php by attached above. And it works without any problems!

As I've understood, you replaced:
//integrate_actions
public function integrateActions(&$actionArray)
{
$actionArray['thank'] = array('SayThanks.php', 'SayThanks::thank');
$actionArray['withdrawthank'] = array('SayThanks.php', 'SayThanks::withdrawThank');
}
by
//integrate_actions
public function integrateActions(&$actionArray)
{
$actionArray['thank'] = array('SayThanks.php', 'SayThanks::thank#');
$actionArray['withdrawthank'] = array('SayThanks.php', 'SayThanks::withdrawThank#');
}

So, please keep it in the next versions.

Thank you for great mod!)
Title: Re: Say Thanks
Post by: Speed King on August 25, 2022, 01:24:33 AM
Hello,

After installing Say Thanks 1.3.6 version on my 2.0.19 forum, everytime when I move a topic to another location, I get this error message:

[24-Aug-2022 13:28:26 Europe/Sofia] PHP Notice:  Undefined index: selected in /home/bulataka/public_html/forum/Sources/Load.php(2295) : eval()'d code on line 42


Forum details:

Forum version: SMF 2.0.19 (more detailed)
Current SMF version: SMF 2.0.19
GD version: bundled (2.1.0 compatible)
Database Server: MariaDB
MySQL version: 10.3.36-MariaDB-log
PHP: 7.4.30
Server version: Apache
Title: Re: Say Thanks
Post by: kelvincool on August 25, 2022, 06:26:20 PM
Just installed a fresh 2.0.19 copy and installed the mod, I have not been able to replicate the issue, moving topics does not generate any errors for me.

Where are you seeing that error? In the error log within SMF? You got any other mods installed, could be a conflict. If you can attach your Load.php, that might help identify what's happened.
Title: Re: Say Thanks
Post by: Speed King on August 26, 2022, 01:48:26 AM
I see that error in drop-down list when moving a topic to another location:

Click => (https://i.postimg.cc/D85H6LpR/2022-08-26.png) (https://postimg.cc/D85H6LpR)

Also, this error is logged in the server error log.

Load.php file is attached.
Title: Re: Say Thanks
Post by: kelvincool on August 26, 2022, 07:46:45 AM
Does the error go away if you uninstall the mod?

Also what other mods do you have installed, what's the most recent mod apart from SayThanks?

A quick search shows someone had a similar issue for a different mod, you got this mod installed? https://www.simplemachines.org/community/index.php?topic=476366.msg3374636#msg3374636
Title: Re: Say Thanks
Post by: Speed King on August 26, 2022, 08:14:01 AM
Yes, I have "SEO sitemap and XML sitemap" mod installed.
I will uninstall this mod and then try to move a topic to see if the error persist.

P.S. The error is gone, thanks for help to resolve the problem :)
But errors appear after installing Say Thanks mod, maybe there is some conflict between two mods.
Title: Re: Say Thanks
Post by: jsx on September 20, 2022, 09:40:39 AM
@kelvincool

The mod worked on my forum, but is currently not working.

This error appeared in the error log:

(https://i.imgur.com/HPeB3We.png)

Please help.

In the modification settings, I can select a board in which thanking for posts will not work, but it is not possible to deselect this board to enable thanking in this board. It would be good if there was an option, if I select an board then there should be an option to deselect that board.
Title: Re: Say Thanks
Post by: kelvincool on September 20, 2022, 10:46:40 AM
That error indicates the column date_thanked is missing in the message_thanks table, this column has been in the mod for a long time. Have you restored from an old backup or something?

You can re-add the column into that table and that'll fix it, column details are as follows:

    'name' => 'date_thanked',
    'type' => 'int',
    'default' => 0,
    'null' => false,

You can deselect the boards by holding ctrl and clicking.
Title: Re: Say Thanks
Post by: jsx on September 20, 2022, 12:25:13 PM
I was using your mod on SMF 2.0.19 and updated the forum to 2.1.2 and that's it.

Did I run these values correctly?

(https://i.imgur.com/VlSSLv7.png)

But in the Null Index, I don't have the choice of False
Title: Re: Say Thanks
Post by: kelvincool on September 20, 2022, 12:29:26 PM
Change default to 0 and uncheck null, leave index as is.
Title: Re: Say Thanks
Post by: jsx on September 20, 2022, 12:34:23 PM
Right now?

(https://i.imgur.com/r1sZixV.png)
Title: Re: Say Thanks
Post by: kelvincool on September 20, 2022, 12:41:46 PM
the name field is just date_thanked, no ' or ,

everything else looks fine
Title: Re: Say Thanks
Post by: jsx on September 20, 2022, 12:59:40 PM
Thanks for the clarification, I created this column and now the thanks for the post works fine. Thank you for fast help.

Can you ever implement this possibility? I mean, in the modification settings it should be possible to deselect a board, now it is possible to select a board in which the thank you button will not be displayed.

I also noticed that after clicking the Say Thanks button, the Say Thanks button is still visible, it does not automatically switch to Withdraw Thanks (if this option is enabled), only after refreshing the page is the button changed. I understand you designed it that way, but if it would be easy for you to change the buttons to automatically change, then think about it.
Title: Re: Say Thanks
Post by: kelvincool on September 20, 2022, 01:16:25 PM
Good to know it's working  :)

You must have missed my previous comment about deselecting a board? Just hold down ctrl when clicking on them and it'll deselect it.

Regarding the withdraw button displaying automatically, something to think about for sure.
Title: Re: Say Thanks
Post by: jsx on September 21, 2022, 05:53:18 AM
Quote from: kelvincool on September 20, 2022, 01:16:25 PMYou must have missed my previous comment about deselecting a board? Just hold down ctrl when clicking on them and it'll deselect it.

Yes, I missed that information. Thank you for the clarification. This information is missing there: Hold ctrl + click to deselect a board.

Quote from: kelvincool on September 20, 2022, 01:16:25 PMRegarding the withdraw button displaying automatically, something to think about for sure.

Good to know that. I think this is a good suggestion, because if you implement it then there is no need to refresh the page (forum).
Title: Re: Say Thanks
Post by: jsx on November 29, 2022, 07:17:12 AM
Hi @kelvincool

In my forum I get this error in the error log:

8: Undefined index: input_html

/Themes/NameX/Profile.template.php (Line 1616)

8: Undefined index: desc

/Themes/NameX/Profile.template.php (Line 1613)

I reported it here:

https://www.simplemachines.org/community/index.php?topic=584291.0

But I already know that this error is caused by Say Thanks mod, when I go to Look and Layout there is the text Thanked

(https://i.imgur.com/qi8qJWA.png)

I uninstalled this mod and reinstalled it and I still see Thanked here.

Can you help me with this?
Title: Re: Say Thanks
Post by: kelvincool on November 29, 2022, 05:37:40 PM
Hi @jsx

Thanks for reporting that bug, that should now be fixed in v2.3.4.
Title: Re: Say Thanks
Post by: jsx on November 30, 2022, 03:38:54 AM
@kelvincool

Thanks for fixing it and also thank you for your quick reply.
Title: Re: Say Thanks
Post by: jsx on December 01, 2022, 04:21:26 AM
@kelvincool

I just noticed that in the private messages settings here is "Thanked". And this error is also generated. I have installed version 2.3.4. Then I installed Say Thanks 2.3.4 on the test forum and there is no "Thanked" in the private messages settings. So how do I remove it from my forum from these PM settings?

(https://i.imgur.com/NxqkbWL.png)
Title: Re: Say Thanks
Post by: kelvincool on December 01, 2022, 05:13:19 PM
@jsx, thanks for spotting that.

v2.4.0 fixes this,I've also implemented the ajax button switching to withdraw/thank.
Title: Re: Say Thanks
Post by: jsx on December 02, 2022, 03:39:06 AM
@kelvincool

Awesome, thanks for implementing the button in ajax.

I am using NameX theme and there is some bug here, take a look:

(https://i.imgur.com/LBCwfEo.gif)

After pressing the Say Thanks button, this is displayed:

"SAY THANKS WITHDRAW THANKS"

When pressed, it displays:

"SAY THANKS SAY THANKS"

The default theme does not have this bug.
Title: Re: Say Thanks
Post by: kelvincool on December 02, 2022, 06:27:34 AM
I suspected other themes might be an issue, the mod doesn't know how the other themes are formatting that section, will see if I can make it more generic.
Title: Re: Say Thanks
Post by: jsx on December 02, 2022, 07:43:19 AM
Thanks for the info, hope you can fix it.
Title: Re: Say Thanks
Post by: kelvincool on December 02, 2022, 05:59:54 PM
v2.4.1 should work fine with your custom theme now.
Title: Re: Say Thanks
Post by: jsx on December 03, 2022, 04:56:56 AM
@kelvincool

Now it's ok. Thanks for the quick fix. :)

I have a question about the Say Thans button icon for custom themes. Can it be implemented? I see that the Say Thanks button has an icon for the default 2.1 theme

Title: Re: Say Thanks
Post by: kelvincool on December 03, 2022, 10:06:44 AM
@jsx, I was curious how the NameX theme was doing the icons when I was working on that fix yesterday, looks like it's using a font instead of images for them. So it's not possible to use the original Say Thanks icon for that, you can however pick an icon from the font awesome website to use (free ones only):

https://fontawesome.com/search?o=r&m=free

The code for each icon is at the top right of the icon page, it's the text that looks like this f7f5 for example.

Here's the css you will need to add to apply the icons, I've just picked out a couple of example icons, you can replace the code for each of them with ones you like:

.thank_you_button::before, .saythanks_top_thanked::before, .saythanks_top_thanked_posts::before, .alert_icon.saythanks::before {
    content: "\f7f5"
}

.thank_you_loading::before {
    content: "\f110"
}

.thank_you_success::before {
    content: "\f00c"
}

.thank_you_error::before {
    content: "\f00d"
}

Title: Re: Say Thanks
Post by: jsx on December 04, 2022, 04:08:15 AM
@kelvincool

Thank you for providing this code. :)
Title: Re: Say Thanks
Post by: jsx on December 25, 2022, 05:19:39 AM
Hello @kelvincool

I get these errors in the error log, can you take a look at this?

(https://i.imgur.com/EnmbNWq.png)

(https://i.imgur.com/m2nyi7q.png)

(https://i.imgur.com/As0jKzq.png)
Title: Re: Say Thanks
Post by: kelvincool on December 27, 2022, 11:19:57 AM
@jsx, I cannot replicate this issue, do you have Top Replies installed as well? If you do, can you uninstall that and see if the error goes away?

I think these errors are symptoms of something going wrong elsewhere, don't think this problem originates from Say Thanks, do you get any other errors in the logs? Any database related ones perhaps?
Title: Re: Say Thanks
Post by: jsx on December 27, 2022, 04:48:23 PM
@kelvincool

I don't have this Top Replies mod installed, I don't have any other errors in the log. This error is caused by a guest (Google Bot). This guest IP address generates these errors.

(https://i.imgur.com/KbPXHAW.png)
Title: Re: Say Thanks
Post by: kelvincool on December 27, 2022, 05:30:48 PM
@jsx, that's interesting, looking at the urls in the log they are all wap2 which is a bit strange since wap was removed from SMF 2.1. Are you using a mod for wap?

Also is there anything peculiar about that specific topic 375.30? I take it you don't get that error when visiting that link yourself?
Title: Re: Say Thanks
Post by: jsx on December 28, 2022, 05:00:21 PM
Quote from: kelvincool on December 27, 2022, 05:30:48 PMlooking at the urls in the log they are all wap2 which is a bit strange since wap was removed from SMF 2.1. Are you using a mod for wap?

I don't use that mod. What is WAP?

Quote from: kelvincool on December 27, 2022, 05:30:48 PMAlso is there anything peculiar about that specific topic 375.30? I take it you don't get that error when visiting that link yourself?

When I click on this link, this appears:

QuoteAn error has occurred

Database error, given array of integer values is empty. (message_list)

and these two errors are generated. Every time I click on that link I get two more of these errors.

(https://i.imgur.com/PMbXGLh.png)
Title: Re: Say Thanks
Post by: kelvincool on December 28, 2022, 05:28:50 PM
@jsx, wap is just a standard for mobile display, I'm out of ideas on what's causing the issue, what I do know is that query that gets all the messages for that topic is failing for some reason.

I've released 2.4.2 which will just stop doing anything if that query fails, this is what the core does as well so I think doing it this way is fine, that should stop any more of those errors coming up.

Would be interesting to see if that topic actually comes up properly after you've updated the mod.
Title: Re: Say Thanks
Post by: jsx on December 29, 2022, 07:28:35 AM
@kelvincool

I have this setting set in TinyPortal:

(https://i.imgur.com/q4mGlza.png)

Because a few users don't like the mobile layout of the forum.

I have installed version 2.4.2, so far these errors have not appeared.
Title: Re: Say Thanks
Post by: jsx on January 01, 2023, 04:36:38 PM
Hello @kelvincool

Simple Colorizer mod has a problem displaying the color of the nick here.

(https://i.imgur.com/7Ytdtwx.png)

Can you look at it?

https://www.simplemachines.org/community/index.php?topic=439878.msg4142213#msg4142213

And here in the default theme, the admin name displays as bold.

(https://i.imgur.com/awEIZIB.png)
Title: Re: Say Thanks
Post by: kelvincool on January 03, 2023, 05:03:50 PM
I see from the other thread you've already got a solution, the reason for the bold is just to indicate that's you in the list, that's why it works when you aren't logged in, let me know if you have any further issues on this.
Title: Re: Say Thanks
Post by: jsx on January 12, 2023, 02:54:31 AM
@kelvincool

Thanks for the explanation. Everything is fine now. Kelvin tell me where in the forum settings can I find these functions? I can't find it on the forum, where is it located?

$txt['saythanks_title'] = 'Hide by thanked count';
$txt['saythanks_hide_text'] = 'You require at least {thanks_needed} thanks, you need another {thanks_left} thanks.';
$txt['saythanks_desc'] = 'Hides post content based on thanked count.';
$txt['saythanks_thanked_title'] = 'Hide by thanked';
$txt['saythanks_hide_thanked_text'] = 'You must thank this post to see the content.';
$txt['saythanks_thanked_desc'] = 'Hides post content based on thanked count.';
$txt['saythanks_input_title'] = 'Minimum thanked count';

$txt['saythanks_recently_thanked_posts'] = 'Recently Thanked Posts';
$txt['saythanks_recent_view'] = 'View the most recent thanked posts on the forum.';
$txt['alert_msg_saythanks'] = 'When one of my posts is thanked';

I am asking this because I translate Say Thanks mod to my language. I just want to know where it is, it's not in mod settings, permissions or account settings.
Title: Re: Say Thanks
Post by: kelvincool on January 12, 2023, 01:48:11 PM
@jsx, the first set of settings become available if you have Hide Content mod installed.

$txt['saythanks_recently_thanked_posts'] = 'Recently Thanked Posts';
$txt['saythanks_recent_view'] = 'View the most recent thanked posts on the forum.';

These are not used, I was working on a feature a while back but did not finish it, I will remove these in the next release so you can just ignore them.

$txt['alert_msg_saythanks'] = 'When one of my posts is thanked';
This one is used on the notifications settings page under features and options

Title: Re: Say Thanks
Post by: jsx on January 13, 2023, 09:19:37 AM
I understand, thanks for the clarification. :)
Title: Re: Say Thanks
Post by: Steve on January 30, 2023, 04:02:31 PM
@kelvincool - forgive me if this has been addressed before but I haven't read all 11 pages of this topic ... does each post show the number of thanks given?
Title: Re: Say Thanks
Post by: kelvincool on January 30, 2023, 04:51:45 PM
@Steve each post shows a list of users who have thanked the post as shown in this screenshot

2.png
Title: Re: Say Thanks
Post by: Steve on January 30, 2023, 06:11:30 PM
Perfect! Thank you.  :)
Title: Re: Say Thanks
Post by: realvanyek on February 24, 2023, 08:47:08 AM
It looks like russian translation is not in the right encodingIMG_20230223_224220.jpg
Title: Re: Say Thanks
Post by: kelvincool on February 28, 2023, 06:18:03 PM
That's weird, I've tried it on my local and it works fine:

russian.jpg

I can see in your screenshot the say thanks button itself is in the right encoding so very confused why the other text is incorrect.

Two things to try, see if the same thing happens for the default theme, secondly try uninstalling and re-installing the mod.
Title: Re: Say Thanks
Post by: Butiks on July 02, 2023, 01:22:41 AM
Hello.
Can standard "likes" counts be transferred to "Say Thanks" mod?

There is a very interesting function "saythanks_hide_thanked"!
But in order for this function to be in demand on the forum, you must have a limit of "thanks per hour" (or "thanks per day").

Dear kelvincool, can you add a thank you time limit feature?
Title: Re: Say Thanks
Post by: kelvincool on July 06, 2023, 05:20:03 AM
Running this query will transfer likes to say thanks. Obviously ensure to backup and test locally first. Need to change the prefix smf_ of the tables to whatever you have set it to.

INSERT INTO `smf_messages_thanks` (id_member, id_msg, date_thanked) SELECT id_member, content_id, like_time FROM `smf_user_likes` a WHERE content_type = 'msg' AND NOT EXISTS (
  SELECT *
  FROM `smf_messages_thanks` AS b
  WHERE a.content_id=b.id_msg AND a.id_member=b.id_member
)

Regarding your suggestion, I can certainly look into it.
Title: Re: Say Thanks
Post by: ateofilo on August 07, 2023, 01:40:02 PM
Hello @kevincool

Is it possible to have the "list of users who have thanked the post" listed in order of time of thankyou occurrence?
Maybe with an administrative option to select that order, or the current order (should be the order in the table...)

Thanks for this very useful mod.
Title: Re: Say Thanks
Post by: kelvincool on August 08, 2023, 03:55:59 PM
@ateofilo that should be possible, I will add it to the list of feature requests.
Title: Re: Say Thanks
Post by: kelvincool on August 11, 2023, 07:28:27 PM
@Butiks time limit feature is now available in v2.5.0
Title: Re: Say Thanks
Post by: CMBurns on August 15, 2023, 04:14:05 AM
Hi @kelvincool
I found out about a major issue recently: when showing thanks in the user profile, the user rights aren't respected. If a user clicks on my profile, checks for any TYs I've given in the past, he'll also be able to see internal posts, it just needs a thank you on it.
I updated to the latest version, but it still shows the same behaviour.
Title: Re: Say Thanks
Post by: kelvincool on August 15, 2023, 03:53:51 PM
@CMBurns Thanks for reporting that bug, this has now been fixed in v2.5.1.

To be honest I am considering removing this feature in the next release, not sure anyone finds those two pages useful.
Title: Re: Say Thanks
Post by: Steve on August 15, 2023, 04:02:09 PM
Quote from: kelvincool on August 15, 2023, 03:53:51 PMnot sure anyone finds those two pages useful
Not I.  :)
Title: Re: Say Thanks
Post by: CMBurns on August 18, 2023, 02:04:20 AM
Quote from: kelvincool on August 15, 2023, 03:53:51 PMTo be honest I am considering removing this feature in the next release, not sure anyone finds those two pages useful.

I removed them after I noticed the issues. Our users weren't very happy about it. That's a +1 for keeping them.

Title: Re: Say Thanks
Post by: CMBurns on August 18, 2023, 02:30:32 PM
The patch is installed and works fine. Huge thanks for fixing it that quickly.
Title: Re: Say Thanks
Post by: kelvincool on December 03, 2023, 01:23:08 PM
v2.6.0 now released, can choose how to order the list of thanks.
Title: Re: Say Thanks
Post by: Steve on December 04, 2023, 02:37:47 PM
Looks like it's working like a charm.  ;D
Title: Re: Say Thanks
Post by: artvolt on January 14, 2024, 09:48:55 AM
Hello. After the forum was transferred to a new hosting, the mod stopped working - the posts had the message "Class 'SayThanks' not found" and the content of the posts was not shown because of this. I deleted the mod and installed it again. But now the service text of the mod began to appear at the top of the forum (I attach a photo). Please help me set up the mod, because everything worked correctly on the old hosting. Forum version 2.0.17.


Title: Re: Say Thanks
Post by: kelvincool on January 14, 2024, 04:33:00 PM
Can you find and attach this file:

Themes\default\languages\Modifications.russian.php

Perhaps it is missing the php tags. Also does it do this if you switch to english?
Title: Re: Say Thanks
Post by: artvolt on January 14, 2024, 06:25:23 PM
Quote from: kelvincool on January 14, 2024, 04:33:00 PMCan you find and attach this file:

Themes\default\languages\Modifications.russian.php

Perhaps it is missing the php tags. Also does it do this if you switch to english?

I am attaching the file "Modifications.russian-utf8.php" . The mod menu is immediately displayed in English by default, and the "thank you" button in posts is also in English. And before, on the old hosting, everything was installed in the forum language. I am attaching a screenshot of the mod menu immediately after installation.

The mod version is 1.36, it worked normally on the forum on the old hosting since 2020. Version 2.6 unfortunately does not install at all, even with emulation.

Please help me figure it out, I really need a mod for thanking people in posts.

Modifications.russian-utf8.php
Title: Re: Say Thanks
Post by: kelvincool on January 15, 2024, 03:53:37 AM
Ok I see the problem, in this file:

$txt['vob_protected'] = 'Защищено';?>
// Say Thanks Mod

Move the ?> to the end of the file
Title: Re: Say Thanks
Post by: artvolt on January 15, 2024, 04:12:35 PM
Kelvincool, thank you, the mod is installed and everything works fine.
Title: Re: Say Thanks
Post by: Lucarella on February 11, 2024, 03:46:47 PM
Hi guys, today I installed the latest version of this mod however, a little while ago, I realized a problem...
As you can see from the image, this mod (https://custom.simplemachines.org/index.php?mod=4335) tells me that I have installed the old version while I have the latest one, and I am missing the button for removing the mod.
I tried removing the mod version checker and putting it back, but nothing changed.
(https://i.postimg.cc/WFc2bY8R/Screen-Shot-02-11-24-at-09-25-PM.png) (https://postimg.cc/WFc2bY8R)
Is there a way to reset everything?

Ah, the mod version checker tells me that the BCC message box mod is also obsolete, but I have installed version 1.0 and the uninstall button is present, so I think the support of @vbgamer45 is also needed here

Thank you
Title: Re: Say Thanks
Post by: Lucarella on February 12, 2024, 04:41:16 PM
Guys, I apologize for the previous post, but a friend of mine installed the previous version and I didn't realize it, also because it was at the bottom of the list and I hadn't seen it...  :-[

Thanks for what you do
Title: Re: Say Thanks
Post by: Bugo on February 27, 2024, 03:35:47 AM
@kelvincool, in version for SMF 2.1 your mod does not need such fixes, you can safely delete them:


if ($context['user']['language'] == 'russian')
{
  $arr['response'] = iconv('Windows-1251', 'UTF-8', $arr['response']);
}

if ($context['user']['language'] == 'russian')
{
  $arr['list'] = iconv('Windows-1251', 'UTF-8', $arr['list']);
  $arr['response'] = iconv('Windows-1251', 'UTF-8', $arr['response']);
}

Title: Re: Say Thanks
Post by: kelvincool on March 03, 2024, 04:52:22 PM
Thank you @Bugo, I will remember to remove that with my next release  :)
Title: Re: Say Thanks
Post by: Klauser on March 30, 2024, 12:32:01 PM
I just upgrade from SMF 2.0.19 to 2.1.4 and installed this MOd which I had before running. I am getting an error while I am watching an Thread

Database Error: Unknown column 't.date_thanked' in 'order clause'


         SELECT
            m.id_msg, u.id_member, u.real_name as member_name
         FROM smf_messages m, smf_messages_thanks t, smf_members u
         WHERE m.id_msg IN (108401) AND m.id_msg = t.id_msg AND t.id_member = u.id_member
         ORDER BY t.date_thanked ASC

Title: Re: Say Thanks
Post by: Lucarella on March 30, 2024, 02:48:50 PM
HI,
Is it possible to add the total number of users who thanked below the list?
Like something like this:
(https://i.imgur.com/PY1RqUe.png)

Thanks
Title: Re: Say Thanks
Post by: kelvincool on March 30, 2024, 05:40:47 PM
@Klauser please refer to this post and the following replies on how to resolve the issue https://www.simplemachines.org/community/index.php?topic=527032.msg4135268#msg4135268

@Lucarella I can look into something like that
Title: Re: Say Thanks
Post by: Klauser on March 31, 2024, 12:22:49 AM
Hello, this mod ist not working on my Site  SMF 2.1.4

/homepages/xxx/Sources/SayThanks.php (Line 92)
Backtrace-Information


Database Error: Unknown column 't.date_thanked' in 'order clause'


         SELECT
            m.id_msg, u.id_member, u.real_name as member_name
         FROM smf_messages m, smf_messages_thanks t, smf_members u
         WHERE m.id_msg IN (108401) AND m.id_msg = t.id_msg AND t.id_member = u.id_member
         ORDER BY t.date_thanked ASC
Title: Re: Say Thanks
Post by: kelvincool on March 31, 2024, 07:17:05 AM
@Klauser see my previous reply to you.
Title: Re: Say Thanks
Post by: Klauser on March 31, 2024, 07:43:32 AM
@kelvincool

I apologize very much for the double posting, it was just too late yesterday. Your solution worked, thank you very much and happy Easter.