Support Forum

Displaying Added Identities

36 Answers

New Answer

MP Mr Papa
Mr Papa
Member

very fair point on the documentation on the Coex… and we are working to complete it – its actually a bigger job than writing the plugin itself! ;) most of the plugin and theme info is now complete… as are most sections outside of the api (which is members only) – which we have started digging into this month- BrandonC is doing yeoman work there!

I dont understand your comment about not having a sidebar in a page in wp… that is most definitely supported in wp – just look at our sidebar on any forum page… can you elaborate?

not sure I understand the comment about shortcodes either… Just about any plugin you use in wp that has shortcodes can be used within the forum (ie in posts)… SP also has many shortcodes for doing the same thing as our template functions… no, most of our API template functions dont have shortcodes, but some of the plugins have shortcodes equivalents… take a look at the template tags functions plugin… all its template functions have shortcode equivalents…

Granted, I may be different ;) but 99% of the plugins I use, I manually place template tags – otherwise they dont show up in correct spot for me… of course, referring to ones that have visual display elements on the front end…

Matthew, thanks for your thoughts! Keep them coming! Interacting with our users is how we can continue to improve Simple:Press…

MS Matthew Selznick
Matthew Selznick
Member

Mr Papa said
very fair point on the documentation on the Coex… and we are working to complete it – its actually a bigger job than writing the plugin itself!

I imagine so… I know it’s often standard practice to write the documentation before the software is written, so that function follows intention. Can’t speak to whether it’s faster / easier..!

Mr Papa said
I dont understand your comment about not having a sidebar in a page in wp… that is most definitely supported in wp – just look at our sidebar on any forum page… can you elaborate?

To be specific, the content area of a page / post is seperate from the aside / sidebar area of a page / post. As far as I know, asides can’t exist within the content area, at least not without some augmentation.

Mr Papa said
not sure I understand the comment about shortcodes either… Just about any plugin you use in wp that has shortcodes can be used within the forum (ie in posts)…

In posts within the SP “application” that lives in a WP page, I guess you mean. However, near as I can see, there’s no way to put a shortcode in, say, the footer area of SP. For that, you have to use template tags (by design, I understand. Just using that as an example to better explain.)

Mr Papa said
Granted, I may be different ;) but 99% of the plugins I use, I manually place template tags – otherwise they dont show up in correct spot for me… of course, referring to ones that have visual display elements on the front end…

You (and I, really) are different from the base user of WordPress, I’d guess. I’m not very proficient with php, but I’m not afraid to get my hands dirty and I’ve built themes from scratch. The base user, though, wants the same “install, activate and use” simplicity they get from most plugins in the WP repository, I’d argue. To clarify: I don’t expect SP to follow suite, entirely. SP is built differently. That’s why I strongly recommend making the documentation ready-for-prime-time, so expectations are entirely clear to the end user.

Mr Papa said
Matthew, thanks for your thoughts! Keep them coming! Interacting with our users is how we can continue to improve Simple:Press…

Careful what you wish for! I paid my money… I want to get the most for it. ;-)

TO torontocapital
torontocapital
Member

Hello,

sp_PostIndexIdentityDisplay(”,’Amazon Author Page’,’Amazon Author Page’);

this code works in spTopicView file and displays the user’s identities in the post’s page.

However, trying to insert that code into spProfileShow file, and nothing show up on the user’s profile page.

MP Mr Papa
Mr Papa
Member

assuming you are running SP version 5, you definitely have that file or you wouldn’t get any lists of posts (topic view)… well, not entirely true – if you completely wrote your own custom theme, you might have called the template file something else – but that is our standard name…

by default it would be here: wp-content/sp-resources/forum-themes/default/templates/spTopicView.php

remember, its part of the SP theme so it would not be in the plugin core… and that assumes the default SP theme… if you are using a different theme, just replace default with your theme name…

and I say ‘by default’ because you can locate the forum themes where ever you want… the location is determined by forum – integration – storage locations…

if you look that template file (spTopicView.php) you will see where the other identities are displayed… just add it in there…

if you want to put it in the profile too, you will want to add to template files spProfileShow.php and spProfilePopupShow.php… either both or just the one you want…

TO torontocapital
torontocapital
Member

Thank you, Mr Papa.

 

I was a bit confused about the structure of this plugin…and indeed was looking in the plugin core.

 

Now I found the spTopicView, spProfileShow, spProfilePopupShow….copied the same line everywhere….the user’s identities appear only in the topic, not on his profile…

MP Mr Papa
Mr Papa
Member

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…

 

FL Floyd
Floyd
Member

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?

YS Yellow Swordfish
Yellow Swordfish
Member

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

FL Floyd
Floyd
Member

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.

 

YS Yellow Swordfish
Yellow Swordfish
Member

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/codex/plugins/our-plugins/available-plugins/plugin-add-identities/

That shows other ways to display the data plus label.

FL Floyd
Floyd
Member

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.

YS Yellow Swordfish
Yellow Swordfish
Member

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.

FL Floyd
Floyd
Member

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

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

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?

YS Yellow Swordfish
Yellow Swordfish
Member

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

 

FL Floyd
Floyd
Member

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.