Flatbase Shoutbox Exilent :d

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Flatbase Shoutbox Exilent :d

    Here is a easy to use flatbase script u can use for any script on wml ...its easy to install and doesnt need a sql database for it..its mostly great for users that starts new chats...enjoy

    u can paste this anywhere in any script its the main for the shout box ,,,u can past it in the front page of your index.php or in the inside of your chatroom

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>////////////////////////////////////////////
    // shoutbox by cyberspider //
    ////////////////////////////////////////////
    echo "---------------
    ";
    echo "<img src=\"shoutlogo.gif\" alt=\"\"/>
    ";
    echo "The shout box
    ";
    $shoutboxfile=file(&#39;shoutbox.txt&#39;);
    for ($x=0; $x<1; $x++)
    {
    $shoutboxfile[$x] = rtrim($shoutboxfile[$x]);
    if (substr(trim($shoutboxfile[$x]),0, != "DELETED_"){
    echo "$shoutboxfile[$x]";
    }}
    echo "";
    echo "<anchor>Shout";
    echo "<go method=\"post\" href=\"shoutbox_1.php\">";
    echo "<postfield name=\"shout\" value=\"$(shout)\"/>";
    echo "<setvar name=\"shout\" value=\"\"/>";
    echo "</go>";
    echo "</anchor>";
    echo "
    ";
    echo " - ";
    echo "<anchor>Read";
    echo "<go method=\"post\" href=\"shoutbox_3.php\">";
    echo "</go>";
    echo "</anchor>";
    echo "
    ---------------
    ";
    ////////////////////////////////////////////</div>


    the following is the shoutbox_1.php file that need to be inserted and dont forget to change the index.php inside to where your shoutbox is:D<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
    header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    echo "";
    echo "<wml>";
    echo "<card title=\"Send a shout\">";
    echo "<p align=\"center\">";
    echo "SEND A PUBLIC
    ";
    echo "SHOUT
    ";
    echo "---------------
    ";
    echo "Do not use abusive
    ";
    echo "or vulgar text in
    ";
    echo "the shoutbox.
    ";
    echo "---------------
    ";
    echo "Your text
    ";
    echo "
    <input type=\"text\" name=\"shout\" value=\"\" emptyok=\"true\" maxlength=\"200\"/>
    ";
    echo "";
    echo "<anchor>Send your shout";
    echo "<go method=\"post\" href=\"shoutbox_2.php\">";
    echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
    echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
    echo "<postfield name=\"shout\" value=\"$(shout)\"/>";
    echo "</go>";
    echo "</anchor>
    ";
    echo "
    ";
    echo "<anchor>Back to menu";
    echo "<go method=\"post\" href=\"index.php\">";
    echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
    echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
    echo "</go>";
    echo "</anchor>";
    echo "
    ";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    ?></div> !!!

    the third part for this is the shoutbox_2.php that need to be loaded up!!

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
    header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    echo "";
    /////////////////////
    // Filter swearing //
    /////////////////////
    $rumatsanat=file(&#39;censored.txt&#39;);
    $leeg = "";
    for ($ri=0; $ri<count($rumatsanat); $ri++)
    {
    $vaihto=rtrim($rumatsanat[$ri]);
    $viesti = str_replace ($vaihto,"censored", $viesti);
    }
    ////////////////////
    echo "<wml>";
    echo "<card title=\"Send a shout\" ontimer=\"index.php?time=";
    echo date(&#39;dmHis&#39;);
    echo &#39;&nimi=$nimi&salasana=$salasana&#39;;
    echo "\">";
    echo "<timer value=\"50\"/>";
    echo "<p align=\"center\">";
    if (filesize(&#39;shoutbox.txt&#39;)>30000)
    {
    $peke = fopen(&#39;shoutbox.txt&#39;, &#39;r+&#39;);
    ftruncate ($peke,0);
    fclose($peke);
    }
    $swe_from=array("Ã¥","ä","ö","Ã…","Ä","Ã-","$","&","Â");
    $swe_to=array("å", "ä", "ö", "Å", "Ä", "Ö","d","j","");
    $shout=str_replace ($swe_from[$i], $swe_to[$i], $shout);
    $shout=htmlspecialchars($shout);
    $shout=stripslashes($shout);
    $uusirivi =&#39;SHOUT : &#39;.$shout.&#39;

    &#39;;
    $tiedosto = fopen(&#39;shoutbox.txt&#39;, &#39;r+&#39;);
    $kolmas=file_get_contents (&#39;shoutbox.txt&#39;);
    $toinen="$uusirivi $kolmas";
    fputs($tiedosto, $toinen);
    fclose($tiedosto);
    echo "SEND A PUBLIC
    ";
    echo "SHOUT
    ";
    echo "---------------
    ";
    echo "Your shout was send
    ";
    echo "---------------
    ";
    echo "<anchor>Back to menu";
    echo "<go method=\"post\" href=\"index.php\">";
    echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
    echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
    echo "</go>";
    echo "</anchor>";
    echo "
    ";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    ?></div>

    after u done this now u will need to upload the 3rd section of shoutbox_3.php

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
    header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    echo "";
    echo "<wml>";
    echo "<card title=\"View shouts\">";
    echo "<p align=\"center\">";
    echo "View the shouts
    ";
    echo "";
    echo "<anchor>Send a shout";
    echo "<go method=\"post\" href=\"shoutbox_1.php\">";
    echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
    echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
    echo "<postfield name=\"shout\" value=\"$(shout)\"/>";
    echo "<setvar name=\"shout\" value=\"\"/>";
    echo "</go>";
    echo "</anchor>
    ";
    echo "
    ";
    echo "<anchor>Back to menu";
    echo "<go method=\"post\" href=\"index.php\">";
    echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
    echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
    echo "</go>";
    echo "</anchor>
    ";
    echo "
    </p>


    ";
    $shoutfile=file(&#39;shoutbox.txt&#39;);
    for ($x=0; $x<10; $x++)
    {
    $shoutfile[$x] = rtrim($shoutfile[$x]);
    if ($shoutfile[$x] != &#39;&#39;){
    if (substr(trim($shoutfile[$x]),0, != "DELETED_"){
    echo "$shoutfile[$x]";
    }}}
    echo "
    ";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    ?></div>

    now for last part of this script is to create a shoutbox.txt file chmod 777 and then u create a censored.txt file that looks like this!!!

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>you can type any word here u dont like ppl to say in the shoutbox example:

    you
    me
    ****
    f88k
    create your own list as u wish and have fun..</div>

    i hope this will come handy for someone enjoy the rest of the day cya

    #2
    Create a zip file and upload.

    Comment


      #3
      hmmm i couldnt get it work! cuz u have a smilie in the 1st script and when i put that file in my index it says error blabla in row 20.. .. and u have another smilie in sum file below! could u check it pls?
      sigpiceeeeerrr....

      Comment


        #4
        hmmm i couldnt get it work! cuz u have a smilie in the 1st script and when i put that file in my index it says error blabla in row 20.. .. and u have another smilie in sum file below! could u check it pls?[/b]

        oops lol my mistake haha il upload it lol smily buggered it up haha ok here it is:
        [attachment=1048:insert_i...ain_page.txt]

        [attachment=1049:shoutbox_1.php.txt]

        [attachment=1050:shoutbox_2.php.txt]

        [attachment=1051:shoutbox_3.php.txt]


        please just remember to read the first part of this post and to make the files thats needed and change txt files to 777

        enjoy
        Attached Files

        Comment


          #5
          The XML page cannot be displayed
          Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


          --------------------------------------------------------------------------------

          Invalid at the top level of the document. Error processing resource &#39;http://www.2wap.org/forums/index.php...t&id=1049&#39;. Line 5, Position 55

          echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
          ------------------------------------------------------^




          LOOK WHT I GOT WHEN I WANNA DOWNLOAD THOSE FILES

          I KNW IM JUST A BEGINER BUT I SERIOUSLY DOUBT ITS A SHOUTBOX LOLOLOLOL



          //////////////////////////////////////////// // shoutbox by cyberspider // //////////////////////////////////////////// echo "---------------
          "; echo "
          "; echo "The shout box
          "; $shoutboxfile=file(&#39;shoutbox.txt&#39;); for ($x=0; $x<1; $x++) { $shoutboxfile[$x] = rtrim($shoutboxfile[$x]); if (substr(trim($shoutboxfile[$x]),0, != "DELETED_"){ echo "$shoutboxfile[$x]"; }} echo ""; echo "Shout"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo " - "; echo "Read"; echo ""; echo ""; echo ""; echo "
          ---------------
          "; ////////////////////////////////////////////
          sigpiceeeeerrr....

          Comment


            #6
            okay now...is there sum1 so nice and tell me wht goes there where smilie stands? pls! i cnt download those atached files...
            sigpiceeeeerrr....

            Comment

            Working...
            X