CVS edit link for pshahmumbai

Created a Drupal module called Special URL.

For the selected content type it provides a link in the node view which allows the node to be hidden from the world and only accessible via a special url provided.

Source available below :
http://landmarkhrc.com/drupalcvs/

Comments

pshahmumbai’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new3.68 KB

Hide a node and creates a Special URL for viewing it. Anyone who has access to the Special URL will be able to view the node and not otherwise.

pshahmumbai’s picture

StatusFileSize
new42.96 KB
avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.

As per http://drupal.org/cvs-application/requirements, the motivation message should be expanded to contain more details about the features of the proposed module, and it should include also a comparison with the existing solutions. In particular, what is the difference between your module, and any module that allow to create a service equivalent to tinyURL using Drupal (see http://drupal.org/project/shorturl)?

avpaderno’s picture

Status: Needs work » Closed (won't fix)

There have not been replies in the last week. I am marking this application as won't fix.

pshahmumbai’s picture

Motivation :
The main motivation behind this module is to easily hide a particular node item from everyone and only accessible to people that the node owner chooses to give the link to. It is not necessary for the user to have account on the site. The only permission checking that is done is that the url token is correct. If the user has the special url then he/she can view the node else the user is shown the access denied message.

Once the node owner clicks on the "hide" link in the link area of the node, it will be hidden from everyone and owner will see a special url code in the message area of the site.
eg : http://localhost/node/149/6bce38b907645ea6af91dfbc5251ccb9

The owner can then email the link to anyone. The node is no longer accessible without the special url code to anyone except the owner of the node.

Difference :
The goal of this module is not to shorten the url, but to hide a particular node quickly. The node is no longer accessible even with the original node/nid link. The special url works on the same drupal setup and gives a easy way to hide content from general public at the same time give access to choosen few. This module does not use any third party API service. It generates a md5 encrypted code from a random number which it appends to the url.

pshahmumbai’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new2.16 KB

1. Change the name of module to specialulr (from special_url) as per guidelines.
2. Module now follows all the Drupal coding standards. Checked with the coder module.

Attached is the new setup.

meba’s picture

Status: Needs review » Needs work

There is a Cross Site Request Forgery in the module (hide/unhide nodes).

I am wondering if there is a better way to do this? I would be worried about security of the hiding - maybe better to implement a proper node_access to REALLY hide the node and then expose it under the URL and print using node_view() ?

http://drupal.org/writing-secure-code

avpaderno’s picture

  1.   variable_set('specialurl_node_types', array());
    
    

    Variables are not initialized when the module is installed.

  2.         drupal_set_message(t("Special URL :") . " " . $node_link);
    
    

    Use t()-placeholders.

  3.         $node_link = l($base_url . "/node/" . $node->nid . "/". $result->specialurl, $base_url . "/node/" . $node->nid . "/" . $result->specialurl);
    
    

    $base_url is never prefixed to the links passed to l().

  4. See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how constants, Drupal variables, global variables, and functions defined from the module should be named.
manuel garcia’s picture

Status: Needs work » Closed (won't fix)

It's been 7 weeks without response.

manuel garcia’s picture

Status: Closed (won't fix) » Needs work
avpaderno’s picture

Status: Needs work » Closed (won't fix)

The application has been already declined because 7 weeks passed without any reply.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes

Please read the following links as this is very important information about CVS applications.