PHP
  Home arrow PHP arrow Chatter
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Chatter
By: Roger Stringer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 28
    2004-11-08

    Table of Contents:
  • Chatter
  • Configuration
  • View Chatter
  • Manage the Chatter
  • Secure it

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Chatter


    (Page 1 of 5 )

    This tutorial shows you how to make a ChatterBlock. ChatterBlocks are small windows where users can type in messages. They're also called Shout Boxes or TagBoards and are kind of like miniature chat rooms.

    Chatter Form

    Let's make the chatter form first. Open Notepad or your editor, cut and paste the following HTML code and save this file as chatter.html .

    <iframe src='view.php' border='0' name='chatterblock' width="120" height="180" frameborder="0" framespacing="0"></iframe><br>
    <form action='post.php' method='post' target='chatterblock'>
    <input type='text' name='name' value='name'><br>
    <input type='text' name='url' value='http://'><br>
    <input type='text' name='msg' value='message' maxlength="100"><br>
    <input type='submit' value='Talk'>
    </form>

    The code above creates an iframe code, and a small form for users to enter their name, url and messages. This will also be the code that you can cut and paste into part of your navigation.

    This code can be inserted into your own Web pages as well. We use the same code here at QuickPipe for our ChatterBlock.

    The Database

    Before we go any further, we must create the database schema for MySQL for the ChatterBlock entries. Cut and paste the following code into MySQL either via Telnet, PhpmyAdmin or any other means of communicating with MySQL.

    CREATE TABLE chatterblock(
    id INT (4) not null AUTO_INCREMENT,
    name VARCHAR (32),
    msg VARCHAR (100),
    url VARCHAR (32) ,
    entered DATETIME,
    ip varchar(16),
    PRIMARY KEY (id));

    CREATE TABLE blocked_ips(
    id INT (4) not null AUTO_INCREMENT,
    ip varchar(16),
    PRIMARY KEY (id));

    CREATE TABLE blocked_nicks(
    id INT (4) not null AUTO_INCREMENT,
    name varchar(32),
    PRIMARY KEY (id));

    As we start off, the msg variable in the 'chatterblock' table only allows 100 characters. If you find your chatterblock too limiting, you can increase the number of characters in the schema. Don't forget to update the HTML code and set maxlength to your new limit.

    More PHP Articles
    More By Roger Stringer


       · Once again, after criticising the "Building a Quick and Easy Tag Board" article, I...
       · I was to trying the scripts but when others user posting into it ..iframe shout box...
     

       

    PHP ARTICLES

    - Validating Web Forms with the Code Igniter P...
    - Output Buffering
    - Paginating Database Records with the Code Ig...
    - HTTP Headers in Web Development
    - Project Management: Administration
    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway