Is there any way to retrieve a form by a function in a class? [drupal_get_form]

Hi all,
It was a typical way to retrieve a form by:

drupal_get_form('my_form');

but could I possibly call that $form_id by a function in a class, like this:

drupal_get_form('My_Class::my_form');

In fact, this does work, but some red notice appears :|

Notice: Undefined index: My_Class::my_form in drupal_retrieve_form() (line 654 of C:\wamp\www\d7\includes\form.inc).

Some tips? pls help, thank you in advance.

Drupal 7 theme upgrade guide

I have a paid theme. I need to upgrade it to Drupal 7; but I can not find any guide about it. Could anyone help me? I have a 5 to 6 guide (link below). I'm searching for something like that

http://wtanaka.com/drupal/convert-theme-6

I Need A Clone Of Threadless.Com Or Designbyhumans.Com

I am looking for a Drupal developer to build a clone of threadless.com or designbyhumans.com. The site should be turn key and have every feature that they have. I will want my logo, design, and color theme integrated of course.

Look at threadless.com's features and send me a qoute and time to complete if interested. Include URL's and names of contacts I can talk to about your work. I will do my homework..... Payment details can be discussed after your portfolio has been verified and the qoute is accepted.

Shared content types across multisite setup

Is there a way to share content types created on a 'main' site with the remaining sites (multi database setup)? Or at the very least is it possible to push/export these content types from the main site to the other sites?

Block width

hello i have just started my drupal site which you can see at www.mike.eclipsewebhosting.net/drupal but at the top you can see the text Chat Now ! Mecharansie ect. This is a featured block and i want to extend the width the same as the image it is placed on. How do i do this?

Cannot make hook_view() to display extra data

Hi,

I have written the simplest possible module for a content type which has only one single field - the 'Title' which I renamed to 'Full Name' (I have removed the body as I dont need it).

All good - I can add content and view it just fine: For each added node it displays what I have specified in the 'Full Name' field.

Then I tried to extend this by using the hook_view() to display some additional data (first and last name) when viewing each node but so far I had no joy. In the example below I try to display simple string as additional data, but even that doesnt work:


/**
* Implementation of hook_view().
*/
function person_view($node, $view_mode = 'full') {

// Use Drupal's default node view.
$node = node_load($node->nid);

// Add first and last names.
$node->content['name_first'] = array(
'#value' => theme('person_name_first', $node),
'#weight' => 2
);

$node->content['name_last'] = array(
'#value' => theme('person_name_last', $node),
'#weight' => 3
);

return $node;
}

/**
* Implementation of hook_theme().
*/
function person_theme() {
return array(
'person_name_first' => array(
'arguments' => array('node'),
),
'person_name_last' => array(
'arguments' => array('node'),
),
);
}

function theme_person_name_first($node) {

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x