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!


  1. You are a greate man…. I must confess you are a very good badt guy. I need to save this page.

  2. Oloketuyi Opeyemi Ayodele says:

    I lke dis site is so educative.

    • Agbeyomi Oluwafemi Samuel says:

      Oloketuyi Their is a Website error and There mailing out free iipad two @ go right now before its too late

    • Agbeyomi Oluwafemi Samuel says:

      CHeck out which person saw your facebook page at

  3. 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]

  4. That info is not in my index.php file, for the redirection of Opera mini. What do i do

  5. Can you help me to do this for my smf

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

  7. 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.

  8. 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

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

  9. 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.

    • 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

  10. Thanks ya @don more $$ 4 u

  11. please how do i add DOWNLOAD, GALLERY, BLOG AND FACEBOOK

  12. Don!!! This no work for me ooo.. and i cant upload that mod

  13. Oyedepo John says:

    You’re really a DON. What great tips for SMF mobile users. I’ll implement this in my SMF forum too. Thanks for sharing.

  14. Uwazie Simon says:

    if add this on my forum @ how will it look like when viewed with low end phones?

    • Obasi Miracle says:

      Don please help me remove this silly comment above urgently please

      • Don Caprio says:

        But why?

        • Obasi Miracle says:

          It looks spammy and absolutely needless, when I posted it didn’t really see the need and my theme was totally different from smf default and yours I was using something like Iconcept3 but now I’m fine and wouldn’t need the link up there. thanks don

  15. 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

  16. 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?

  17. john smith says:

    please how can i add facebook link button to my wap2 mod thanks waiting for replies and nice site john smith

    • Don Caprio says:

      You can get the code from facebook developers page, rewrite it in php or use this converter and then include it in ur template

  18. 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?

    • Don Caprio says:

      align your code with div align before converting it to php. Or u can align it directly with php if you’re can.

  19. 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

    • Don Caprio says:

      Be sure u enclose the links in a div tag that’s going to align it to the center before converting to php.

  20. ok bro thnks ill try it

  21. please give me example i mean encolse it for me bro i begg

    • Don Caprio 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"; ?>
  22. thnk you very much bro am gratefulll

  23. All my edit in wirelesstemplate.php does not show i mean links and ads i pratice it [url=][/url]

  24. 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

  25. 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

  26. i seriously hope when i use that code in the comment it will align as your site does cos d previous one was showing at the top and that aint cool.

  27. 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

    • Don Caprio 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.

  28. 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.

    • phpBB too is also good but I’m more used to SMF and it does what I need to get done. It isn’t a bad choice considering the fact its free.

  29. Don pls dont be offended i want to know the name of smf mod for 2.0.2 version that adds profile images or avaters to post

  30. Don pls sorry to disturb you but i want you to explain for me how to enable profile avater/image in wap2 pls

  31. so their is no way you can help me on this one

  32. Joseph Adediji says:

    Great Post Don! an going to try it on my forum soon. BTW, is there any other Wap2 fancy mod?

  33. Weldone. Sorry please, can you just help us to Edit that index file and Upload it here? Please i would be Gr8ful!

  34. 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

  35. samex4rill 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

  36. 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?

  37. Pls don, i couldnt get to see the section where i wil insert that redirecting mobi user code at index.php

    • Good day bro… your article or post helped me…… but i have a problem now… i can’t see my child board……..

      • Don Caprio says:

        I had that same problem when using one of the newer versions of bXk WapMod. I’m using v1.4-2 and it works great.

  38. Am using smf 2.0.3…..can i use v1.4-2 on it? please help!!!!!!!!!!!

  39. its not auto redirecting oh…i carefully did what u wrote up there

  40. Thanks I am working on a forum, this tutorial is extremly usefull!

  41. 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

  42. thanks this really Helpe d

  43. says:

    Guess it gonna take a while to do this. Don’t have any other scripts?

  44. Olili Bob says:

    Nice post boss, my forum view on mobile looks same with the desktop version but am sure going to try this out no matter how long it takes.

  45. Please sir i want to know how this new version is working before i give it a shot. my smf version is 2.0.5 thank you

    • It works but this particular tutorial may not be applicable to it.

      • Please Sir help me with tutorial on how to install for SMF2.0.5. I dont know what to do unless i here from you. It install with errors as discussed here:

  46. pls aw can i change the wap theme, i dnt want the default, red,green,blue colours

  47. Tanks. I appreciate your effort. Also aw can I add recent topics to my wap smf forum site

  48. von COLLINZO 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

  49. 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

    • You shouldn’t get that error if you copied the code right. If you’re trying to do this on a mobile phone, it’s not gonna work.

  50. 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

  51. Nice one!! Kindly post many useful articles like this for smf :)

  52. Please help me with the code now @my above post

  53. 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.

  54. Any update for 2014?

  55. 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!)