Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    Qualcuno può aiutarmi nel modificare una chat che ho scaricato già pronta?

    La chat è perfetta...solo che la pagina dei messaggi avrei da fare due modifiche:

    nella pagina compaiono i messaggi lasciati dalgi utenti, prima il nik poi il messaggio.
    vorrei che fosse possibile sciegliere una figura da implementare all'inizio del messaggio tramite opzione con menu a tendina
    altra cosa vorrei che all'inizio del messaggio apparisse anche l'ora in cui è stato scritto il messaggio...spero che qualcuno sappia aiutarmi e se necessario posterò anche il codice della chat....grazie fin da ora!

  2. #2
    beh se non posti il codice come ti si fa ad aiutare?
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  3. #3
    Originariamente inviato da Manuelandro
    beh se non posti il codice come ti si fa ad aiutare?
    ecco il codice della pagina messaggi:
    <html>
    <head>
    <title>Messaggi degli utenti</title>
    <?
    include("config.php");
    echo "<meta http-equiv=\"refresh\" content=\"$time_refresh\">";
    ?>
    <script language="javascript">
    function apri(nick_ut)
    {
    window.open("profilo.php?nick=" + nick_ut,nick_ut,"width=500, height=300, left=200");
    }
    </script>


    </head>

    <body>
    <?
    if (!(file_exists($file_mess)))
    {fopen($file_mess,"w");}

    $rows_file=file($file_mess);
    $rows_file_ord=array_reverse($rows_file);
    $count=count($rows_file_ord);

    if ($count<$num_messag)
    {
    for ($i=0;$i<$count;$i++)
    {
    $dati_utente=explode("|",$rows_file_ord[$i]);
    $nick=$dati_utente[0];
    $msg=$dati_utente[1];

    $nick=stripslashes($nick);
    $msg=stripslashes($msg);

    $msg = str_replace('[em1]','[img]emoticons/em1.gif[/img]',$msg);

    for ($x=1;$x<19;$x++)
    {
    $img="em".$x;
    $img2="[".$img."]";
    $path="<img src=\"emoticons/$img.gif\">";
    $msg = str_replace("$img2","$path",$msg);
    }
    echo "<a href=\"javascript:apri('$nick');\"><font face=\"verdana\" size=\"2\" color=\"#000000\">$nick</font></a>: "."<font face=\"verdana\" size=\"2\">".$msg."</font>
    ";
    }
    }
    else
    {

    for ($i=0;$i<$num_messag;$i++)
    {
    $online_ut[$i]=$rows_file_ord[$i];
    $dati_utente=explode("|",$rows_file_ord[$i]);
    $nick=$dati_utente[0];
    $msg=$dati_utente[1];

    $nick=stripslashes($nick);
    $msg=stripslashes($msg);

    for ($x=1;$x<19;$x++)
    {
    $img="em".$x;
    $img2="[".$img."]";
    $path="<img src=\"emoticons/$img.gif\">";
    $msg = str_replace("$img2","$path",$msg);
    }

    echo "<font face=\"verdana\" size=\"2\"><a href=\"javascript:apri('$nick');\"><font face=\"verdana\" size=\"2\" color=\"#000000\">$nick</font></a>: "."<font face=\"verdana\" size=\"2\">".$msg."</font>
    ";
    }
    $online_ut=array_reverse($online_ut);
    fopen($file_mess,"w");
    $ins_msg=fopen($file_mess,"a+");
    for ($i=0;$i<$num_messag;$i++) fwrite($ins_msg,$online_ut[$i]);
    fclose($ins_msg);
    }
    ?>

    </body>
    </html>


    e questo è quello della chat corpo principale dove si trovano tutte le opzioni:

    <html>
    <head>
    <title>Happy Chat</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language = "JavaScript">
    function textCounter(field, countfield, maxlimit) {
    if(field.value.length > maxlimit){
    field.value = field.value.substring(0, maxlimit);
    }
    else{
    countfield.value = maxlimit - field.value.length;
    }
    }
    </script>
    <script language="javascript">
    function aggiungi(y)
    {
    espressione=document.form_ins.messaggio.value;
    new_espressione=espressione + y;
    document.form_ins.messaggio.value=new_espressione;
    }
    </script>
    <style>
    .stile {
    background:#FFFFFF;
    font-family:verdana;
    font-size:8pt;
    SCROLLBAR-BASE-COLOR: #0099CC;
    SCROLLBAR-ARROW-COLOR: #FFFFFF;
    }
    </style>
    </head>

    <body bgcolor="#FBBEAA">
    <?
    include("config.php");

    $nick=$_GET['nick'];
    $nick=strtolower($nick);
    $nick=stripslashes($nick);
    $password=$_GET['password'];
    $password=strtolower($password);
    $password_cr=crypt($password,$nick);
    $password_cr=str_replace("|","*",$password_cr);



    if (!(file_exists($file_reg)))
    {fopen($file_reg,"w");}

    $utente=$nick."|".$password;
    $utente_ok=0;
    $ut_regist=file($file_reg);
    $dim_reg=count($ut_regist);
    for ($i=0;$i<$dim_reg;$i++)
    {
    $dati_ut=explode("|",$ut_regist[$i]);
    $nick_ut=$dati_ut[0];
    $pass_ut=$dati_ut[1];
    if (($nick==$nick_ut) & ($password_cr==$pass_ut)) $utente_ok=1;
    }

    if ($utente_ok==1)
    {
    if (!(file_exists($file_online)))
    {fopen($file_online,"w");}

    $dim_file=filesize($file_online);
    $dim_max=14000; // Dimensione in bytes massima per ricreare il file online

    if ($dim_file>$dim_max)
    fopen($file_online,"w");

    $ar_orario=getdate();
    $ora=$ar_orario['hours'];
    $minuti=$ar_orario['minutes'];
    $secondi=$ar_orario['seconds'];
    if (strlen($minuti)==1) $minuti="0".$minuti;
    if (strlen($secondi)==1) $secondi="0".$secondi;

    $data=date("d/m/Y");
    $orario=$ora.":".$minuti.":".$secondi;
    $utente=$nick."|".$data."|".$orario."\n";

    $ins_online=fopen($file_online,"a+");
    fputs($ins_online,$utente);
    fclose($ins_online);
    }
    else
    {
    echo "<center>Utente non registrato

    ";
    echo "<a href=\"javascript:history.back();\">TORNA INDIETRO</a></center>";
    exit;
    }
    ?>
    <table width="703" align="center" cellpadding="4" bordercolor="#000000" bgcolor="#F8EBC2" style="border:1px solid">
    <tr bgcolor="#F0DBAA">
    <td colspan="2" valign="top">
    <div align="right">[img]images/titolo.bmp[/img]
    <table width="260" border="0" cellspacing="5">
    <tr>
    <td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Realizzata
    da:

    <a href="http://www.clickmania.altervista.org"><font color="#000000">Clickmania
    - Formula 1 e risorse gratis</font></a></font></div></td>
    </tr>
    <tr>
    <td><div align="center"><? echo "<a href=\"$homepage\">"; ?>[img]images/home.gif[/img]</a></div></td>
    </tr>
    </table>
    </div></td>
    </tr>
    <tr>
    <td width="476" valign="top"> <iframe src="messaggi.php" width="490" height="413" scrolling="yes"></iframe>
    </td>
    <td width="203" valign="top"> <div align="center"> </div>
    <table width="180" align="center" bordercolor="#000000" bgcolor="#E7E9FA" style="border:1px solid;">
    <tr>
    <td width="208" height="21" bgcolor="#BBC2F2"><div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">PERSONE
    ONLINE
    </font></div></td>
    </tr>
    <tr>
    <td height="21"><iframe width="170" height="50" src="online.php" scrolling="no"></iframe></td>
    </tr>
    </table>

    <table width="180" align="center" bordercolor="#000000" bgcolor="#E7E9FA" style="border:1px solid;">
    <tr>
    <td width="208" height="21" colspan="6" bgcolor="#BBC2F2"><div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">SIMBOLI METEO - SMILES</font></div></td>
    </tr>
    <tr>
    <td width="30" height="21"><div align="center">[img]emoticons/em1.gif[/img]</div></td>
    <td width="30" height="21"><div align="center">[img]emoticons/em2.gif[/img]</div></td>
    <td width="30" height="21"><div align="center">[img]emoticons/em3.gif[/img]</div></td>
    <td width="30" height="21"><div align="center">[img]emoticons/em4.gif[/img]</div></td>
    <td width="30" height="21"><div align="center">[img]emoticons/em5.gif[/img]</div></td>
    <td width="30" height="21"><div align="center">[img]emoticons/em6.gif[/img]</div></td>
    </tr>
    <tr>
    <td height="21"><div align="center">[img]emoticons/em7.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em8.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em9.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em10.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em11.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em12.gif[/img]</div></td>
    </tr>
    <tr>
    <td height="21"><div align="center">[img]emoticons/em13.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em14.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em15.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em16.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em17.gif[/img]</div></td>
    <td height="21"><div align="center">[img]emoticons/em18.gif[/img]</div></td>
    </tr>

    </table>

    <table width="180" align="center" bordercolor="#000000" bgcolor="#E7E9FA" style="border:1px solid;">
    <tr>
    <td height="21" bgcolor="#BBC2F2"><div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">MESSAGGIO</font></div></td>
    </tr>
    <tr>
    <td ><form method="GET" action="insert.php" name="form_ins" >
    <table width="170" border="0" align="center">
    <tr>
    <td colspan="2"><div align="center">
    <textarea class="stile" rows="3" onKeyDown="textCounter(this.form.messaggio,this.fo rm.rem,200);" onKeyUp="textCounter(this.form.cjmsg,this.form.rem ,200);" cols="20" type="text" name="messaggio"></textarea>
    </div></td>
    </tr>
    <tr>
    <td><div align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Lettere
    rimaste:</font></div></td>
    <td><div align="center">
    <input readonly class="stile" type=text name=rem size=3 maxlength=3 value="200">
    </div></td>
    </tr>
    <tr>
    <td height="26" colspan="2"> <div align="center">
    <?
    echo "<input type=\"hidden\" name=\"nick\" value=\"$nick\">";
    echo "<input type=\"hidden\" name=\"password\" value=\"$password\">"
    ?>
    <input type="submit" name="Submit" value="Invia">



    </div></td>
    </tr>





    </table>
    </form></td>
    </tr>
    </table></td>
    </tr>
    </table>
    </body>
    </html>

  4. #4
    spero che postando i codici qualcuno sappia darmi qualche consiglio...

  5. #5
    nessuno che risponde...?

  6. #6
    nessuno che mi dà qualche suggerimento?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.