Announcement

Collapse
No announcement yet.

logincode / logoutcode in header

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

  • logincode / logoutcode in header

    hi,
    i like to modify my header template so that anyone
    who is online see the "welcome..."-message and
    anyone who is not online see the login-input boxes.

    i know that this is allready in the forumhomepage
    template, but i like to have it on every page (header
    template).

    when i remove the $logincode from the
    forumhomepage and add id to the header template
    nothing apperars there

    can anyone help?

  • #2
    You will have to edit the global.php file so that it parses those templates.

    Currently they are only parsed in the index.php file.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      Re: logincode / logoutcode in header

      Originally posted by babak
      when i remove the $logincode from the
      forumhomepage and add id to the header template
      nothing apperars there

      can anyone help?
      Have the same problem with the $timenow and $welcometext variable, which doesn't work in the header template...

      Originally posted by wluke

      You will have to edit the global.php file so that it parses those templates.
      Umm, does anyone has a sample how to do that, went through the global.php and don't find my way.

      Do I really have to go so deep to edit the original files?
      Couldn't I modify something in the templates to use the bits in the header

      Thanks,
      -Tom

      P.S.: Sorry to exhume such an old thread, but it's exactly what I need
      http://www.mcseboard.de/images/buttons/lastpost.gif www.MCSEboard.de
      German Windows Server & IT Pro Community dedicated to Windows Client & Server Systems. MVPs inside

      Comment


      • #4
        Ditto

        Ditto

        Comment


        • #5
          Im guessing to use PHP in the header mate, the only way to do it is to edit the GLOBAL.PHP, should be easy I'll take a look now!

          Comment


          • #6
            ok mate heres how its done

            open admin/index.php

            and take the code out of there that you need, example below...it has descriptions by them, their near the top

            // get newest member
            $getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
            $newusername=$getnewestusers['username'];
            $newuserid=$getnewestusers['userid'];

            then simply copy and paste the selected into global.php (not the admin one) under // ####### Start load options ########

            this may not be the exact way to do it but it gives the result

            Comment


            • #7
              You also need
              PHP Code:
              $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user'); 
              before what Dunny pasted.
              (and it's in /forum/index.php, not /admin )
              Chen Avinadav
              Better to remain silent and be thought a fool than to speak out and remove all doubt.

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

              Comment


              • #8
                Sorry, I don't understand the solution.

                I'm having the same problem with $timenow in the header template -- variable doesn't seem to be set at that point. However, $timenow is already in global.php, so I'm having a hard time with figuring out what's wrong.

                thanks,
                Mike

                Comment

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