News:

Wondering if this will always be free?  See why free is better.

Main Menu

Need Small Help

Started by Vonotna, September 01, 2015, 07:43:44 PM

Previous topic - Next topic

Vonotna

Hello, I am using SimplePortal and UltimateProfile mods. (I am pretty sure all of you are familiar with them)
I have User info section on my home page (posts,massages,profile,log out..)
Now, I want in this user info section to have a certain profile field from ultimateprofile added.
Here is a silly example of what i need :D thanks

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Vonotna

I was just looking into that, figured that I don't need the ultimate profile mod. Made a profile filed with it but still It doesnt show on the home page, only in the profile. I guess I need to change something in the SimplePortal mod. I have no problems with adding fields I just don't know how to make it show on the homepage and this is crutial for my forum.

margarett

I would suggest you check SimplePortal's site for advice.

* margarett has 0 experience with SP
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Vonotna

I have found people on SimplePortals forum asking this and it isn't resolved :( I tried playing with the code with no success
Thanks for trying to help me  :D

br360

Actually [sinan] has answered that before when asked- http://simpleportal.net/index.php?topic=13102.msg65008#msg65008

I'm looking at the Sources/PortalBlocks.php file now. Look for-

echo '
<li>', sp_embed_image('dot'), ' <a href="', $scripturl, '?action=unread">', $txt['unread_topics_visit'], '</a></li>
<li>', sp_embed_image('dot'), ' <a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>';


What you want to add would probably go right under there. I just tested it and added a link and it worked- but back up first. ;)

Here is an example of what I did with my forum. I added this part after the above code to look like this-



                echo '
<li>', sp_embed_image('dot'), '<a href=http://genxcommunity.com/index.php?topic=18435.0>testing something here</a></li>';

Vonotna

hmm I understand you untill the part where I need to put my own forum link, how to find the code/link for my costum profile field.
I dont just want something writen, I need when I change the profile field also the field on homepage in user info to be changed.
That sounded confusing hope you understood can't explain better :D

br360

Sorry, it is a little confusing and not exactly sure what you are trying to do. ;)

How are you setting up the profile field, and will there be any sort of html link at all for your members in their profiles?

Vonotna

Nope, no links sorry for the confusion
I just want a profile field to be shown in the user info.
Looking at the source/portalblocks file I guess I need to add something here:

         echo '
                           ', $member_info['group'], '<br />';
      else
         echo '
                           ', $member_info['post_group'], '<br />';

      echo '
                           ', $member_info['group_stars'], '<br />';


Something like
member_info [costum field/points]

Hope you understood me now  :)

Vonotna

oow and I didn't asnwer your question, am setting up the profie field just from the Advanced Profile Fields in smf.

br360

So you want a member's points they get to be shown in that user info area? How do members get points to begin with, who adds the points, and how would it be shown in their own profile?

Vonotna

costum field, points will be added manually by the admin.
In their own profile there is a costum field named "Points"
Thanks for your assistence.

Kindred

I don't know that SimplePortal ever exposes any of the user's advanced profile fields for use...  You really need to ask them.

If they don't then you are going to have to code it yourself -- a full query to the user's record plus then joining the advanced profile fields -- then display.


In short -- this is actually a coding request...

Also - please note: "need small help" is basically a useless title for your question thread. You should clearly state a summary of the question/problem instead of something generic like "need help"
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Vonotna

Meaning this would be a lot more harder to do then I expected :(
I will try emailing SimplePortal's staff.
And yes for the title sorry, really didn't know what to write and now it ended up not beeing such a small help.

Pipke

You need a query that grabs the profile field info wich you have setup with smf's Core_Features, Advanced_Profile_Fields, from the db and add the outcome on the userinfo block from the simpleprotal mod right?
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Actually, loadMemberContext should already be doing it for him.

I think he "just" needs to expand the user info block template to actually show the custom profile fields, because the data should already be available...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

Is the data available in the member context array?  because it's not in the members table
(note: I have not actually looked at that function recently)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Pipke

Quote from: margarett on September 02, 2015, 07:42:17 AM
Actually, loadMemberContext should already be doing it for him.

I think he "just" needs to expand the user info block template to actually show the custom profile fields, because the data should already be available...

I wouldn't bother calling loadMemberContext and wasting space in memory and extra CPU cycles computing the information, the custom fields input fields are placed in the smf_themes table, i prefer to load only that field what is needed (as the OP wants only one field to be shown?), a simple query will do the job.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Vonotna

Yes its already shown in the member context array. And yes I only need one field to be shown.
I have researched a little bit about what you guys mean by simple query means.
But whenever I try changing something in the source/SimplePortal the whole forum gives error.
Example:
echo '
                           ', $member_info['group'], '<br />';
      else
         echo '
                           ', $member_info['post_group'], '<br />';

      echo '
                           ', $member_info['group_stars'], '<br />';


If I delete one of this lines since lets say  don't want members info for stars to be shown it gives eror.
Maybe I am just too new for this stuff and need more proper knowledge :D

Advertisement: