PHP Shoutbox

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
popcop
Forum Newbie
Posts: 21
Joined: Fri Jan 30, 2004 10:42 am

PHP Shoutbox

Post by popcop »

i want to create a shoutbox for my site which will hopefully look like this...

http://www.box.net/public/rvj47l8yji

i have users on my database who have subscribed to the site but they can only use the shoutbox once they have logged into the site.

can anyone point me in the right direction of how i can achive this.
i really dont know where to start

thanks
shwanky
Forum Commoner
Posts: 45
Joined: Thu Feb 15, 2007 1:21 am

Post by shwanky »

There are many tutorials out there on how to build a shout box. Because of this, I refer you to google :). Just run a quick search on Shoutbox Tutorial. Shoutbox tutorials are fairly common, so you shouldn't have any trouble finding 1 :).
popcop
Forum Newbie
Posts: 21
Joined: Fri Jan 30, 2004 10:42 am

Post by popcop »

i couldnt find anything that suited my needs..

they all looked very amaturish.... i wanted to include an image from the database of the user who left the last message
and also have it so that u could only leave a message if u had logged into the site

can you help with this????

its kinda urgent

http://www.popcop.co.uk/shoutbox.jpg

feyd | sorry, 120K images are not acceptable.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Databasing. The same place you get the users login information and image from, use it when they post to the shoutbox. Then, just use a database table that is added to whenever somebody posts to the box. Include fields for the user that posted and their message, then use their username to obtain the proper image.

Nothing you couldn't have thought of yourself.
popcop
Forum Newbie
Posts: 21
Joined: Fri Jan 30, 2004 10:42 am

Post by popcop »

i dont have a shoutbox though....

i dont know whwre to start with it... and everyone ive found on gooogle doesnt fit what i want mine to be like

its becoming a bit of a nightmare
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Of course you don't have one. So make one.

It's not too difficult to do until you start adding a bunch of extra functions to it. Save all of the shouts into a database and display them as you'd like. Is there something more that you need help with?

It's up to you how hard it becomes.
popcop
Forum Newbie
Posts: 21
Joined: Fri Jan 30, 2004 10:42 am

Post by popcop »

yeah well i really want it the way i designed it.
see above post for jpg

it will sit on the homepage.. viewable by everyone... but u can only post on it if u have logged onto the site

on the last post there will be an image of the user..... this being pulled from the users details on the DB

also beside each post there will be a small icon... displaying if its from a male or female..... these details are on the users details on the DB

can u point me in the right direction to achieving this?

im pretty desparate

cheers
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

I thought I already did...
Okay.

Step 1) Make it active only if there is an active $_SESSION variable indicating that they are logged on

Step 2) Display the last post separate from the others, using the user's image... probably take it from the database as treat the first one special, and then all of the others together

Step 3) You use the user's username or user id to determine which details to display...
You'd query the table with the posts, which would have a field for the post and a field for the user id. You use the user id and query the table with the user information and obtain it from there.

It's not as complicated as you are making it.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

If you don't have the knowledge or skills or time to create the script yourself, have you considered paying someone to do it for you? A shoutbox is not exactly a killer script, and most of us would be able to bang it out in short order (and therefore cheap).

Just a thought.
popcop
Forum Newbie
Posts: 21
Joined: Fri Jan 30, 2004 10:42 am

Post by popcop »

nickvd wrote:If you don't have the knowledge or skills or time to create the script yourself, have you considered paying someone to do it for you? A shoutbox is not exactly a killer script, and most of us would be able to bang it out in short order (and therefore cheap).

Just a thought.
how much ?
popcop
Forum Newbie
Posts: 21
Joined: Fri Jan 30, 2004 10:42 am

Post by popcop »

superdezign wrote:I thought I already did...
Okay.

Step 1) Make it active only if there is an active $_SESSION variable indicating that they are logged on

Step 2) Display the last post separate from the others, using the user's image... probably take it from the database as treat the first one special, and then all of the others together

Step 3) You use the user's username or user id to determine which details to display...
You'd query the table with the posts, which would have a field for the post and a field for the user id. You use the user id and query the table with the user information and obtain it from there.

It's not as complicated as you are making it.
this is all gobbledegook to me just now im still trying to learn php at the same time... its all get so confusing
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Really? When you complained about how "amateur" the scripts that you found were, I thought you knew what you were doing.

The more I explained, the less I believed that, though.

Are you attempting to get free work out of us? Because I assure you... Developers here don't work for free.
popcop
Forum Newbie
Posts: 21
Joined: Fri Jan 30, 2004 10:42 am

Post by popcop »

superdezign wrote:Really? When you complained about how "amateur" the scripts that you found were, I thought you knew what you were doing.

The more I explained, the less I believed that, though.

Are you attempting to get free work out of us? Because I assure you... Developers here don't work for free.
no the code wasnt amaturish... i ment the look of the shoutbox.... im a beginner in php, not looking for freebies... more like pointed in the right direction.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

popcop wrote:
nickvd wrote:If you don't have the knowledge or skills or time to create the script yourself, have you considered paying someone to do it for you? A shoutbox is not exactly a killer script, and most of us would be able to bang it out in short order (and therefore cheap).

Just a thought.
how much ?
If you are asking in general, it would depend on the specifics of the project, as well as the programmer hired.

If you are specifically asking me, please pm, or email me directly (nickvd (at) gmail (dot) com) with details regarding the project, as this forum is not the correct place to discuss job offers.
Post Reply