News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF4iPhone Mod

Started by Fabius85, May 14, 2010, 01:58:13 AM

Previous topic - Next topic

Fabius85

Quote from: pingpongrob on June 17, 2010, 09:08:28 AM
Its really strange, I wasnt logged in (just Guest), and the standard view was present. Once I logged in the iPhone Theme worked.
but it should load the iphone theme even if you are not logged in ???

pingpongrob

#41
I believe you are correct, but for some strange reason the Normal web view was present until I logged in.  Their is also a classic button, that take me back to the normal view.

Just as a matter of interest, how do you get the main logo to sit correctly, and what size should it be for the Portrait iPhone view.

Fabius85

Quote from: pingpongrob on June 18, 2010, 09:07:18 PM
Just as a matter of interest, how do you get the main logo to sit correctly, and what size should it be for the Portrait iPhone view.
size of the image depends on what effect you prefer to have on your logo. by the way you can manage with it in the style.css file, if you search for:
Quote#logo{

   height: 78px;
   margin-bottom: 8px;
   margin-left: 9px;
   margin-right: 9px;
   margin-top: 14px;
   background: url(images/logo.jpg) 0px -30px no-repeat;
   border: 1px solid #aaa;
   -webkit-border-radius: 8px;
   clear: both;
   overflow: hidden;
   z-index: 0;

}

#logocover{

   height: 211px;
   background: url(images/logocover.png) right repeat-y;
   -webkit-border-radius: 10px;
   margin-right: -1px;
   margin-top: -2px;
   z-index: 1;
}
there you can change the properties of the logo positioning and effects.

ABMoto

Damn forum, keeps timing out so I have to write this all over again!

...Mad props for this theme/mod!  I have, however, come across a few bugs.

1.  After initial installation and logging in, the links on the bottom don't bring me anywhere.  I had to manually update the  a href='#' in the index.template.php file to make them work.

2.  The search page doesn't work (i go to the page but the search field doesn't appear, it's just a blank page).  albertamoto[dot]com/search/ works in a browser but not on a smartphone using this theme

3.  Video is wonky.  If you try to view a video you posted, it'll try to edit the post instead.  Logging out and attempting to view the video, however, will work.

Thanks again for the great mod/theme.  I'm coping this before I submit this time!

Fabius85

Quote from: ABMoto on June 28, 2010, 10:43:13 PM
Damn forum, keeps timing out so I have to write this all over again!

...Mad props for this theme/mod!  I have, however, come across a few bugs.

1.  After initial installation and logging in, the links on the bottom don't bring me anywhere.  I had to manually update the  a href='#' in the index.template.php file to make them work.

2.  The search page doesn't work (i go to the page but the search field doesn't appear, it's just a blank page).  albertamoto[dot]com/search/ works in a browser but not on a smartphone using this theme

3.  Video is wonky.  If you try to view a video you posted, it'll try to edit the post instead.  Logging out and attempting to view the video, however, will work.

Thanks again for the great mod/theme.  I'm coping this before I submit this time!
1 and 2. i really dont have any matters (and no one yet reported any problem with buttons at the bottom, or search page).
3. you have to disable quoting (button on the top of every topic page) to be able to "tap" anywhere without opening "reply with quoting" page.

ABMoto

Thanks for the quick response Fabius.  Ran across another issue as well with another website t2iforum[dot].com

1.  The 'Boards' - 'Latest Posts' at the top of the smf4iphone theme are not there (they're there on my other site).  I looked at the code and they should be triggered on if($settings['number_recent_posts'] > 1).  I tried changing the 1 to a 0 and then emptying the file cache on the site then clearing the cache and cookies on my android phone and then it didn't even pick up the smf4iphone theme when I loaded it up.  I reset it to 1 then cleared the cache from the website and phone and the cookies from my android phone and it loaded the theme but again without the 'Boards' and 'Latest Posts' buttons.

Fabius85

Quote from: ABMoto on June 29, 2010, 11:07:16 AM
Thanks for the quick response Fabius.  Ran across another issue as well with another website t2iforum[dot].com

1.  The 'Boards' - 'Latest Posts' at the top of the smf4iphone theme are not there (they're there on my other site).  I looked at the code and they should be triggered on if($settings['number_recent_posts'] > 1).  I tried changing the 1 to a 0 and then emptying the file cache on the site then clearing the cache and cookies on my android phone and then it didn't even pick up the smf4iphone theme when I loaded it up.  I reset it to 1 then cleared the cache from the website and phone and the cookies from my android phone and it loaded the theme but again without the 'Boards' and 'Latest Posts' buttons.
the tabs appears if you enabled recent posts showing in the theme settings. recent posts to be displayed must be at least 1 to make that tab appear

ABMoto

#47
Don't think that's it as I have recent posts enabled and set to 5 on both of my sites (see screenshots).

Also, how does the recent post logic work and how could I increase the number of recent posts that it shows (ex.  for the site where it works, it's set to 5 recent posts but the smf4iphone theme only shows 3)?

Fabius85

Quote from: ABMoto on June 30, 2010, 11:02:46 AM
Don't think that's it as I have recent posts enabled and set to 5 on both of my sites (see screenshots).

Also, how does the recent post logic work and how could I increase the number of recent posts that it shows (ex.  for the site where it works, it's set to 5 recent posts but the smf4iphone theme only shows 3)?
did you set it both on default smf default theme and iphone theme?

ABMoto

#49
You're the man!  That was it!  Thanks you so much.  Now the Latest Posts are showing for the t2iforum smartphone site!

At the risk of being that annoying guy one more time, I have one last issue.

When clicking on 'Latest Posts' in t2iforum[dot]com through the smf4iphone theme, the content headers appear on top of the recent posts (see 02.jpg attachment - ex. Introductions, T2i / 550D General Discussion, T2i / 550D Video-Specific Discussion, ...etc...) instead of just the recent posts appearing (this is working correctly on my other site albertamoto[dot]com).  The only difference between the two forums is that the one working (albertamoto[dot]com) is using child boards and this one isn't.  I think I've narrowed down the issue to the following code in iphone.js:

Quote
function iswitch(id){

   if(id=='switcher'){
      document.getElementById(id).id = 'switcheralt';
     
      var x= document.getElementsByTagName('ul');
     
      for(var i = 0;i<x.length;i++){
         
         if(x.id=='contentrecent')
            x.style.display='block';
         if(x.id=='contentboards')
            x.style.display='none';
            }
      document.getElementById('childbuttondiv').style.display='none';
           
      var x= document.getElementsByTagName('h2');
     
      for(var i = 0;i<x.length;i++){
         
         if(x.id=='contentrecenth2')
            x.style.display='block';
         if(x.id=='contentboardsh2')
            x.style.display='none';

            }
     
   }else{
   
      document.getElementById(id).id = 'switcher';
     
      var x= document.getElementsByTagName('ul');
     
      for(var i = 0;i<x.length;i++){
         
         if(x.id=='contentrecent')
            x.style.display='none';
         if(x.id=='contentboards')
            x.style.display='block';
            }
      document.getElementById('childbuttondiv').style.display='block';
           
      var x= document.getElementsByTagName('h2');
     
      for(var i = 0;i<x.length;i++){
         
         if(x.id=='contentrecenth2')
            x.style.display='none';
         if(x.id=='contentboardsh2')
            x.style.display='block';

            }
   
      }
   

}

Any suggestions on what this might be?

Leemy

Fabius,

I installed the theme, which loads properly. I installed the mod and directed mobile user agents to the theme (#35).  But when i visit from my iphone, it still shows the normal site. Can you advise? The site is bhangrateams forum.com (without the space) Thanks!

ABMoto

Leemy,

I tried accessing your site with my Nexus One and didn't get the smf4iphone theme.

Have you tried the following:

1.  Go to Admin -> Configuration -> Themes and Layouts -> Manage and Install
     Then make sure that 'Allow members to select their own themes.' is checked and that the smf4iphone theme is checked
     (see attached manage_install_themes.jpg)

2.  Go to Admin -> Maintenance -> Forum Maintenance
     Then scroll down to the 'Empty the file cache' section and click 'Run task now'
     (see attached empty_file_cache.jpg)
     The clear the cache and cookies on your smartphone and try reloading the page

Leemy

ABMoto,

I had already set the option in #1 but had not emptied the cache. I have emptied the cache and it now auto-selects. Thanks!

Fabius85

there's a little bug which i'm gonna fix in the next release of the theme.
to fix it yourself you should open BoardIndex.template.php in SMF4iPhone Theme folder and search for:
if ($children) echo '

<div class="child buttons" id="childbuttondiv">

<button id="childboardbutton" onclick="childBoards();">Show ', $txt['parent_boards'], '</button>

</div>

';


then replace it with:
if ($children) echo '

<div class="child buttons" id="childbuttondiv">

<button id="childboardbutton" onclick="childBoards();">Show ', $txt['parent_boards'], '</button>

</div>

';

else echo '

<div class="child buttons" id="childbuttondiv"></div>

';


that should fix you matter

butchs

Ok I have to say this but shouldn't this stuff be with the theme not the mod?
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

~DS~

Quote from: butchs on July 01, 2010, 10:02:06 PM
Ok I have to say this but shouldn't this stuff be with the theme not the mod?
Are you quoting me? If so I dont know what you mean...
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

butchs

Quoting no one in particular but this is a mod thread.  I thought there was a thread for the theme?  I would assume it could get confusing to readers?
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

~DS~

Quote from: butchs on July 01, 2010, 10:27:29 PM
Quoting no one in particular but this is a mod thread.  I thought there was a thread for the theme?  I would assume it could get confusing to readers?
I am quite confusing as well...I will post it in the theme thread...
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Sledgie

If you click the "Classic" button and go to the forum theme, how do you get back to the iPhone theme?

Fabius85

Quote from: Sledgie on July 02, 2010, 05:41:41 PM
If you click the "Classic" button and go to the forum theme, how do you get back to the iPhone theme?
in the readme it is explained how to add a link to your other themes to get back to iphone theme

Advertisement: