Device Detector is a simple, PHP-based browser and device(Desktop & Mobile)feature-detection module that can detect devices & browsers on its own without the need to pull from a central database of browser information and adds configuration classes to "" tag.
- This module provides an admin configuration section, where the user can provide different class names for different conditions(browser & device wise).
- This class names are then added to the html “” tag, while the page gets rendered from the server end.
- The class names for browsers are rendered based on the the admin configurations, using a browser’s(mainly) unique user-agent string as a key.
- Mobile Detect Class, included in in the module itself, is used to collect and record any useful information's(like OS or device name) the user-agent string may contain, for rendering classes for device(Desktop & Mobile).
Similar projects and how they are different
Available community modules :
- Detector
- Mobile Detect
- Browser Detection
Note *: All these solutions somehow have certain dependency on other community modules or have to add some extra libraries.
Apart from this, Device Detector provides separate configuration pages for browser and devices with various set of configurations available to customize the detection process based on the requirement.
Usage of jQuery Plugins.
Note *: Leads to client end dependency and loading issue for slow connectivity.
Dependencies
No such dependencies present. Simply install the module and do your stuffs.
Project : "https://www.drupal.org/sandbox/nathmonoj2014/2523140"
Git Clone Url : "git://git.drupal.org/sandbox/nathmonoj2014/2523140.git"
Clone the repository and you may rename the folder "2523140" with "device_detector".
Manual reviews of other projects
First Round of Review ::
https://www.drupal.org/node/2155969#comment-10361115
https://www.drupal.org/node/2264953#comment-10361173
https://www.drupal.org/node/2267323#comment-10361209
Second Round of Review ::
https://www.drupal.org/node/2365671#comment-10416481
https://www.drupal.org/node/2364165#comment-10416499
https://www.drupal.org/node/2267611#comment-10416515
Comment | File | Size | Author |
---|---|---|---|
#20 | comma-separated-classnames-errro.jpg | 47.52 KB | kalpeshhiran |
#12 | device_detect2.png | 23.47 KB | jnavane |
#12 | device_detect1.png | 12.78 KB | jnavane |
device_settings.jpg | 54.78 KB | monojnath | |
module_install.jpg | 165.02 KB | monojnath |
Comments
Comment #2
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #3
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #4
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxnathmonoj20142523140git
We 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 #5
dishabhadra CreditAttribution: dishabhadra commentedI review it's working fine for me
Comment #6
formatC'vt CreditAttribution: formatC'vt as a volunteer commented@dishabhadra what about automated test?
http://pareview.sh/pareview/httpgitdrupalorgsandboxnathmonoj20142523140git
Comment #7
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedThanks for your reviews.
I am working on the automated test.
I will fix all the syntax issues within 2 days..
Comment #8
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #9
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #10
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #11
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #12
jnavane CreditAttribution: jnavane as a volunteer commentedHi,
Could you please validate the input fields where you should not accept any special characters?
I tried to add special chars in "Body Common Class Name/Names " field, its accepting. But In your case, as you are going to use this as class name in tag, you should avoid special chars if I am right.
I have attached the screenshots.
Thanks,
Navaneeth
Comment #13
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedThanks a lot @Navaneethakrishnan for your valuable feedback.
I have fixed the issue and also have put some extra checks on the check boxes condition.
Hope it will do the job.!!
Comment #14
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #15
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #16
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #17
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #18
kalpeshhiran CreditAttribution: kalpeshhiran as a volunteer commentedHi monojnath,
When I configure "Device Detector Settings" and try to "Add Custom class specific to the browser :: Google Chrome" I get below error
Please provide Chrome specific Class Name/Names in required format
I tried it with class1,class2 and other comma separated class names as per examples you have given. And I am getting same error for other browser options.
Can you please look into it.
Comment #19
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedHi kalpeshhiran ,
Thanks for reviewing my module and providing your valuable feedback.
I am sorry as I have mentioned the example classnames as Class1,Class2.
But there was note that states not to mention any alphanumeric numeric class name ::
*Note: Don't include any Number or Special Character(eg.'\/~`!@#$%^&*()_-+=\{}[]|;:"<>,.?) in your class name.!!
Still I have changed the example clases as Class1, Class2.
Hence the updated field description looks like :
Add class names, comma(,) separated for multiple class names to be added to every page on body
eg. classA,classB....
*Note: Don't include any Number or Special Character(eg.'\/~`!@#$%^&*()_-+=\{}[]|;:"<>,.?) in your class name.!!
Comment #20
kalpeshhiran CreditAttribution: kalpeshhiran as a volunteer commented@monojnath
Your description says
Single class name work perfectly for me. But when I add comma(,) it gives me an validation error. Please check attached screenshot.
Comment #21
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedHi kalpeshhiran ,
Thanks for having your patience and reviewing my module and providing your valuable feedback.
I am realy sorry for the misconfusion arised.
I have made the validation fixes for ',' check and checked it again.
The extra validation checks implemented is that "You cannot start or end the class names with a ','".
I am waiting for your valuable feedback.
I hope it runs correctly this time in your end. :)
Comment #22
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #23
kalpeshhiran CreditAttribution: kalpeshhiran as a volunteer commentedHi,
I have reviewed your module manually. There are few recommendations you might want to consider.
Automatic Review
http://pareview.sh/pareview/httpgitdrupalorgsandboxnathmonoj20142523140git
looks good, though no automated test cases written.
Manual Review
Body Common Class Name/Names
also.Body Common Class Name/Names
, it gets converted to lowercase.This review uses the Project Application Review Template.
Comment #24
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedHi kalpeshhiran ,
Thanks for having your patience and changing the status to reviewed and tested by community.
And, I have made all the required changes as per your suggestions.
Please find the below updates on your suggestions :
1. Change configuration example class1,class2 to classA,classB in Body Common Class Name/Names also.
- Done.
2. If I add capital letters in Body Common Class Name/Names, it gets converted to lowercase.
- Done.
I hope that everything goes well, and my module gets accepted. :)
Comment #25
kalpeshhiran CreditAttribution: kalpeshhiran as a volunteer commentedHi monojnath,
I have checked your changes and they are fixed now.
Also remove comma(,) from your examples
eg.'\/~`!@#$%^&*()_-+=\{}[]|;:"<>,.?
Everything else looks good.
Comment #26
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedHi kalpeshhiran ,
Thanks for your continuous evaluations and feedbacks.
The ',' is not to be used as a part of the class name, but it is used as a separator between two class names.
So it is mentioned in the examples eg.'\/~`!@#$%^&*()_-+=\{}[]|;:"<>,.?'.
I hope that i have clarified the point to you. :)
Comment #27
kalpeshhiran CreditAttribution: kalpeshhiran as a volunteer commentedOh yes. I got confused. Those are 2 different things.
No need to remove comma(,) from examples.
Comment #28
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedThanks Kalpeshhiran... :)
Can you tell me what goes next.
I mean what are next processes/steps to be followed?
Comment #29
dishabhadra CreditAttribution: dishabhadra at Blisstering Solutions commentedComment #30
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedHi Dishabhadra,
I couldn't find the changes/updates that you made in the issue. :(
Can I know the same? :)
Comment #31
rahul.shindeFollowings are few observations,
from device_detector.module LN#198
Please lemme know if you need more info on above suggested changes.
Comment #32
naveenvalechaThanks for the review rahul,I have not found any blocker above, so moving to needs review
Comment #33
rahul.shindeThanks @naveenvalecha for correcting the status.
Comment #34
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedHi Naveen/Rahul,
Thanks for your time and valuable feedback's for my module.
I have made all the changes as per mentioned by you.
Can you please check and provide your feedback's.
Thanks in advance...:)
Comment #35
rahul.shinde@monojnath, please address preview.sh comments.
Following is being copied from http://pareview.sh/pareview/httpgitdrupalorgsandboxnathmonoj20142523140git
Review of the 7.x-1.x branch (commit c8e882e):
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.
Source: http://pareview.sh/ - PAReview.sh online service
Comment #36
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedI am extremely sorry for the harassment... :(
I forgot to run the review after I submitted the updated code.
I have run the review and checked it.
Waiting eagerly for your valuable feedback's. :)
Comment #37
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #38
rahul.shindeNo blockers. Marking this as RTBC
Comment #39
naveenvalechagreat thanks for your time Rahul!
Manoj, Nice Module,there is a module which looks similar to this,mobile_detector can you check out and post its similarities and differences on the project page and issue summary.
Review of the 7.x-1.x branch (commit b1ab836):
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.
Source: http://pareview.sh/ - PAReview.sh online service
Manual Review :
$form['body_class_details']['device_detector_node_spfc_class']
: Where will this wrappertestprb_replace_field_div
exist/come from ?Not found any blocker. I don't have d7 setup available, so did manual review from code scan. Assinging to er.pushpinderrana to do full & final review if he has time.
Comment #40
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #41
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #42
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedAlso Naveen,
I have posted the similarities and differences about the other available modules on the project page and issue summary. :)
I am eagerly waiting for your kind response. :)
I hope this module gets a release permission from you all...
Comment #43
er.pushpinderrana CreditAttribution: er.pushpinderrana as a volunteer and at Publicis Sapient for Publicis Sapient commentedAutomated Review
Best practice issues identified by pareview.sh / drupalcs / coder. None
Review of the 7.x-1.x branch (commit c27e3e1):
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
You are passing the
$last_arg
unsanitized to$vars['classes_array']
.You need to apply check_plain() to the$last_arg
. This is a security blocker. Please make sure to read https://www.drupal.org/node/28984 again.The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
Please don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #44
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedHi Pushpinderrana,
Thanks a lot for reviewing my module and providing your valuable feedbacks.
I have made all the required changes as mentioned above and tested it.
Hope this time there would be no blocker for the module.
I am eagerly waiting for your kind response. :)
Comment #45
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedComment #46
er.pushpinderrana CreditAttribution: er.pushpinderrana as a volunteer and at Publicis Sapient for Publicis Sapient commentedAutomated Review
Best practice issues identified by pareview.sh / drupalcs / coder. None
Review of the 7.x-1.x branch (commit b8ca344):
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
My blocking issues have been addressed.
Nothing major jumped out at me when I read `git diff b8ca344..`
Been sitting at RTBC for a while now, so...
Comment #47
er.pushpinderrana CreditAttribution: er.pushpinderrana as a volunteer and at Publicis Sapient for Publicis Sapient commentedThanks for your contribution, Monoj Nath!
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 #48
monojnath CreditAttribution: monojnath at TATA Consultancy Services commentedThanks a lot Pushpinder and all other reviewer's for your support... :)