This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Block not showing

Hi fellows, I'm having a really strange error, and I don't know if its of my template or my module.

I created a module which use blocks:

--------

function mymodule_block($op = 'list', $delta = 0) {

if (user_access('access content')) {
if ($op == 'list') {
$block = array();
$block[0]['info'] = t('Title 1');
$block[1]['info'] = t('Title 2');
$block[2]['info'] = t('Title 3');
$block[3]['info'] = t('Title 4');
$block[4]['info'] = t('Title 5');
return $block;
}
}

if($op == 'view') {
$block = array();

switch($delta) {
case 0:
if(user_access('access content')) {
$block['subject'] = l("

".t('Title 1')."

", "module/categories/all", array(), NULL, NULL, FALSE, TRUE);
$block['content'] = "

";
}
break;

...

-----

This block was implemented at start at taxonomies (an odd hack), it was working fine with taxonomies module, but I moved to my module to clean all drupal.

After the move, none of the block was working, even drupal shows in the admin page the modules and are active. I tried to check the $op in mymodule_block(), but instead a string it was show an object:

--------------
stdClass Object
(
[module] => user
[delta] => 1
[status] => 1
[weight] => 0
[region] => 0

Are there Database and UpDownload modules?

Hi Everybody

I am using Postnuke and would like to change to Drupal.

Does Drupal have a Database module like Postnuke? I am not talking about the Drupal Database Admin module which allows editing of Drupal database tables. I am talking about letting users create their own database tables for their own use.

Postnuke Database module allows users (depending on their assigned permissions) to create, edit or just view databases (more accurately database tables). This is very useful for storing information in a database and allowing users to view it.

The page cannot be found, was working a minute ago, module is definitely present

Hi,

I'm writing a new module to allow taxonomy navigation the way I want it. It was working about half an hour ago, but seems to have stopped. I was playing around with menus and module (enabling and disabling) but after re-enabling them it still isn't working.

drupal_get_path_alias() broken?

Or is it just me? Unfortunatly I haven't been using drupal long enough to know if it's a bug, or I'm just doing something wrong.

I'm making a block module .... The relevent part of my _block hook looks like:

function menusplit_block($op = 'list', $delta = 0, $edit = array()){
	switch($op){
		case 'list':
			return menusplit_list();
			break;
		case 'view':
			return menusplit_get($delta);
			break;
	}
}
function menusplit_get($mid){
	
	$q = $_REQUEST['q'];
	$alias = drupal_get_path_alias($_REQUEST['q']);
	
	$b['content'] = "SPLIT BLOCK " . $q . " ---- " . $alias;
	$b['subject'] = "-test-";
	return $b;
}

At http://example.com/graduate/admission/requirements/mbamse I get:
"SPLIT BLOCK graduate/admission/requirements/mbamse ---- graduate/admission/requirements/mbamse"
as expected....

But, at http://example.com/node/76 I get:
"SPLIT BLOCK node/76 ---- node/76"

These are the same node, the first one is the alias. I thought that $alias should contain "graduate/admission/requirements/mbamse" right?

Can't get devel module to print out a summary of database queries at bottom of page. Need help.

I've installed and enabled the devel module, but the setting page is blank other than the one word "Array" followed by "Save configuration" and "Reset to defaults" buttons. I don't think this is right, however, the module seems to have added "variable viewer" and "empty cache" links to the main navigation. But that's all I see.

I really want to be able to tell how many database queries are being made on each page but this information is not showing up at the bottom of the page or anywhere else.

All of this is on a 4.6.4 site. What could I be doing wrong?

Drupal Developer

I'm looking for some competent drupal developers that I can sub-contract for ongoing work.

You must know how to develop a drupal module from the ground up. You must understand the Drupal API.

Im based in Long Beach, CA. I dont care where you're based, as long as you're competent and of course trustworthy.

(please use the contact tab from my user account on drupal.org to contact me.)

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions