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
Displaying Added Identities
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 5, 2013 - 9:34 pm

eh, sorry, wasnt really paying attention... you cannot use that template tag in the profile - wont work... its designed for topic view and makes use of data and objects that exist there...

you will have to do something a bit different in the profile...  we dont have a template function for helping you there (never been asked for before)...

you will have to format it the way you want in the profile, but basically you can get at the data with:

$spProfileUser->identity_slug

but you will need to replace identity_slug with the slug of the identity you want to output... for your example it should be:

amazon-author-page

so doing this:

echo $spProfileUser->amazon-author-page

should output it...  you can add whatever label or styling you want...

 

Avatar
Floyd
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2013 - 10:45 am

Hello

I want to do the same thing, apply the custom identities to the SpProfilePopupShow and the spProfileShow. However, I try to do it with this line: echo $spProfileUser->amazon-author-page putting it here:

            # output section for detailed user info
            sp_SectionStart('tagClass=spProfileShowDetailsSection', 'profileDetails');
                # show user identities
                sp_ColumnStart('tagClass=spProfileShowIdentitiesSection spLeft&width=45%', 'profileIdentities');
                    echo '<p>'.__sp('Contact').' '.$spProfileUser->display_name.'<br /><hr>';
                    echo $spProfileUser->amazon-author-page
                    sp_ProfileShowYIM('', __sp('Yahoo IM ID'));
                    sp_ProfileShowMSN('', __sp('MSN ID'));
                    sp_ProfileShowICQ('', __sp('ICQ ID'));
                    sp_ProfileShowGoogleTalk('', __sp('Google Talk ID'));
                    sp_ProfileShowSkype('', __sp('Skype ID'));
                    sp_ProfileShowMySpace('', __sp('MySpace ID'));
                    sp_ProfileShowFacebook('', __sp('Facebook ID'));
                    sp_ProfileShowTwitter('', __sp('Twitter ID'));

So this produce an error. Any advise what kind of code I should use?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 12, 2013 - 10:49 am

could it just be the missing semi-colon at the end of the line of code?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Floyd
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2013 - 11:38 am

Amazing, that did the trick. Thanks. Now a last thing I need to do is add a Name for this, how would I do that?

I tried it like that: echo $spProfileUser->amazon-author-page('', __sp('Amazon Author Page'));

But it didn't work.

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 12, 2013 - 12:18 pm

No it wont. That needs a special dedicated element function.

Just try the echo 'label name'; before the data echo. Although we may need to work out some CSS styling for you..

But... did you look at the Codex examples for this plugin? - http://codex.simple-press.com/.....dentities/

That shows other ways to display the data plus label.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Floyd
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2013 - 12:32 pm

Yellow Swordfish said

Just try the echo 'label name'; before the data echo.

This nearly did what i need, but the only problem is, that it places the label in the same column with the identities. So the labels and identities still get mismatched.

I checked out the identities page, but I do not have much experience with php.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 12, 2013 - 2:22 pm

Yes - I was referring to the example use of the sp_PostIndexIdentityDisplay() function (in the examples section) in the codex article which is pretty much self-explanatory and might do a better job.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Floyd
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2013 - 3:15 pm

This code doesn't do anything. Well, I solved it somehow by adding this code:

echo '<p>'.__sp('Steam ID:').' '.$spProfileUser->steam.'<br />';

Image Enlarger

So this place the new identity, but not inside the style group.

I could go with that, but it could look better.

Any solution how to put the code line into the identities style sheet group?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 12, 2013 - 4:28 pm

Replace your code with this - changing the label and id slug as needed:

?>
<div>
<p>YOUR LABEL:</p>
</div>
<div></div>
<div>
<p><?php echo($spProfileUser->YOUR-ID-NAME); ?></p>
</div>
<?php

 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Floyd
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2013 - 6:19 pm

Well that not really solved it. Anyway, I just renamed some identities in my installation, that I not really need. So, thats a good solution for me now. Thanks for help thou.

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