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
Adding custom options
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 3, 2013 - 8:46 am

Ok - well this is the function:

sp_CustomProfileFieldsDisplayExtended($args, $name, $userid=0, $label='Field label');

As with the original function you will notice this still has the $name and $userid parameters that need to be passed. Same as before.

But there are two new parameters - the 4th is $label which you can use to pass the label text you want to display. The 1st is a standard argument list ($args) as used on most SP template display functions.

The optional arguments available - along with their type and default values - are:

tagClass - class to be applied for styling - text - spCustomField
type - container type - 'div' or 'span' - text - 'div'
labelClass- class to be applied to optional label - text - spCustomLabel
labelSep - text to be used between label and data - text - ': '
before - text to display before data - text - ''
after - text to display after the data - text - ''
listSep - text to display between each item (list) - text - ', '
echo - echo content or return content - true/false - true

although it is clearer to see these in the function code itself.

 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dre Erwin
Member
Free Members
sp_UserOfflineSmall Offline
Apr 3, 2013 - 12:34 pm

echo '<div class="spPostUserLocation spCenter">';
sp_CustomProfileFieldsDisplay('Original Member since ', $spThisPostUser->ID, $label='Original Member Since:');
echo '</div>'

 

nothing works

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 3, 2013 - 2:24 pm

you are mixing template tags...   you are using sp_CustomProfileFieldsDisplay() which does not have a label...  the two function prototypes are:

sp_CustomProfileFieldsDisplay($name, $userid=0)

and

sp_CustomProfileFieldsDisplayExtended($args, $name, $userid=0, $label='')

you need to pick which one you want to use...

See this post:  https://simple-press.com/suppo.....y/#p124477

for simple way to add it to your profile page... of course, make sure to use your custom profile name and desired label...

Avatar
Dre Erwin
Member
Free Members
sp_UserOfflineSmall Offline
Dec 17, 2013 - 5:56 am

run into this issue every time the plug in has to be updated...the userid=0..what do i need to put in there exactly so the current users info shows up?  This is what I have:

 

echo '<div class="spColumnSection spCenter">';
echo '<p>Platform:</p>';
echo '</div>';
echo '<div class="spColumnSection spProfileSpacerCol"></div>';
echo '<div class="spColumnSection spCenter">';
echo '<p>';
sp_CustomProfileFieldsDisplay('Platform', $userid=0);
echo '</p>';
echo '</div>';
echo '<div class="spColumnSection spCenter">';
echo '<p>Gamertag:</p>';
echo '</div>';
echo '<div class="spColumnSection spProfileSpacerCol"></div>';
echo '<div class="spColumnSection spCenter">';
echo '<p>';
sp_CustomProfileFieldsDisplay('Gamertag', $userid=0);
echo '</p>';
echo '</div>';

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 17, 2013 - 1:40 pm

$spThisUser->ID

Is this in your SP theme? Why don't you just make a custom theme as we always recommend...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dre Erwin
Member
Free Members
sp_UserOfflineSmall Offline
Dec 17, 2013 - 4:55 pm

casue there is no clear way of doing this

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 17, 2013 - 5:00 pm

What? Making your own SP theme?

That's what this codex page is all about:

http://codex.simple-press.com/.....g-a-theme/

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dre Erwin
Member
Free Members
sp_UserOfflineSmall Offline
Dec 17, 2013 - 5:00 pm

maybe u should hve a theme creator...easy for guys to make their own and save them to file..even share them with others!!!!!

Avatar
Dre Erwin
Member
Free Members
sp_UserOfflineSmall Offline
Dec 17, 2013 - 5:01 pm

$spThisUser->ID

 

changing that didnt do anything

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 17, 2013 - 5:04 pm

Did you see my post #17 before you wrote post #18.

And.. as to a theme creator - are you offering? smileThese things don't happen by themselves and can take a lot of time and effort to get to work - often for little benefit. Making you own theme is so easy why would you need a 'creator'

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