Jump to content

SHOUTBOX HELP !!!!


popcop

Recommended Posts

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

 

[move]thanks[/move]

Link to comment
https://forums.phpfreaks.com/topic/38796-shoutbox-help/
Share on other sites

Why not just use a ready made script and have it only appear on the page if the user is logged in?

 

You can simply use sessions to check if the user is logged in and then if they are echo the code for the shoutbox. If they are not then echo whatever else is on the page that you want non logged in users to be able to view.

Link to comment
https://forums.phpfreaks.com/topic/38796-shoutbox-help/#findComment-186465
Share on other sites

i want to have there at all times, just if someone is on the site and they want to post on it they have to register

 

ive not liked any of the free ones online... they have the fields for name, email and web address.... i just want them to be able to post a quick message without having to enter a name or anything... just like the one ive designed up

 

can u help with this?

 

id really appreciate it....have a look at www.dontstayin.com im trying to achieve something similar

Link to comment
https://forums.phpfreaks.com/topic/38796-shoutbox-help/#findComment-186476
Share on other sites

If you created the shout box this might be possible. On the page that displays the shoutbox:

Check if user is logged in

if yes display shoutbox as normal

if no display shoutbox without the input bar(Take away the place where they can input what they want to say.)

 

If you did this you would probably want to include some text below the shoutbox that said you must register and log in to have access to the shoutbox.

Link to comment
https://forums.phpfreaks.com/topic/38796-shoutbox-help/#findComment-186580
Share on other sites

Making it is real Easy just think of all the ideas FIRST

 

thats just...

mysql has the icon of the poster as a image file  or fullpath to file

posters name or ID  and posters data

 

using HTML you can have a <img src code with width and height so image wont be too big or too small you can resize them

 

 

than begin coding function by function

 

like.. a basic layout I would make in 2 minutes..

 

function shoutgetdata(){
global $everything;

$everything = array();

mysql_connect(HOSTNAME, USERNAME, PASSWORD);
mysql_select_db(DB_NAME);

$query = "SELECT * from shoutdata";

	$result = mysql_query($query)
		or print("Could not load shoutbox data: query failed: " . mysql_error());

	while($row = mysql_fetch_object($result))
	{
	      $everything[] = $row;
	}
}

 

than when I made atleast like 5 or so functions for loading data from mysql to generating tables from php loops to html and many other functions

 

just call the main one or call them all in order and thats about it..

 

 

Link to comment
https://forums.phpfreaks.com/topic/38796-shoutbox-help/#findComment-186768
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.