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
WPAchievements Ranks
Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2014 - 4:32 pm

Is anyone using the WPAchievements plugin with Simple:Press?  If so, does anyone happen to know a way that I can display users' ranks on posts under their names in the forum?

Thanks.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 27, 2014 - 4:35 pm

It's been a while since I looked at it but I assume it has some sort of template tag or available function that can be called to display what you want so it should be easy enough to add it into the Simple:Press page template. So - do you know what the call is and how to use it?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2014 - 4:46 pm

Some of that might be beyond my capabilities.  I know ranks can be displayed with Wordpress shortcodes.  Will that work?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 27, 2014 - 4:51 pm

We can help you with it - have no fear!
I am not sure about using shortcodes in this way but I can check up for you. Template tags would be better and simpler... Will need to get back to you...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2014 - 5:05 pm

Thank you!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 27, 2014 - 5:05 pm

Where are you funding information on shortcodes please? I don't see anything that mentions them...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2014 - 8:22 pm

I copy and pasted all the shortcodes into a Word document and shared it here:

http://www.filedropper.com/wpa.....sshortcoes

Let me know if you have trouble accessing it.

Thanks!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2014 - 9:37 pm

Not sure I follow where this was heading, but will try...

so you want it under the username in the topic view?  so find the spTopicView.php template file in the wp theme you are using and edit it...  the user name is displayed with this template tag:

                                    sp_PostIndexUserName('tagClass=spPostUserName spCenter');

so you will want to output it after that...   you will want to add code similar to this:

echo do_shortcode("[shortcode]");

but instead of shortcode, use the one you want to display the rank with... perhaps

echo do_shortcode("[wpa_rank_achievements]");

with the needed arguments..

as always, we strongly recommend you create a child theme or your own theme rather than edit our themes since your changes will be overwritten if you update our themes...

Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2014 - 2:53 pm

Hmmm...the actual process works but there seems to be no way to link the users in the forum with the shortcodes.  What I mean is that I can use a shortcode to display the logged in user's rank but not the ranks of all the other users because I don't know how to tell it who's rank to pull.  Does that make sense?

The shortcode will accept a user ID though.  Is there a way to make this a variable that simple:press can understand?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 28, 2014 - 2:59 pm

It depends where you are putting this. If ot goes on the topic view page (posts) on tbhe left where the avatar etc., is then you can use:

$spThisPostUser->ID

which will return the user ID of the author of the post.

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