Posts Tagged ‘tips’

How to insert custom smilies or emoticons in phpBB 3.xx (version 3)

October 13th, 2011

Adding custom smilies and emoticons to your phpBB forum is an easy way to insert personal style to your boards. It’s also rather easy to do once you know how. Unfortunately for me, when I searched for how to do it I got outdated information that applied to phpBB 2. I will never, ever, EVER accuse the phpBB interface of being intuitive, so figuring out how to do it in version 3 was a lot more painful than it should have been. If you’ve found this post, I hope to save you the trouble I ran into. Here’s how to add custom smilies in phpBB 3.xx.

  • First off, make the actual smilies. Typically each smilie should be a 16×16 gif file. They can be animated. It helps if the file name is the same as the emotion the emoticon is expressing.
  • Upload the smiles to the “images/smilies” directory of your phpBB installation.
  • Log into the admin panel for phpBB.
  • Click on the “Posting” tab.
  • Click on “Smilies” in the left hand menu.

If you’re only adding a few smilies
If you’re only adding a few smilies, it’s probably fastest to do this individually through the phpBB interface. Click the “Add multiple smilies” button at the bottom of the page. You’ll then be taken to a page where you can select any image in the “smilies” directory and assign it a shortcode.

Hint: It’s best to create a shortcode surrounded by colons or some other marker to distinguish them from regular text, like :smile: If you just use a word, like “smile,” then anytime a visitor uses the word “smile” in a post it will be replaced by the emoticon.

phpBB smilies

If you’re adding several smilies
If you’re adding several smilies, it’s faster to create a .pak file that will import all the settings at once. You can create the proper file using Dave’s and Mykee’s *.pak Generator for phpBB 3.xx that’s hosted on RapidShare. (Click the green button in the middle of the page to download. I think they make it confusing on purpose.) According to this forum post you need VB6 runtime installed for it to work.

.pak generator

If you want the emoticons to show up on the right side of the screen when people are writing a post, be sure to uncheck the “Hide” checkbox on the left. Otherwise visitors will have to click a link under the regular emoticons to get a pop-up showing the extra emoticons, which sounds like a total pain. Check the “Click here!” box and you will be prompted to choose the directory that has your emoticon images. Your code will then be populated in the white box. Click the “Generate File” button to save the .pak file.

If the generator doesn’t work for you, you can make the .pak file by hand. Each line in the .pak file gives phpBB instructions on how to insert the emoticon in this format:

ImageFileName, ImageWidth, ImageHeight, Show on posts screen (0 or 1), Emotion, Shortcode

So an example line from my .pack file looked like this:

'angry.gif', '23', '19', '1', 'angry', ':angry:', 

Upload the .pak file to the “smilies” directory on your server which also includes all the smilie images. Go back to the Posting -> Smilies screen in the admin panel and click the “Install smilies package” link at the top right of the page. Your .pak file should be available to select from the dropdown. Select how you want to handle duplicate files. If you select the “Delete All” option, you will delete all other emoticons from the listings, whether they are duplicates or not. The images will still be on the server, they just won’t be listed. When you’re ready, click “Install smilies package.” That’s it! The smilies will now be active.

If you happen to accidentally delete the default smilies (not that I would ever do that), you can reimport them by selecting “smilies.pak” from the dropdown. If that’s missing from your installation, you can download the default emoticon pak here.

If you ever need to edit and delete smilie, this can also be done on the Postings -> Smilies page.

Have fun, and don’t forget to smile while you’re at it!

How to exclude posts from LinkWithin with the robots.txt file

January 24th, 2010

The LinkWithin plug-in has become very popular among bloggers because of its ability to link to related posts by displaying thumbnail images from those posts. We are a highly visual species, so the inclusion of images next to the links makes them far more appealing and increases the likelihood that readers will click on them. Linking to related posts on a blog encourages readers to spend more time on a site and each link helps increase search engine optimization.

This feature is particularly popular among food bloggers who frequently post pictures in their entries. Here is an example screenshot of the plug-in taken from a client’s site, Simply Sugar and Gluten Free:

LinkWithin plug-in

The downside? Bloggers don’t necessarily want all of their posts to appear in the LinkWithin widget. One client of mine manages events, sponsored reviews, and site pages in WordPress that she doesn’t want to promote at the bottom of her posts. Looking around the LinkWithin site, no solution to this problem is listed, nor did they respond to my request for help.

However, I was able to find my own solution after I realized LinkWithin operates similarly to a search engine. It indexes your site to generate a listing of posts and has to update this index regularly to include your latest posts. You can control what parts of your site a search engine indexes by creating a robots.txt file on your site. You can get more complete information on robots.txt here, but for our purposes, all you have to do is create a file titled robots.txt in the root directory of your web server with this information in it:

User-agent: *
Allow: /

User-agent: LinkWithin
Disallow: /directory-or-pages-you-want-to-hide-from-LinkWithin/
Allow: /

The first block of code says that it’s ok for any search engine to index your site. The second block then tells the LinkWithin spider not to index anything in the page or directory listed after the “Disallow:” text. You can add as many Disallow lines as you want, either to hide specific pages, or to hide any pages within a directory. If you want to disallow a directory, but want to include one specific page in that directory, first disallow the directory and then add the specific page to the Allow: line.

I hope this helps anyone who’s run into this problem with the LinkWithin plug-in. Happy blogging!