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 28, 2014 - 3:03 pm

The plugin uses this shortcode:

[wpa_myranks user_id="1"]

So I tried this and it didn't work:
[wpa_myranks user_id="$spThisPostUser->ID"]

Sorry, I'm not great at this.  Should I have done something otherwise?

I'm trying to get it to display here:

Image Enlarger

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

I have to admit I am not a shortcode man (or fan) but you wont get what you want - I think - with those quotes around the variable. Plus - as Steve demonstrated above - you need to make the full function call - just as he outlined.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2014 - 3:14 pm

Ok, removing the quotes is certainly getting me somewhere and it does not appear to be showing the correct rank based on the user who made the post.  Just need to work on some sizing, etc.

Any idea how I could widen the section on the left that displays the users' info?

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

It's NOT showing the correct user? Check the ID being output... just echo that variable on it's own line in the template - you should find it equates to the user ID of the post author.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2014 - 3:57 pm

Sorry for the typo...it is displaying the correct user.  Just need to make that section fit the width.  Any way to widen that sidebar?

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

You can change the column widths if necessary. You will see them defined in that template in the spColumnStart() routines. But tread carefully. i do not have any idea what it is you are adding so I can't comment on it really. Can it not be made smaller with the right CSS styling?

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

Ideally I would love to make it smaller.  Here's what the plugin is giving me:

Available Parameters

Parameter Description
user_id The ID of the user to get the rank for. If blank it defaults to current logged in user.
rank_image Whether to show the rank image, if one is available. "True" to show or "False" to hide. If blank it defaults to true.
show_title Whether to display the title: "My Rank". Example: "True" to show or "False" to hide. If blank it defaults to true.
title_class This class will be added to the title and will allow the use of custom CSS.

Examples
[wpa_myranks user_id="1" show_title="false" rank_image="true"]
[wpa_myranks user_id="2" show_title="true" rank_image="false" title_class="custom_title_class"]

Any idea how to make it smaller?

Avatar
Frank Fasano
Member
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2014 - 4:12 pm

Here is what it looks like.  As you can see, I either need to shrink it somehow or widen the column:

Image Enlarger

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2014 - 4:42 pm

If you are familiar with inspecting elements in your browser, you should be able to figure out what needs adjusting (normally right click > inspect element)

As Yellow Swordfish says, you can widen the column, but that would need to be almost doubled to accommodate, which would take up a lot of room!.. try inspecting and shout if you need further help

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

Gosh ... Ugly.

You should be able to style it using CSS but you will need to know the classes being applied so that it can be done. Is there no documentation on the classes?

andy-signature.png
YELLOW
SWORDFISH
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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626