Description
Basically the Boost Mobile module adds mobile support to the Boost module.
The Boost module provides static page caching for Drupal. It is designed to serve cached pages per domain.
So what if you want two versions of your website (let's say a desktop and mobile version) on the same domain name but still cached with boost ?
This is what the Boost mobile module is for. All Drupal users who already use the Boost module and want to have a mobile version of their website on the same domain name will be happy with this module.
Users will just have to choose a different Drupal theme for the mobile version.
Technically, we use the same logic as boost and generate some Apache rewrite rules to paste in .htaccess file. It's where we do all of the detection of user agent, cookies management and check of $_GET parameters.
Practically you just have to choose a Drupal theme to be associated to the mobile version of the site.
You also have a switcher block to switch between desktop and mobile version.
To use it, Just add this block in the region you want in desktop/mobile theme.
Project Page and git repository
https://drupal.org/sandbox/davidpetit/2153807
git clone --branch 7.x-1.x DavidPetit@git.drupal.org:sandbox/DavidPetit/2153807.git boost_mobile
Reviews of other projects
https://drupal.org/comment/8692729#comment-8692729
https://drupal.org/comment/8692509#comment-8692509
https://drupal.org/comment/8267277#comment-8267277
Comments
Comment #1
davidpetit commentedComment #2
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
davidpetit commentedComment #4
federiko_ commentedFirst I installed the module
I activated switcher block and all seemed to work well on my mobile and on my desktop devices. The right theme is displayed in both use cases. Boost mobile directory is created and Boost is serving cached pages as I could verify in source code.
Just a few comments:
I changed the Mobile cache directory value in configuration form and the old directory is still existing.
Also, I wonder if there is an alternative to editing settings.php
----
Then I did some code review.
Code looks all right for me. I'm not a Boost expert but all seems well structured from my point of view.
Some little corrections in your module files:
- In the README file
line 27 : "assiocated" (associated)
line 46 : "like any other modules" (like any other module)
- In boost_mobile.admin.inc
line 135 : "extesion" (extension)
Comment #5
federiko_ commentedComment #6
davidpetit commentedHi federiko, thanks for your feedback.
Yes. It is already the same behaviour with Boost alone but it's not really a problem.
I already tried other solutions with hook_boot or hook_init. I also tried to dynamically change the directories in $_boost too but it can't work because boost module overwrite everything.
Since there are no hooks available in the boost module to dynamically alter the $_boost variable, it's the only way for now.
I made all the corrections you stated.
Moreover, pareview return 2 false positives:
The text passed in this l() function is a path and not a translatable string so we don't need to put t().
Those are not translatable strings. We have some ID attributes and some query options which are not translatable and the same string in every language.
Comment #7
davidpetit commentedComment #8
federiko_ commentedI'm ok with your answers David. Let's see what others have to say.
Comment #9
Alexxikon commentedHi, DavidPetit,
I looked into this issue, about which federiko_ was asking for other opinions:
I agree that these are not translatable strings. You say "we don't need to put t()". In fact, I would say you must not use t(), lest they get translated and break your module in languages other than English. I would recommend adding a comment near each of these strings, to prevent accidental future modification by other maintainers.
Comment #10
davidpetit commentedHi Alexxikon,
thanks for the feedback.
I commited the changes you suggest, thank you.
Comment #11
federiko_ commentedNothing to add David. Code is well written and remaining warnings and error are false positives. Looks RTBC. This is a useful module to implement some cached mobile version into the same domain than the desktop one.
Comment #12
davidpetit commentedComment #13
scotthooker commentedFurther testing of this module.
1. Code is good and clean and the issues from the code check are not real issues
2. The results when using the module are good. https://developers.google.com/speed/pagespeed/ - the module does what it should do an improves speed and also improves the performance of my site according to google page speed.
Comment #14
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to patrickd as he might have time to take a final look at this.
Comment #15
klausino objections for more than a week, so ...
Thanks for your contribution, DavidPetit!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #16
davidpetit commentedHi klausi,
first of all thanks very much for helping in reviewing this project and for updating my account.
Also I commited all the changes you proposed in the previous post.
Many thanks to all the reviewers for this project.