Textpattern Forum

You are not logged in. Register | Login | Help

#81 2011-06-25 20:50:25

Gocom
Developer
Registered: 2006-07-14
Posts: 4,476
Website

Re: TXP Mobile

oliverker wrote:

I’ve managed to put it up on github for those interested

Nice. You probably should remove your system files (Finder’s temporary cache) from there ;-)

As your last commit goes, you could (or, well, should) leave the version number in, just set it as a string. It’s one of the standard manifest items, and can be used to tell the user if the theme is up-to-date. You can also remove the global lines from the manifest() and did leave the last $prefs call there.

If you want to use preference strings, you can. Just remember that every non-core preference string should be prefixed, same goes for global scope functions, where it be JavaScript or PHP. In commands.js could be prefixing functions init and hideURLbar, both being relative common names to avoid interfering with other scripts, core and plugins.

Last edited by Gocom (2011-06-25 21:18:24)


Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />

Offline

#82 2011-06-26 22:38:52

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

Re: TXP Mobile

@Oliver Ker:

Thanks for putting txpmobile in a git repository. If I change anything en route to getting my little mess sorted, I may even try to commit my changes back upstream — subject to your review, of course. :-D

I set up a new DNS A record and corresponding Apache2 <VirtualHost> entry for testing.hotwebmatter.com and created a new MySQL db for the back end, then installed Textpattern 4.4.1 successfully. All diagnostics passed — I can paste ‘em if you’d like.

This is a brand-new, virgin-clean install with no plugins of any sort — as a matter of fact, it doesn’t even have any articles yet.

Then I used git clone to pull txpmobile into a staging directory, and cp -R to copy the txpmobile theme into DocumentRoot/textpattern/theme/. I logged in as Publisher and set the default admin theme to txpmobile. As soon as I logged out, I was greeted with the now-familiar errors:

Warning: Cannot modify header information - headers already sent by (output started at /home/userid/testing.hotwebmatter.com/textpattern/theme/txpmobile/txpmobile.php:163) in /home/userid/testing.hotwebmatter.com/textpattern/include/txp_auth.php on line 214 Warning: Cannot modify header information - headers already sent by (output started at /home/userid/testing.hotwebmatter.com/textpattern/theme/txpmobile/txpmobile.php:163) in /home/userid/testing.hotwebmatter.com/textpattern/include/txp_auth.php on line 215 Warning: Cannot modify header information - headers already sent by (output started at /home/userid/testing.hotwebmatter.com/textpattern/theme/txpmobile/txpmobile.php:163) in /home/userid/testing.hotwebmatter.com/textpattern/lib/txplib_head.php on line 50 

… underneath which the standard Textpattern login screen displays “Invalid cookie. Please enter login details.”

As above, the same user logs in without error from my iPhone 3GS and sees your beautiful, gleaming TXP Mobile theme.

Line 163 in txpmobile.php is the beginning of the <?php block immediately following <?php else: ?>, so it appears that the problem only occurs upon fallback to txpmobile’s built-in copy of the “Remora” theme.

As before, I am able to reset the cookie by using mv to temporarily rename the txpmobile theme directory to something else (e.g., txpmobile-d, where the “d” is short for “disabled”). Upon reloading, I receive the following error:

cannot_instantiate_theme: txpmobile, txpmobile_theme, /home/userid/testing.hotwebmatter.com/textpattern/theme/txpmobile/txpmobile.php 

… but then after reversing the mv operation, I can log in from a non-mobile browser. (The admin-side theme reverts to “Classic” but can be set to “Remora” without error.)

I guess I should test this from some other browsers or other OS platforms. The latest test was with Firefox 5.0 on Fedora 15.

Let me know if you can duplicate the bug, or if there’s any additional information I could share that might help you.

Meanwhile, I may regretfully take a break from TXP Mobile for a little while, or downgrade to the oddly-implemented but functional v0.3 branch.

I’m also looking at some other possibilities involving CSS Media Queries and I might let the forum know how that works out for me (here, or under a more appropriate topic elsewhere).

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


Well’s all that ends.

Offline

#83 2011-06-27 08:05:35

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

Re: TXP Mobile

Gocom wrote:

oliverker wrote:

As your last commit goes, you could (or, well, should) leave the version number in, just set it as a string. It’s one of the standard manifest items, and can be used to tell the user if the theme is up-to-date. You can also remove the global lines from the manifest() and did leave the last $prefs call there.

Ok, Thanks, will get round to it

If you want to use preference strings, you can. Just remember that every non-core preference string should be prefixed, same goes for global scope functions, where it be JavaScript or PHP. In commands.js could be prefixing functions init and hideURLbar, both being relative common names to avoid interfering with other scripts, core and plugins.

This may help with a few of the bugs in there, Im no javascript of php dev (i copy and paste) but would love it if you could take a look (ie. fix it for me ; ) )

Cheers

Offline

#84 2011-11-08 14:18:24

brainseller
New Member
From: Nürnberg, Germany
Registered: 2011-11-08
Posts: 1
Website

Re: TXP Mobile

Same problem as hotwebmatter

I get warnings like
Warning: Cannot modify header information - headers already sent by (output started at /mnt/web2/30/07/5560907/htdocs/textpattern/theme/txpmobile/txpmobile.php:163) in /mnt/web2/30/07/5560907/htdocs/textpattern/lib/txplib_head.php on line 50
and the cookie problem on login

textpattern 4.4.1
txpmobile 0.4.1

only installed plugIn is zem_contact

Offline

#85 2013-04-07 07:36:22

cynrise
Member
Registered: 2013-04-07
Posts: 1

Re: TXP Mobile

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

I registered just to post about this in case anyone else is still looking for how to fix this. Depending on your version, PHP will yell at you for sending any HTML before the headers. It does this in the break

In txpmobile.php around like 161-163, find this:

?>
<?php else: ?>
<?php

Remove the segmented PHP blocks to:

else:

Offline

Board footer

Powered by FluxBB