PHP Classes
elePHPant
Icontem

Smiley Generator: Display a list of smiley icons

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2007-06-01 (9 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 389 All time: 6,306 This week: 1,043Up
Version License PHP version Categories
smiley_php 0.1GNU General Publi...3.0HTML, Graphics
Description Author

This class can be used to display a list of smiley icons all at once in a Web page.

It retrieves the list of icon images to display that are stored in a given server side directory.

The class can either generate HTML with tags to display all images in a single paragraph one after another, or a single image with smiley icons and HTML tags that define all the areas of the image that correspond to each icon.

In both cases, the class generates Javascript code to associate to events when each icon is clicked.

Picture of SteakOverCooked
Name: SteakOverCooked <contact>
Classes: 2 packages by
Country: United Kingdom United Kingdom

Details
    Important Instructions:
    
      First, put all your smileys in one folder, say, "images/smileys"
      Set the correct variables when you call constructor of Smiley
      
      $alls="images/smiley.jpg"  - The target smiley.jpg
      $maps="images/smiley.map.html" - The target html map file
      
      Because they are non-existent at the beginning , so just leave them alone for a little bit while
      
      $smileydir="images/smileys/" - The folder has All the smileys  
      $width=720 - The smiley image width
      $space=1 - The space between each individual smiley      

      Then Execute this file, the first time you execute the file, the php examines all the smileys in the folder and put them each by each in a image. Automatically, the html template which contains MAP tag and their co-ordinates are placed.
      
      IMPORTANT: 
      
        You need to save the image by your self and upload to you ftp server and set the correct "$alls" variale so next time the class would skip the looping.
        
        You also need to save the html (by right click and see the source code) and save it in a html file , upload it in a similar way and set the correct "$maps" variable so next time the class would skip looping.
        
        The reason it does not automatically generate image and map to disk is that some ftp servers might disable that. Of course you can easily add "saving" to the program.
        
        OK, have fun! Let me know if anything comes up.
        
        One example is located at my website. Remember to tick "smileys" to see how many smileys i got :)
        
        http://www.zhihua-lai.com/?do=Comments.All&cmode=post
        
        PS. addSmiley is a javascript you need to develop, which inserts the smiley into textarea.
  Files folder image Files  
File Role Description
Plain text file class.smiley.php Class Smiley Generator Class
Accessible without login Plain text file Readme Doc. Readme
Accessible without login Image file smiley.jpg Output The smiley image , generated by this php class.
Accessible without login Plain text file smiley.map.php Output HTML Generated by This php class, remeber to modify it to suit your website

 Version Control Unique User Downloads Download Rankings  
 0%
Total:389
This week:0
All time:6,306
This week:1,043Up