modules pages <<confused>>
sammy1982 - May 26, 2009 - 13:05
Hi,
Im a newby to drupal and was wondering if someone would be able to help ???
Our sites where developed by a drupal programer who left for greener pastures - unfortunatley, this has left me in a whole heap of programing which i do not understand.
There is a module that has been created so that we can have the same url extension across the various sites with different information.
The below code is pretty much copied from the previous function - but does not work.
We have issues with changing content and it actually does not appear on the site at all, or it will take 24 hours to see the change (if you lucky)
<?php
$items[] = array (
'path' => 'subscriptions',
'title' => t('Subscriptions'),
'description' => t('Site and book subscriptions'),
'callback' => my_module_subscriptions',
'callback arguments' => array(),
'type' => MENU_CALLBACK
);
function my_module_subscriptions (){
switch ($_SERVER['HTPP_HOST']) {
case 'www.touchcardiology.com':
$output="<div id='subscriptions'>
<h2>Welcome to the Subscription Page</h2>
</div>";
return $output;
case 'www.touchoncology.com':
$output="<div id='subscriptions>
<h2>Welcome to the Subscription Page</h2>
</div>";
return $output;
}
}
?>am i missing a step? do i need to add something to the DB for this?
Thanks,
Sam

That does not look like a
That does not look like a valid module. The first part ($items[] ...) needs to be in a function, probably my_modules_menu (an instance of hook_menu)
(No subject)
that was not the entire file ... i thought that the code i pasted would be sufficient ... i'll paste the full file below...
[Edit by Dave Reid: Moved code to http://drupalbin.com/9582. Please use drupalbin.com or pastebin.com with large chunks of code.]