I have a stupid question.

I've asked a question regarding how to implement something here: (http://drupal.org/node/922410) and I've received an answer. The problem is that I am not skilled enough to implement the solution I was offered.

Could someone tell me what do I need to do exactly in order to implement it? I have no problem editing files, but I really don't know the in and outs of Drupal's code.

Thank you!

Comments

Ildar Samit’s picture

You might wanna learn more about Drupal before doing this. Essentially, you need to write a custom module. You'd "hook" to other Drupal functions, in this case hook_domainrecords(). To do that, you name your own function (which is inside your module) example_domainrecords(), but instead of example use the name of your module (which is something you pick yourself).

That's why agentrickard's code starts like this:
// This assumes you have a module named custom.module.
function custom_domainrecords(&$grants, $node) {
global $_domain;
...

Anyway, start by reading on how to write your own module.

Eli Baskin’s picture

How much time will it take someone who knows what he is doing to do what was suggested?

Ildar Samit’s picture

If the code works as is, then it should be a matter of copying/pasting it into a new module. If not, then it would take whatever it takes to get it to work :)

Eli Baskin’s picture

I've created my own module, pasted the code and enabled the module.

It doesn't work. BAH :(

mcfilms’s picture

It rarely does right off the bat.

A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com

Eli Baskin’s picture

I guess I should move it to module developer forum.

Here it is, if anybody feels like helping out:

http://drupal.org/node/922916