Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
CubePoints in Profile View
Avatar
timothy worley
Rookie
Free Members
sp_UserOfflineSmall Offline
Aug 3, 2012 - 8:28 pm

I was wondering if there is a way to display the amount of CubePoints a user has in their forum profile? I have disabled the wp-admin access so now there isn't a convenient way for users to see how many points they have. Perhaps a new tab on the profile view after the Buddies / Adversaries?

Also, is there a way that I can display a users CubePoints in the User Information on forum posts? Maybe under forum rank? Thanx in advance for your help with this!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 3, 2012 - 8:54 pm

well, ya know...  not easily...  looks like when the plugin was written, with a single template function, it made an assumption of displaying only in the topic list loop...  at least with some level of styling... I will open a ticket to add a more general template tag...

in the meantime, you can modify the popup template file you want it to show in (page or popup) in your sp theme...

and you can display the users points with:

echo get_option('cp_prefix').cp_getPoints($userid).get_option('cp_suffix');

where you will want to replace $userid with the id of the user you are viewing...  this will likely be: $spProfileUser->ID

you will need to add any text or styling around as that will just output a value...

Avatar
timothy worley
Rookie
Free Members
sp_UserOfflineSmall Offline
Aug 3, 2012 - 10:23 pm

Thanx for the fast response! I'll try that out. =]

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 3, 2012 - 10:48 pm

Let me know how it goes...

Avatar
drkknght
Member
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2012 - 5:12 pm

Just added cube points to my site and forum, and was looking for the same :)

 

And maybe not just in the profile page, but also somewhere by the user's screen name and avatar in the forum and site.  

 

It's an awesome plugin, but defeats the purpose if the user isn't made aware of the fact that they're earning them :(

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2012 - 5:15 pm

you can do it now as per my directions in post #2...  you just have to add to your profile or wherever you want...  keep in mind when we add the additional template tag as I said, you will still have to add it to your sp theme - just be easier to style...

Avatar
drkknght
Member
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2012 - 5:19 pm

Ahh, i gotcha.  Thanks, Mr. Papa.  

 

It's been awhile since I edited the simplepress forum templates - I'll have to dig around to find the best placements now.  

 

Will that same string of code work in the profile page, the actual forum post (by the avatar area) and by their names on blog post comments...?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2012 - 5:28 pm

with 5.0, you will want to occasionally play with the sp theme if you want to customize... easier than before editing core! ;)

be sure to see this article:  http://codex.simple-press.com/.....g-a-theme/

before making any changes to our core sp themes...

if you want to put it by the avatar in a topic, that is the one spot our plugin was explicitly designed for...  what I want to add is a more generic template function for other areas... 

again, what you want is to use the template tag in the plugin...  just add:

sp_PostIndexCubePoints();

in your spTopicView.php template file of the sp theme you are using... add it where you want it to display...

Avatar
drkknght
Member
Free Members
sp_UserOfflineSmall Offline
Aug 12, 2012 - 7:25 pm

Hi Mr. Papa,

 

I started messing around with the bits of code you referenced above.  It works great, listed on the topic with the user's avatar.  However, when trying to add to the profile, the count is always "0", even when I know that particular user has points, according to the admin.  Am I missing something else...?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 12, 2012 - 7:48 pm

you would need to post the exact code you used please... and where you put it...

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: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625