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  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
PHP

Chatter
By: Roger Stringer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 29
    2004-11-08


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

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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
     

       

    PHP ARTICLES

    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek