Log in

View Full Version : Private Messaging System



Jam-ez
05-12-2008, 07:12 PM
Hi, :)

I'm in need of a private messaging system that comes with a login. Or perhaps an existing user system with a messaging system built in.

Any ideas?

Calon
05-12-2008, 07:27 PM
I could easily build one for you if you wanted. (free because I'm kind)

Jam-ez
05-12-2008, 08:02 PM
Well if you would I'd appreciate it. :)

All it needs is a login, inbox, outbox, send message, sent messages, nothing too fancy. An admin panel is optional (for deleting/viewing all mail).

Thanks a lot! :O

jackass
05-12-2008, 08:17 PM
I could do with one of these really. :P

Calon
05-12-2008, 08:40 PM
Started coding it now. :)

Calon
05-12-2008, 09:16 PM
http://rapidshare.com/files/170615372/pm.zip

Didn't have the time to finish it, sorry.

Jam-ez
05-12-2008, 09:36 PM
How far is it, and is anyone else up for the challenge?

Jackboy
05-12-2008, 10:24 PM
Just looking at a small part of your code.


{
public function mysql_connect( $hostname, $username, $password, $database )
{
$db_connect = mysql_connect( $hostname, $username, $password );
$sr_connect = mysql_select_db( $database );
}Why have you used variable names. You can just have


{
public function mysql_connect( $hostname, $username, $password, $database )
{
mysql_connect( $hostname, $username, $password );
mysql_select_db( $database );
}You don't actually need to define variables unless you plan to use them later or w/e.

But nice of you for trying :) Also why have you put the public function as an actual reserved function? Im confused. Well have fun learning PHP :D

Calon
05-12-2008, 10:36 PM
Just looking at a small part of your code.


{
public function mysql_connect( $hostname, $username, $password, $database )
{
$db_connect = mysql_connect( $hostname, $username, $password );
$sr_connect = mysql_select_db( $database );
}Why have you used variable names. You can just have


{
public function mysql_connect( $hostname, $username, $password, $database )
{
mysql_connect( $hostname, $username, $password );
mysql_select_db( $database );
}You don't actually need to define variables unless you plan to use them later or w/e.

But nice of you for trying :) Also why have you put the public function as an actual reserved function? Im confused. Well have fun learning PHP :D
public is a keyword, so the function in the class is publicly usable, you should read up on it ^_^

Jackboy
05-12-2008, 10:48 PM
public is a keyword, so the function in the class is publicly usable, you should read up on it ^_^

Well i said what i was trying to say wrong :P

I was trying to say, whats the point in using public function mysql_connect when mysql_connect is already useable without that silly function there...

Excellent2
05-12-2008, 11:07 PM
Lol Calon there was really no need to try being fancy :P

Calon
06-12-2008, 12:03 AM
Lol Calon there was really no need to try being fancy :P
No, there is because MySQL doesn't have a function which connects to both the database and the server, hence why I created a custom function for it.

Jackboy
06-12-2008, 09:06 AM
No, there is because MySQL doesn't have a function which connects to both the database and the server, hence why I created a custom function for it.

Oh dear. I really can't be bothered to argue.

I just wouldn't have done it that way, tis my opinion :P

Calon
06-12-2008, 10:14 AM
Oh dear. I really can't be bothered to argue.

I just wouldn't have done it that way, tis my opinion :P
To be honest, we all have our different ways of coding. And it is your opinion, I couldn't be bothered using two functions which could easily be done in one.

Source
06-12-2008, 12:17 PM
Calon, creating a class for something with a single purpose seems extremely pointless in a variety of ways to me - you could of done it nice and simply with a functions.php and a config.php (with the connection in the config.php). Seems as though you try todo coding methods which are meant to impress people, which in the long run is making more hassle.

Jam-ez
06-12-2008, 12:25 PM
Well, whatever. Is anyone else up for the challenge or does anyone know of any good systems?

Hypertext
06-12-2008, 09:31 PM
Unless he's making a MySQL wrapper, like if he's going to use MySQLi, there isn't much point putting it in a class.

Jam-ez
06-12-2008, 09:49 PM
Yabberer has done this for me. Thanks to him!

Calon
07-12-2008, 06:53 PM
Unless he's making a MySQL wrapper, like if he's going to use MySQLi, there isn't much point putting it in a class.


Calon, creating a class for something with a single purpose seems extremely pointless in a variety of ways to me - you could of done it nice and simply with a functions.php and a config.php (with the connection in the config.php). Seems as though you try todo coding methods which are meant to impress people, which in the long run is making more hassle.

I'm not trying to impress anyone, I just found it easier too do it my way as "code is art" - quoted from w3c. And I try keep my code neat, and I found using one function instead of using two might be a better method. Clearly, proven wrong.

L?KE
07-12-2008, 08:23 PM
Ahh, give him a break :P At least he admits he's wrong.

Protege
07-12-2008, 08:48 PM
I think no one should of coded it for him, I think the best method was to help him make it himself - at least he could of learnt something and had a working PM system.

Want to hide these adverts? Register an account for free!