Announcement

Collapse
No announcement yet.

Adding custom profile field that allows hyperlink

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding custom profile field that allows hyperlink

    I've searched this and its been asked before but no one has given a straight answer. Is there a way to do this?

    My forums holds a spotlight on a member each month and I'd like to create a custom field in everyones profile where if they've had a spotlight they can place the URL in that field and it will show up as a hyperlink when people view their profile. Is there a way to do this because thus far bbcode and standard html aren't working when you go to view the profiles.
    Last edited by KCMO; Sun 15 Jan '06, 11:29am.

  • #2
    You'd have to manually edit the MEMBERINFO template and create a field where the URL is displayed, using the appropriate HTML there.
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      ok, so I have the profile field already built, what <if> statement would I need to put into the memberinfo templete to get it to read the field and display it as a URL?

      Comment


      • #4
        You could edit your memberinfo_customfields template and change it to this:
        Code:
        <tr>
            <td>
                <strong>$profilefield[title]</strong>:<br />
                <if condition="$profilefield[profilefieldid] == 33"><a href="$profilefield[value]">$profilefield[value]</a></if>
            </td>
        </tr>
        Change 33 to the ID itself.
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment


        • #5
          awesome!! thank you...one last question. What if I wanted to add more than one ID to have a few items in the profile hyperlinked?


          ***EDIT***

          Nevermind, I got it...just duplicated the if statement...Thank you so much man

          Comment


          • #6
            I tried that but it didn't work for me.
            This did the trick:
            Code:
            <tr>
                <td>
                    <strong>$profilefield[title]</strong>:<br />
                    <if condition="$profilefield[profilefieldid] == 33"><a href="$profilefield[value]">$profilefield[value]</a><else />
            $profilefield[value]
            </if>
                </td>
            </tr>
            Can someone show me how nest multiple statements, if I wanted to have different fields displayed different ways (or not at all on the profile page)
            Last edited by CheapyD; Fri 24 Feb '06, 10:55pm.

            Comment


            • #7
              Basically to nest statements, use this format:

              Code:
              <if condition="foo">
                  foo
              <else />
                  <if condition="foo2">
                      foo2
                  <else />
                      foo3
                  </if>
              </if>
              Just make sure to close all the if statements.
              Best Regards
              Colin Frei

              Please don't contact me per PM.

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X