Customizing Simple Machines Forum (SMF) Mobile Version (WAP2)

With the increasing rate at which people browse the internet, it’s very important to optimize your site for mobile users. I have a web forum built with SMF 2.0 script and the mobile version isn’t bad at all compared to the default mobile version SMF has to offer. Unlike MyBB that has a better mobile version plugin, SMF mobile version (also known as WAP2) looks rather too crude to be of interest to any mobile user. A lot of my web forum users use Opera Mini mobile browser and I had no choice but to make the forum’s mobile version a lot better than what it was. Since mobile users are also more than 50%, I had to find ways to insert adsense for mobile into WAP2 to monetize it and I’m going to explain just how I did it. The screenshot below shows exactly how my forum looks like when viewed with Opera Mini.

Installing BXK WAP MOD

This modification gives your SMF WAP2 version a much better look. It’s not available on SMF modifications site but i got it from Empireofthesun. Sadly, the site too has been having some technical issues for some months now and this mod is almost nowhere to be found online. Fortunately, I ran a search on my hard drive, found it and uploaded it to my old mobile site.

Download BXK WapMod 1.4-2

Now, this version supports SMF 2.0 RC5 but in case you’re using SMF 2.0 or SMF 2.0.1, you need to emulate SMF 2.0 RC5 to install this mod.

Go to Package Manager, click on Advanced at the bottom right and emulate SMF 2.0 RC5
Click on Apply and now try to upload and install the mod.

How To Redirect Opera Mini To WAP2

This part is a bit tricky as you have to do edit a php file. Log in to your cPanel and locate index.php file. This is the only file that needs to be edited in order to redirect mobile users to the WAP version you just installed.

Edit index .php file by searching for this code:

if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)

And replacing with this:

if ((isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) || isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']))

Now save the file and view your web forum with Opera Mini. You should be automatically redirected to WAP2.

Inserting Ads (Adsense, Inmobi, Admob or Buzzcity) To SMF WAP2

-You first need to generate and copy out the php code for the advert and paste it to a text file. If you’re using Adsense for mobile, be sure you selected ads for both low and high end phones and copy out the codes in php format.

-Save the text file as ads.php (be sure the extension is php)

-Upload the php file to your domain root (public_html)

-Find Wireless.template.php (./public_html/Themes/default/Wireless.template.php)

-If you want the advert to appear at the top just above the header, find this code:

<center><p class="catbg">', site_logo(), '</p></center>;

-Right below it, paste this code:


-If you wish the advert to appear below, right before the footer, find this code:

global $context, $settings, $txt, $options, $boardurl, $scripturl;

-Right below this, paste this code:


You can as well add the ads to any other location depending on whether you have a clear idea on php coding. Inserting the advert at a wrong place might render your template useless.

Adding External Links To SMF WAP

The procedure is quite similar to the one above. You need to write your links in php and save it as a text file. If you don’t know how to get this done, simply edit the links and anchor texts in the example below:

echo "<div class="wapmenu">n";
echo "<a href=";wap2">Edit Account</a> | <a href=";wap2">Edit Profile</a>n";
echo "</div>n";

-Now save this as links.php and upload to public_html.

-Locate Wireless.template.php file from your cPanel

-To show the links at the top, search for this code:


function template_wap2_boardindex()

-Just above this, paste this code:


-To show the links at the bottom, find:

<center>', $txt['footer'], '</center></div>

-Just above it, paste this code:


Everything posted here can be practically seen on and if you find this post helpful, say thanks by hitting the google +1 and facebook like buttons below. Thanks!

Filed Under: HTML / PHP

Author: Don Caprio

Don Caprio is a full time blogger / web designer living in Nigeria and apart from blogging, my other obsession is music. I'm a self-confessed Tupac fan, an iOS lover, an Android user, a Windows 8 power user, a writer with a 5-year old unfinished novel... and the list goes on and on. You can add me on Facebook, follow my updates on Twitter or add me to your circles on Google+! By the way, if your blog needs a custom design, you can contact me here...


  1. Anonymous says

    I want the print option added to the toolbar as when there used to be the file dropdowni want to disable Alt Ctrl keys using JAVA… so plizz help me doing these…..!!!!! [url=]wyszukiwarka mp3[/url] Hi, I wanna starting development for smartphones applications, I'm hesitant about choosing between android OS and Apple IOS , I'll be happy to listen to your ideas and experience. Appreciate your help.Yes. wyszukiwarka mp3 Hey guys, I am currently learning to program in Java and would like some ideas as to a program to make inorder to improve my knowledge. I am quite a novice however i have written programs for a snack machine, solitaire, fifteen puzzle game and a sudoku / futoshiki solver. Ideas can be anything as long as not too complicated lol thanks in advance.I have a samsung phone so is it safe, free and full quality song? [url=]wyszukiwarka mp3[/url] get the install discs and you can change passwords using the install discI just got a new laptop and it was fast when i got it and now its slow i only have three programs downloaded i have gimp 2.6.11 and imvu and also i have google chrome downloaded which on is slowing down my computer? [url=]wyszukiwarka mp3[/url]I'm looking for a webcam to use with skype, but I'm useless with technical stuff. what resolution is good for a webcam? will 1MP be enough? Is there any particular brand that is good for webcams? thanks in advance.I need someone to dumb it down for me… Because i really dont get what im supposed to do [url=]wyszukiwarka mp3[/url]
    [url=]wyszukiwarka mp3[/url]

  2. Duro222 says

    Great info don. For those haaving redirection issue, you can use this link Don can you help me set up my blog? Nice compilation

  3. says

    Nice and easy… been looking for this for a while now.. Thanks.. Question.. That user agent is only for opera.. I see ur 9jaclub goes mobile on my iphone – Care to share the user agent u pasted to activate for iphone and other OS? I’d prefer they see mobile too than Full.

  4. says

    This is a VERY good write up on my mod. You did a great job. I will link you when it is accepted on the smf site in the next few days. Also if the author of this wants to contact me for the latest version visit me at or send me an email. For updates and news about me and my wap mod (BxK’s WAP Mod) then visit

    • Don Caprio says

      I lost touch when went down, could’ve updated the post with the latest version of the mod. Thanks for dropping by! Cheers.

  5. says

    Hi don, 9ce job there… Do u know of any mod that i can use with my smf to restrict guests from viewing links in post. I’v searchd 4 dis and i think you can help…also my wap2 doesn’t show recent posts. Thanks in advance.

    • Don Caprio says

      Search for “Registered links” at SMF modification site. It’s right there. You wap2 can show recent posts from smf settings. I can remember where exactly

  6. says

    my if i won to customize my wap2 mod theme how do i go about it. like changing the color and making it look good like the one in your forum

  7. says

    please if i want to create a menu below the Home|Login how will i do it. because i followed your step but the menu is showing at the head which is bad. so how can i execute d task as ur site?

  8. says

    i put the menu above as prescribe by you, but it did not be at the center. if i want to align it to be at the center how will i do it?

  9. says

    please don how can i alin the link to center plz help me and urgent waiting i tryd inserting the link thank God it work but to was in d left please i need it to be in the center to fit my mobile view

    • says

      <?php echo "<div align='center'>n"; echo "n"; echo "<div class='wapmenu'>n"; echo "<a href=''>Gallery</a> | <a href=''>Downloads</a> | <a href=';wap2'>Shop</a>n"; echo "</div>n"; echo "n"; echo "<div class='wapmenu'>n"; echo "<a href=''>Blog</a> | <a href=''>Facebook</a>n"; echo "</div>n"; echo "n"; echo "</div>n"; ?>
  10. says

    bro you did a very wonderful work and thanks for teaching me most of the work you guys can equally checkout my wap2 version though i am still working on it to make it more perfect

  11. says

    MY BRO DON YOU ARE THE BEST AND I WISH YOU CAN HELPS AS BEGINNERS. guys for best love discussions, problems and solution join me on my blog @ xtreamloadedblog? or my official forum

  12. says

    Don pls i want to know how to use article to build backlinks after writing the article, is the article suppose to have my website link in it or are they making provision for where to insert your domain name pls i need Explaination

    • says

      This comment is on the wrong post, I guess. It depends on the guidelines the article diretory has. Some allow links in posts and others only let you add it only in the bio.

  13. Denmar says

    My UK based web hosting provider located at offers both SMF and phpBB2. Just wondering which of the 2 is the best and why? Thanks.

  14. says

    don pls i been having problems with my smf wap2 guest cannot view images attached through img unless they are on full version of the site, it sees it as link in wap2

  15. says

    this post has been helping alot of ppl especially me thanks infact i remodify my wap2 template with css and it looked beautiful you can check it at

  16. says

    hello don! I did as u wrote but after editing d index file….am now getting this error whenever i visit ma site ”Parse error: syntax error, unexpected T_BOOLEAN_OR in / home/u289087630/public_html/index.php on line 118” what should i do?

  17. says

    Don please it seems smf group is blocking that mod now i upgraded to the latest version of smf which is 2.0.4 and i cant install the mod again pls any help or if i can manually install it please Don do something

  18. says

    nice post ! I recently wrote a post on how to insert ads after first post in smf wap mod. You can take a look here

  19. says

    i got this error message Parse error: syntax error, unexpected T_ELSEIF in /home/akinlexu/public_html/index.php on line 124 when i performed d operation above. pls help me to provide a solution with it

  20. says

    Pls don help me with the code right under this code if((isset($_SERVER[‘HTTP_ ACCEPT’])&&strpos($_SERVER [‘HTTP_ACCEPT’], ‘application/vnd.wap.xhtml +xml’)!==false)||isset($ _SERVER[‘HTTP_X_OPERAMINI_ PHONE_UA’])) code, I tampered with it and it is giving me serious problem with my forum

  21. NigeriaKitchen says

    Hello Don, pls will the wap2 guide you gave above work for users viewing the forum with a blackberry or samsung phone inbuilt browsers or is it for opera mini users only? If yes, how can I make my forum: become responsive to users viewing with blackberry phone, samsung, etc? Pls I really want my forum to appear as it is when viewed with a desktop to mobile phone users, any help @Don? I really appreciate your effort here, God bless you Don.

  22. Pixels says

    Nice tips, however I would like to get info regarding the SMF theme that was possibly used in Thanks

Share Your Comments & Feedback:

Please do NOT use keywords in the name field because they won't be linked to anything anyway...just use your real name. Let's try to have a personal and meaningful conversation.

Commenting Note(s):
To insert code into comments, use: [php]code in here...[/php]
Some HTML tags allowed: <strong>, <em>, <del>, etc. (Just don't overdo it, please!)