Build iPhone Compatible Drupal Websites Using iWebkit: Part 3 - final release of iWebkit theme
on
November 2, 2009
Build iPhone Compatible Drupal Websites Using iWebkit: Part 3 - final release of iWebkit theme
Finally iWebkit theme for drupal-iPhone websites is production ready. Theme now includes Drupal form theming and 12 different subthemes to suit your color preferences.
From Now on this theme will be maintained on drupal.org as iWebkit project.
Features added since last release are:
- Form elements are now themed. All form elements now looks like default iphone forms. This means there is no need to add custom user-login, comments or node add forms for your iphone website, you can directly use drupal default forms and they will be automatically converted into iPhone style form elements.
-
Select list and Checkboxes look like-
-
Radio buttons and Text-area look like-
The code behind this magic is included in template.php where individual field's theme function is overridden as
-
Select list and Checkboxes look like-
- 12 different subthemes + 1 default theme are now included in iWebkit project. To give you more control the theme settings (at 'admin/build/themes/settings/iwebkit') provide a UI to switch between different subthemes. Each subtheme consists of its own style.css along with custom colored image files.
UI to switch subthemes
<?php
function iwebkit_button($element) {
// Make sure not to overwrite classes.
if (isset($element['#attributes']['class'])) {
$element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '. $element['#attributes']['class'];
}
else {
$element['#attributes']['class'] = 'form-'. $element['#button_type'];
}
return '<ul class="pageitem"><li class="form menu"><input type="submit" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'id="'. $element['#id'] .'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." /></li></ul>\n";
}
?>Other posts in this series of iPhone-drupal blogs:
- Build iPhone Compatible Drupal Websites Using iWebkit: Part 1
- Build iPhone Compatible Drupal Websites Using iWebkit: Part 2
- iDrupal: Manage Your Drupal Website From iPhone
| Attachment | Size |
|---|---|
| iwebkit.zip_.txt | 1008.36 KB |













You have made a demo website,
but do you have a download link for that website.
It would be nice to have a website with a usersystem
dreceon
diederik.1@live.nl
please help