PDA

View Full Version : Custom User Profile Field with link


iNate19
10-19-2013, 09:51 PM
I currently have Customer User Profile Fields for accomplishments. What I am trying to do is make it where I can put a link in the User Profile Field and it links other users to this particular accomplishment from the postbit.

Lynne
10-20-2013, 05:37 PM
I don't understand exactly what you want. What is your current code for this? And what do you want it to link to?

iNate19
10-20-2013, 06:28 PM
I have created User Profile Fields in the Admin CP, labeled "Accomplishments". They are Single Line Text Box that show in each users Postbit.

In a specific forum, I have posted threads for each user, listing accomplishments in each post. I want to link from the Single Line Text Box to each post, so that it shows the list of the accomplishments.

For instance, I have a member who has accomplished a certain task say 9 times. In the thread that I created for that user, it list each time they made that accomplishment. In the Admin CP, I can go to the users account, and enter in that they have reached that accomplishment 9 times. Right now it ONLY shows text, but I want to have it Like This (https://vborg.vbsupport.ru/showthread.php?t=303613). HTML and BB coding currently does not work, which is how I am trying to do it.

blind-eddie
10-21-2013, 12:20 AM
You will need two profile fields to achieve what you are after.
One for link name & one for the url.

Use this in your postbit or postbit Legacy

Change 43 to the new profile field Link Name
Change 44 to the new profile field Link Url

<!-- Start -->
<if condition="$post[field43]"><a href="$post[field44]">$post[field43]</a>
</if>
<!-- End -->

iNate19
10-22-2013, 02:07 AM
You will need two profile fields to achieve what you are after.
One for link name & one for the url.

Use this in your postbit or postbit Legacy

Change 43 to the new profile field Link Name
Change 44 to the new profile field Link Url

<!-- Start -->
<if condition="$post[field43]"><a href="$post[field44]">$post[field43]</a>
</if>
<!-- End -->

Where do I put this?

blind-eddie
10-22-2013, 02:10 AM
Where would you like it to show? Above Avatar, below Avatar, above join date?
... ect

iNate19
10-22-2013, 02:21 AM
http://img594.imageshack.us/img594/3746/brkk.png

Where is shows "4x OM HOF", that is where I want it to link to a post where the accomplishments are posted.

blind-eddie
10-22-2013, 02:32 AM
Is the Battle Records and Awards Showcase auto template edits?

iNate19
10-22-2013, 02:33 AM
Battle Records yes, Awards showcase no

blind-eddie
10-22-2013, 02:34 AM
Then add this below the Awards code. (Changing profile field numbers to yours)

<!-- Start -->
<div class="smallfont">
<if condition="$post[field43]"><a href="$post[field44]">$post[field43]</a>
</if></div>
<!-- End -->

iNate19
10-22-2013, 02:40 AM
Will these be different for each individual user?

blind-eddie
10-22-2013, 02:42 AM
Yes, You can test it on my test board if you like. I will pm you login info if you want.

--------------- Added 1382414390 at 1382414390 ---------------

Sorry, Use this:

<!-- Start -->
<div class="smallfont" align="center">
<if condition="$post[field43]">Accomplishment Details<br/><a href="$post[field44]">$post[field43]</a>
</if></div></div>
<!-- End -->

--------------- Added 1382415568 at 1382415568 ---------------

Use the info from the following link to hide these profile fields on usecp page if you are the only one adding links via ACP. Do that edit twice one for each profile field you wish to hide.

https://vborg.vbsupport.ru/showthread.php?t=244946&highlight=profile+fields+permissions

--------------- Added 1382461584 at 1382461584 ---------------

If you are only showing a single post for accomplishments, why not set it so members do not leave the forum page they are on and create a pop up window.

To do this, use the following in place of the code you are using now.
Again, change profile field numbers to your profile field numbers.

<!-- Start -->

<div class="smallfont" align="center">
<if condition="$post[field43]">Accomplishment Details<br/><a href="#" onclick="window.open('$post[field44]','accomplishments','statusbar=no,menubar=no,toolb ar=no,scrollbars=yes,resizable=yes,width=950,heigh t=450'); return false;">$post[field43]</a>
</if></div></div>
<!-- End -->

Sample: http://blind-eddie.com/forum/showpost.php?p=1894&postcount=2
Click Test One below Accomplishments

iNate19
11-03-2013, 01:03 AM
Where do I need to place this code?

Above you stated below the Awards Code, but i'm not even sure where that is.

--------------- Added 1383444688 at 1383444688 ---------------

Also, which portion do I copy for the next line? Some members have multiple accomplishments

blind-eddie
11-03-2013, 12:47 PM
Below is the code you would need for five Accomplishments. Each will open in popup set at 950 x 450, change those numbers to your liking.
Two profile fields will need to be created per accomplishments you want to show, one for accomplishment name & one for accomplishment link.

Your Awards code is located in the postbit_legacy template.
It is somewhere below the following code: $vbphrase[posts]: $post[posts]


CREATE A BACKUP OF ANY TEMPLATE BEFORE YOU EDIT IT

Change profile field numbers to yours.

<!-- Start -->
<div class="smallfont" align="center">
<if condition="$post[field43]">Accomplishment Details<br/><a href="#" onclick="window.open('$post[field44]','accomplishments','statusbar=no,menubar=no,toolb ar=no,scrollbars=yes,resizable=yes,width=950,heigh t=450'); return false;">$post[field43]</a><br/>
<a href="#" onclick="window.open('$post[field46]','accomplishments','statusbar=no,menubar=no,toolb ar=no,scrollbars=yes,resizable=yes,width=950,heigh t=450'); return false;">$post[field45]</a><br/>
<a href="#" onclick="window.open('$post[field47]','accomplishments','statusbar=no,menubar=no,toolb ar=no,scrollbars=yes,resizable=yes,width=950,heigh t=450'); return false;">$post[field48]</a><br/>
<a href="#" onclick="window.open('$post[field49]','accomplishments','statusbar=no,menubar=no,toolb ar=no,scrollbars=yes,resizable=yes,width=950,heigh t=450'); return false;">$post[field50]</a><br/>
<a href="#" onclick="window.open('$post[field51]','accomplishments','statusbar=no,menubar=no,toolb ar=no,scrollbars=yes,resizable=yes,width=950,heigh t=450'); return false;">$post[field52]</a>
</if></div></div>
<!-- End -->

Demo: http://blind-eddie.com/forum/showpost.php?p=1894&postcount=2
Happy Editing.......