Setting up your forum, part two (installing styles)

Note: post updated November 7, 2017 to bring it up to date.

(Click here for part one.)

Once your forum is setup for basic public access, you generally want to change its look. If you like the default prosilver style, and many admins do, then perhaps the only thing you might want to do is add a logo.

Selecting a new style

If you want to use a different style, there are many sources:

  • Official styles are styles that are submitted to the phpBB group and are made publicly available for download on phpbb.com after a review team asserts that the style meets the group’s design standards. The easiest way to tour styles is to use the styles demo for phpBB 3.2. If you find one you like click on the download link. These styles are free.
  • There are other sites that provide phpBB styles that may cost money. Some of these include artodia.com, awesomestyles.com, rockettheme.com and themeforest.net. Since many of these styles have not been approved by the phpBB group (in part because paid styles cannot be downloaded from phpbb.com), it’s possible but unlikely that they won’t meet their criteria.
  • If you are trying hard to match colors used by your website, check out colorizeit.com. The site offers a way to colorize some of the more popular phpBB styles.

One factor to consider is whether the style is “Sassy” or not. All phpBB 3.1 styles should be responsive, i.e. they should intelligently “size down” for mobile devices. A “Sassy” style is one that uses .sccs files. These must be edited and then the style must be “compiled” to change what is displayed. For the novice, the process of editing and publishing these files can be intimidating. I discuss this more in this post. If you download a style and it contains .sccs files in the style’s theme folder, it’s a Sassy style.

Installing a new style

The phpBB group has full instructions for installing a style. It’s straightforward.

Adding a logo

Typically you will want to add your own logo. You will of course need a logo, and it should be in a .jpg, .gif or .png format, and probably fairly small in size too. You will need to know the image’s width and height. Clicking on the properties of the file may tell you this information. If you have a Mac, use the “Get Info” button of the Finder after you select the file. Images should be uploaded to your style’s theme/images folder.

You will generally have to edit at least one file to place the image, usually colours.css and common.css. Search for “.site_logo”. For width and height use the width and height of the image. Usually you make changes to the background-image property and width and height properties. Save the files back to your style’s /theme/images folder. Generally refreshing the page will show the style changes. You may have to hold down the SHIFT key when you refresh the page. Sometimes you may have to purge your browser’s cache. If you still don’t see the changed, check your web host control panel. There may be some software running like Supercacher that is actually serving these files. You may need to flush this cache so it is refreshed.

This topic may be of interest.

Suppressing the forum name and forum description

The default prosilver style shows both a logo and the forum name and forum description as text. Some styles show just the image. Some don’t show the image at all and only the forum name and forum description. Since many logos have the name of the forum or site already on the logo, showing both can be redundant and look unappealing. Approaches to fixing this vary:

  • “Sassy” styles generally have a switch that turns the display of the logo and/or the forum name and forum description on and off. Look in the style’s theme folder for a file with “config” in the name an a .scss extension. You can probably find a switch in there. The .sccs files though must be “compiled”. There is an extension you can install to make this easy.
  • Some styles require editing the overall_header.html file in the theme’s template folder. You will have to either delete or comment out the HTML that shows this information. To show a logo, you might have to uncomment or add the HTML that will display the logo.

Template changes require purging the cache in the ACP to be seen. You may also have to delete your browser’s cache and reload the page to see the changes.

Tweaking the style

Making further customizations is not for the timid and requires a moderate understanding of both CSS and phpBB’s templating system. If you have both, go ahead. Again, this post may be useful.

Making the new style the default

As an admin, you can permit as many styles as you want on the forum and users can select their style preference in the User Control Panel. As a practical matter, it is easier and less confusing for everyone to use the same style. You can set this in ACP > General > Board configuration > Board settings. You can select a style to be the default style in ACP > Customise > Style management > Styles. Click on the details link for the style you want to make the default and select the appropriate controls.

Digests extension and phpBB 3.1.10

It appears that there are some bugs or features in phpBB 3.1.10 that affect the digest extension:

  • If you install versions of the digest extension prior to the latest 3.0.6, phpBB will complain because there is no exp.php program in the extension. This was introduced in 3.0.6 and appears to be required in phpBB 3.1.10.
  • If after disabling the digests extension you also select the option to delete the extension’s data, the following error will appear: “Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors. A required module does not exist: ACP_CAT_DIGESTS”. In fact based on my testing all the data is deleted including modules, config table rows and columns added to the phpbb_users table. So the message is erroneous.

I think it’s likely that this is caused by bugs introduced in phpBB 3.1.10 to the migrator class. This may require the phpBB group to put out a patch to this version. Issues with the migrator are known so presumably these will be fixed.

I have not extensively tested Digests 3.0.6 with phpBB 3.1.10 but I have not encountered any other bugs so far, so if installed it should work correctly, just flag a bogus error when uninstalled.

Updated 10/26/16:

Setting up your forum, part one

(Note: this post was edited on August 25, 2017 to bring it up to date.)

Installing a phpBB forum is pretty straightforward, particularly if you use the option available from many web hosts and install it in the web host control panel scripting center. There is an official guide published by the phpBB group for setting up and administering a forum. However, it’s a lot to parse through.

Since I do a lot of these for a living, you might want to follow some of my steps after installation. ACP means select the link for the Administration Control Panel.

  1. Change the name of your forum. ACP > General > Board configuration > Board settings. “yourdomain.com” is obviously not very helpful to a visitor. This does not have to be a domain name, but something textual that briefly describes the purpose of your forum. Also change the default site description or leave it blank if it’s not useful.
  2. Review the board settings. ACP > General > Board configuration > Board settings. Make sure they are what you want, but you can defer installing styles until later if you don’t like the default prosilver style. The guest timezone is also the board’s timezone so make sure that is the way you like it. If your board is regional, you might want to set it to your local timezone.
  3. Add language packs. If you need to support a language other than British English, follow these instructions. Generally you don’t want to support more than one language on your forum. If you do the expectation is that users are fluent in both languages and can post in either language.
  4. Change the name of the default category. ACP > Forums. Manage forums is highlighted by default. Click on the green wheel next to ‘Your first category” and change the name of the category. You can have many forums inside a category but you cannot create posts under a category, only under forums.
  5. Change the name of the default forum. Again, ACP > Forums. Click on the link for your newly renamed category. Then click the green wheel next to “Your first forum” and change it to an appropriate forum name for your category.
  6. Edit or delete the default post. You can’t do this in the ACP, but on the forum index select the links for the category, topic and post and look for the edit icon. Edit the subject and content if you want or delete it altogether.
  7. Add additional forums. Most likely you will want to add additional forums and may need to create more than one category. ACP > Forums. This part can be a little confusing but to start off it’s important when creating a forum to copy the forum permissions from the default forum. You can change these permissions later if needed. If you don’t do this, no one can access the forum until you explicitly add them later on. This can be very confusing if you are not familiar with phpBB. This video may be of help.
  8. Create and set an effective spambot countermeasure. The defaults is “Simple image” which has been thoroughly hacked. This means you could get spam registrations. You have two logical choices: the Question on Registration and (for phpBB 3.2 only) reCaptcha.
    1. ACP > General > Board configuration > Spambot Countermeasures
    2. For the Question on Registration:
      1. Under installed plugins select “Q&A” then press Configure.
      2. Press the Add button and create a question.
    3. For reCaptcha, if you are running phpBB 3.1, the reCaptcha it uses is different than the newer version of reCaptcha for phpBB 3.2. The version in 3.1 has been hacked and is not recommended. For phpBB2:
      1. Go to the reCaptcha site and generate a public and private key for your site.
      2. Under installed plugins select “reCaptcha” (it is greyed out on first use) and press Configure
      3. Copy and paste the public and private reCaptcha keys from the reCaptcha site and press submit
    4. You will eventually find yourself back on the Spambot Countermeasures page. You must now enable your selection, so pick either Q&A or reCaptcha (depending on which one you setup) then press Submit. This will enable the spambot countermeasure.
  9. Review your server settings. ACP > General > Server configuration > Server settings. The main setting to check here is server protocol. If you use https to encrypt traffic, specifying it in the Server protocol field.
  10. Set up SMTP for email if you have Windows hosting or will send board emails through a SMTP server.
    1. ACP > General > Client communications > Email settings
    2. Under SMTP settings select Yes for “Use SMTP server for email”
    3. Enter the SMTP information provided by your host or mail provider
    4. To test SMTP, ACP > System > General tasks > Mass email. Enter the username you created for admin when you set up the forum (it may be “admin”) and send yourself a test email. If it doesn’t work repeat these steps until it works correctly.

This is enough to get your started with a useful, bare bones forum for public access. Stay tuned for the next post on this topic.

Digests extension … more work ahead

It took about four months but I finally got a review by phpBB’s extension team of my Digest extension version 3.0.5. They are requesting some pretty extensive changes so I’ll be in coding mode for a while but it’s good to have a review. No one gets approved on the first time through so I’m hoping the second time is the charm.

There may be an issue when deinstalling digests. I am analyzing that and will post a correction when I figure out what the issue is. If you need to manually deinstall digests and it doesn’t work, use these instructions.

Digests 3.0.6 (RC5) now available

Digests version 3.0.6 is available for testing. It can be downloaded here or you can grab it from GitHub.

For details on installing and configuring digests, see the first post of the digests extension topic on phpbb.com.

You can see a complete list of changes compared with 3.0.5 here:

To highlight some of the major changes since the last release:

  • The code has been cleaned up with PhpStorm, removing a lot of unused variables, fixing a lot of inconsistencies and in some cases fixing errors that PhpStorm found. It’s an impressive IDE.
  • Edit subscribers search feature is now case insensitive.
  • Duplicate digests bug is hopefully fixed. For a given hour, digests will ensure that a user has not received a digest for the requested time period. For example, for daily digests at least 24 hours must have passed since the last digest was recorded to have been sent for it to go out.
  • Encoding of the FROM email name now matches how it is handled in /includes/functions_messenger.php
  • If a user has not chosen a timezone in the User Control Panel, the board timezone is used. This prevents a HTTP 500 error. This can happen when installing a new forum and using the admin account for testing.
  • html_messenger object is reset after each email is sent, which might also address duplicate digests going out for a given hour.
  • Added ext.php to the archive, which enforces rule to use phpBB 3.1.9 (but not phpBB 3.2)
  • Email templates now include the missing <html> tag for HTML digests, making them valid HTML 5.
  • Both the date and hour are shown in the admin log when a digest is sent (assuming this option is enabled). This aids troubleshooting if more than a day has elapsed since digests were sent out.
  • Migrator fixes issue with User Control Panel permissions if a user converted Digest 3.0 mod subscriptions using Digests 3.0.4 or earlier. The bug had limited seeing the Digest options in the UCP to admins only.

Thanks to testers for finding bugs both large and obscure, and to Praggle for the German translation.

September 2016 work summary

I was busy in September helping clients. I had little downtime. Here is some of the work I did in September. All client information has been anonymized:

  • I was asked to remove an ad that appeared after a user’s posts. It turned out the ad that was actually in his post signature.
  • I did an analysis of a client’s forum. Like many I see, someone wrote an integration between phpBB 3.0 and a client’s in house content management system. The CMS handled the registration and by being logged into it was also logged into the forum. The forum is using phpBB 3.0, so some hacks were added to the base code to permit the integration. I compared his files with a reference to see what was different and summarized the custom changes that were made by a previous programmer. I provided guidance on upgrading to 3.0.14 if desired along with a work estimate, and guidance on implications of moving to phpBB 3.1 (a better long term solution). Later in the month, the client decided to upgrade phpBB to 3.1 and created a test area for client review. He added the integration code. I moved the forum files over into 3.1 instance client created. Client also moved the 3.0 database to the test area. I edited config.php to point to the 3.0 database. 6300 files took a while to move. The upgrade to phpBB 3.1 was successful. I changed server and cookie settings to point to test domain. User to take care of style changes and to add integration with custom CMS. Customer feedback will determine if this will be done for production. Later, worked on retrofitting we_clearblue style to customer’s CMS. It was not entirely successful. There were some integration issues. but the client’s designers will handle them.
  • I upgraded forum from phpBB 3.0.11 to 3.1.9 using the default prosilver style. I integrated the old logo. There were no issues during upgrade itself, but I had to remove a lot of dead modules. I added a home link and changed the server settings to https.
  • I investigated mysterious HTTP 406 errors that occurs when editing a post with lots of text and images. Assumed it was due to an Apache mod_security issue. I added some instructions in the forum’s .htaccess file to disable mod_security but it had no effect. I tried an online chat with web host’s tech support, who could not resolve it. They wanted a ticket filed with image of problem and IP used. I asked the client to submit the support ticket since this was a hosting issue I could not fix. They did fix it, but it took a few days.
  • A forum had my digests extension version 3.0.3 installed. Client complained of cron email errors, and a user getting 30 copies of digest and a messages in the admin log indicating there was nothing to send in a digest. The latter is not a problem and is by design. I could find no evidence of 30 copies being sent. The cron error may be due to “Administrator1” who was subscribed not having a valid email address on the domain. Days later I had a short screen sharing conference call. The remaining issue was that some users could not see digests tab in UCP. This was a permissions issue I fixed in version 3.0.5 but the migrator program did not explicitly overwrite these settings. Toward the end of the month, I got a note that some users were still getting multiple digests. I added debug code to see SQL being issued. No cartesian product was resulting from the SQL query, but the messenger object was not reset after each mailing. I added that line of code. I am still troubleshooting this issue and I am not sure of the cause, but want to fix it for the next version of the digests extension.
  • A poor web host a client was using would not allow a forum upgrade from version 3.0 to 3.1 because PHP could not be upgraded to one supported by phpBB 3.1. I recommended using siteground.com. Client purchased hosting on siteground.com. I created new phpBB 3.1 instance on new hosting since there were only test posts. I installed the Metro Purple style and FAQ manager extension. I moved the domain when he provided registrar information. At his request, I hid links for FAQ and member list links. I tweaked viewtopic_body.html to move the poster’s profile to left side of screen. I then helped sort a logo placement issue with the style and answered search engine questions. I did a lot of work trying to make the logo fit the size proportionately when screen width shrank. I found no easy way so created 3 versions of the logo at different breakpoints.
  • Digests were not going out in a phpBB 3.0 forum. After investigating it looks like they started going out again that morning. Hosting had changed from Window to Linux, so the issue of digests not going out was due to SMTP being enabled. Client turned this off and it seems digests started going out again. I did upgrade digests from 2.2.25 to 2.2.27. Client upgrade from 3.0.12 to 3.0.14 did not seem to overwrite any digest file changes.
  • Client wanted an ability for his users to enter and report on events on his website and asked if I could write PHP scripts to do this dynamically. He provided an Excel spreadsheet as a mockup. I loaded the data in the spreadsheet into a MySQL table. I created a preliminary report for review. After feedback, I created the data entry module that users could use to post events. Later I made tweaks to these dynamic pages to meet other requirements.
  • Client wanted to reach forum users that hadn’t posted or visited in awhile. I created a CSV export of selected fields from the users table containing username, user_email, last visited date and registration date.
  • Former client contact information had changed. The new contact couldn’t get into iPage hosting. I provided the information I had after getting prior contact’s approval to do so.
  • I had two Skype discussions with an existing client on why email notifications weren’t going out. There were SMTP email errors. In addition, the client had his email notifications turned off in the user control panel. Worked with in house tech person to get new SMTP server information and configured it for the phpBB form. I showed client how to use the mass email feature to send out test emails.
  • I installed version 3.0.5 of my digests extension on test forum running phpBB 3.1.9. Sending digests manually and via a phpBB cron worked but sending it via system cron did not. After analysis, it turned out that GoDaddy’s jail shell could not handle multiple statements in a cron. I tried a number of approaches but eventually used curl to call cron.php hourly and turned off the system cron configuration.
  • Client needed an emergency installation of phpBB. Installation failed in the web host’s scripting manager. It looked like it was mostly installed. A populated database existed, and software was in /phpBB3 folder. I had to turn on PHP which for some reason was turned off and create the config.php (it was empty) for the forum to come up. I reset the password for admin and gave it to him. Client provided logo. I resized it and placed it.
  • I updated the Tapatalk extension for a client from version 1.3.7 to 1.3.8
  • I updated the Tapatalk extension for another client from version 1.3.7 to 1.3.8. I checked potential connection problem with Tapatalk for SEO and Push, but if it existed the update fixed it.
  • A forum used by Croatians was running slow. Forum was running phpBB 3.0.7-PL1. I checked indexes of the most frequently used tables. I found one duplicative index that I deleted. Most tables were using MyISAM storage engine. I optimized the tables but slowness persisted. So I changed the storage engine for these tables to InnoDB and performance suddenly became quick. Converting search_wordmatch table however seem to hang cPanel but eventually finished. Client is very pleased.
  • I upgraded a forum from phpBB 3.0.12 to 3.1.9. My digest mod was only mod installed. Crons used by digest had stopped working with rehosting causing no digests to go out. I installed digests extension version 3.0.5 and created an hourly cron to call cron.php. Tested and it worked. I warned client about possible duplicative digests due to possible bug.