SMF 1.1.11 Tips, Tricks and Tutorials
Before we start: this is my page about SMF versions 1.1.11 and below. For versions 2.0 RC3 and above, please visit my SMF 2 page, which includes upgrade instructions.
SMF is the best free forum software out there. On this page, I would like to assemble the best tips and resources for SMF.
How to install SMF manually in Hostgator
In CPanel, create a database user and a database. Associate the user with the database.Create a Forum folder in your rood directory. Upload the SMF file (something.tar.gz) via FTP
In CPanel's file manager, select the file and extract
In Firefox, go to mydomain/forum
For My SQL server, leave localhost. Enter the database user and password you just created.
To change the colors, open Forum/Themes/Default/style.css. Inside, you'll want to look at the colors for body, catbg, tborder, and perhaps more. Install Firefox's Firebug extension: When you hover over elements of the page, it shows you what parts of the css to change. Remember to clear your browser's cache to see the effects.
On the pieces of code that specify a background with both a jpg and a color, I notice that I am happier scrapping the jpg. (e.g. background: #006666 url(images/catbg2.jpg) repeat-x; ). Otherwise, in the images folder, take catbg.jpg, catbg2.jpg and titlebg.jpg, and change the color in Photoshop.
To remove the logo, open index.template.php in your theme, look for smflogo.gif and remove the lines of code around it starting with td and ending with /td.
One strange feature of SMF is that when members register, by default, their email address is shown to the world. To hide it by default, open Register.template.php in Themes/default, search for "hideEmail", and change the line like so:
<label for="hideEmail"><input type="checkbox" name="hideEmail" id="hideEmail" class="check" checked /> ', $txt[721], '</label>';Basically, you are only typing the word "checked", without quote marks or equal sign or anything.
To turn on automatic email notification of replies to posts, go Admin / Themes & Layout / Reset Options. Then check the box both inside "Reset default (guest) options for this theme" and inside "Reset all members' current options for this theme".
How to apply mods in SMF
At first, I tried to install in the package manager, and had one of two errors:"The package you are trying to download or install is either corrupt or not compatible with this version of SMF.", or 404 (file not found).
This is the procedure that works for me.
1. Download. Do not download files in the package manager, even by right-clicking. Go straight to the mod site.
2. Verify. On your PC, check that the files can actually unpack. I use 7-zip. You wouldn't believe the number of corrupted files I've had.
3. Upload. With an FTP program, upload the mod (still compressed as a something.tar.gz or something.zip) to your forum/Packages folder.
4. In SMF, click Admin, then, under Main, click Packages. Choose browse packages. Select your package. Click "Apply".
5. Pay attention to the language of the installer. It actually tells you where in the SMF panel to go look for the mod once installed!
Here are the mods I run on 1.1.11 (see below for 2.0).
Pretty URL (for SEO optimization).
Recaptcha (for registration)
No Reply Emails (avoids blasting a real email address)
SMF User Email System (to prevent email harvesting)
All Topics Unsubscriber (allows user to unsubscribe from all threads)
Look but No Read (tease guests, forcing them to register if they want to read a post
Hide Info Center from Guests (keep your stats to yourself)
Minimize Footer (removes three logos)
Quote Clear Lines (prettier replies)
Link Tree (easier navigation)
Here are the mods I wasn't able to install as of this post
Users in Last 24 Hours
Remove quoted images (keeps the boards pretty)
DNS Blocklist Bans (stop known spammers at the door) [xml, need to research how to install]
Anti Spam: Prevent Posting Links (I have not turned it on) [xml]
Mods I'm Contemplating
Colorize Boards
Bookmarks
Here's a list of recommended mods.
SEO for SMF
I have moved this section to my SMF 2 page.How to Upgrade SMF
In the Admin panel, when there is a notification that you need to update the forum, updating can be as simple as following the update link. This takes you to a page where you can directly apply the update.However, if there is a hickup with permissions on your server, the update link can generate a "File Not Found" error. Don't panic. Copy the update link in a text editor. Embedded in the link, you will find a link to a patch file. Open that link, save the zip file to your hard drive then upload it to Admin/Packages folder. Now go back to your forum: click on Admin, then Packages. You will find the update ready to install.
How to Upgrade SMF from 1.1.x to 2.0
This is surprisingly easy. See the top of my SMF 2 page.SMF 1.1 - Buttons not Showing as Images
Couldn't figure this out in the settings. The option to show buttons as images is checked. I inserted this in index.template.php, just after "The main content should go here." It gives me a new topic button, but not exactly in the right place.
if(!empty($context['current_board']))
{
if (allowedTo('post_new'))
echo '<br> <a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0">' . '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_topic.gif" alt="New Topic" style="margin: 2px 0;" border="0" />' . '</a>';
}
Someone sent me these instructions, which work better.
SMF: Nice Red Buttons, Web 2.0 Style
You can see these buttons in action by registering to the forum. The idea was to make a "big buttons for dummies" theme, because I had a hard time understanding the original buttons. You are free to use the buttons as they are, or you can modify them (size, color, text) by following these instructions. Please note that the buttons where first made following this tutorial. Why this additional tutorial? Because if you use the template on that site, you will get ugly corners when you resize a button.1. Right-click here to download the buttons. Copy any of the Photoshop (PSD) files, rename it for your new button. Open the file. Make sure the Layers panel is displayed (Windows, Layers).
2. Click on the text layer. Click T for text, change your button text. The text may run over the button size.
3. Let's resize the button so that it fits your text. There are two button layers: INSIDE and OUTSIDE. If you need to enlarge the button, start with the OUTSIDE layer. Otherwise start with the INSIDE layer. Click on the appropriate layer in the Layers panel. Choose the direct selection tool (the white arrow). Click once near the top right corner of the button. You will see two path points for that corner. Select all four path points for the right side of the box (Shift-click to add points to the selection). Then select the right-edge and shift-drag left or right to fit your text. Repeat on the left side. Then repeat with the other layer (INSIDE or OUTSIDE).
4. Let's adjust the glow. Click the Glow layer. Select the Move tool (shortcut: V). Pull the left and right edges until you get a centered glow that you like.
5. The Photoshop button is ready, now we need to save it to web format. Save the PSD file (Ctrl + S). At this stage it may be a good idea to close the file, copy it and open that copy so you don't overwrite the button by mistake.
6. Let's crop. Select the crop tool (C). Draw a large crop box around the button, then bring the edges in until they are within half a pixel of each edge (that extra space is needed for smooth resizing because of anti-aliasing). Zoom in as needed (Ctrl + the Plus key). Press Enter when done.
7. Let's resize. From the menu, select Image / Image Size. Display the units in pixels. Don't touch the width. Change the height. I like 21 for my regular buttons, 30 for new_topic.gif and reply.gif.
8. Let's save to GIF. Choose Image / Mode / Indexed color. Important: make sure Transparency is checked. Select File / Save As, select Compuserve Gif, rename the button to the name of the file it is meant to replace in your theme's images/english folder.
9. Upload. Done!
10. What about changing the colors? We need to change the gradients in the INSIDE and OUTSIDE layers. I am giving you a precise method to achieve the same effect as on the red buttons, but if you have a good eye for colors you can follow the instructions and skip the number instructions. If you're following my numbers guide, open the calculator (Windows: Windows key + type "Calc"). Click the "Hex" button at the top. First, choose what will be your darkest color. In this example, I'm going for a blue button, and my darkest color is 004a80. We will call A that first color. We need to come up with color B. For B, take the first two numbers of A (in my example, 00). In the calculator (in Hex mode), take that number and add 2F (you will find A through F at the bottom of the keypad). For the two middle digits, add 2B. For the last two digits, add 2C. In my example, this gives me this value for B: 2F75AC. Now right-click the OUTSIDE layer and choose "Blending Options". Click on "Gradient Overlay". In te new window, click in the middle of the colored bar next to "Gradient". In the new window, double-click the little colored box at the bottom left (above the "Stops" options). In the box preceded with "#", enter the A value. Double-click on the little colored box at the bottom right. Enter the B value. Click OK, OK. Repeat with INSIDE layer, entering A for the left box and B for the right box. That's it! If the colors look strange when you are cropping and resizing, don't worry. As soon as you switch to index mode they will look good.
Other awesome PHP scripts
I document all the scripts I use. Go to the top of the page and have a look at my other PHP articles in the right column!Smiles,
Andy
ps: If you have enjoyed this page, I would be immensely grateful if you would link to it, bookmark it or share it. You can also comment using the form below.
