Jul 26, 2008

Center Shoutoutbox

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Center Shoutoutbox

BOAW
Where can i find an easy reliable shoutout box that i can install and center in my site?? i ight just use the shoutoutbox becuase of the lack of use in our my forums...i almost find it to b useless since it is not used often...i figure that poeple are jsut lazy to use it so i think setting up the shoutbox would be most useful than my forums heh

Reply

eddyys
Well, you could set up a flat file shout box. Here is a flate file shout box i wrote a while back.

1. Save this file as index.html
CODE

<html>
<head>
<title>Shout Box</title>
</head>
<body>
<center>
<form method="post" action="post.php">
<iframe src="shouts.html" scrolling="auto"></iframe><br />
<input type="text"  name="name" value="Name" onfocus="if(this.value=='Name'){this.value=''}" onblur="if(this.value==''){this.value='Name'}" /><br />
<input type="text" name="message" value="Message" onfocus="if(this.value=='Message'){this.value=''}" onblur="if(this.value==''){this.value='Message'}" /><br />
<input type="submit" name="post" value="Post Comment" />
</form>
</center>
</body>
</html>


2. Save a blank file as shouts.html and CHMOD the file to 777.

3. Save this file as post.php
CODE

<?php
if (isset($_POST['name']) && isset($_POST['message'])) {
if ($_POST['name'] != 'Name') {
if ($_POST['message'] != 'Message') {
$name = str_replace(';', '.', $_POST['name']);
$message = str_replace(';', '.', $_POST['message']);
if (@file_exists('shouts.html')) {
if (@is_writable('shouts.html')) {
$fp = @fopen('shouts.html', 'a+');
if (!@fputs($fp, stripslashes('<br><font color="red">' . $name . ',</font><font color="#000000"> ' . $message . '</font>'))) {
echo 'Could not write to text, please set the permissions right.';
} else {
header('Location: index.html');
}
} else {
if (@chmod('shouts.html', 777)) {
$fp = @fopen('shouts.html', 'a+');
if (!@fputs($fp, stripslashes(';' . $name . ', ' . $message))) {
echo 'Could not write to shouts.html, please set the permissions right.';
} else {
header('Location: index.html');
}
} else {
echo 'shouts.html is not writable, we attempted to CHMOD it to 777 and it failed, please manually CHMOD shouts.html to 777.';
}
}
} else {
echo 'Could not locate file: shouts.html';
}
} else {
echo 'You must enter a message.';
}
} else {
echo 'You must enter your name.';
}
} else {
echo 'You must fill in both form fields.';
}
?>



And there you go.



 

 

 


Reply

BuffaloHELP
I don't know which forum software you have, but Trap17's shoutbox is by Dean and his shoutbox module can be found in Invisionize.com.

Reply

Saint_Michael
well if you don't want to program your own here are soem sites where you can get your own shoutbox already set up.

http://saybox.co.uk/
http://simpleshout.co.uk/

but their are some scripts as well including the one eddys showed in the previous post.

Reply

BOAW
thanks =) ill try the code out...but isnt the code supposed to b a block thing? because i used to have a shoutbox for my php site and installed the shoutbox block and i just had to center it...i believe i downloaded it from a site thou...not sure what it was to get it back

and by the way i dont understand this step

"2. Save a blank file as shouts.html and CHMOD the file to 777."

please clarify this for me..

Reply

sportytalk
QUOTE
and by the way i dont understand this step

"2. Save a blank file as shouts.html and CHMOD the file to 777."

please clarify this for me..


Hi there, Chmod's are confusing at first, but once you get to know them, they're nice.

When you chmod a particular file, you are setting the permissions for the other pages/users. This determines whether or not they can view the file or whether they can make modifications to files (Write).

777 is the permissions allowing users and other pages to execute, run and write on the file the permission is assigned to. What you need to do, is set 777 to this html file once created.

To do this, on an ftp client (such as Cute FTP or Smart FTP), you can right click on the file, and then click on 'properties / CHMOD'. Alternatively, you should be able to access the properties or Chmod menu from one of the menus along the top (where file, window, help etc is located). On my machine, it's under command.

Hope this helps smile.gif

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. fopen wmv duration - 38.35 hr back. (1)
  2. forum shoutoutbox code - 112.48 hr back. (1)
  3. shoutoutbox - 0.04 hr back. (6)
  4. free shout out box code - 165.16 hr back. (4)
Similar Topics

Keywords : shoutoutbox


    Looking for center, shoutoutbox

Searching Video's for center, shoutoutbox
advertisement



Center Shoutoutbox



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE