Link custom profilefield to an website

Support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Forum rules
Please only request support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Korkel
Senior member
Senior member
Posts: 349
Joined: 26 May 2014, 06:48
Location: ~/home/Mark/Desktop

Link custom profilefield to an website

Post by Korkel »

Hey,

Is there a to get an custom profile field linked to an website.

http://services.runescape.com/m=hiscore ... Hollanders
http://services.runescape.com/m=hiscore ... user1=XXXX

Where you see XXXX that is the text an member enter if we click you come to the site. See first link.

Thanks.
Korkel
Senior member
Senior member
Posts: 349
Joined: 26 May 2014, 06:48
Location: ~/home/Mark/Desktop

Re: Link custom profilefield to an website

Post by Korkel »

A litle bump, I hope someone can help me.
Luke
Member
Member
Posts: 57
Joined: 20 Apr 2012, 17:04
Location: Northern Ireland

Re: Link custom profilefield to an website

Post by Luke »

Which style do you use Mark?
steve
Master of posting
Master of posting
Posts: 1213
Joined: 12 Jul 2009, 19:14
Location: uk
Contact:

Re: Link custom profilefield to an website

Post by steve »

Steve ©
Luke
Member
Member
Posts: 57
Joined: 20 Apr 2012, 17:04
Location: Northern Ireland

Re: Link custom profilefield to an website

Post by Luke »

I think that modification will break current profile fields though.
I'm writing something based on Sniper_E's guide, I'll post it when it's done
Luke
Member
Member
Posts: 57
Joined: 20 Apr 2012, 17:04
Location: Northern Ireland

Re: Link custom profilefield to an website

Post by Luke »

First off create your custom profile field:
Field Type: Single text field
Field Identification: RuneScape
Publicly display profile field: Yes
Display in user control panel: Yes
Display on registration screen: (up to you)
Display on viewtopic screen: Yes
Required field: No
Hide profile field: No
Field name/title presented to the user: RuneScape
Field description: (up to you)
Default value: (blank)

Next page:
Length of input box: 10
Minimum number of characters: 0
Maximum number of characters: 30 (a guess)
Field vailidation: Alphanumeric and spacers

Then, go to Board Features/Load settings and set:
Display custom profile fields on topic pages: Yes


OPEN:
styles/prosilver/template/viewtopic_body.html
Find This may be a partial find and not the whole line

Code: Select all

      <!-- BEGIN custom_fields -->
         <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
      <!-- END custom_fields -->

Replace with Replace the preceding lines with the following

Code: Select all

      <!-- BEGIN custom_fields -->
         <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "RuneScape" -->
            <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> <a href="http://services.runescape.com/m=hiscore/compare.ws?user1={postrow.custom_fields.PROFILE_FIELD_VALUE}">{postrow.custom_fields.PROFILE_FIELD_VALUE}</a></dd>
      <!-- ELSE -->
         <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
        <!-- ENDIF -->
      <!-- END custom_fields -->


OPEN:
styles/subsilver2/template/viewtopic_body.html
Find This may be a partial find and not the whole line

Code: Select all

               <!-- BEGIN custom_fields -->
                  <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
               <!-- END custom_fields -->

Replace with Replace the preceding lines with the following

Code: Select all

      <!-- BEGIN custom_fields -->
         <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "RuneScape" -->
            <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> <a href="http://services.runescape.com/m=hiscore/compare.ws?user1={postrow.custom_fields.PROFILE_FIELD_VALUE}">{postrow.custom_fields.PROFILE_FIELD_VALUE}</a>
      <!-- ELSE -->
         <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
        <!-- ENDIF -->
      <!-- END custom_fields -->


Save and refresh the templates

Tell me how it goes :popcorn:
Luke
Member
Member
Posts: 57
Joined: 20 Apr 2012, 17:04
Location: Northern Ireland

Re: Link custom profilefield to an website

Post by Luke »

AutoMOD file:
RuneScape.zip
0.0.1
(25.12 KiB) Downloaded 48 times
Korkel
Senior member
Senior member
Posts: 349
Joined: 26 May 2014, 06:48
Location: ~/home/Mark/Desktop

Re: Link custom profilefield to an website

Post by Korkel »

No sorry.
Luke
Member
Member
Posts: 57
Joined: 20 Apr 2012, 17:04
Location: Northern Ireland

Re: Link custom profilefield to an website

Post by Luke »

No sorry what?
Korkel
Senior member
Senior member
Posts: 349
Joined: 26 May 2014, 06:48
Location: ~/home/Mark/Desktop

Re: Link custom profilefield to an website

Post by Korkel »

I tested, doesn't work, sorry.
steve
Master of posting
Master of posting
Posts: 1213
Joined: 12 Jul 2009, 19:14
Location: uk
Contact:

Re: Link custom profilefield to an website

Post by steve »

Works fine
http://services.runescape.com/m=hiscore ... er1=runner

What else do you want Mark?
Steve ©
Luke
Member
Member
Posts: 57
Joined: 20 Apr 2012, 17:04
Location: Northern Ireland

Re: Link custom profilefield to an website

Post by Luke »

In what way doesn't it work Mark? You'll need to give more information if you need help fixing the problem.
Did you remember to follow all the DIY steps at the end of the installation?
Korkel
Senior member
Senior member
Posts: 349
Joined: 26 May 2014, 06:48
Location: ~/home/Mark/Desktop

Re: Link custom profilefield to an website

Post by Korkel »

Field must required and displayed on pages as RSN
Luke
Member
Member
Posts: 57
Joined: 20 Apr 2012, 17:04
Location: Northern Ireland

Re: Link custom profilefield to an website

Post by Luke »

Just change everywhere it says "RuneScape" to RSN, and in the custom profile field options, mark the boxes for show on registration, and required field
Korkel
Senior member
Senior member
Posts: 349
Joined: 26 May 2014, 06:48
Location: ~/home/Mark/Desktop

Re: Link custom profilefield to an website

Post by Korkel »

Works perfect, thank you so much!

Edit; Not when I show a profile, what must I change for that?
Post Reply