hi all, im stuck right there, my block doesnt show on the blocks admin page. i use Drupal 7

i created a module using block api. my hook block_info looks like:

function datos_inicio_block_info() {
	$blocks = array ();
	$blocks ['datos_inicio_block'] = array (
			'info' => 'datos_inicio',
			'cache' => DRUPAL_NO_CACHE
	);
	return $blocks;
}

and my hook block_view looks like:

function datos_inicio_block_view($delta = '') {
	if ($delta = 'datos_inicio_block') {
		something...
		something...
		something...
		something...
		something...
		something...
			return array (
					'content' => array (
							array (
									'#theme' => 'item_list',
									'#items' => $datos
							)
					)
			);
	}
}

and my block.info looks like:

name = block_datos_inicio
description = "a block"
package = Modelos
core = 7.x
files[] = block_datos_inicio.module
files[] = ../../dominio/M.php
files[] = ../../dominio/C.php

i've tried clear the drupal cache, disable->uninstall->clearcache->install->enable, change modules names, change hook functions names, but nothing. i cant see the block in blocks admin page. i also checked the blocks table in db, but there are no entry for that block.

what can i do? throw away drupal and become a farmer? :D
thanks in advance!

Comments

Jaypan’s picture

What's the machine name of your module? From the .info file, it looks like it might be block_datos_inicio. If so, you need to add block_ to the start of your function names.

laden_maiden’s picture

yes yes yess! you are the one! that was my problem!
thank you very much!