Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Thanks Plugin
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Feb 25, 2015 - 11:57 am

How do I get the thanks to show correctly?  I currently have it set like this: 

sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanked %THANKED% times');

Though it shows up as white and you can't see it.  I also want it to show the reputation.  How can I add the reputation and change the color?

 

I tried this:  

sp_thanks_post_user_reputation('tagClass=spCenter spPostUser',Thanks</span>Reputation'

,'Reputation:');

When I tried the code above, it would crash the forum. I believe I have the code incorrect?  I have it set in sptopicviewdesktop.php

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2015 - 12:45 pm

Hey Alex,

I've just tried copying that snippet you pasted for 'sp_thanks_user_stats' and it seems to work fine. I put it just underneath the username under the avatar in spTopicViewDesktop.php.

I then realised that because the classes associated with the function don't specify a font colour, it's inherited from spTopicViewSection..

spTopicViewSection doesn't have a colour set in the first release version of Reboot, although it has been added to the next version which will be released soon, that doesn't help. So - as a fix you should add:

#spMainContainer .spTopicViewSection {
    font-color: #000000;
}

- to your stylesheet. Child theme or not, this is already fixed in the next update so will remain working for you.

As for reputation, you can't cut off a function with <span>'s like that. Try something like:

sp_thanks_post_user_reputation('tagClass=spCenter spPostUser', 'Reputation:');

Hope that helps!

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Feb 25, 2015 - 1:17 pm

Where do I add the color code?  In reboot.php?  Also, the reputation works, however it shows as the numerical reputation instead of the stars?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 25, 2015 - 1:41 pm

Yes - reboot.php

For the thanks function to work properly you need to add the class spPostUserThanksReputation. So - as the codex has it:

sp_thanks_post_user_reputation('tagClass=spCenter spPostUserThanksReputation', 'Reputation:');

should work.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Feb 25, 2015 - 2:17 pm

This is what I have: 

sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanked %THANKED% times');
sp_thanks_post_user_reputation('tagClass=spCenter spPostUser', 'Reputation:');

This is how it shows up in the forum:

Thanked 238 times
 
Reputation: 4714
 
Is there a setting i'm missing in admin that I need to change to show the stars?
 
Where in reboot.php am I supposed to add this:
 
#spMainContainer .spTopicViewSection {     font-color: #000000; }


Is there a specific line I have to add it to?
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 25, 2015 - 3:23 pm

I already answered this above in post 4...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Feb 25, 2015 - 3:35 pm

Yellow Swordfish said
I already answered this above in post 4...

Thanks, but you really didn't address my follow-up question:  I have added the code just like I was told, however it's showing up as this:

Thanked 238 times (this is fine as that's how I want it to show)
 
Reputation: 4714 (I want this to show up as the stars)
 
I want it to show stars, not as points in the reputation field.
 
With respect to the color, I added this code in reboot.php and it still did not change the color.  Do I add the code anywhere, do I add it after the last line?
 
# load the rtl css file if needed
if (isset($_GET['rtl'])) {
 include('reboot-rtl.php');
}
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 25, 2015 - 3:45 pm

I did address the question., i said you need to have a specific class in the function call and showed you the code that was needed to show the stars. The code you are using is incorrect - it needs the class. copy and paste it from my post above.

As to the colour rule then paste it in anywhere after line 36 which is the closing php tag. It has to be somewhere with the rest of the actual CSS rules. There us a small php block at the top and the bottom so just make sure it is in the large middle section somewhere.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Feb 25, 2015 - 3:59 pm

I have this as the code:

sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanked %THANKED% times');
sp_thanks_post_user_reputation('tagClass=spCenter spPostUserThanksReputation', 'Reputation:');

It still shows up as this:

Thanked 238 times
 
Reputation: 4716
 
The color was added  like this and the color did not change:
 
} else {
 include('base-reset.css');
}

?>
#spMainContainer .spTopicViewSection {
 font-color: #000000;
}

/* --------------------
Links
-----------------------*/

#spMainContainer a:link,
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 25, 2015 - 4:22 pm

Curious.

Can you try changing that line for this:

sp_thanks_post_user_reputation('', 'Reputation:');

that is removing the tagClass code just leaving two single quotes instead.

IKE: Can you conform if it matters where the CSS goes for the topic view colour?

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626