How to place Login/logout link on all pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pulsorock
    Senior Member
    • Aug 2001
    • 306
    • 3.6.x

    How to place Login/logout link on all pages

    Hello,
    I want to place a image link for login/logout on all pages on my board for easy access for my users.
    What files do I need to modify and what do I need to place for the correct link?
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    You could place these in your footer template:





    Could you please enter your customer info into your user profile? See my sig for details. Thanks!
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • pulsorock
      Senior Member
      • Aug 2001
      • 306
      • 3.6.x

      #3
      And how can I place the link that depends if the user is logged in or logged out what link to appear.
      For example, if the user is logged, then it will appear the logout link and if logged out,the login link?

      Ok.. I have my account info on my home, as soon as I arrive there I'll add it.

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Hmmm....that's a bit more complicated. I don't know if this will work, but you can try using the $logincode variable in the footer template.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • Chen
          Senior Member
          • Jun 2001
          • 8388

          #5
          I'm pretty sure that using $logincode will give him the table cells that are used in the new reply / thread templates (username_loggedout and username_loggedin)...

          But I think I got it.
          In your global.php, add this code
          PHP Code:
          if ($bbuserinfo['userid']==0) {
            eval(
          "\$loginlink= \"".gettemplate("loginlink")."\";");
          } else {
            eval(
          "\$loginlink= \"".gettemplate("logoutlink")."\";");

          right before
          PHP Code:
          if (!$header) {
            eval(
          "\$header = \"".gettemplate('header')."\";");
          } else {
            eval(
          "\$header .= \"".gettemplate('header')."\";");

          Now make two new templates, logoutlink and loginlink, and place the right link in each of them.
          If you want, you can use forumhome_logincode and forumhome_logoutcode (both exist) instead of loginlink and logoutlink (respectively).

          Now you can use $loginlink in any of your templates to display a log in / out link.

          Tell me if this works.
          Good luck!
          Last edited by Chen; Sat 25 Aug '01, 12:09am.
          Chen Avinadav
          Better to remain silent and be thought a fool than to speak out and remove all doubt.

          גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            Good job FireFly!
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • Chen
              Senior Member
              • Jun 2001
              • 8388

              #7
              Thanks.
              Chen Avinadav
              Better to remain silent and be thought a fool than to speak out and remove all doubt.

              גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

              Comment

              • Zorg
                Senior Member
                • Jan 2001
                • 236

                #8
                So if you were going to user forumhome_logincode forumhome_logoutcode; would it be

                PHP Code:
                if ($bbuserinfo['userid']==0) {
                  eval(
                "\$forumhome_logincode = \"".gettemplate("forumhome_logincode ")."\";");
                } else {
                  eval(
                "\$forumhome_logoutcode = \"".gettemplate("forumhome_logoutcode ")."\";");

                is this correct?

                Comment

                • Chen
                  Senior Member
                  • Jun 2001
                  • 8388

                  #9
                  That is correct.
                  But note that using forumhome_logincode will produce a form, not a link. (forumhome_logoutcode will give you a link tho)
                  I forgot to mention where to add this code, so I edited my original post.
                  Chen Avinadav
                  Better to remain silent and be thought a fool than to speak out and remove all doubt.

                  גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                  Comment

                  • samtha25
                    Senior Member
                    • Feb 2001
                    • 325

                    #10
                    How would I get that to display on non-vB pages?

                    Comment

                    • certify
                      Senior Member
                      • Jul 2001
                      • 337

                      #11
                      Something like in my site http://www.certifyexpress.com ?

                      Check out this hack.
                      <sig removed because it violated the forum rules. Two requests were sent but ignored>

                      Comment

                      • pulsorock
                        Senior Member
                        • Aug 2001
                        • 306
                        • 3.6.x

                        #12
                        Hi FireFly

                        The display of the links appeared fine, just as they should.
                        The logout link worked fine, but the login link didn't.
                        When a logged out user click on login, it appeard this message:
                        Thank you for logging in, .
                        Then the user stays logged out.

                        What could be wrong?

                        Comment

                        • Chen
                          Senior Member
                          • Jun 2001
                          • 8388

                          #13
                          That's because just giving a link there is not enough.
                          I think you will have to use the template with the form (forumhome_logincode).
                          Chen Avinadav
                          Better to remain silent and be thought a fool than to speak out and remove all doubt.

                          גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                          Comment

                          • Thomas P
                            Senior Member
                            • Apr 2001
                            • 1497
                            • 5.6.4

                            #14
                            Looks like http://vbulletin.com/forum/showthrea...threadid=16815
                            -Tom
                            www.MCSEboard.de
                            German Windows Server & IT Pro Community dedicated to Windows Client & Server Systems. MVPs inside

                            Comment

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