Textpattern Forum

You are not logged in. Register | Login | Help

#21 2010-07-22 21:30:39

oliverker
Plugin Author
From: Huddersfield
Registered: 2008-07-14
Posts: 90
Website

Re: TXP Mobile

Thanks Patrick,
Were the alterations anything that others may benefit or be included in later versions?

Offline

#22 2010-07-23 16:03:15

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,018
Website

Re: TXP Mobile

Sure.

First, I changed “new” /textpattern/index.php file (line #27):

define("txpath", $_SERVER['DOCUMENT_ROOT'].'/root/txpmobile');

Second, cause I love Robert’s remora theme, I changed some instance of the theme:

file /textpattern/lib/txplib_theme.php (line #98):

set_pref('theme_name', 'remora');

file /textpattern/txpmobile/lib/txplib_theme.php

83.   $name = pluggable_ui('admin_side', 'theme_name', get_pref('theme_name', 'txpmobile'));
(...)
98.   set_pref('theme_name', 'txpmobile');

So, when I log in with my browser computer after I loged with my iTouch/iPhone or iPad I recover remora theme after the theme instance error message “Theme fails to load properly from file. The default theme will be used as a fall-back. Please, refresh your page…”

Best regards,


Patrick.
Txp Tricks & Tips by french users : http://txp-fr.net | G+
Alison: a CSS Grid tool for all browsers

Offline

#23 2010-07-23 21:16:06

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: TXP Mobile

Pretty freaking awesome, I’m running it on my iPhone and it works great!

One thing I did that you might want to consider. I modified the /textpattern/index.php a bit more.

Download mobile_detect.php

if (!defined(‘txpath’)) { //detect whether a mobile browser or not require(dirname(FILE).’/include/mobile_detect.php’);

if ($mobile_detect == TRUE) { //is mobile, so load TXP Mobile define(“txpath”, ‘/home/wremote/www/txpmobile’); } else { // load normally define(“txpath”, dirname(FILE)); } }

index_change.txt

Then it will load the correct directory if your on your desktop or on the mobile device.

Last edited by ecklesroad (2010-07-23 21:17:34)

Offline

#24 2010-07-23 21:27:32

oliverker
Plugin Author
From: Huddersfield
Registered: 2008-07-14
Posts: 90
Website

Re: TXP Mobile

ecklesroad wrote:

Then it will load the correct directory if your on your desktop or on the mobile device.

Thanks,

It already does load the desktop admin if you are on desktop ; )

search half way down the index page is the else statement. I also noticed the query was far too long than it need to be and have implemented your shorter version in v0.3

Cheers – Glad you like it.

Offline

#25 2010-07-23 22:46:48

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: TXP Mobile

It didn’t for me initially, that’s why I did that. I’ll check the source when I get back to my desk

Offline

#26 2010-07-24 00:34:41

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: TXP Mobile

ah, I see it. Ya, in your 0.3 I’d do the include with the true false check. other than that, it effing rules!

Offline

#27 2010-07-31 13:15:37

babyben
Member
Registered: 2007-06-03
Posts: 39

Re: TXP Mobile

Finally got a chance to try this today, really really impressed.

The design and interface are lovely, will be a pleasure to use on the move!

Offline

#28 2010-08-06 20:56:56

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: TXP Mobile

Just installed v0.3b. It looks great (iPhone 3G) and appears to work just as advertised. Hope to make good use of this when away from home.


TextPattern user since 04/04/04

Offline

#29 2010-08-25 11:22:31

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,185
Website

Re: TXP Mobile

Any plans to get this working with a multi-site install? I just tested TXP Mobile for the first time by placing the txpmobile folder into the /textpattern folder and get the following error message:

Theme *txpmobile* (txp_mobile_theme) fails to load properly from file /users/home/me/web/textpattern/textpattern/theme/txpmobile/txpmobile.php. The Classic theme will be used as a fall-back.

Its just a blank screen with that message.


TXP Tips | @txptips | Me | @jonathanstubbs | Github

TXP Builders – finely-crafted code, design and txp @txpbuilders

Offline

#30 2010-08-25 11:33:23

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 191
Website

Re: TXP Mobile

jstubbs wrote:

Any plans to get this working with a multi-site install? I just tested TXP Mobile for the first time by placing the txpmobile folder into the /textpattern folder and get the following error message:

Theme *txpmobile* (txp_mobile_theme) fails to load properly from file /users/home/me/web/textpattern/textpattern/theme/txpmobile/txpmobile.php. The Classic theme will be used as a fall-back.

Its just a blank screen with that message.

Suspect this is a result of Textpattern’s multi-site setup not using the textpattern directory for admin? I suspect that this has gotten hard-coded somewhere. Needs investigating…

Offline

Board footer

Powered by FluxBB