Anyone followed the iphone tutorial and have it working?

Permalink 1 user found helpful
Wondered if anyone had followed thiscand got it working?

Not sure what i am doing wrong but get this error:

Events::extend('on_start', 'ThemeSwitcher', 'checkForIphone', 'libraries/theme_switcher.php');

pixelfish
 
andrew replied on at Permalink Best Answer Reply
andrew
Hah, I believe that's from my tutorial, right?

One thing you'll need to do in addition to this, make sure that you add

define('ENABLE_APPLICATION_EVENTS', true);

to your config/site.php

otherwise the events file will be skipped over.
pixelfish replied on at Permalink Reply
pixelfish
Thanks again Andrew. I will give it another go and see how i get on.
pjbelgrave replied on at Permalink Reply
I'm having the same issue - instead of processing the Events::extend line as code, it's simply showing up at the top of the document. I added the ENABLE_APPLICATION_EVENTS to config/site.php, and added the theme_switcher.php in /libraries.

Any other ideas?

PJ
pjbelgrave replied on at Permalink Reply
I'm having the same issue - instead of processing the Events::extend line as code, it's simply showing up at the top of the document. I added the ENABLE_APPLICATION_EVENTS to config/site.php, and added the theme_switcher.php in /libraries.

Any other ideas?

PJ
pjbelgrave replied on at Permalink Reply
Figured it out. Copying and pasting the code out of that syntax highlighting block leaves out the important less-than question-mark to start a PHP block. I went to Andrew's site and noticed there was one at the top of the class definition. However, in order to get this working, I needed to add one at the top of the Events::extend file as well. I suggest changing the code samples to plain text... PRE is our friend :)

Hope that helps. We'll be doing a lot of work with C5 and mobile, so just let me know what you need help with.

PJ
12345j replied on at Permalink Reply
12345j
Yeah, i figured that out but my site still isn't displaying the c5 theme, displaying a theme called earthling two which is the theme I want to use for computers, i am using an ipod touch for testing don't have any other devices.
edit: nevermind, i had a user agent switcher for my ipod

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.