In general, Allows the admin to select which content types, taxonomies, access
role to restrict node page view access for specific nodetypes and redirect to
404 as well as from crawlers and bot for this site. Currently there are two
features implemented.
Restrict node view by Content Types and Taxonomy Vocabularies
When a user is restricted, that user will not be able to view for selected user
roles.
Restrict data by Robot.txt for bot/crawler
When a Content Type and Taxonomy Vocabulary are restricted, that Content Type
and Taxonomy Vocabulary will not be available to crawl by the any bot/crawler.
Robot.txt will disallow it. To enable this feature, we must enable robot.txt
drupal module [https://www.drupal.org/project/robotstxt].
Note: You must delete or rename the robots.txt file in the root of your Drupal
installation for this module to display its own robots.txt file(s).
Install
1. Follow the instructions at
https://drupal.org/documentation/install/modules-themes/modules-7.
Usage
1. All configuration can be managed from administration pages located at
Administration > Configuration > Content authoring > Restrict Node Page View
404 Settings.
2. Checked individual node/content types for node view restriction, fieldset
located on the "Restrict Node types".
3. Checked individual taxonomy vocabularies for node view restriction, fieldset
located on the "Restrict Taxonomy Vocabulary".
4. Checked individual roles for node view restriction will apply, fieldset
located on the "Restrict Role Users to view Page".
5. Select a page whare restricted node view will redirect, fieldset located
on the "Redirect To". Currently there are three options - Home Page, Page not
Found, Page access denied.
6. Select "Yes" if we want to restrict above selected "Content Types and
Taxonomy Vocabularies" from bot/crawler, fieldset located on the "Disallow to
robots.txt". To use this feature, we must enable robot.txt drupal module
[https://www.drupal.org/project/robotstxt].
7. To remove, simply unselect its value, and submit the configuration form.
Project Information:
https://www.drupal.org/sandbox/sajib_hassan/2404581
GIT clone command:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/sajib_hassan/2404581.git
Comment | File | Size | Author |
---|---|---|---|
settings_25.png | 69.7 KB | sajib_hassan | |
menu_7.png | 12.1 KB | sajib_hassan |
Comments
Comment #1
polaki_viswanath CreditAttribution: polaki_viswanath commentedHi,
I would like to suggest you that you fix below mentioned points
Info file
1. Miss spelled word, change "taxonomies" to "taxonomy".
2. Line length must not exceed 80 characters.
Install file
1. Remove all the blank lines from the file.
2. Line length must not exceed 80 characters.
Module file
1. Line length must not exceed 80 characters.
2. Remove unused variables from the code.
3. Remove all the blank lines from the file.
4. Remove all the warning and errors like "Strict warning: Only variables should be passed by reference in node_page_view_404_is_restricted_role() (line 211 of /var/www/html/dcmood/sites/all/modules/contrib/node_page_view_404/node_page_view_404.module)."
Use http://pareview.sh for furthur development.
Thanks
Comment #2
PA robot CreditAttribution: 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
sajib_hassan CreditAttribution: sajib_hassan commentedHi polaki_viswanath,
Thanks for your suggestion.
I have worked on your mentioned point and fixed some of issues -
Info file
1. Miss spelled word, change "taxonomies" to "taxonomy".
2. Line length must not exceed 80 characters.
Install file
1. Remove all the blank lines from the file.
2. Line length must not exceed 80 characters.
Module file
1. Line length must not exceed 80 characters.
2. Remove unused variables from the code.
3. Remove all the blank lines from the file.
4. Remove all the warning and errors like "Strict warning: Only variables should be passed by reference in node_page_view_404_is_restricted_role() (line 211 of /var/www/html/dcmood/sites/all/modules/contrib/node_page_view_404/node_page_view_404.module)."
Already checked with http://pareview.sh and found no error.
Thanks.
Comment #4
cfischer83 CreditAttribution: cfischer83 commentedHi,
Nice module. Here are some recommendations:
That's it! Nice looking code :)
Comment #5
albertski CreditAttribution: albertski commentedThe only other thing I found is:
In node_page_view_404.info you have:
recommends[] = robotstxt
but it should be:
dependencies[] = robotstxt
Comment #6
sajib_hassan CreditAttribution: sajib_hassan commentedHi cfischer83,
Thanks for your review.
I just updates as per your two recommendations.
Comment #7
sajib_hassan CreditAttribution: sajib_hassan commentedHi albertski,
Thanks for your review.
I just removed "robotstxt" from "dependencies" from node_page_view_404.info. Since it's a recommended modules for a extra feature, NOT required.
Thanks.
Comment #8
MattDanger CreditAttribution: MattDanger commentedNice work with this. Looks like it gives users additional features over the Restrict Node Page View module. I've reviewed the module functionality, UI and code. I only have two suggestions
#collapse
state on all, or at least the first, fieldsets to FALSE to save the user a step.node_page_view_404.module
. If the user does not havesite_404
configured (it's blank by default), the page will just redirect to the front page, an unintended result. One of these could be possible solutions:drupal_set_message(t('Your 404 is page not configured. You must configure it before you can select the Redirect To: Page Not Found option below')with a corresponding <code>hook_requirement()
warning.Otherwise, this work looks good to me.
Comment #9
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.