Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 77

PostPosted: Wed Dec 28, 2011 5:09 pm Reply with quote

In working on a mobile theme for RN which uses AJAX, I found the majority of RN runs pretty well in an AJAX environment, with a few exceptions.

1) Any time the header location is set in PHP it breaks the AJAX chaining

2) Anti-leaching file protection does not seem (easily) compatible with AJAX

This breaks both methods of downloading files in NSNGD... Not being a "mobile" user myself, how important is downloading files to a mobile device? This mobile theme is using html5, so there could be other methods for streaming files; but not sure how you could support them within NSNGD at this time..
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Wed Dec 28, 2011 11:42 pm Reply with quote

Yeah, it would take some convincing of me that the Downloads use model for mobile is important. (I am probably being short-sighted on this - Laughing )

Even if I had the working mobile theme, I've got a ton of things backed up in the queue. But, I think having a working theme will be crucial for the debugging/enhancement process, so am definitely looking forward to seeing your work on this when it is close to release or released.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 77

PostPosted: Thu Dec 29, 2011 1:26 am Reply with quote

Thanks for the feedback. At this point I was mostly just curious how important downloads were in the mobile context, which I think you have answered my question there. If the landscape changes in the future we can certainly explore other options..

I haven't exactly decided how to approach the handful of features that don't work as intended; as I'm trying to keep it as lightweight as possible. JavaScript is an option, but the jquery mobile framework is also designed to degrade gracefully on mobile devices that don't support JS... which means a fix would only work on some devices..... and by "fix" I mean a warning message that "the feature is not supported on our mobile site, etc.." Another challenge is that rarely do any forms within RN have unique id's or classes, so targeting them selectively with JS can be difficult.

Glad you are willing to take a look when I have something more concrete... as I mentioned previously I'm not a mobile user, so I'm not always sure which features have importance and/or practical use. Just fyi, this will require 3 minor edits (hooks) to header.php, footer.php, and the get_theme function as it uses UA sniffing and the html5 doctype.

On a side note, found it interesting that google and wikipedia use the same type of UA sniffing approach. If anyone following along is curious, try it http://chrispederick.com/work/user-agent-switcher/ Smile
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 401

PostPosted: Thu Dec 29, 2011 5:10 am Reply with quote

I would be very interested to see this once it is released also. As a regular visitor to my site, you'll know I already made a half hearted attempt into using HTML5 within RN and there were quite a few things that fell-over, forms being one of them.
Yes, the lack of ID's or unique classes in forms is a real problem and that is one of the many reasons why I have been hammering on about Accessibility for the last few years because if your form is up to snuff from an accessibility point of view, 99% of the work is done.

I also found the anti CSRF check fell over. Not sure if that was due to the way forms are currently written or whether Mimetypes (mimetype.php) are handled differently in HTML5 resulting in the antiCSRF check not knowing what it was supposed to do.

I guess at the moment, it isn't a real worry whether you can actually download something from Downloads, provided there is *something* there to enable the visitor to find it again (social bookmarking/sharing, mail link to self, that kind of thing).
However, for e-commerce it is getting more and more important to have mobile support. The fact that the visitor cannot immediately used an e-product (unless it's an APP of course) is not a real argument, if your in e-commerce, you just lost a sale if your site isn't mobile friendly.

The next 2 years are going to be EXTREMELY important for mobile access. A friend of mine in London who works for O2 is currently field testing their G4 network (due to go live sometime before 2013) and he says it is actually faster and as stable as his home fiber optic broadband, which is very scary! He even uses a G4 dongle to play games online like Halo - no way you could even consider that with G3.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Thu Dec 29, 2011 8:49 am Reply with quote

IMO, one has to take an overall holistic approach with RN and mobile. Its not just an HTML5 issue, or a CSS3 issue, or an accessibility issue, or theme hooks, or a UTF-8 issue, or a clear & clean API, or ??????. These need to all be taken up in one single coherent design and implemented together quickly.
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Thu Dec 29, 2011 10:22 am Reply with quote

Wow... just saw this:

http://www.mantisbt.org/mantistouch.php

Very much what I am talking about by having a clear and clean API that can be used with both internal and external interfaces.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 77

PostPosted: Thu Jan 12, 2012 7:59 pm Reply with quote

As far as the original issue that started this thread, I was able to address it via JavaScript by disabling ajax for this particular form.. In a similar manner to how we load the validation plugins for Your_Account op=new_user in javascript.php.. Although I'm open to other suggestions.

Code:
// fix for mobile downloads
if(!isset($_GET['op']))  $_GET['op'] = '';
if(!isset($name))  $name = '';
if ($name=='Downloads' and $_GET['op']=='getit') {
echo '
<script type="text/javascript">
   $("form").attr(\'data-ajax\', \'false\');
</script>';
}
// end mobile downloads


In the future it would be nice if this particular form had a unique id so it could be targeted via CSS selector(s) alone. Of course a global template system would be nice too but one step at a time Cool

@Guardian: Thanks for the heads up on the CSRF check, in limited testing it seems to be functioning as intended. Although I'm working with a trimmed down version of RN and only using the features that make sense in a mobile context. For instance, the DH system will not be used as the <head> of the doc does not refresh in the traditional sense (AJAX). There is a methodology for page titles but I can't justify loading the DH system just for titles. Using $custom_module_name - $sitename for titles, for now. Since this is not a "standalone" mobile site I don't think we need to be concerned with SEO @ current.

@montego : Nice looking mantis touch Smile As for "one single coherent design" I'm all for it... Although it may be outside the boundaries of what I can do with this particular theme... Smile

@All: I have some mobile theme questions over at raven's site if you are interested in contributing Wink http://www.ravenphpscripts.com/postt20259.html
 
View user's profile Send private message
Palbin
Newbie
Newbie



Joined: Nov 26, 2007
Posts: 25

PostPosted: Sun Jan 15, 2012 1:33 pm Reply with quote

I am not sure why the CSRF checks would not be working. All we are doing is using output buffering to automatically add the token to ever form. At that point it is just an input like any other field. A function is called on form submission that just checks this input. So I do no think it could be a HTML 5 issue. With the release of 2.5 we are closer to HTML5, but there is still work to do with deprecated attributes. Which is going to be a pain, because some of them do not have strait up replacements.
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 401

PostPosted: Sun Jan 15, 2012 6:16 pm Reply with quote

@ Palbin - I don't know why the CSRF check fell over either. I had briefly switched my site over to use the html 5 DOCTYPE (mass search replaced on the DOCTYPE used) and then found forms like the user log-in wouldn't work. There wasn't any errors being generated, the forms *seemed* to work as normal but no actual data was being passed/updated and looking at the source, I couldn't see the hidden CSRF token.
I did this during a 'mad moment' on a production site so had to switch back again and unfortunately I have not had a chance to look at it again, but I definitely want to get back to it soon as I want to convert my site fully to HTML5.
 
View user's profile Send private message
kguske
Community Giant



Joined: Dec 11, 2005
Posts: 32

PostPosted: Thu Feb 02, 2012 8:16 am Reply with quote

I wonder how much of Mantis' design for the mobile access centered around making it profitable...

It seems logical, and I certainly don't begrudge them for wanting a little reward for hard work.

Spastic, I'm also interested in your efforts to mobilize RN and very much agree with Guardian that this is critically important.

_________________
nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch
linear-bunch
linear-bunch