You need the code as Steve wrote it. So something like this:
<?php
global $current_user;
if ( $current_user->ID ) {
sp_ShowForumRankTag($current_user);
}
?>
should work.
You need the code as Steve wrote it. So something like this:
<?php
global $current_user;
if ( $current_user->ID ) {
sp_ShowForumRankTag($current_user);
}
?>
should work.
Hmmm put it in the exec_php widget and it kinda blew up. Got this:
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /problem-with-post-edit-buttonome/problem-with-post-edit-buttonomesite/public_html/wp-content/plugins/simple-press/sp-api/sp-api-class-user.php on line 320
Catchable fatal error: Object of class WP_User could not be converted to string in /problem-with-post-edit-buttonome/homesite/public_html/wp-content/plugins/simple-press/sp-api/sp-api-class-user.php on line 111
-Max
Whoops – typo on my part.
When you call the SP function it needs to pass $current_user->ID – not the entire object.
THANK YOU!
Got it working. I was wondering. sine I’m essentially making an info widget for the person on the site. How can I add the equivalent of these calls (from the forum)
In these two I can turn off the title part off when I show the ranking. I also notice the forum has nice overrides in that it only show the Userrank icon if there is no Special rank icon.
sp_PostIndexUserRank(‘tagClass=spPostUserRank spCenter&showTitle=0’);sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter&showTitle=0’);
As for these three – i just want to put that info in a widget also!
sp_PostIndexUserPosts(‘tagClass=spPostUserPosts spCenter’, __sp(‘Posts: %COUNT%’));
sp_PostIndexUserRegistered(‘tagClass=spPostUserRegistered spCenter’, __sp(‘Member Since:<br /> %DATE%’));
sp_PostIndexUserStatus(‘tagClass=spCenter spPostUserStatus’, __sp(‘Online’), __sp(‘Offline’));
Thanks in advance for any help!
-Max
Afraid we don’t currently have template tags that currently return any of those data items. And the problem with using those actual functions is that they would be out of context of the data object they need and will return nothing.
I can certainly talk it over with Steve to see about offering a custom template tag that does return such data..
Yellow Swordfish said
Afraid we don’t currently have template tags that currently return any of those data items. And the problem with using those actual functions is that they would be out of context of the data object they need and will return nothing.I can certainly talk it over with Steve to see about offering a custom template tag that does return such data..
That would be helpful, to be clear though what I am talking about is making a little widget I can drop on the sidebar of my site that kicks out basic information about the user. If you look directly to the left of this post where my forum info resides you can sorta see what I’m after. That’s basically a summary of me and my basic info. I don’t need ALL that info for a widget but it would be nice to have perhaps a little alert for subscribed forum topics, PMs and the like. Now – I realize an obvious statement might be “But Max, they can go to the forum for all that info.” I agree but I have an art centric site and people most assuredly do not spend all their time in the forums. I would like to drive them to the forum any way I can and this little widget with alerts for messages, posts, etc might help. I envision it as a basic reminder that “hey, there’s a forum you want to check out!”
Speaking of PM’s. I used the “sp_pm_inbox” command in my current widget to return info about a user’s private message inbox. The thing is – I don’t think what it says and what it shows are the same thing. Can I add the word “new” to the current statement of:
You have 1 PM(s) in your inbox.
Change this to something like:
1 new PM(s) in your inbox.
It’s a niggly detail I know but would make that statement I little more accurate since that is what the check seems to find. I did some searching for the phrase in some various theme template.php files but didn’t find it.
Thanks for any help,
-Max
Apologies for being slow to respond. I was discussing this in the background with Steve (Mr Papa) and was leaving it for him to answer but he arrived home last night to discover that his internet access had been knocked out by storms…
So – bottom line is we are still plan to discuss it. I rather like the idea of us doing a tag along these lines. Time is our enemy.
most of the individual pieces exist already… and a bunch of them are already in the dashboard template tag… I would just add them there vs a new template tag…