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
Cubepoints Rank Display
Avatar
Josh Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2012 - 7:20 pm

Brandon,

At the moment, that seems to be the fix! Thank you both for addressing this promptly.

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2012 - 7:50 pm

Josh Thomas said

At the moment, that seems to be the fix! Thank you both for addressing this promptly.

Good deal. You could probably use that first example by Mr. Papa if you wanted to put the logged in user's rank next to his Avatar at the top too.

It would be nice if we could add the CP ranks info to the codex for others. I don't really have the time right now, I am doing another Codex project, but we are always looking for volunteers. ;)

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2012 - 8:31 pm

correct. user id...

and you dont want to check logged in, but whether a user or not.... so

if (!empty($spThisPostUser->ID)) echo 'Rank:'.cp_module_ranks_getRank($spThisPostUser->ID);

if you dont have guest posters, you eliminate the check...

Avatar
Josh Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2012 - 11:05 pm

Great. That all seems to be working smoothly. Now, one final question...

Everything else in this section is centered. How do I center this?

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2012 - 11:45 pm

Josh Thomas said Everything else in this section is centered. How do I center this?

Cool,

I have not looked at the CSS used by CP and it's rankings but you could try using the SP centering class.

Something like:

echo '<div class="spCenter">';
echo 'Rank:'.cp_module_ranks_getRank($spThisPostUser->ID);
echo '</div>';

If that doesn't work I would probably need to see the actual site for recommendation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2012 - 11:45 pm

do you have a link to an example?  easier to examine css and give you change... firefox with firebug is great for this kind of work...

Avatar
Josh Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Oct 19, 2012 - 1:11 am

Brandon's suggestion worked and the text is now centered. Thank you again.

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

good news. thanks for the update!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
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: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625