I run Storm out of a different Web directory and changed all the paths to a user configurable setting. Here is the base for the change in the hope it will become a standard feature.

Function in storm.module to get the path:

function storm_pages_path()
	{
	$path = variable_get('storm_pages_path', 'storm');
	if(substr($path, -1) == '/')
		{
		$path = substr($path, 0, -1);
		}
	return $path;
	}

Example of using the path:

  $items[storm_pages_path()] = array(

New storm_admin_settings setting:

	$form['storm_pages_path'] = array(
		'#type' => 'textfield',
		'#title' => storm_t('Storm pages directory'),
		'#default_value' => variable_get('storm_pages_path', storm_pages_path()),
		'#description' => storm_t("The directory that contains Storm pages"),
		'#weight' => -11,
		);

I made a global change of 'storm/ to storm_pages_path() . '/ then some hand made adjustments.

Comments

Roberto Gerola’s picture

Status: Active » Closed (works as designed)

I'm sorry but I cannot accept this change.
The module name is Storm and so is the prefix for every path, as
for every Drupal module. This is necessary to avoid name clashing
with other modules.

I don't see any benefit to allow the users to change the prefix.

Thanks, Roberto

Anonymous’s picture

Component: Code » Storm.module

The benefit I can see would be people can decide what their own site structure would be and appropriately integrate Storm into that, instead of forcing them to have a top level entry for your module (which is a great module, btw). But great or not, I'd prefer to make site organization decisions myself. Perhaps I'm misunderstanding, but I believe there are a ton of Drupal modules that do not impose their own site structure on a developer's site.

Please reconsider allowing us to organize our own sites for our own audiences. Thanks!

Magnity’s picture

Sorry - no. There are several ways you could make your change with site settings or a mini custom module.