hm, i can mess around with my site to see if i can get anything to work. Never tryed this thou. I know its possible however.

    yea, i searched up and down that site! I found something similar to what i want, but it is applicable to the unix server (using httpaccess something). So i'm back to square one!

      Then why not view the code in vBulletin itself and edit it to suit your needs?

        you mean in my code for vbulletin forum? i did that!

        all of my pages are in html format... ok, i can handle that, just give them a different extension... i got as far as displaying the login info on One page.... but it doesn't remember the logged in person (something MUST be missing from the code).

        then, does this mean that if i want to protect 50 pages, i would have to put that same "check/set cookie" code on that every page?

          btw, i do appreciate your interest in helping me!!!!

            yes you would need to put the same check cookie code on each page that is restricted.

              i guess i could handle that... and then it is supposed to track that user throughout his session????

              i found that my code works half way if the protected page is within the "forums" folder. I am thinking this is because the global.php and function.php are in that folder (script that I stole from the vbulletin pages refers to both of these files).

              Could i place protected files in other folders???? Would i help you guys to help me if i posted the code here? THanks!

                <?php
                error_reporting(7);

                require("./global.php");

                if ($bbuserinfo[userid]==0) {
                show_nopermission();
                }

                ?>

                here is the "show_nopermission();" function:

                function show_nopermission() {
                global $bbtitle,$logincode,$url,$scriptpath,$bbuserinfo,$session;

                // generate 'logged in as:' box or username and pwd box
                if (!$logincode) {
                $logincode=makelogincode();
                }

                if ($bbuserinfo[userid]==0) {
                eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
                } else {
                eval("standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
                }
                exit;
                }

                  I'm a PHP n00b but i've don this.

                  User can register on my site, using a self build login system
                  when they register the records will be writen in my user database
                  but the name and password will also be writen to the userdatabase of the forum.

                  When users login, the login system will write a cookie bases in the forum cookies layout, so if a user goes into the forum the cookie will exist and they will be logged in automaticly 😛

                  Seems to work oke

                    hmm... sounds just like what i need! so, basically, you store the user name and psw twice?

                    Would you mind sharing your code? if it's not too much trouble.... i'd really appreciate that. I am totally at a wall of uncertainty! thanks in advance... you can pm me if you want.

                      Contact me by mail i will send you some files
                      mail is in my profile

                        Write a Reply...