Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
foxx
a framework is a good idea even if you are the best fokken programmer
If you can code a system around your website project that will keep your website secure and efficient, a framework would, more times than not, either slow you or/and your site down.
I, personally, find it much easier to program a product that is 100% originally my code, than a program that is either not my code or built on top of a framework.
Nonetheless, using a framework is very rarely, if ever, a 'bad' idea (depending on the quality of the framework though, of course). If you know what you are doing, it boils down to what you need for your application, and your personal preference.
Re: [Development] Modern Board - [PHP, OSS]
you won't ever build MVC or database adapter that's more flexible and extensible than the one built by team of people that made php themself
and MVC is the future of web
---------- Post added at 11:06 AM ---------- Previous post was at 10:59 AM ----------
besides building a forum is just the kind of project that's perfect for use of a framework, you might use some OOP here and there, but in the end without a framework it's still gonna me messy procedural php
Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
foxx
you won't ever build MVC or database adapter that's more flexible and extensible than the one built by team of people that made php themself
and MVC is the future of web
---------- Post added at 11:06 AM ---------- Previous post was at 10:59 AM ----------
besides building a forum is just the kind of project that's perfect for use of a framework, you might use some OOP here and there, but in the end without a framework it's still gonna me messy procedural php
After a bit of research, I assume you mean the Zend engine and framework?
Apparently a couple of developer's took the original PHP developer's work and updated it and whatnot and released PHP 3. Then they completely rewrote the parser and called it the Zend Engine, which has been the core of PHP ever since PHP 4.
Kind of confusing...
The framework was founded, and assumingly the original/base built, by their company - Zend Technologies.
The fact that Zend technology are only listed as the founders and corporate sponsors of the framework makes me believe that, by now, the Zend Framework is more community-built than anything else.
In terms of using a framework to create a message board:
Yes, yes, and yes. A message board would indeed be an 'ideal project' to be created using a PHP framework.
Re: [Development] Modern Board - [PHP, OSS]
yes I mean zend framework which is made by people who made zend engine which is the engine behind php itself, up from version 3, that is
and no, zend framework is not exactly community build, it's similar to how mozilla's firefox work, and you can't really say firefox is community-build, can you..
Re: [Development] Modern Board - [PHP, OSS]
I would like to point out, I'm doing this for experience along with learning. I would rather work off of it from scratch. Thank you for the tips.
Re: [Development] Modern Board - [PHP, OSS]
Why using vBulletin favicon?
Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
Dzoki
Why using vBulletin favicon?
I'm not, I haven't set a favicon so apache decided to use the roots favicon :P
---------- Post added at 07:58 PM ---------- Previous post was at 07:32 PM ----------
I've made a github for the project.
https://github.com/Makarovich/Modern-Board The source at the moment is dirty.
Please give me positive comment instead of negative ones.
Thank You.
Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
Tr0ll.™
Alright, let's begin.
- Instead of essentially creating a whole new page for functions like registering, why not just use GET and then just include the register.php when it is called through GET?
In other words, instead of http://localhost/forum/register.php, use http://localhost/forum/index.php?action=register
I also suggest doing this for anything else you can, i.e. login, logout, profile, etc etc.
- Now, includes/core.php:
Code:
$value = mysql_query("SELECT * FROM users WHERE id = '".$id."'");
No. No. No. No.
I don't care what other kind of protection you have. I don't care how well you try to stop user's from inputting 'bad' characters in to text boxes and such.
'".$id."'" is a huge no-no.
Here, read up on MySQLi:
PHP: Mysqli - Manual
Specifically the bind_param function.
- smiles/ - This folder is misspelled, hehe. Although, forum smilies is often misspelled.
- A simple PHP tip:
Code:
if (mysql_num_rows($result) == 0){
return true;
}
can be written like
Code:
if (mysql_num_rows($result) == 0)
return true;
and it will still work just the same. It's definitely a personal choice, but it makes the code a tad cleaner in some people's eyes, and also gets rid of one unnecessary line :P.
- Now.. just a small HTML tip - putting something like this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
right above the <html> tag in the header will, among other things, make Internet Explorer a lot more willing to display more parts of your site, especially if they currently use even remotely-non-basic CSS.
- Oh, and...
Code:
<head>
<title><?php echo $config['title']; ?> - Powered by mBoard</title>
</head>
Add <html> above the head tag ;).
- Finally.. Bulletin is spelled bulletin, not Bulliten ;).
I hope this helped. Once again, good luck.
Re: [Development] Modern Board - [PHP, OSS]
@Above. Couldn't have said it better my self.
There's also a quicker way to put:
PHP Code:
<?php echo $blabla; ?>
Which is:
Good luck with it though. When are you doing a logo? xD
Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
FreedomSaint
There's also a quicker way to put:
PHP Code:
<?php echo $blabla; ?>
Which is:
The problem with that is that many web servers don't recognize as <? being the start of a PHP code block, and thus it doesn't work. That's why I always use <?php.
Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
FreedomSaint
@Above. Couldn't have said it better my self.
There's also a quicker way to put:
PHP Code:
<?php echo $blabla; ?>
Which is:
Good luck with it though. When are you doing a logo? xD
A logo is probably one of the easiest and last things I'm doing.
---------- Post added at 01:12 PM ---------- Previous post was at 01:11 PM ----------
I'm going to stop the development for maybe a few days. School is starting tomorrow and I need to focus on that.
Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
FreedomSaint
@Above. Couldn't have said it better my self.
There's also a quicker way to put:
PHP Code:
<?php echo $blabla; ?>
Which is:
Good luck with it though. When are you doing a logo? xD
php shorthand is a bad practice and should be avoided for as stated before most apache servers dont recognize shorthand.
school is starting for me too and ill be doing CCNA through Cisco. WEEEEEEEEE
Re: [Development] Modern Board - [PHP, OSS]
Link doesn't even work? Is there a new demo link?
Re: [Development] Modern Board - [PHP, OSS]
Quote:
Originally Posted by
holthelper
php shorthand is a bad practice and should be avoided for as stated before most apache servers dont recognize shorthand.
school is starting for me too and ill be doing CCNA through Cisco. WEEEEEEEEE
It's not that apache servers don't "recognize" it, it's just disabled by default- and for good reason.
If you have PHP short-tags enabled, you can't use an <?xml ?> leading tag on xHTML 1.1 documents.
Example of an XHTML 1.1 document
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN"
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml
http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
>
<head>
<title>Virtual Library</title>
</head>
<body>
<p>Hello, World!</p>
</body>
</html>
The above example leads to a PHP parse error with short-tags enabled.
You can also have ASP tags enabled, but it's disabled by default.
ASP tags will not conflict with XML. You shouldn't be coding in ASP anyway, so there's no reason not to unless.. well I state below why asp & short tags can be bad..
PHP Code:
<?php
ini_set('display_errors', 1);
ini_set('error_reporting', -1);
$str = "This is a string in PHP";
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN"
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml
http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
>
<head>
<title>Virtual Library</title>
</head>
<body>
<% for($i=0;$i<10;$i++):%>
<p><%=$str%></p>
<% endfor%>
</body>
</html>
The problem with asp_tags and short_tags, is that you have to enable them in the php.ini file (ex: /etc/php5/apche2/php.ini). That also requires you to restart apache after making appropriate changes to that file (find "asp_tags" or "short_tags", change value to 'On' or 'Off').
If you're coding an application to be used on more than one server, this could be a problem, as not all host providers let you edit this file for your account. Example, when a host decides to stupidly share this file across users.. which is a security risk and there's better ways of doing this, but not everyone thinks ahead, so there are hosts out there (like free hosts) that are retarded and don't care about their client's security or features.
If your application is supposed to be compatible for use by one of their clients, of if you're one of their clients, you cannot use use asp_tags or short_tags.
If it's a private project, go for it.. It's kind of like using PHP as a templating language.
...
Quote:
Originally Posted by
foxx
but in the end without a framework it's still gonna me messy procedural php
That's an opinion with a lack of experience, but many people actually know how to code *clean* without a framework. Even procedural code can be clean, it's just harder to do.
If you code it in OOP, and it becomes a procedural mess, you're not coding OOP correctly. You don't need a framework to code neatly.. Especially if u jump to a framework from a clutter life-style, it'll still be a cluttered mess.
Also, MVC is a design pattern. It's not patented by ZEND. Model View Controller is a good design pattern, but it doesn't require a framework or style of programming, though it does work good coded in OOP.