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

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.)

how do i kick off new browser to new URL?

I want my code to open a new browser window to one of several locations
(a) an outside URL
(b) an inside page which does not show header, nav info but just my own HTML

Question:
How do I do this? I tried printing a form + javascript to submit the form but this html appears in the page before the html tag, and get javascript error that the form does not exist. So that does not work.

I cannot find a PHP or drupal function that opens a new browser window to a new URL.

THANKS!

how to install a drupal forum

how to install a drupal forum

How does Drupal send confirmation email?

...after registration. What function or program does it use? Am trying to solve this problem -- http://drupal.org/node/41614. Have looked into user.module, but am not that advanced yet in PHP programming to understand the entire module. Thanks!

Pages

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