Say Thanks

Started by kelvincool, August 30, 2014, 05:16:29 PM

Previous topic - Next topic

yakyakyak

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?

kelvincool

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.

kelvincool

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.

kim_c

Thank you, I didn't see I had to change the display template. It's appearing now, but I have 2 thumbs up pics?

kelvincool

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.

kim_c

All working now, thanks very much for your help   :D

yakyakyak

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.






kelvincool

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;
}

Steve

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. :)
DO NOT pm me for support!

yakyakyak

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


DragoN_PT

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?

massillon

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

DragoN_PT

Yep. Settings are fine.

massillon

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.

kelvincool

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.

DragoN_PT

After looking at that particular table it appear to have a bad path to the file. Thanks for the help man.  ;)

margarett

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 ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

pro100sn

Hello! Translation Russian language program at scheduled?

kelvincool

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.

pro100sn

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();

Advertisement: