Text Size

Tabs Eleven - Inside the Files


 Index Router Code Sample

index.php :: The Action Router
This file takes the request from the iPhone and figures out which of your files to load based on the route variable.

Lines 32-65 of index.php sets up some basic variables. Adjust these if need be for your own needs.

Lines 40-60 are the file names that match the tab calls from the mobile device. You can change these if you like. For example you might change tabseleven_tab1.php to tabseleven_tab1.html.

 
 Index Code View 2Lines 68-83 create the document head, css include and body tags for all eleven tab inserts. They are included after this point. The css file however has provisions for separate styles per tab.Whatever the codebase you prefer to build your mini app or widget in the end result need be HTML as that is what is rendered in the UITabView on the mobile device.
 Index Code Sample 3

Lines 58 -128 are the actual router include actions. There should be no need to adjust anything there.

 
 Index Code Sample 4

Lines 158-185 are fail overs that would only occur if the index.php page was called with no unlock variable and or with no route tab number variable. If this occurs then this id default HTML. We embedded this in PHP so you could developer smarter and more interactive feedback.

Lines 186-188 close out the HTML tags.

  
  

If you have any questions, need further information or just have a suggestion please post or forums.

Now go have some fun!

 

Site Login