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

Can a block find out things about the page it's on?

Is there anyway for a hook_block function to find out things about the node it is rendered together with? And if there is only one node at the page or a list of them?

I've seen one solution:

if (arg(0) == 'node') {
  $node = node_load(array('nid' => arg(1))); 
  ...

Is this the recomended praxis? It looks like a hack, is it reliable? Will it work with path aliases?

Intergration of old site into Drupal

Going right to the facts, recently I got burnt by a so-called development team, "Esteban Media". Turns out they were a scam. They did, however, do at least a little work - enough to trick me into paying them before vanishing. For the past two weeks I've tried to contact them, but no answers anymore. I've already taken precautions and changed both Root and the site's password, of which they had access to. Now, I'd like to intergrate what work they actually did do into Drupal itself, and am looking for a developer to help with this.

after add new module i got blank pages

Hi community
I followed the drupal module development module. After adding the onthisdate.module I got blank pages. How
should i correct this error
Thank you
Thilina

Contemplate and CCK

Hi there

First up let me apologise for being a JSP guy who has just encountered PHP. So I don't know much and have all sorts of assumptions getting in the way.

I am trying to create custom nodes using CCK and to present those nodes nicely using contemplate. There are two types of custom nodes, ads and ad categories. Each ad category will contain a bunch of ads. The thing is that each ad has a picture, and I want to display the full picture in each ad and a thumbnail in the ad categories page. At present the picture in the ad page is a nodereference field type, that points to an image (image module). So it simply displays in the ad page, as a text link to the image page .

I thought that by using contemplate I could show the picture by tweaking the template for the ad custom node type, and do something similar to show thumbnail images in the ad category.

So That is what I am trying to do. However the only output that seems to work from the contemplate template is $item['view']
If I try anything like $item['title'] or $item['field_picture_0'][0] I get no output. To put it another way, I am trying to display members of a contained node, and the only thing that works is ['view'] which gives me a text link.

I suspect I am probably really barking up the wrong tree. Can I do what I want to do using CCK and Contemplate?

Is there a more direct way of achieving what I am trying to do?

Help test the new banner module

I'm putting the final touches on my update of the banner module (the current CVS version is simply the old banner module updated to use the form API).

New features:

image module & access

I want to make image module coplately unreachable by anonymous users...

image module has this codes for permissions and i tried to add "view images" condition but i could not get it working right... How can i do this? thanks.

Pages

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