1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Making a custom userfield hyperlinked?

Discussion in 'Styling and Customization Questions' started by PVO_Dave, Nov 28, 2011.

  1. PVO_Dave

    PVO_Dave Active Member

    Hi All,

    We would like to be able to make one of the custom user fields a link to another user fields content...

    To put this into context (and hopefully make it make sense :confused:)

    One customer user field is 'Drives' - So the user would put 'Car' (hopefully the type of car..)
    Another custom user field is 'Gallery Link' so they put a link to the thread they have shared pictures of their car in

    The idea being in the forum messages the Car they have entered is clickable and takes them to a thread.

    I've had a play in the message_user_info but I'm getting knowwhere fast!

    Any thoughts?

    EDIT: It'd need to be conditional too, I.e. only show if they've entered something into Drives

  2. Fuhrmann

    Fuhrmann Well-Known Member

    Follow this steps and the addon that I made for you will work. Later, you can change the name of the fields.

    Create two custom user fields:

    id -> drives
    Title-> Drives
    Value Display HTML: <a href="{$custom}">{$value}</a>

    Gallery Link
    id -> gallerylink
    Title -> Gallery Link

    Download the attached file and put inside the folder library.
    Use the .xml to install.


    The field Drives should display the value that you entered to this field and link to the value of the field Gallery Link

    If you want to use another fields, open the file Member.php and change the drives or gallerylink to what you want.

    Attached Files:

  3. PVO_Dave

    PVO_Dave Active Member


    Just tried to install though, and got this: Please enter a valid callback method. ?
  4. Fuhrmann

    Fuhrmann Well-Known Member

    Make sure your folder structure will be this:

  5. PVO_Dave

    PVO_Dave Active Member

  6. Fuhrmann

    Fuhrmann Well-Known Member

  7. PVO_Dave

    PVO_Dave Active Member

    Just tried again and you are right, it does link in the Information tab, but doesn't in the message_user_info bit within threads, thats when I get the {$custom} URL show up

Share This Page