How do you set to actually show how many points one has with this plugin?
Support Forum
Hey Alex,
Just take a look at the post thanks codex document.
About half way down you have multiple methods of displaying thanks reputation detailed using template tags such as ‘displaying number of thanks’, ‘displaying thanks reputation’, displaying thanks reputation on profile pages’ and ‘displaying top thanked users’.
Shout if you need any further help!
I cannot find the sp-thanks-thanks-for-post.php template file? Below are the templates found when I click editor.
-
- spDefault.php
- spFoot.php
- spForumView.php
- spFunctions.php
- spGroupView.php
- spHead.php
- spListView.php
- spMembersView.php
- spNewPostsView.php
- spProfileEdit.php
- spProfilePopupShow.php
- spProfileShow.php
- spSearchView.php
- spTopicView.php
If you’re referring to the ‘displaying thanks’ section, the reference to the template file is simply that it is the function file the template function uses. It’s really just a reference and to be honest threw me a little bit when I read it.
You don’t need to access this file at all. If you read further on it explains that you use the function
sp_thanks_thanks_for_post().
And also explains where to place the function in the themes template files.
However – this will just display in topic which user (by name) thanked a post, and won’t display a users ‘thanks stats’ so to speak. See further down at ‘Displaying Thanks Reputation’ for this.
I’ve read that page, however it is a bit difficult to understand. Here’s what it says to Display the number of thanks:
These variables are passed to the function along with any surrounding text. The sp-thanks-user-stats.php template file is where the function is found and the function used is sp_thanks_user_stats() to create this display and it’s default setting is:
According to this, i’m reading it as I have to add the function to sp-thanks-user-stats.php? I’m not sure why you guys didn’t just add these options into the plugin’s options?
The reason these options are not included in the plugin is because template functions with arguments placed in the theme templates (which drive the display) allow far more flexibility. In order for these options to be included in the plugin options, the template functions would need to already exist in the theme templates using ‘if’ statements which is no simple task given how many options and combinations there actually are. Also, if these template functions did exist, given the flexibility in displaying exactly what you want where you want it, you might not be happy with where we have put them, and would need to move and customise the function anyway.
We include the basic template functions in the theme files such as actually thanking someone – so the plugin can be used straight out of the box, but further customisation is of course optional.
Anyway!.. Basically the reference to the php template file is irrelevant, it’s simply telling you that the sp-thanks-user-stats.php template file is the code that drives the function.
‘the function used is sp_thanks_user_stats() to create this display’ is far more relevant – as stated it creates the display which is what you are aiming for. Assuming you are familiar with template functions (exactly the same as WP) then that is all this is.
Simply put sp_thanks_user_stats() into your theme template – wherever you like, and in the format outlined in the Codex article. You could put the function into your spTopicView.php template – possibly underneath the users avatar and username. It would look like
sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanked %THANKED% times in %POSTS% posts')
I see that I have to edit this in topicview.php. Took a couple of times in reading this. Another question, is there a way to have that button show up twice? For instance, one to thank and another for something else?
It depends what you mean.. Firstly, what button? and secondly, what would that something else be?
Ike said
It depends what you mean.. Firstly, what button? and secondly, what would that something else be?
The actual “Thank” button. I saw that you are able to change the “Thank” to something like “Like” instead. Is there a way to add a second button for people to, let’s say…”Dislike”?
I don’t think so, if you look at the way the thanks plugin works in the plugin options on the admin page, it only really caters for additional points, although I could be wrong. You can certainly duplicate the button, and it might be possible to get it to subtract points but I’d rather have this clarified before looking into it.
Ike said
I don’t think so, if you look at the way the thanks plugin works in the plugin options on the admin page, it only really caters for additional points, although I could be wrong. You can certainly duplicate the button, and it might be possible to get it to subtract points but I’d rather have this clarified before looking into it.
It would be great if you could find out! I was able to update the template, however now the thanks quotation is showing up mid post instead of the very bottom. How may I change this to show at the bottom of a post?
Also, can I change the reputation to show the level instead of points?
No, you cannot dislike or do opposite of thanking… wouldnt make sense for a ‘thanks’ plugin…
however, you can use the post rating plugin to allow vote up or vote down of posts… which is very much, if not exactly what you say about like and dislike…
as to level, show the reputation for the level name…
Mr Papa said
No, you cannot dislike or do opposite of thanking… wouldnt make sense for a ‘thanks’ plugin…however, you can use the post rating plugin to allow vote up or vote down of posts… which is very much, if not exactly what you say about like and dislike…
as to level, show the reputation for the level name…
It might not make sense to you, but if you’ve actively participated in a general discussion forum, excluding this one of course, sometimes you want to just tell the person that their post was not useful. The Thank plugin is great, though I would want to add the opposite where you can take points away. The vote up/down plugin does not do this, unless I have to go and add a script to add that function?
oh, I do understand what you want…
the post rating plugin allow you to tell a user their post was not useful, but voting it down… but it does no award points to a user for positive vote or take away for a negative vote…
the post thanks plugin is just for thanking a post – was explicitly in response to user requests… you are looking for something like a kharma plugin which we dont have… I could see how a customized version of thanks doing like/dislike stuff could server as a kharma plugin… unfortunately, its not supported currently and would require some structural changes to support…
we do have an open ticket for a kharma type plugin, but it hasnt generated much support or desire from users so has not been a priority… will make a note to look at the required changes to thanks plugin to provide similar support…
Thanks. People love their recognition and status on a general discussion forum, even if it means nadda. Having points given/taken away makes people engage more.
