hook_load not loading

Hello!

I've built a module that defines a single custom content type. My module name is cfvideo, and my content type is cfvideoct. The problem is that hook_load does not seem to be loading the fields that are being stored in my module table.

Here's the structure that I've been using for my module functions:


function cfvideo_node_info() {
//We return an array since a module can define multiple node types.
// We're only defining one node type, type 'cfvideo'.
return array(
'cfvideoct' => array(
'name' => t('cfvideoct'), // Required.
'base' => 'cfvideo', // Required.
'description' => t('CT - Embed CloudFront private video.'), // Required.
'has_title' => TRUE,
'title_label' => t('Title'),
'min_word_count' => 2,
'locked' => TRUE
)
);
}

function cfvideo_cfvideoct_load($nodes) {
$result = db_query("SELECT * FROM {cfvideo} WHERE nid IN (:nids)", array(':nids' => array_keys($nodes)));
foreach ($result as $record) {
$nodes[$record->nid]->videoname = $record->videoname;
$nodes[$record->nid]->audioname = 'randomaudioname.mp3';//$record->audioname;
$nodes[$record->nid]->mobile = $record->mobile;
$nodes[$record->nid]->normal = $record->normal;
$nodes[$record->nid]->hd = $record->hd;
$nodes[$record->nid]->storemp3 = $record->storemp3;

Theme search form in drupal 7

Hi,

What would be the easiest way to theme the default search form (/search/node) in Drupal 7?

I'd like to change the title, "Enter your keywords" and the label for the submit button but using _preprocess_search_theme_form doesn't seem to work.

Thanks,

koen

Drupal under Jetty/Tornado/nginx/...?

Is it possible to deploy Drupal with other Web servers including Jetty and Tornado?

Errors after uploading site, even when my site works locally?

Hello, I'm trying to upload a locally created Drupal site to my server, and getting error messages after doing so. I've zipped up every file of my site, and FTP'ed the files up, and unpacked them in the right directory. I used PHPMyAdmin to export the database, and imported it to the server using PHPMyAdmin (according to the instructions here: http://drupal.org/node/81993) and finally uploaded settings.php for the database on my server.

Accessing the 'login' option in Drupal 7.

Hello,

I am new to Drupal and have made a silly error.

I had been attempting to remove access to the 'login' option in the theme for non admins, however, I've stupidly removed access to it altogether resulting in myself not being able to access the login. Having done this resulted in no access to the control panel which I would need to allow allow access to it again.

How do I get the login option back without the control panel?

Any help would be very much appreciated.

Matt

D7 render($content) question

When I use the following code the result is wrapped in CSS div tags. How can just display the value of field_url?

print render($content['field_url']);

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x