Announcement

Collapse
No announcement yet.

redirect

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

  • redirect

    Well how do i do a redirect in a php file?

    i tried
    header("Location: $site[siteurl]");

    but that doesn't work
    My site
    www.coolservice.dk

  • #2
    Did you set the $site[siteurl] variable?

    The rest looks correct.
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      oh doh me.... embaressing
      got another lil quick question

      which var can I check if a user is logged in? and their userid and username?
      My site
      www.coolservice.dk

      Comment


      • #4
        If you've included global.php at the top of the php file, you can use $bbuserinfo[userid] to check if a user is logged in. If it's 0, the user is a guest, if it's anything else, he's logged in.

        Their userid would be again $bbuserinfo[userid], their username $bbuserinfo[username]
        That's for vBulletin 3, vBulletin 3.5 has different variables.
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment


        • #5
          okay it worked, thanx.

          A concerning question though. If i upgrade to 3.5 later on, will i then have to change these vars??? I put them both in php files and in templates???
          My site
          www.coolservice.dk

          Comment


          • #6
            There is a legacy mode, so they should still work, but you'll want to change them once.

            The new vars will be in the format $vbulletin->userinfo['userid']
            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