BoltZ Posted November 3, 2008 Share Posted November 3, 2008 http://www.devwebsites.com/RemoteBB.zip AHAHAHHAHA done. Things to note I am deciding to take out the wysiwyg editor. It is faulty and not necessary. I have not updated the smilies. They are better now. You can not login as your administrator in the admin directory yet, login from the regular directory READ THE README FILE PLEASE give me feedback and btrw dont even THINK its CLOSE to w3 validation standards. I dind't even add a doctype to this stuff yet Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/ Share on other sites More sharing options...
BoltZ Posted November 3, 2008 Author Share Posted November 3, 2008 and also I noticed already about the title of the pages. I shall fix. I also updated the zip so if you downloaded the files before this post then delete that directory and download this. This one works Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-680984 Share on other sites More sharing options...
Daniel0 Posted November 3, 2008 Share Posted November 3, 2008 Seeing as you've decided to use short tags that means it'll not run on many systems. Short tags is disabled by default on PHP5+. Seeing as I couldn't run it (I didn't bother to turn short tags on) I've decided to comment on your code. To be honest, it's really bad. All your pages are essentially one big mess of conditionals (if this do that, otherwise to this, but if something is like this you should do that instead). Just look at your index.php, it's one giant mess of code. The HTML is all mixed up with the PHP code as well. I'm wondering how you are going to implement those "templates" that your directory structure suggests will come at a later point. As it is right now that will be completely impossible. You use deprecated superglobals like $HTTP_COOKIE_VARS. Your way of doing error handling is also horrible. Simply calling die() is not error handling. It gets even worse when you start actually printing verbose information to the screen regarding the errors. That is really bad as it will potentially aid attackers in compromising the application (see the tutorial PHP Security). Then there are things like $postselect3. Do you have a constant called post? No, so don't use a constant called that. Yes, it works and I know you don't care about such stuff as long as it works (which you've previously stated), but if you set the error reporting to E_ALL then you'll see it actually results in an E_NOTICE. You need to use quotation marks around strings. I'm sorry to say it but the code is absolutely horrendous. It's poorly designed, you use deprecated stuff, you have errors, you use short tags, you have security flaws, it doesn't scale, and it will be incredibly difficult to maintain. I'd say it's back to the drawing board... Oh yeah, you should code it to be W3C compliant from the start. It'll be a pain in the ass to have to go back and make it all compliant. Especially considering how your code is structured. Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-681471 Share on other sites More sharing options...
BoltZ Posted November 3, 2008 Author Share Posted November 3, 2008 I alrady know the code is a mess. Its just a basic forum. This is like beta 1.0.0. On the actual release it will be compliant and a little more secure with no short tags. Right now I am just messing around with the bugs. But on another note was installation easy for you, the user? Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-681528 Share on other sites More sharing options...
Daniel0 Posted November 3, 2008 Share Posted November 3, 2008 In order to make it easy you'd probably have to work on the install script to make the user able to enter various values in there instead of having to edit files. I alrady know the code is a mess. Its just a basic forum. This is like beta 1.0.0. On the actual release it will be compliant and a little more secure with no short tags. That doesn't make any sense. Why waste your time deliberately write it poorly first and then make it better? Why not just make it better from the start? Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-681529 Share on other sites More sharing options...
BoltZ Posted November 4, 2008 Author Share Posted November 4, 2008 Because I had a bet wtih a friend to see if I could make a forum in a month. I have 3 days left so No real time yet. Theres only like 60 files I would have to edit really. Not too long, only like a week maybe. Dw When beta 2 comes out I will have taken all your suggestions to heart. How you like the forums so far though? Search doesn't work btw and theres stiill bugs Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-681849 Share on other sites More sharing options...
Daniel0 Posted November 4, 2008 Share Posted November 4, 2008 Well, if I was your teacher and you turned this in for an assignment then I would fail you. To me there is no valid reason why you would not want to write proper code. As for your bet, I'd say you lost. My advice would be to work on a smaller project and then do it properly. When you have more experience then you can start working on a larger scale project. Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-681976 Share on other sites More sharing options...
BoltZ Posted November 4, 2008 Author Share Posted November 4, 2008 The bet was taht I could make forums...these are forums. Not the most advanced, or compliant code and look but they are forums no mtter what u say. And the reason I wrote it non-compliant at first is because I was just rushing the typing. Well thanks for the suggestions anyway I guess..... Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-682118 Share on other sites More sharing options...
BoltZ Posted November 4, 2008 Author Share Posted November 4, 2008 Ok you know what? I am just going to retype everything making it semantic and I will redesign the home page Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-682354 Share on other sites More sharing options...
corbin Posted November 5, 2008 Share Posted November 5, 2008 No offense, but your code is horrible. It's like you're coding with 5 year old PHP, and half of your stuff doesn't make sense. One of my big issues with your code is $array["$variablekey"]. Why would you ever put a lone variable in quotes?! (Unless you're trying to force it to be a string, of course, but in that case, typecasting would be better.) Also, your SQL schema looks like you copy and pasted random crap together. It doesn't even make sense. I'll show an example table for you: CREATE TABLE b_users ( userID bigint(21) NOT NULL auto_increment, username varchar(60) NOT NULL default '', `password` varchar(255) NOT NULL default '', `status` int(20) NOT NULL default '0', posts bigint(20) NOT NULL default '0', email varchar(255) NOT NULL default '', validated int(11) NOT NULL default '0', keynode bigint(21) NOT NULL default '0', sig tinytext NOT NULL, banned varchar(255) NOT NULL default 'no', rank varchar(255) NOT NULL default '0', usepm int(11) NOT NULL default '1', AIM varchar(50) NOT NULL default '', ICQ varchar(50) NOT NULL default '', location varchar(255) NOT NULL default '', showprofile smallint(6) NOT NULL default '1', lastposttime bigint(20) NOT NULL default '0', tsgone bigint(20) NOT NULL default '0', oldtime bigint(20) NOT NULL default '0', avatar varchar(255) NOT NULL default '', photo varchar(255) NOT NULL default '', rating bigint(255) NOT NULL default '0', totalvotes bigint(20) NOT NULL default '0', votedfor longtext NOT NULL, rps int(11) NOT NULL default '1', rpsscore bigint(20) NOT NULL default '0', lasttime bigint(20) NOT NULL default '0', templateclass bigint(20) NOT NULL default '1', PRIMARY KEY (userID) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Your userID column should be the same datatype/size in every table that uses it since that will make for quicker joins. bigint(20). That's 20 digits. 99 999 999 999 999 999 999 users. Holy crap! That's more than the earth's population!!!! Also, why not make it unsigned? Save a couple bits here and there. Unless you plan on using negative user ids. username varchar(60) NOT NULL default '', You probably don't ever actually want the username to be '', but I guess that's technically fine. else if(strlen($username)>15 || strlen($username)<3) Why is your username column 45 letters longer than your max value??? $password=md5($password); md5 hashes (when in hex form) are always 32 characters, so why is your column 255? Also, it could technically be char instead of varchar, but that's just being picky. Also, you don't do it in this table, but a lot of times I saw you storing IPs in 255 varchar columns. I've never seen a 255 character IP address. xxx.xxx.xxx.xxx. 17 char max. Or, just store it in an unsigned int with INET_ATON. I could go on, but I won't. Sorry if this post was kind of harsh, but if you think you have the skill to take on an entire forum (bet or no), then you should have the mind to take criticism of it ;p. Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-683252 Share on other sites More sharing options...
Imad Posted November 6, 2008 Share Posted November 6, 2008 Very, Very Unorganized code. I agree with the others, a teacher wouldn't pass this. I think you should start from scratch, make it more organized, modular and a lot easier to customize things. Good Luck. Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-683445 Share on other sites More sharing options...
BoltZ Posted November 6, 2008 Author Share Posted November 6, 2008 Very, Very Unorganized code. I agree with the others, a teacher wouldn't pass this. I think you should start from scratch, make it more organized, modular and a lot easier to customize things. Good Luck. The point was NOT for people to review the CODE. It was supposed to be people reviewing how the general look and power of the forum. I already mentioned in the first post that the code was a mess and it wasn't valid or good. Thanks ps. I never mentioned a teacher would be grading this at all did i? this was a bet between me and a friend Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-683603 Share on other sites More sharing options...
corbin Posted November 6, 2008 Share Posted November 6, 2008 Very, Very Unorganized code. I agree with the others, a teacher wouldn't pass this. I think you should start from scratch, make it more organized, modular and a lot easier to customize things. Good Luck. The point was NOT for people to review the CODE. It was supposed to be people reviewing how the general look and power of the forum. I already mentioned in the first post that the code was a mess and it wasn't valid or good. Thanks ps. I never mentioned a teacher would be grading this at all did i? this was a bet between me and a friend The code is so antiquated that I can't get it to run without spending time going through fixing random things. (Which I'm not going to do.) So, it's not possible for me to see what it looks like ;p. Also, if you wanted the look reviewed, it would've been better to post it in Critique. When ever someone provides code, I expect that they want it critiqued. If someone wants the look critiqued, or even the functionality, they usually provide a link to a running copy of it, so we each don't have to download/install/mess with the exact same thing. Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-683609 Share on other sites More sharing options...
Daniel0 Posted November 6, 2008 Share Posted November 6, 2008 I agree. Besides, how the code is written can have an impact on how it works so it's not completely irrelevant. Also, we know you didn't mention school or a teacher, but saying that "a teacher would likely fail it" is a measure of the code's quality. Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-683611 Share on other sites More sharing options...
corbin Posted November 6, 2008 Share Posted November 6, 2008 I just realized, Bolt, that you never said to review the look. You simply posted a link to the source and told us to review it. No wonder we all assumed you wanted us to review the code. Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-684073 Share on other sites More sharing options...
BoltZ Posted November 12, 2008 Author Share Posted November 12, 2008 Yea mb but I got a new bet now. Well this is kinda personal I want to do it. I want to create a kind of ajax website builder. I have finished a little bit on my site www.devwebsites.com Link to comment https://forums.phpfreaks.com/topic/131157-done-basic-forum-installation/#findComment-688412 Share on other sites More sharing options...
Recommended Posts