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.

http://drupal.org/sandbox/royiby/1173164

Comments

joachim’s picture

> 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.

jordojuice’s picture

I 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.

royiby’s picture

When 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.

jordojuice’s picture

Status: Needs review » Needs work

Well, 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.

jordojuice’s picture

One 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 use node_get_types('names') and it will already be formatted properly for a checkboxes form element.

z.stolar’s picture

Title: random_nids » Random NID
Status: Needs work » Needs review
Issue tags: -change path +aliases

@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.

jordojuice’s picture

While 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.

jordojuice’s picture

By 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.

jordojuice’s picture

Status: Needs review » Needs work

Why 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.

royiby’s picture

sorry it took a while - just seen it - will fix.

z.stolar’s picture

Status: Needs work » Closed (fixed)

OK, 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)