Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2010-07-21 20:08:12

kritoke
Member
From: Florida
Registered: 2010-07-19
Posts: 26

Re: TXP Mobile

You have the same errors I had, this is what I did in the index.php in textpattern dir:

change define("txpath", dirname(__FILE__).'/textpattern'); to define("txpath", dirname(__FILE__));

Remove all blank lines before each “cannot modify….” error, the : after the file location is the line that you have to look at to modify.

Last edited by kritoke (2010-07-21 20:09:23)

Offline

#14 2010-07-21 22:13:16

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: TXP Mobile

Oliver, great work on the plugin so far! Easy to implement except the teething problems already notied.

I’ve removed the problem regarding the huge amount of errors on first run, but I’m getting a “Cannot modify headers” error on line 201 (on desktop) and 43 on (iPod)…

any ideas?

@mrqwest

Offline

#15 2010-07-21 22:18:28

kritoke
Member
From: Florida
Registered: 2010-07-19
Posts: 26

Re: TXP Mobile

The cannot modify headers is an issue with the blank lines before each line and it is actually line number 7 (it is really pointing to what has the colon from it). So you need to remove the spaces before <?php if($mobile==true): ?> and you probably will see other errors after that and you just keep going to the line before the one noted after the colon.

Offline

#16 2010-07-21 23:02:10

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

Re: TXP Mobile

Hi All, Just had a look at it and can’t spot anything here, I’ve got it running on 3 different sites now all showing no errors..
So its hard for me to replicate anything you have going on.

I’ve just uploaded v.02 see if that makes any difference? (remember to change the server root in textpattern/index.php file

Offline

#17 2010-07-21 23:04:10

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

Re: TXP Mobile

kritoke wrote:

Completely fixed it. I removed all the extra spaces between the <? commands and that define thing I mentioned earlier and it all works fine now.

Great just published v0.2 with no spaces.

One feature request, though I think it will be hard to get it to work is to be able to remove an article

I could turn on the tick boxes to delete from the article list view with delete drop down below (it just looks prettier without ; ) – I’ll look into a solution

Offline

#18 2010-07-22 01:17:29

kritoke
Member
From: Florida
Registered: 2010-07-19
Posts: 26

Re: TXP Mobile

It does look prettier without it, especially when comparing it to the sections that have the delete. Too bad there wasn’t some way to add a persistent preference of some sort that could tell it to enable it if you want to or not. With the spaces causing issues, I wonder if it is a matter of the php version being run and/or specific settings setup on the system. I am running PHP Version 5.2.13 on my server with the issue and LiteSpeed V5.3 for the web server. On my WAMP box without the issue, it is running PHP Version 5.3.0 with Apache version 2.2.11.

Last edited by kritoke (2010-07-22 01:20:35)

Offline

#19 2010-07-22 05:09:05

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: TXP Mobile

Thanks Oliver & Kritoke. Just uploaded v2 & it’s cleared the error messages for me :) Looking forward to testing this later today!

Offline

#20 2010-07-22 21:14:59

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,528
GitHub Twitter

Re: TXP Mobile

@Oliver

Pretty cool! Love it! Works fine (with some changes for my server). Keep your amazing work!

Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#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,528
GitHub Twitter

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.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

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

Board footer

Powered by FluxBB