SMF4iPhone Theme
*Customization*
To change the header logo, replace
logo.jpg in the theme images folder.
If you want to translate the theme, follow these instuctions:
- Make a copy of "
iPhone.language.english.php", "
iPhone.language.english-utf8.php", "
Settings.english.php", "
Settings.english-utf8.php".
- Rename files replacing
english with
yourlanguage.
- Translate all the strings.
If you want your translation to be officially added to the theme, send it to
fabius85@gmail.com.
*Supported Languages*
- Dutch (Thanks to Mr. Jinx)
- Dutch-UTF8 (Thanks to Mr. Jinx)
- English
- English-UTF8
- French
- French-UTF8
- German (Thanks to Chili)
- German-UTF8 (Thanks to Chili)
- Italian
- Italian-UTF8
- Spanish_ES (Thanks to videoed)
- Spanish_ES-UTF8 (Thanks to videoed)
- Swedish (Thanks to Richard Roe)
- Swedish-UTF8 (Thanks to Richard Roe)
*Changelog*
- 1.1 (26/11/2010)
- SMF 2.0 RC4 compatibility.
- Added attachments box (assuming there is at least one attachment) to the end of posts box.
- Added topic title on top of topic's page.
- Added "Go Down" and "Go Up" links in topics.
- Added "unread topics" function. They can viewed for single boards by tapping the icons on the left side of boards and sub-boards titles, or for the entire forum with the left button above online users box.
- Added "mark read" fuction for single boards and entire forum.
- Added new languages: French, German and German-UTF8 (Thanks to Chili), Spanish_ES and Spanish_ES-UTF8 (Thanks to videoed), Swedish and Swedish-UTF8 (Thanks to Richard Roe).
- Fixed UTF-8 chars not converted to their respective HTML entity in some language files.
- Fixed typo errors in Italian translation.
- Fixed typo errors in style.css (instead of "position", there were two "postion").
- Fixed long topic title bug. Now if the topic title is longer than 16 chars it will be cut and followed by three dots (...) so board pages will not get misaligned. 16 is the max amount of chars that can be viewed in 1 line, if all chars are UPPERCASE and followed by the longest "new" button (the french one).
- Fixed avatar showing even if disabled by admin.
- Fixed bottom pages list not showing if not logged in.
- Fixed Classic/Back button. Now it should always work properly.
- Fixed misalignment of "Board | Latest Posts" switcher when translation string of "Latest Posts" was too long.
- Fixed bugs in reCAPTCHA system.
- Fixed non localized strings for reCAPTCHA.
- Fixed "Show Child Boards" button bug.
- Removed all no longer used images.
- Updated search field background image, ON/OFF toggle images and theme preview image, to fit new iPhone 4 / iOS 4 appearance.
- "Search" button and "New" button are now managed by language files.
- Now when browsing the forum as guest, boards and topics will not all show as "new", but already read.
- 1.0 (09/04/2010)
- First public release out of beta.
SMF4iPhone Mod
*Summary*
The mod uses the
Movila Free Device Detection which is a free server that detects wether or not you are using a mobile device. This service takes some of the problems out of the picture. It will check the user agent and also the domain names that are used for mobile devices.
After the mobile device is detected, filters defined in "Admin > Configuration > Modification Settings > SMF4iPhone" are used to send a specified user agent to one of previously set themes. If a user agent is not found, the mobile device will go to the failsafe such as wap2 or a theme you specify.
*Features Of This Mod*
- Uses Movila Free Device Detection service to ensure that a mobile device is reading your forum
- Automatically detects iPhone device (and others) and transfers to the theme
- Can manage the transfer of up to four (4) themes
- User agent list can be adjusted in Modification Settings
- Theme ID can be changed in Modification Settings
- If SMF4iPhone Theme and some other themes are installed before the mod, it will automatically detect the theme IDs and set them by default in Modification Settings
- Supports SMF caching system
*Customization*
If you want to translate the mod, you just need to translate the following lines and add them the the end of the respective files.
Modifications.yourlanguage.php or
Modifications.yourlanguage-utf8.php:
Errors.yourlanguage.php or
Errors.yourlanguage-utf8.php:
If you want your translation to be officially added to the mod, send it to
fabius85@gmail.com.
*Supported Languages*
- Dutch (Thanks to Mr. Jinx)
- Dutch-UTF8 (Thanks to Mr. Jinx)
- English
- English-UTF8
- French
- French-UTF8
- German (Thanks to Chili)
- German-UTF8 (Thanks to Chili)
- Italian
- Italian-UTF8
- Spanish_ES (Thanks to videoed)
- Spanish_ES-UTF8 (Thanks to videoed)
- Swedish (Thanks to Richard Roe)
- Swedish-UTF8 (Thanks to Richard Roe)
*Usage*
The mod can transfer to SMF4iPhone Theme, Curve Mobile, Mobile Theme, or any other theme, basing on the phrases entered in the Modification Settings. It is suggested that you copy the built in phrases. Save them to a safe place and give it a try. If everything works right you should be able to send someone to any theme based on the phrases. Adding a new User Agent is as simple as typing in a new phrase using the proper syntax.
If you have "smf4iphone_theme", "curve-mobile" and "mobile_theme" installed before you load the mod, it will automatically detect the theme IDs and assign them as follows:
Theme # 1: smf4iphone_theme
with user agents for
iphone|ipod|android|mobile|Safari Mobile
Theme # 2: curve-mobile
with user agents for
iemobile|Opera Mobi|symbian|series60|series70|series80|series90|series 60|series 70|series 80|series 90|blackberry|blackberry05|palm|webos
Theme # 3: mobile_theme
with user agents for
nokia|motorola|samsung|fennec|minimo|sonyericsson|htc
Failsafe Theme: wap2
all remaining user agents
Phrases must be entered in the format of "user agent|user agent" ie "safari|firefox". Mobile failsafe can be "wap", "wap2", "imode" or "theme=#" where # is the ID of the theme. Theme will not load unless both ID and phrases have data.
If any of the above themes are missing the mod will leave the theme ID blank. If either row is blank the theme will be skipped. The selection boxes are text boxes so be careful. A trailing space in theme ID will skip that theme. Please note that the user agents selected are merely a guess and should be adjusted for the theme best fit.
The mod works both if using SMF caching system or not. If you don't want to use this support, enable "
Skip cache errors" option in Modification Settings to prevent your logs from being filled of cache errors.
*Other Themes*
To add a link to this or another theme type
http://www.yoursite.com/smf/index.php?theme=#
Where # is your theme ID.
Or you can modify your default theme with a selection at the bottom of index.template.php next to wap2. Something like:
<a href="http://www.yoursite.com/smf/index.php?theme=' . $modSettings['id_theme1'] . '>iPhone Theme</a>
*Warnings*
VERY IMPORTANT IF YOU DON'T WANT PHP TO CRASH :
a) In Theme Management, select : 'Allow members to select their own themes.'
b) Select SMF4iPhone Theme.
If you don't do that, when surfing on iPhone, the forum will try forever to use the forbidden to use by force the iPhone theme, and the system will loop until crash.
COOKIES MUST BE ENABLED BY USERS FOR THIS MOD TO WORK
*Known Issues & Things To Do*
Use of DetectFree service is limited to the duration that it is offered. If the service is turned off this mod will not work.
The phrases must have a certain syntax. A future version may simplify the syntax.
*Changelog*
- 1.1 (26/11/2010)
- SMF 2.0 RC4 compatibility.
- Added checkbox to disable mobile theme automatic switch for every user in: Profile > Look and Layout
- Added theme names to the selection boxes in Mod's settings. Now they will appear like "(ID) Theme Name" so you dont need anymore to serach for theme ID by yourself.
- Added new languages: French, German and German-UTF8 (Thanks to Chili), Spanish_ES and Spanish_ES-UTF8 (Thanks to videoed), Swedish and Swedish-UTF8 (Thanks to Richard Roe).
- Fixed UTF-8 chars not converted to their respective HTML entity in some language files.
- Updated all language translations.
- Better alignment of "additional notes" at the end of SMF4iPhone Mod settings page.
- Some improvements to the code.
- 1.0 (09/04/2010)
- First public release out of beta.