the only error in apache is: [Tue Apr 28 17:04:49 2009] [error] [client 192.168.1.8] File does not exist: /var/www/favicon.ico I solved it adding: $menu['node/add']['access callback'] = TRUE; But I think it has to be a better way On Tue, Apr 28, 2009 at 4:56 PM, Pedro Faria <predofaria@gmail.com> wrote:
Check at apache errors log.
On Tue, 2009-04-28 at 16:21 +0200, Lluís wrote:
I am developing a module which will allow users to post certain content-types after 30 days of being registered. I think this is achieved using hook_menu_alter(); but my code freezes drupal with a white screen.
Whats is missing in my code?
function wu_menu_alter(&$menu) { foreach (node_get_types('types', NULL, TRUE) as $type) { $type_url_str = str_replace('_', '-', $type->type); $menu['node/add/'.$type_url_str]['access callback'] = 'wu_role_access'; $menu['node/add/'.$type_url_str]['access arguments'] = array('create', $type->type); } }
function wu_role_access($a='',$b='',$c='',$d='',$e='') { // echo "**************"; //if uncommented this is displayed return true; //when it works I will implement the rest of the function }
-- *La vida és com una taronja, que esperes a exprimir-la? *Si creus que l'educació és cara, prova la ignorància. *La vida és com una moneda, la pots gastar en el que vulguis però només una vegada. *Abans d'imprimir aquest missatge, pensa en el medi ambient.