Archive for the ‘Simple Machines Forum’ Category

Simple Machines Forum – Problems in Automatic Installation of Mods

December 25, 2007

Installing SMF Mods from Admin->Packages option, sometimes, is not a pleasant task even if you want to install with the default theme. Root of the problem lies in the way SMF Mods are developed. Most of the Mods need to rely on search and add/replace method and sometimes copying of some Mod specific extra files. It is the assumption made in the design of the search string that creates the problems most of the time. Because the search string may not match in situation where a previously installed Mod might have changed the string already. As a result Mod installation test will fail and Admin has to manually install the Mod.

Manual installation of SMF Mods have been detailed here.

SMF Email Configuration Settings

December 21, 2007

Struggled for a few minutes in order to get my email configuration of Simple Machine Forum based site. Finally the following settings seem to work. The settings have to be made to the following section of the Admin panel.

1) Admin -> Configuration -> Server Settings -> Feature Configuration dialog:

Mail type: “SMTP”
SMTP server: “localhost”
SMTP port: “25″
SMTP username: keep it blank
SMTP password: keep it blank
(confirm): keep it blank

2) Admin -> Configuration -> Server Settings -> Core Configuration dialog:

Webmaster Email Address:

It is advised though to use the “PHP default” instead of “SMTP” as the Mail type, because SMTP is suggested to be slow. But for some reason it is not working at the moment.

Tried to set up other my own web host’s SMTP server and also google’s SMTP server using the following settings but failed.

Mail type: “SMTP”
SMTP server: “smtp.gmail.com” (tried also smtp.google.com)
SMTP port : “465″ ( recommended port) or 587 or 25
SMTP username: my valid gmail mailbox for example “myaccount@gmail.com”
SMTP password: my gmail password
(confirm): my gmail password

Appreciate your suggestion if any.

Content Encoding Error (content_encoding_error)

December 15, 2007

Looks like a series of problems I am facing after I transferred my site from one server to another. This morning I am getting the following error the first time I try to login onto my SMF forum:

“Server response could not be decoded using encoding type returned by server.

This is typically caused by a Web Site presenting a content encoding header of one type, and then encoding the data differently.”

I have a clue from here. Basically it says that it is related to a bug in the content compression code.

Based on this concept, I turned off content compression from “Admin > Configuration > Server Settings > Feature Configuration”. I checked off “Enabled Compressed Output” option and it works!

Simple Machines Forum – Remove Menu Item of an Uninstalled Package

December 14, 2007

I have installed a package called “GoogleTagged (v1.2)” for my SMF forum. However I later decide to uninstall it. The problem is that when I actually uninstall the package the menu item associated with it remains on the forum menu bar and in the admin menu box.

So, I have to manually remove the menu item from the forum menu bar. SMF menu items are programmed in a file called “index.template.php” in its active theme folder. For example, if the active theme is the SMF default theme, the corresponding file path is “<forum home>\themes\default\index.template.php”. In this file the “function template_menu()” contains the menu items of the forum menu bar. I have to just delete the entry related to “GoogleTagged” package ( the echo command after the comment // The [GoogleTagged] Button ).

I am yet to figure out how to remove the menu item from the admin/config area.

Database Error: Duplicate entry ‘0′ for key 1

December 12, 2007

I have recently transferred one of my websites to a new server box. This is with the same hosting company though. My previous server was using an NT system and the upgraded one is using Windows 2003 Server. My web site is using Joomla as a CMS and SMF for forums. I have also set up the Joomla-SMF bridge. The transfer was with obvious hiccups. In this blog I like to point out the one issue that I had with the databases.

I was having this error “Database Error: Duplicate entry ‘0′ for key 1″ whenever I tried to create new user or new topics in my forum. Two of my databases, one for Joomla and the other for SMF, were based on MySQL.
After a little googling and browsing through php codes for the page that were generating the error I came up with the solution. The problem was with the export and import of the MySQL database. Understandably, the database import didn’t set the “AUTO_INCREMENT” property of key fields of many tables of the databases. I manually had to set this property using phpMyAdmin. You can set this property in the “Extra” attribute of the field once you display the table structure.

So i did a comparison with my old server installation for both Joomla and SMF database and came up with the following list of table and associated key fields that are using auto_increment attribute.

Joomla Database (version 1.12)

Following are the Joomla tables and corresponding key fields that are using auto_increment attribute.

Joomla Table Key Field
jos_banner bid
jos_bannerclient cid
jos_bannerfinish bid
jos_categories id
jos_components id
jos_contact_details id
jos_content id
jos_core_acl_aro aro_id
jos_core_acl_aro_groups group_id
jos_core_acl_aro_sections section_id
jos_downloads_blob id
jos_downloads_containers id
jos_downloads_files id
jos_downloads_log id
jos_downloads_reviews id
jos_downloads_structure id
jos_downloads_temp id
jos_downloads_text id
jos_mambots id
jos_mbt_groups group_id
jos_menu id
jos_message message_id
jos_modules id
jos_newsfeeds id (not catid)
jos_polls id
jos_poll_data id
jos_poll_date id
jos_sections id
jos_template_positions id
jos_users id
jos_weblinks id

SMF Database (version 1.1.4)

Following are the SMF tables and corresponding key fields that are using autoincrement attribute.

SMF Table Key Field
smf_ads ADS_ID
smf_attachments ID_ATTACH
smf_ban_groups ID_BAN_GROUP
smf_ban_items ID_BAN
smf_boards ID_BOARD
smf_calendar ID_EVENT
smf_calendar_holidays ID_HOLIDAY
smf_categories ID_CAT
smf_log_actions ID_ACTION
smf_log_banned ID_BAN_LOG
smf_log_errors ID_ERROR
smf_membergroups ID_GROUP
smf_members ID_MEMBER
smf_messages ID_MSG
smf_message_icons ID_ICON
smf_package_servers ID_SERVER
smf_personal_messages ID_PM
smf_polls ID_POLL
smf_smileys ID_SMILEY
smf_topics ID_TOPIC
smf_tpv_chat ID

So, make sure that you manually restore the “auto increment” property after an import of the Joomla, SMF and as such where similar situation may occur. For example, you will face similar problem while transferring WordPress, Drupal, PhpBB, and many other web content managers from one machine to other.