Announcement

Collapse
No announcement yet.

Profile Redirect

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

  • Profile Redirect

    We are using vBulletin for forums in our site. Profiles are handled by a separate piece of software (our CMS), not vBulletin. We have single-sign on (we also use WordPress) so that when a user registers, they are given a vBulletin account and when they log-in, they are automatically logged in to vBulletin too.

    We want to make sure that when in the forum, a user clicks the name of another user, they are shown the profile page from our CMS site, not from vBulletin. Which template(s) do we need to modify to make sure that the vBulletin profiles don't show and can you please suggest what we should do to best redirect to the CMS profiles?

    Thanks in advance.

  • #2
    There are many different links to user profiles. One solution is to edit this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Member Info Templates -> MEMBERINFO

    You can add a meta refresh tag to the head. For example:

    Code:
    $stylevar[htmldoctype]
    <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
    <head>
    $headinclude
    <style type="text/css">
    #additionalinfo_list, #membergroups_list { margin-top: 0px; margin-bottom: 0px; }
    #additionalinfo_list dd, #membergroups_list dd { margin: 0px 0px $stylevar[cellpadding]px 0px; }
    </style>
    <title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title>
    [color=red]<meta http-equiv="refresh" content="0;url=[color=blue]new url here[/color]"/>
    [/color]
    </head>
    <body>
    $header
    $navbar
    If the external profile link uses the userid then you can reference this variable in the URL:

    Code:
    $userinfo[userid]

    Comment


    • #3
      Jake,

      Thanks. This works, but is not an elegant solution: when a user clicks the name of another user, the vBulletin profile page shows for a second or two and then there is a redirect to our own custom profile page. Do you have a suggestion to accomplish this without the 1-2 second vBulletin profile page showing? Can I just strip the MEMBERINFO template of all code and leave only the meta include? Is there a better/slightly more elegant way to accomplish this?

      Thanks in advance.

      Ross

      Comment


      • #4
        So we thought about this a little more and figured out a good way to accomplish a profile redirect (in a more elegant way). The solution might be different depending on how your software is configured and what you are trying to do. In our situation, we are using the userprofile_prepare hook. We then read the user id (via GET), querying our CMS database for the corresponding cms user ID, get the correct URL for our profile page and send a header.

        Comment

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