The random_nids module allows you to replace your site's node nids with a random value of 7 digits in order
to make it impossible to keep track of the node amount.
The random_nids module allows you to replace your site's node nids with a random value of 7 digits in order
to make it impossible to keep track of the node amount.
Comments
Comment #1
joachim commented> to make it impossible to keep track of the node amount
Why would you want to do that?
Also, you can't tell the node amount, really. If you find node/4 is a 404, that doesn't tell you there are only three nodes, because it could be that number 4 was deleted.
Comment #2
jordojuice commentedI guess to make your site look cooler than it really is? Not that one can't vaguely tell how big a site is. Most Drupal sites seem to use path aliases anyways.
Comment #3
royiby commentedWhen you are using this node you make it harder to keep track of a chronological order of the nodes so that you keep a higher level of business security, furthermore this solution also applies when using views where url alias doesn't.
Comment #4
jordojuice commentedWell, I'm not here to question the worthiness of a module!
Please run your module through the coder module on minor (most) setting and fix coding issues.
Indentation should be two spaces, no tabs.
All of your functions need commenting. Please consult the commenting and coding standards for guidelines or look at core modules for reference.
Your .info file does not have any information other than what was added when the repository was set up.
You need to add a hook_uninstall() to remove any variables you set with variable_set(). That includes variables set by system_settings_form().
Inline
//style comments should always start with a space after the slashes.Try to avoid making trailing comments, i.e.
if (this) { // Some comment here.Your hook_menu() says "Description of your On this date settings page"? What's that about?
Your comments end with periods, good.
Please set this back to needs review once these issues are corrected.
Comment #5
jordojuice commentedOne more thing. I noticed you use
node_get_types()and then run it through a foreach loop to populate an array for the form. This isn't necessary as you can just usenode_get_types('names')and it will already be formatted properly for a checkboxes form element.Comment #6
z.stolar commented@joachim> Why would you want to do that?
The reason is very simple: some clients wish to blur the real quantity of content in their website, especially in it's first days.
Since at any point in time only a portion of the content is visible (active deals), obscuring the real nid supports this goal.
You can agree with the goals or not, but the need is real, and the solution is rather elegant: it changes the actual nid of a new node, and doesn't pretend to swap it with anything else.
This action is done once, and that minimizes the risk of incompatibility with module X.
Comment #7
jordojuice commentedWhile me or joachim probably wouldn't want to use this ourselves, I can certainly see this being desired by more than a few people. People and companies love to look bigger than they really are.
Comment #8
jordojuice commentedBy the way, when you run it through Coder if you get a warning telling you you need
// $Id$tags or the like please ignore those. We don't use them any more with git.Comment #9
jordojuice commentedWhy is this needs review? The issues outlined in #4 have not been fixed and committed to the repository. Please fix coding issues and set this issue back to needs review once completed and pushed to your sandbox.
Comment #10
royiby commentedsorry it took a while - just seen it - will fix.
Comment #11
z.stolar commentedOK, based on the comments in #4, I have fixed the module, and created a project for it: http://drupal.org/project/random_ids
Thank you reviewers!
(note: royiby has given me permission to do so)