This Module aims to add external JSS and CSS in drupal way and also to modify which JS or CSS file to add from admin panel.Can restrict the theme to add JS and CSS externally that are mentioned in the form.
Project Page Link : https://www.drupal.org/sandbox/nilesh.garg111/2290795
GIT : git clone --branch 7.x-1.x git.drupal.org:sandbox/nilesh.garg111/2290795.git add_external_js_css
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | add_js_css.png | 35.37 KB | coderider |
Comments
Comment #1
nilesh.garg111 commentedComment #2
nilesh.garg111 commentedComment #3
gisleIt is customary to use the project's prospective official name as the title of the issue posted here.
Is your project named "Adding external JS and CSS in drupal way page rank in yslow etc increases", "Add External JS CSS", or "Add External JS"?
You may want to tidy this up.
Comment #4
nilesh.garg111 commentedComment #5
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxnileshgarg1112290795git
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 #6
nilesh.garg111 commentedChanges Done.
Comment #7
adammitchell commentedHi,
I have had a quick look at your module and it works well. Coding standards look good and the idea is sound. However I have a few minor suggestions which could improve things.
Validation
Your admin form does not validate the file url's that you put in. Although this is not a big deal it means you can put any url in and it will be added as css or js.
Perhaps you should retrieve the file and check the type, before allowing submissions. This could also mean you could give them the option for local file caching.
Options
It would be good to be able to alter the options for individual javascript and css files. For example change their scope and weight.
Hope this helps.
Adam
Comment #8
ruslan piskarovHello nilesh.garg111,
* _add_external_js_css_admin()
It does not really matter, but I would call this function like that add_external_js_css_admin_configure().
and would remove most of the functions for the "_".
This is just my personal opinion.
* add_external_js_css_permission()
'add js and css form' this can be confusing. Can rephrase?
* add_external_js_css_menu()
you can declare an array before.
$items = array();
* add_external_js_css_init()
foreach ($ext_js_to_add as $ext_js_to_add) {
and
foreach ($ext_css_to_add as $ext_css_to_add) {
The variables is already used a an array expression.
Are you sure that this is Feng Shui?
Thanks.
Comment #9
mattdanger commentedThe persistent variables should be prefixed with the module's name to avoid potential namespace conflicts. See https://www.drupal.org/coding-standards#naming
For example,
ext_excluded_theme_valueshould be renamed something likeadd_external_js_css_excluded_theme_valueComment #10
coderider commentedHi
i have test this module manually

1. its very important have to validate you from values before doing any process. as adammitchell says at #7
i have add in http://google.com as External css value and this is what your module include in my sites head section.
Option
it should be great if you make it page specific also just like other module are doing.
just like i need to add any js file just only at one page.
Comment #11
pingwin4eg@nilesh.garg111
I didn't understand from the description what does actually your module do. What do you mean by
?
First of all correct JavaScript abbreviation. Second supply more user-friendly description.
This is an important criterion so that code integrates well and can be improved over time. I encourage you to continue developing and gaining from the feedback available in the git approval process.
Thank you for you contributions and understanding.
Comment #12
PA robot commentedProject 1: https://www.drupal.org/node/2290973
Project 2: https://www.drupal.org/node/2290783
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #13
avpaderno