Smiley Script :)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Voodoo
    ♥ ♦ ♣ ♠
    • Sep 2002
    • 10600

    #1

    Smiley Script :)

    Hey there... Just thought I'd post this little script in case anyone wants it. It will read the current directory and display all of your pics/smiles in a formatted table w/ the [IMG] tag code to copy/past into your messages.

    PHP Code:
    [SIZE=1]
    <?php
    function flist() {
    $website="www.YOURSITE.com/smiles";   //No trailing slashes, no [url]http://[/url]
    $dir= getcwd();
    $d=dir("$dir");
    echo "<div align=\"center\"><table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">";
     
    while (false !== ($entry=$d->read())) 
    {
    $x=is_file($entry);
     
    if($entry[0] !=".") 
    {
    if($entry != $x) {
     
    $path = "$entry";
    $file = basename ($path,".php"); // $file is set to "index"
     
    if(($entry != $x)&&($entry != "index.php")) {
    echo "<tr><td width=\"184\" align=\"right\" valign=\"middle\"><img src=\"$entry\" border=0></td><td
     width=\"516\" align=\"left\" valign=\"middle\"><font size=\"1\" face=\"Verdana\">"."["."img"."]"."http://$website/$entry"."["."/img"."]"."</font></td></tr>";
    }}
    else {echo "";}}}
    echo "</table></div>";
    $d->close();
    }
    flist();
    ?>[/SIZE]


    Just copy/paste this into a plain text file, and save as index.php,
    upload to your smiles directory, and point your browser to that page.

    Hope you like it.
    Last edited by Voodoo; 10-20-2002, 04:44 PM.

    "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
  • mrthumbs
    salad tossing sig guy
    • Apr 2002
    • 11702

    #2
    Well now.. finally a useful contribution to gfy..

    Comment

    • Voodoo
      ♥ ♦ ♣ ♠
      • Sep 2002
      • 10600

      #3
      Hehehe

      "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

      Comment

      • DrewKole
        Confirmed User
        • Jul 2001
        • 5193

        #4
        Lol, what a newb!

        Comment

        • Voodoo
          ♥ ♦ ♣ ♠
          • Sep 2002
          • 10600

          #5
          Originally posted by DrewKole
          Lol, what a newb!

          That hurts my feelings Drew. LOL
          I'm trying to spread smiles, and you call me a NewB.
          Would it suit you better if I called it the "Frown Script"? LOL

          "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

          Comment

          • DrewKole
            Confirmed User
            • Jul 2001
            • 5193

            #6
            Lol, yes... Smiley's are for newbs... Frowns are for pimps

            Wuzzah

            Comment

            • Voodoo
              ♥ ♦ ♣ ♠
              • Sep 2002
              • 10600

              #7
              Originally posted by DrewKole
              Lol, yes... Smiley's are for newbs... Frowns are for pimps

              Wuzzah
              What about an "O-Face Script"?

              "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

              Comment

              Working...