Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2011-06-10 14:24:53

hudsong
New Member
Registered: 2011-05-20
Posts: 5

Re: TXP Mobile

This is an amazing thing! I’m about to go on a three week trip with only my HTC phone and I had no clue how I’d keep my site updated. Thanks!

Last edited by hudsong (2011-06-10 20:10:12)

Offline

#62 2011-06-17 05:12:08

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: TXP Mobile

Funny story — I’ll try (and probably fail) to keep it brief:

I was out and about a few nights ago, with only mobile access to the web, and thinking about updating my new txp weblog. I logged in with my mobile browser, but didn’t like the look of the regular theme — too much zooming in and out, dragging my finger around. You know the drill. Then I remembered that I’d heard about the TXP Mobile Admin theme. A quick search led me to txpmobile.com — but since I was using a mobile browser, no option to download.

Luckily I have an ssh client for iPhone, so I logged in to my remote server and used the lynx browser from the command line to navigate the site and download the tarball, but I didn’t quite manage to get it working.

I had failed to notice that due to a quirk of the text-only browser, and the fact that I wasn’t using a full keyboard for input, the tarball I downloaded was actually txpmobile 0.3 rather than the latest version.

Later, sitting in front of my laptop, I took another look at the source and managed to figure out how to fix it. Using vimdiff, I merged the index.php file from txpmobile-3.0 with the one from textpattern-4.4.0. This led to authentication errors with the new Portable PHP password hashing framework used in Textpattern 4.4.0, which I solved by:

  • Copying textpattern/include/txp_auth.php over the version in textpattern/txpmobile/include
  • Copying textpattern/lib/constants.php over the version in textpattern/txpmobile/lib
  • Copying the new file textpattern/lib/PasswordHash.php into textpattern/txpmobile/lib/

I returned to the forums, eager to sign up and post about my experience. Only then did I finally read the entire TXP Mobile topic thread and realize that I had downloaded, installed, debugged and patched the wrong version of TXP Mobile!

I just spent five minutes trying to replace my forked version of txpmobile-0.3 with the latest txpmobile-0.4.1, but decided that I’d already used up my daily quota of brain cells working on the other thing.

If you have any possible use for a TXP Mobile tarball based on version 0.3, but patched to support phpass(), I can make such a thing available: txpmobile-0.3.14


Well’s all that ends.

Offline

#63 2011-06-17 05:40:56

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: TXP Mobile

Anyway to use TXPMobile along with a different theme for Non-Mobile use?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#64 2011-06-17 07:46:48

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: TXP Mobile

@MattD:

Yes, that’s exactly what it does. Textpattern Mobile uses the PHP mobile_device_detect(); function (downloadable free of charge for non-commercial use here) to determine whether to display the mobile theme or whatever default admin theme you have specified (i.e., “Classic” or “Remora”) when you are not browsing from a mobile platform.

If you’re just getting into mobile web development, I highly recommend using one of the many Mozilla Firefox extensions (UA Control, User Agent Switcher, Modify Headers, Header Tool, Proxy Tool, etc.) to spoof the User-Agent string of a mobile browser from your desktop. This will allow you to “trick” your server into delivering the mobile admin theme to your desktop browser, so that you can leverage desktop tools for (X)HTML/CSS analysis and debugging which are normally unavailable with mobile browsers. (The Firebug extension for Mozilla Firefox and Google Chrome/Chromium springs to mind, though there are many others.)


Well’s all that ends.

Offline

#65 2011-06-17 09:16:30

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: TXP Mobile

I know what it does but how do you specify the “default theme” ?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#66 2011-06-17 23:15:20

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: TXP Mobile

@MattD:

Regardless of whether or not you have installed the TXP Mobile theme, the default Textpattern admin theme is selected under Admin -> Preferences -> Advanced -> Admin -> Admin-side theme. There, you’ll find a drop-down list of all the admin-side themes you have installed (out of the box, this will contain the “Classic” and “Remora” themes.)

After you have successfully installed the TXP Mobile theme, you should find a new txpmobile section under Admin -> Preferences -> Advanced if you scroll all the way down to the bottom of the page. This should contain a single entry for txpmobile_theme set to the default value of txpmobile.

At least, that’s been my experience — though I hasten to add that I have only used the TXP Mobile v0.3 branch so far. I suspect that v0.4.1 is set up in much the same way, but I’d have to install it to be sure.


Well’s all that ends.

Offline

#67 2011-06-17 23:38:31

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: TXP Mobile

I’m not sure we are on the same page. I’m hoping there is a way to make my non-mobile admin theme be something other than Classic or Remora such as Hive


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#68 2011-06-18 08:17:15

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

Re: TXP Mobile

MattD wrote:

I’m not sure we are on the same page. I’m hoping there is a way to make my non-mobile admin theme be something other than Classic or Remora such as Hive

v0.4 works as a theme, v0.3 is completely different.
If you look at the txpmobile.php file there is the if mobile statement to the top, which starts the mobile theme template, then there is an android statement followed by theme for android, and at the bottom is the remora theme code. You could swap the remora code part for any other template. And make sure you transfer all the images and CSS structure to the txpmobile folder.

Hope that helps.

Offline

#69 2011-06-20 00:01:21

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: TXP Mobile

@MattD:

We weren’t on the same page. Apparently, I was off on some page of my own. Luckily, oliverker understood your question and was able to answer it in a helpful manner.

You’ve already written a bunch of plugins, and I’m comparatively a Textpattern newbie, so I couldn’t really understand what you were asking.

If I had, maybe I would have realized that I didn’t know the answer.

In a nutshell, my reply was ignorant, incorrect and condescending. Please accept my apologies.

I’ll be lurking for a while and familiarizing myself with the Textpattern PHP code and database internals before I try to answer any more questions!

[Edit: As the next several posts will show, I failed in my attempt at “lurking” — but I’m doing my best to stick to asking the questions!]

Last edited by hotwebmatter (2011-06-26 22:46:38)


Well’s all that ends.

Offline

#70 2011-06-20 01:31:12

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: TXP Mobile

No worries! Stick with it. Thanks for trying.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#71 2011-06-20 06:38:35

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: TXP Mobile

Two quick things:

  1. The Hive admin theme is freakin’ gorgeous. I installed it with no problems. It’s even close to usable on my iPhone 3GS, though not as perfectly optimized as TXP Mobile. Tanks for the tip, MattD!
  2. I had TXP Mobile v0.1.4 working for a while with fallback to the Remora admin theme, but then in a fit of hubris, I tried to follow Oliver’s advice above and ended up in this situation … ugh. Moving the themes/txpmobile file to themes/txpmobile-disabled cleared up all the errors and left me with the Hive theme for desktop and mobile, but that is not ideal. Having come so close to perfection, I now want them both to work together!

If anybody figures out how to patch the txpmobile.php file to “swap the remora code part for any other template [a]nd […] transfer all the images and CSS structure to the txpmobile folder” please post your solution here. I’m subscribed to the topic, and eagerly awaiting some insight.


Well’s all that ends.

Offline

#72 2011-06-22 03:33:56

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: TXP Mobile

I’m back! I figured out that the worst of my errors were not the fault of any theme or plugin, but rather leftovers from my recent Textpattern 4.4.1 upgrade — I had copied the new files into the existing Textpattern 4.4.0 installation, but diagnostics were still warning that files had been changed. I solved this by following the instructions more carefully after a mysql db restore.

After this fresh start, I decided to give TXP Mobile 0.4.1 another whirl, this time by a different route: I installed Stef Dawson’s smd_admin_themes plugin and used that to re-install the mobile theme from the source tarball.

In order to get everything exactly as I wanted it, I had to go into the smd_admin_themes “Preferences “ menu and set the theme system to “One theme per user.” Then, I created separate accounts for the desktop user (“Hive” theme) and mobile user (“TXP Mobile” theme). Additionally, I restricted the mobile user to “Managing Editor” since a lot of the “Publisher” features are not completely implemented yet in this theme.

I’m still getting some errors of this type:

Warning: Cannot modify header information - headers already sent by (output started at /home/userid/public_html/textpattern/theme/txpmobile/txpmobile.php:165) in /home/userid/public_html/textpattern/lib/txplib_head.php on line 50

… but they no longer prevent me from working on the site with an appropriate admin theme from my laptop and smartphone.

Jubilantly yours,
Hot Web Matter


Well’s all that ends.

Offline

Board footer

Powered by FluxBB