Announcement

Collapse
No announcement yet.

What data does vbulletin send while signing in

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

  • What data does vbulletin send while signing in

    K, im gunna have a flash login box, but the problem is, i dunno what data flash sends.

    http://haloimpulse.com/site

    the login thing is up in the header (click the thing on the right)

    i wanna have that be for vbulletin

    thx

  • #2
    You can get that information from the login form code. From the navbar template:

    Code:
    		<!-- login form -->
    		<form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)">
    		<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
    		<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    		<tr>
    			<td class="smallfont">$vbphrase[username]</td>
    			<td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
    			<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td>
    		</tr>
    		<tr>
    			<td class="smallfont">$vbphrase[password]</td>
    			<td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td>
    			<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
    		</tr>
    		</table>
    		<input type="hidden" name="s" value="$session[sessionhash]" />
    		<input type="hidden" name="do" value="login" />
    		<input type="hidden" name="forceredirect" value="1" />			
    		<input type="hidden" name="vb_login_md5password" />
    		<input type="hidden" name="vb_login_md5password_utf" />
    		</form>
    		<!-- / login form -->
    You need to POST information to the login.php file. Look at the various input fields to see what information needs to be posted. Some fields have fixed values, like the do field. Others need information entered, like the vb_login_username and vb_login_password fields.

    ...but I have no idea how to do this with flash.

    Comment


    • #3
      this is gunna be weird. Is there anyway i can put php code in the header?

      Comment


      • #4
        In the header template? No.

        But you can put PHP code into the phpinclude_start template. That template is in the same scope as the header.

        Comment


        • #5
          or at least a variable in the header? I need to define a new varible ($theuser) and in the header i need it so panal1.swf will play if user = logged in and panal2.swf will play if user is not logged in. I can do all the coding, i just need to be able to define variables and put some php in the header

          Comment


          • #6
            Variables work.

            Comment


            • #7
              but can variables i define work? And how would i define them?

              Comment


              • #8
                For example, use this in your phpinclude_start template:

                Code:
                $variable = "whatever";
                Now you can use $variable in your header and it will parse to whatever.

                Comment


                • #9
                  oh cool! Didnt know that. Now the hard part is the actionscript :-/

                  also, if some1 could take a look,

                  http://www.haloimpulse.com/forum.php?styleid=10


                  it works and it all aligned in firefox, but has small breaks in IE. Any one can help me with this? BTW, dont mind the big blank box on the right, thats where the flash login goes.

                  Comment


                  • #10
                    You can use conditionals in your style templates to check if a user is logged in or not

                    <!-- usergroupid 1 is unregistered -->
                    <if condition="$bbuserinfo['usergroupid'] == '1'">
                    <!-- html code to play file1.swf for unregistered members -->
                    <else />
                    <!-- html code to play file2.swf for registered members -->
                    </if>
                    <!-- replace the html comment with your real html code to play flash files -->

                    Comment


                    • #11
                      hmm. Can i use php like if and else though?

                      Comment


                      • #12
                        Originally posted by HaloImpulse
                        hmm. Can i use php like if and else though?
                        No, but the template conditional that Floris posted is functionally identical for displaying output, and it can be used in the templates.

                        Comment


                        • #13
                          i dunno if that will work. Ill give it a try though.

                          Comment

                          Loading...
                          Working...
                          X