Author Topic: All forum admins should look: SMF 2.0 iPhone and iPod Touch Theme (NOW FREE!)  (Read 84469 times)

Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
Guess I will have to wait for the stable and functionally one... :-\

The version I've made with the help of other works very well, and is more stable than the orgiginal.
I use it for my professionnal website, you don't have to worry.

I had to install the mod & theme, make the "index.template.php" edits (actually I kept my last mod) and change the name of the theme from "SMF4iPhone_theme" to "theme" in my server to make it functional.

My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline Dismal Shadow

  • Charter Member
  • SMF Hero
  • *
  • Posts: 2,290
  • Gender: Male
  • I am deaf, so what?
    • The Two Worlds
Well the mod finally work perfect, but the Curve mobile mod override SMF4iPhone.
2. Disable the simpleportal or other portal as it messed with the iPhone theme.
"In The End There Will Be Only Chaos"

"A broken vessel, an empty shell, what is a man without mind, without memory? A ghost? A body in search of a soul? With no compass to guide us, how can we know if our destiny is to seek the good, or obey the demons that whisper in our ears? The blank slate hungers to be written upon. The body thrives when the heart has a mission."


Online Calumks

  • Full Member
  • ***
  • Posts: 444
  • Gender: Male
    • iHackMyi
I will make a stable version. I wil post it soon.
I am using SMF 2.0 RC3

Mods Installed: Override SEF Checks 1.2.6, Regular Groups with Post Count Based Groups 1.1, Bad Behavior mod 1.0.0, Stars And Badges 2.1, Board Sort Methods RC3.o, YouTube BBCode 2.6, Curve mobile mod 1.1.1, Internal_Links_Use_Same_Window 1.2, nCode Image Resizer 1.3, SimplePortal 2.3.2, Order Stickied Topics 1.01, Bookmarks 2.3, Bad Behavior install 1.0.0, Add Favicon.ico Support 1.0, Ultimate Profile 0.9.1.



iHackMyi.com

Offline LC

  • Full Member
  • ***
  • Posts: 498
  • Gender: Female
  • Chaos is the score upon which reality is written.
    • LadyChaos Music
Personally, I think that if the mod is not submitted to SMF for approval and is available though the mod page, don't upload it.

Just saying.

I am sure some of the people here have good intentions, but this is the internet after all.
www.ladychaosdnb.com

Shhhh... I am hunting wraskley wabbits. .

Quote
It's all about the environment and the supporting cast. If you have strong support around you, I feel anyone can flourish.- Anonymous

Online Calumks

  • Full Member
  • ***
  • Posts: 444
  • Gender: Male
    • iHackMyi
We don't submit to SMF as we are not the original creators.
I am using SMF 2.0 RC3

Mods Installed: Override SEF Checks 1.2.6, Regular Groups with Post Count Based Groups 1.1, Bad Behavior mod 1.0.0, Stars And Badges 2.1, Board Sort Methods RC3.o, YouTube BBCode 2.6, Curve mobile mod 1.1.1, Internal_Links_Use_Same_Window 1.2, nCode Image Resizer 1.3, SimplePortal 2.3.2, Order Stickied Topics 1.01, Bookmarks 2.3, Bad Behavior install 1.0.0, Add Favicon.ico Support 1.0, Ultimate Profile 0.9.1.



iHackMyi.com

Offline LC

  • Full Member
  • ***
  • Posts: 498
  • Gender: Female
  • Chaos is the score upon which reality is written.
    • LadyChaos Music
We don't submit to SMF as we are not the original creators.
Understandable. I know you want to improve on it.

I wonder if there is a way to "officially" update the theme for SMF to approve.
www.ladychaosdnb.com

Shhhh... I am hunting wraskley wabbits. .

Quote
It's all about the environment and the supporting cast. If you have strong support around you, I feel anyone can flourish.- Anonymous

Online Fabius85

  • Jr. Member
  • **
  • Posts: 162
We don't submit to SMF as we are not the original creators.
Understandable. I know you want to improve on it.

I wonder if there is a way to "officially" update the theme for SMF to approve.
creating a different theme with the improved code by me and other contributors, giving it another (maybe similar) name and hoping the original author will not complain

ps: when a full and completely stable version of the mod is released i could do that.

Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
Well the mod finally work perfect, but the Curve mobile mod override SMF4iPhone.

That is because Curve Mobile uses the load.php file and we check at index.template.php.  Thins is doe because copying the code is a no no and the people who worked on this mod found a proven script method.

If you edit the "curve-mobile-mod" it will not over-ride this mod. You can edit it as follows.  In Load.php change:
Code: [Select]
$user_agents = array(
array('iPhone', 'iphone'),
array('iPod', 'ipod'),
array('PocketIE', 'iemobile'),
array('Opera Mini', isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])),
array('Opera Mobile', 'Opera Mobi'),
array('Android', 'android'),
array('Symbian', 'symbian'),
array('Symbian S60', 'series60'),
array('Symbian S70', 'series70'),
array('Symbian S80', 'series80'),
array('Symbian S90', 'series90'),
array('BlackBerry', 'blackberry'),
array('BlackBerry Storm', 'blackberry05'),
array('Palm', 'palm'),
array('Web OS', 'webos'),
);
to:
Code: [Select]
$user_agents = array(
array('PocketIE', 'iemobile'),
array('Opera Mini', isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])),
array('Opera Mobile', 'Opera Mobi'),
array('Symbian', 'symbian'),
array('Symbian S60', 'series60'),
array('Symbian S70', 'series70'),
array('Symbian S80', 'series80'),
array('Symbian S90', 'series90'),
array('BlackBerry', 'blackberry'),
array('BlackBerry Storm', 'blackberry05'),
array('Palm', 'palm'),
array('Web OS', 'webos'),
);

:)

I do not think someone is going to make a mod for both themes.  ???
« Last Edit: January 06, 2010, 11:23:26 PM by butchs »
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
I have a few more days left to do some hacking so I gave this another shot.

This time I accessed 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.  Not only will it check just the user agent but it will check domain names that are used for mobile devices.  The web site clams it is more reliable and it is free!!!  :) ???

Install the latest "SMF4iphone" theme before you install this mod.

During installation the attached mod assumes that the "SMF4iphone" theme is installed before it is installed.  The mod searches for the theme and attempts to get the correct theme id and tries to put the correct theme id in the mod settings.

The problem is that I do not have a method to test this mod and see if it works.

It loads cleanly on my test server and seems to work.  But I can only test it for false.

Is there anyone who is interested in testing it?  If it works for one mobile device I am sure it will work for all others.  I hope.   :P
« Last Edit: January 09, 2010, 06:35:22 PM by butchs »
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline Dismal Shadow

  • Charter Member
  • SMF Hero
  • *
  • Posts: 2,290
  • Gender: Male
  • I am deaf, so what?
    • The Two Worlds
Will test it for you on my test site...
"In The End There Will Be Only Chaos"

"A broken vessel, an empty shell, what is a man without mind, without memory? A ghost? A body in search of a soul? With no compass to guide us, how can we know if our destiny is to seek the good, or obey the demons that whisper in our ears? The blank slate hungers to be written upon. The body thrives when the heart has a mission."


Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
Thank you.  :)  :)  :)  I just added a version 2.6 above.  I moved the theme change code form index.template.php to load.php.  This will allow the theme to load faster.  It seems to be a better way.
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline CFCParadox

  • Full Member
  • ***
  • Posts: 461
  • Gender: Male
  • Two Contradictory Truths
    • Combat FPS
Everything seems to be functional for me!

Offline Dismal Shadow

  • Charter Member
  • SMF Hero
  • *
  • Posts: 2,290
  • Gender: Male
  • I am deaf, so what?
    • The Two Worlds
Mod 2.5 works for me but 2.6 didn't, don't know why. BTW the Classic button goes in a loop with the same iPhone theme. I see this when clicking the classic button.

index.php?theme=


"In The End There Will Be Only Chaos"

"A broken vessel, an empty shell, what is a man without mind, without memory? A ghost? A body in search of a soul? With no compass to guide us, how can we know if our destiny is to seek the good, or obey the demons that whisper in our ears? The blank slate hungers to be written upon. The body thrives when the heart has a mission."


Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
index.php?theme=

I believe that is in part to an error in the theme and in part the mod.

In "Surfez Couvert" excellent theme revision.
if you take...
Quote
if (((!empty($_GET['action'])) && ($_GET['action']=='iphone')) || !$_GET){
   $backlink = 'index.php?theme=' . $modSettings['id_theme'];
   $backname = $txt['iClassic'];

and replace it with...
Quote
if (((!empty($_GET['action'])) && ($_GET['action']=='iphone')) || !$_GET){
   $backlink = 'index.php?theme=1;';
   $backname = $txt['iClassic'];

Replace the "1" with your actual default theme ID.

In the mod.
I added a session so that the the iphone theme will only be loaded once while your browser is running.  The session variable is temporary and will be reset when you quit the browser.  See attached version 2.5.1.   Please test it.

Does it work with the theme changes?

I will like to note to anyone else who wishes to edit this.  If you run the following in php the session will be destroyed:
unset($_SESSION['smf4iphone']);

Furthermore this mod looks at all mobile devices so if you have another mod installed this will end up being your default.  I believe this is the most accurate mobile detection to date.  I am sure someone else will do better later.

Finally, the mod settings can be changed so this mod can be used with other themes by simply changing the theme ID.
« Last Edit: January 10, 2010, 02:10:53 PM by butchs »
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
If that works I will add a default theme id to the mod settings that can be used in the theme.
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline Dismal Shadow

  • Charter Member
  • SMF Hero
  • *
  • Posts: 2,290
  • Gender: Male
  • I am deaf, so what?
    • The Two Worlds
It works, but instead of you putting what default theme it will be, let us choose which should be default like the one in the iPhone setting "Enter the theme ID for default (usually 1 or 2):"

And BTW I did this:
..
Quote
if (((!empty($_GET['action'])) && ($_GET['action']=='iphone')) || !$_GET){
   $backlink = 'index.php?theme=' . $modSettings['id_theme'];
   $backname = $txt['iClassic'];

and replace it with...
Quote
if (((!empty($_GET['action'])) && ($_GET['action']=='iphone')) || !$_GET){
   $backlink = 'index.php?theme=1' .$modSettings['id_theme'];
   $backname = $txt['iClassic'];

Replace the "1" with your actual default theme ID.


Notice I didn't remove the
.$modSettings['id_theme'];
« Last Edit: January 10, 2010, 12:29:00 PM by Dismal Shadow »
"In The End There Will Be Only Chaos"

"A broken vessel, an empty shell, what is a man without mind, without memory? A ghost? A body in search of a soul? With no compass to guide us, how can we know if our destiny is to seek the good, or obey the demons that whisper in our ears? The blank slate hungers to be written upon. The body thrives when the heart has a mission."


Offline Dismal Shadow

  • Charter Member
  • SMF Hero
  • *
  • Posts: 2,290
  • Gender: Male
  • I am deaf, so what?
    • The Two Worlds
The picture says: No access?
"In The End There Will Be Only Chaos"

"A broken vessel, an empty shell, what is a man without mind, without memory? A ghost? A body in search of a soul? With no compass to guide us, how can we know if our destiny is to seek the good, or obey the demons that whisper in our ears? The blank slate hungers to be written upon. The body thrives when the heart has a mission."


Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
Ok, I knew what you wanted and have been on top of it all along.  I am reaching my limit of my expertise with this one.  Probably drove right by the bus stop.   :o  But here is what I tried to do with the attached:
1.  Added a default theme ID into the mod.  This is where the mod transfers to when you hit classic.
2.  Adjusted the iphonetheme to go to the default ID based on modsettings.
3.  Added 2 other filtered themes to the mod.
4.  Added a failsafe theme to the mod.  This where the mobile device goes when no other devices are filtered.  It can be changed to any other theme or smf built in mobile theme theme.

Read the notes at the bottom of the mod settings CAREFULLY.  One error and it will not work!!!!

Hopefully this does the trick, my brain is burnt?   O:)
« Last Edit: January 14, 2010, 07:56:40 PM by butchs »
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
The picture says: No access?

I was trying to fix the theme and it did not work so I deleted the post.  The post is back above this post.
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.

Offline butchs

  • Full Member
  • ***
  • Posts: 457
  • SPAM free for over 8 months!
    • EastCoastRollingThunder
I just installed the mod  on my server.  [nofollow] www.eastcoastrollingthunder.com/smf/index.php [nofollow]

It seems to work well for me with no crashes.  But I can not test it with a mobile device.
My mods
My mod supporters can get my personal SMF 2 RC3 Firewall.  PM me for info.