[PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

Page 4 of 4 FirstFirst 1234
Results 46 to 55 of 55
  1. #46
    Member SimpleBB is offline
    MemberRank
    Aug 2009 Join Date
    58Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    Quote Originally Posted by Murawd View Post
    Well, for one, you used way too many queries. The structure makes no sense, and there isn't much room for additions.
    This is just a Pre-Alpha Release. It's not supposed to be too much

    Quote Originally Posted by xSilv3rbullet View Post
    Wayne...you messed it up.
    Just shut up.

  2. #47
    :) Horizon is offline
    MemberRank
    Jan 2009 Join Date
    Illinois, U.S.Location
    2,381Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    Quote Originally Posted by SimpleBB View Post
    This is just a Pre-Alpha Release. It's not supposed to be too much



    Just shut up.
    It doesn't matter. This isn't very extensible.

  3. #48
    Member SimpleBB is offline
    MemberRank
    Aug 2009 Join Date
    58Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    Quote Originally Posted by Murawd View Post
    It doesn't matter. This isn't very extensible.
    Let's take this to VM.

  4. #49
    Account Upgraded | Title Enabled! xSilv3rbullet is offline
    MemberRank
    Apr 2009 Join Date
    1,226Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    Can has cookie?

    style/poseidonBB/usercp.php (apparently he didn't finish it, cuz it's crap. T_T)

    PHP Code:
    <?php

    /**
     * User Control Panel
     */
     
    if(isset($_SESSION['uid']))
    {
        
    $sql "SELECT * FROM `users` WHERE `id`='".$_SESSION['uid']."'";
        
    $res mysql_query($sql) or die (mysql_error());
        
    $row mysql_fetch_array($res);
        
        
    $profile_ops = array('Edit Your Details' => 'edit_detail''Change Your Account Details' => 'acc_detail');
        
    $comm_ops = array('Friends and Contacts' => 'friends_contacts''Ignored Users' => 'ignore_users');
        
    $pm_ops = array('Send New' => 'pm_send''Inbox' => 'pm_inbox''Sent' => 'pm_sent');
        
        
    $proc 1;
        
    $count count($profile_ops);
        
    $comm_count count($comm_ops);
        
    $pm_count count($pm_ops);
        
        if(isset(
    $_GET['do'])) {
            
    $do $_GET['do'];
        } else {
            
    $do "";
        }
        
        echo 
    "<center>";
        echo 
    "<div id=\"container\">";
        echo 
    "<div id=\"userinfo\">";
        echo 
    "<table border=\"0\" width=\"100%\">";
        echo 
    "<tr align=\"right\"><td>Welcome, <a href=\"".$rootdir."profile.php?id=".$row['id']."\">".$row['username']."</a>! <a href=\"".$rootdir."logout.php\">Logout</a></td></tr>";
        echo 
    "</table>";
        echo 
    "</div>";
        echo 
    "<table border=\"0\" width=\"100%\" cellspacing=\"3\" cellpadding=\"3\">";
        echo 
    "<tr><td align=\"left\" width=\"22%\">";
        echo 
    "<div id=\"notice\" style=\"width:95%; border:1px solid #000;\">UCP Options</div>";
        echo 
    "<div id=\"content\" style=\"width:95%; border:1px solid #000; margin-top:0px;\">"
        echo 
    "<a href=\"".$rootdir."ucp.php\">&laquo;UCP Home&raquo;</a><br><br>";
        echo 
    "<b>Profile Options</b><br>";
        foreach(
    $profile_ops AS $name => $link)
        {
            
    $break = ($proc == $count) ? "" " <br> ";
            
            echo 
    "<a href=\"".$rootdir."ucp.php?do=".$link."\">".$name."</a>" $break "\n";
            
            
    $proc++;
        }
        echo 
    "<br><b>Community</b><br>";
        foreach(
    $comm_ops AS $name => $link)
        {
            
    $break = ($proc == $comm_count) ? "" " <br> ";
            
            echo 
    "<a href=\"".$rootdir."ucp.php?do=".$link."\">".$name."</a>" $break "\n";
            
            
    $proc++;
        }
        echo 
    "<b>Private Messaging</b><br>";
        foreach(
    $pm_ops AS $name => $link)
        {
            
    $break = ($proc == $pm_count) ? "" " <br> ";
            
            echo 
    "<a href=\"".$rootdir."ucp.php?do=".$link."\">".$name."</a>" $break "\n";
            
            
    $proc++;
        }
        echo 
    "</div>";
        echo 
    "</div>";
        echo 
    "</td><td colspan=\"2\" valign=\"top\" align=\"left\">";
        echo 
    "<div id=\"content\">";
        switch(
    $do)
        {
            case 
    NULL:
                echo 
    "<title>User Control Panel</title>";
                echo 
    "Welcome to the User Control Panel, ".$_SESSION['name']."!<br>
                Here, you will find many useful tools to tweak and edit your profile to create the ultimate look!<br><br>
                
                <i>Profile Options - Change your email, include your website, your location, anything!  Keep in mind that all of this is displayed publicly.</i><br><br>
                <i>Community - Access friends, contacts, or anything related to the community here!</i><br><br>
                <i>Private Messaging - You can use private messaging to send someone a message without it being publicly displayed on the user's profile.</i>"
    ;
                break;
            case 
    "edit_detail":
                
    $image = (file_exists("avatars/".$get['posterid'].".gif")) ? "<img src=\"avatars/".$_SESSION['uid'].".gif\" title=\"Your Avatar\" border=\"1\">" "No Avatar";
            
                echo 
    "<title>User Control Panel - Edit Details</title>";
                echo 
    "<fieldset>
                <legend>Avatar</legend>
                    <center>
                        "
    .$image."<br />
                    </center>
                    <form method=\"post\" action=\"\">
                        <table border=\"0\" cellspacing=\"1\" width=\"100%\">
                            <tr>
                                <td>
                                    <input type=\"file\" name=\"avatar\">
                                </td>
                            </tr>
                        </table>
                    </form>
                </fieldset>"
    ;
                break;
            case 
    "acc_detail":
                echo 
    "<title>User Control Panel - Edit Account Details</title>";
                
                if(!isset(
    $_POST['updatepass']))
                {
                echo 
    "<fieldset>
                <legend>Change Password</legend>
                    <form method=\"post\" action=\"\">
                        <table border=\"0\" cellspacing=\"1\" width=\"100%\">
                            <tr>
                                <td>
                                    <fieldset>
                                        <legend>Please enter your current password to continue</legend>
                                        <input type=\"password\" name=\"password\">
                                    </fieldset>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    New Password
                                    <input type=\"password\" name=\"newp\">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Confirm New Password
                                    <input type=\"password\" name=\"cnewp\">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    New Email Address
                                    <input type=\"text\" name=\"newemail\">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type=\"submit\" name=\"updatepass\" value=\"Update Details\">
                                </td>
                            </tr>
                        </table>
                    </form>
                </fieldset>"
    ;
                }
                else
                {
                    
    $old mysql_real_escape_string(stripslashes($_POST['password']));
                    
                    
    $new mysql_real_escape_string(stripslashes($_POST['newp']));
                    
    $confirm mysql_real_escape_string(stripslashes($_POST['$cnewp']));
                    
                    
    $email mysql_real_escape_string(stripslashes($_POST['newemail']));
                    
                    
    $sql "SELECT * FROM `users` WHERE id='".$_SESSION['uid']."'";
                    
    $query mysql_query($sql) or die(mysql_error());
                    
    $fetch mysql_fetch_array($query);
                    
                    
    $md5pass md5($old);
                    
    $md5newpass md5($new);
                    
                    if(
    $md5pass == $fetch['password'])
                    {
                        if(
    $new == $confirm)
                        {
                            
    mysql_query("UPDATE `users` SET password='".$md5newpass."' WHERE id='".$_SESSION['uid']."'") or die(mysql_error());
                        }
                        else
                        {
                            echo 
    "Passwords do not match!";
                        }
                        
                        if(
    $email != "")
                        {
                            
    mysql_query("UPDATE `users` SET email='".$email."' WHERE id='".$_SESSION['uid']."'") or die(mysql_error());
                        }
                        else
                        {
                            echo 
    "Please provide an email!";
                        }
                    }
                    else
                    {
                        echo 
    "Incorrect password provided!";
                    }
                }
                break;
            case 
    "pm_send":
                
    $userid mysql_real_escape_string(stripslashes($_GET['uid']));
                
                
    #$script = "INSERT INTO";
                
    break;
        }
        echo 
    "</div>";
        echo 
    "</td>";
        echo 
    "</tr>";
        echo 
    "</table>";        
        echo 
    "</div>";            
        echo 
    "</center><br>";
    }
    else
    {
        include(
    'notice.php');
    }

    ?>

  5. #50
    :) Horizon is offline
    MemberRank
    Jan 2009 Join Date
    Illinois, U.S.Location
    2,381Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    You should learn to separate the html from the PHP. This is where procedural becomes a pain.

  6. #51
    Member SimpleBB is offline
    MemberRank
    Aug 2009 Join Date
    58Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    Well then, thank you for your opinion, I'll try to change it around.

  7. #52
    Account Upgraded | Title Enabled! xSilv3rbullet is offline
    MemberRank
    Apr 2009 Join Date
    1,226Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    lol, can I has the latest build?

  8. #53
    Account Upgraded | Title Enabled! Atreyia is offline
    MemberRank
    Aug 2009 Join Date
    BC, CanadaLocation
    240Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    I am sorry, but that is THEE ugliest theme I have ever seen. Do you honestly need someone to explain to you why it's horrible? Good job on making a forum software, but the theme is just.. just sucks. Sorry dude.

    Instead of using just HTML, try looking into making actual forum themes. Look at RaGEZONE, you see how the whole thing flows? Well, your's is just blue, grey, and text.

  9. #54
    Account Upgraded | Title Enabled! Worthy is offline
    MemberRank
    Apr 2008 Join Date
    ScotlandLocation
    256Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    It looks alright but the skin there just put me off straight away.

  10. #55
    Novice xLite is offline
    MemberRank
    Sep 2009 Join Date
    Scotland, UKLocation
    2Posts

    Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)

    Are you kidding me? You don't code it to suit Internet Explorer. That's the most retarded thing you can do. It's not Firefox's fault the borders are not aligned, it's your fault for very poor coding.

    You should code your layouts to work in Firefox, that pretty much guarantees it to work with other standards compliant browsers like Chrome, Opera, Safari etc etc. Once that's done, hack it for [s]shit[/s], I mean Internet Explorer.

    Also your PHP code has absolutely no structure whatsoever, you've caused it to be almost impossible to improve on it/make it extensible. Also you are running too much innefficient crap. Learn to optimise code, don't just use OOP for MySQL, use it everywhere where neccessary. Keep everything organised, optimal and nice looking. I would hate to be writing plugins for this forum I'll tell you that.

    If there's one thing I hate it's flaming other people, however this is just stupid. You should learn good programming techniques and best practices. Have a look at how other forums are structured. Once you have a good understanding, then start to write your own forum. It also wouldn't kill you to learn some decent xHTML/CSS skills too.
    Last edited by xLite; 16-01-10 at 04:13 PM.



Page 4 of 4 FirstFirst 1234

Advertisement