All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

chat monitor

  • # November 30, 2012 at 6:04 am

    hello i have question…

    i have download the simple chat.. Chat.zip very good!

    but i wont personalize to remove login area ( maked ) remove post a message ( maked )

    read external html ( maked ) i have put the folder who is the file.. and work… but not show css good!!

    i can not solve this… this is external .html wit content ( from , to and message )

    2012-11-30 11:50:22 AM NIKNAME TO NIKNAME AND MESSAGE

    THIS IS A CSS FROM EXTERNAL FILE HTML

    body {
    font-family: arial, sans-serif;
    font-size: 11px;
    font-weight:bold;
    color: #272727;
    margin: 0 padding : 0;
    }

    table {
    width: 100%;
    table-layout: fixed
    }

    .title {
    color: #272727;
    background: #eef1f6;
    border-bottom: 1px solid #d7dadf;
    }

    .title tr td {
    border-left: 1px solid #d7dadf;
    padding-left: 10px;
    }

    td {
    width: 20%;
    word-break: break-all;
    word-wrap: break-word;
    border-bottom: 1px solid #edeef2;
    padding-left: 14px;
    }

    .pagelist img {
    vertical-align: middle;
    border: medium none;
    }

    .pagelist {
    position: relative;
    padding: 8px 0;
    height: 12px;
    background: #f8f9fd;
    width: 350px;
    }

    .pagelist a {
    display: block;
    background: url(page.gif) no-repeat;
    width: 8px;
    height: 10px;
    float: right;
    margin: 0 3px 0 3px;
    }

    .pagelist a:hover {
    display: block;
    background: url(page.gif) no-repeat;
    width: 8px;
    height: 10px;
    float: right;
    margin: 2px 3px 0 3px;
    }

    a.home {
    background: url(home.gif) no-repeat;
    float: right;
    width: 18px;
    height: 16px;
    margin-top: -3px;
    }

    .pagelist a:hover.home {
    background: url(home.gif) no-repeat;
    float: right;
    width: 18px;
    height: 16px;
    margin-top: -2px;
    }

    .footer {
    width: 100%;
    clear: both;
    height: 1px;
    font-size: 0px;
    }

    .toptable {
    border-top: 1px solid #d7dadf;
    border-bottom: 1px solid #d7dadf;
    }

    .bottomtable {
    border-bottom: 1px solid #d7dadf;
    border-top: 1px solid #d7dadf;
    }

    .noboardertd {
    border: none;
    }

    a{
    color:#888888;
    text-decoration:none;
    }

    a:hover{
    text-decoration:underline;
    }

    .titlebar{
    float:left;
    padding:8px 0;
    height:12px;
    color:#666666;
    }

    .titlebar a{
    text-decoration:none;
    color:#666666;
    font-weight:normal;
    }

    .titlebar a:hover{
    text-decoration:underline;
    font-weight:normal;
    }

    .timetd {
    font-size: 9px;

    }

    .datetd {
    font-size: 9px;
    }

    .fromtd {

    color:red;
    }

    .datetd {border: none;width:15%;}
    .timetd {width:15%;}
    .fromtd {width:15%;}
    .totd {width:15%;}
    .messagetd {width:40%;}


    this appair good css but your no!

    can you help me?

    i thig the problem is here

    fwrite(fopen(‘chat.html’, ‘a’), ““. $nickname . “” . $message = str_replace(“n”, ” “, $message) . “n”);

    # November 30, 2012 at 6:06 am

    @exino

    No offense, but it’s _really_ hard to understand your English.

    Do you have a link to the website you’re talking about?

    # November 30, 2012 at 6:16 am

    the link is password protected…

    the external html is

    < table cellpadding="3" cellspacing="0">
    2012-11-30

    11:50:22 AM

    ginevra

    sibbio

    OLTRE AL GOMITO HO CONTUSIONI ANCHE ALLE COSTOLE

    # November 30, 2012 at 6:17 am

    < table cellpadding="3" cellspacing="0">
    2012-11-30

    11:50:22 AM
    nikname
    niknameto
    message

    # November 30, 2012 at 6:18 am

    The snippets of code you’re providing are useless in this situation. Maybe try and use [CodePen](http://codepen.io “”) but even this wont help us I don’t think…

    # November 30, 2012 at 6:24 am

    http://codepen.io/anon/full/FrqHw

    # November 30, 2012 at 6:38 am

    So what is your EXACT problem with the code you’ve given me?

    # November 30, 2012 at 6:40 am

    this is the file of chat

    < ?php $function = $_POST; $log = array(); switch($function) { case(‘getState’):
    if(file_exists(‘chat.txt’)){
    $lines = file(‘chat.txt’);
    }
    $log = count($lines);
    break;

    case(‘update’):
    $state = $_POST;
    if(file_exists(‘chat.txt’)){
    $lines = file(‘chat.txt’);
    }
    $count = count($lines);
    if($state == $count){
    $log = $state;
    $log = false;

    }
    else{
    $text= array();
    $log = $state + count($lines) – $state;
    foreach ($lines as $line_num => $line)
    {
    if($line_num >= $state){
    $text[] = $line = str_replace(“n”, “”, $line);
    }

    }
    $log = $text;
    }

    break;

    case(‘send’):
    $nickname = htmlentities(strip_tags($_POST));
    $reg_exUrl = “/(http|https|ftp|ftps)://[a-zA-Z0-9-.]+.[a-zA-Z]{2,3}(/S*)?/”;
    $message = htmlentities(strip_tags($_POST));
    if(($message) != “n”){

    if(preg_match($reg_exUrl, $message, $url)) {
    $message = preg_replace($reg_exUrl, ‘‘.$url[0].’‘, $message);
    }

    fwrite(fopen(‘chat.txt’, ‘a’), ““. $nickname . “” . $message = str_replace(“n”, ” “, $message) . “n”);
    }
    break;

    }

    echo json_encode($log);

    ?>

    # November 30, 2012 at 6:41 am

    i have changed .txt to .html and work but not appair good css

    # November 30, 2012 at 6:57 am

    This reply has been reported for inappropriate content.

    Maybe try explaining clearly what it is you want to do. Don’t put any code snippets in, just explain the problem as clearly as you can.

    # November 30, 2012 at 7:15 am

    i wont make a chat monitor… i have one file .html and i wont monitor ever message

    # November 30, 2012 at 8:03 am

    This reply has been reported for inappropriate content.

    Sounds like a fun project. What’s the problem?

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed