+ Reply to Thread
Results 1 to 3 of 3

Thread: New web layout but a few questions

  1. #1
    nexhunter's Avatar
    nexhunter is offline x10 Sophmore nexhunter is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    millbury,massachusetts
    Posts
    239

    New web layout but a few questions

    http://xstudio.elementfx.com/
    I used fireworks then trial of microsoft expression web designer. And i got some questions if no one minds answering.

    1.Does anyone know how to make a phpbb3 login box so it can show on an html page while the forum files are in a sub folder called forum?

    2. If I added left or right boxes would it look better or worser?

    3. Can i use iframes on the main page for news and have it insert a .txt file or would that be breaking the corporate rule where advertisement must be on all pages visible.



  2. #2
    eddysweb's Avatar
    eddysweb is offline x10Hosting Member eddysweb is an unknown quantity at this point
    Join Date
    Sep 2006
    Posts
    63

    Re: New web layout but a few questions

    Well the first one should be able to be done, i did it for PHPBB2 which was reasonably easy cause you don't actually use the files from the forum, you just connect to its databse. BUT you can't display it an HTML page you have to use PHP. Here is a little bit of code that should get i used for phpbb2 that you should be able to mod prity easily:

    LOGIN SCRIPT:
    Code:
    <?PHP
    $database_name = "PHPBB3_DATABASE";
        //If a log out
        if(@($_GET['f'] == "logout")){
            echo "<meta http-equiv=\"Refresh\" content=\"1.5; URL=index.php\">";
            echo "<div class=\"logout\" align=\"center\">Logging out...</div>\n";
            exit();
    }
        if(@($_GET['posted'] == "true")){
                function connect($database_name){
                    $mysql_c = mysql_connect('localhost','YOUR_USERNAME','YOUR_PASSWORD');
                    $mysql_db = mysql_select_db($database_name);
                }
            connect(PHPBB DATABASE);
            $sql = "SELECT `user_password` FROM `phpbb_users` WHERE UPPER(`username`) = '" . strtoupper($_POST['username']) . "";
            $MD5_password = mysql_query($sql);
            if(@mysql_num_rows($MD5_password)){
                if(implode('',mysql_fetch_array($MD5_password, MYSQL_ASSOC)) == md5($_POST['password'])){
                    $_SESSION['username'] = $_POST['username'];
                    //Log in
                    $error_message = "<div class=\"login\" align=\"center\">Login Successful!</div>";
                    echo "<meta http-equiv=\"Refresh\" content=\"1; URL=index.php?f=success\">";
                    exit();
                }else{
                    //Incorrect password
                    $error_message = "<div class=\"logout\" align=\"center\">Login Failed!</div>";
                    $username_correct = true;
                }
            }else{
                //Incorrect username message
                $error_message = "<div class=\"logout\" align=\"center\">Login Failed!</div>";
                $username_correct = false;
            }
            
        }
    ?>
    All that we did here is connect to the same database that PHPBB2 uses, grab the username and password the same way it would and checks them against the details put in.

    LOGIN FORM:
    Code:
    <form name="userDetails" action="?posted=true" method="post">
                          <p><label for="username" class="txt">Username: </label>
                              <input class="inputForm" type="text" name="username" tabindex="1" <?PHP if($username_correct){echo 'value=' . $_POST['username'] ;} ?>>
                            </p>
    
                          <p><label for="password" class="txt">Password: </label>
                              <input class="inputForm" type="password" name="password" tabindex="2">
                          </p>
                
                          <p><input type="submit" name="button" id="button" value="Submit" />
    </form>
    PRINT:
    Code:
    <?PHP echo $error_message; ?>
    Can't promise anything bout this code but it should work.

    I'm not fantastic on design so i'll leave the display to someone else and finally you can use iframes in a page because i do it. I don't have the ads on the included pages but i have them on the page that has the iframe in it. This way every page that gets displayed still has an add on it.
    Last edited by eddysweb; 11-12-2007 at 12:41 AM. Reason: errors

  3. #3
    nexhunter's Avatar
    nexhunter is offline x10 Sophmore nexhunter is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    millbury,massachusetts
    Posts
    239

    Re: New web layout but a few questions

    Thanks for the help i'm currently looking into my layout in fireworks right now and making some changes to add the log in.



+ Reply to Thread

Similar Threads

  1. Some site design questions by a beginner.
    By parkourmumbai in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 10-31-2007, 12:35 PM
  2. Questions before start the website
    By DarkDragonLord in forum Free Hosting
    Replies: 22
    Last Post: 06-28-2007, 12:34 PM
  3. Replies: 2
    Last Post: 12-16-2006, 08:59 PM
  4. {req} Layout + Members Login Area
    By SEŅOR in forum The Marketplace
    Replies: 8
    Last Post: 04-29-2006, 02:59 PM
  5. Should i use this layout?
    By IamShipon1988 in forum Graphics & Webdesign
    Replies: 2
    Last Post: 07-28-2005, 07:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers