Managing Online Forums, a manual for the community admin

Bookmark and Share

Adding Smilies to Your Forums

Adding Smilies to Your Forums

Postby Rapid Dr3am » June 28th 2003, 6:22 pm

Okay, so you got some smilies that you want to add.

If you have a something.pak file then upload it with your smileys to your smilies directory.

By default, this is at images/smilies.

Now go to your forums and your admin panel and go to.

General Admin -> Smilies

Now scroll to the bottom and select import smiley pack and choose a smile pack .pak file in the dropdown menu.

Delete existing smileys before import if you select this all other smiles will be deleted. This might be useful, if you want a whole set of new images.

What should be done in case of conflicts - Keep the original and you may not import all the new ones, but will keep all your original smilies.

Replace Existing Smiley - Any names the same will be overwriten.

What's that now? I don't have a smiley pak but I have a load of images to add and it will take too long to add them manually?

Well, let's cheat.

Code: Select all
<? 
$dh=opendir(""); 
   while(gettype($file=readdir($dh)) != boolean) 
   { 
      if(!is_dir("$file") && strpos($file, ".gif")) 
      { 
         $file2 = str_replace(".gif","",$file); 
         echo $file. "=+:" .$file2. "=+::" .$file2. ":"; 
         echo "\n"; 
      } 
   } 
   closedir($dh); 
?>


Upload that script to your smilies directory with all your new images in and execute it, it will create an output, that can be used to create a *.pak, just copy and paste the output into a text file called whatever.pak and upload and import and you will add them all. :D

And finally, if you only have a few images so you don't need a pak then add them manually. Select add new smilie and select the following:

Smiley Code: This is were you select the :whatever: part.
Smiley Image File: This will show you a drop down were you select the image name you want.
Smiley Emotion: This will add the alt tag to your image.

And now you've added some smilies!
Rapid Dr3am
Dedicated User
 
Posts: 8319
Joined: January 25th 2003, 10:38 am
Location: Not here

Return to phpBB 2: Customizing Your phpBB

Who is online

Users browsing this forum: No registered users and 0 guests