开发者

Theming/building own module

I'm new to Drupal and want to make my own module for Drupal 7. But i don't understand the theming / templates system in drupal jet. So i will be ready glad 开发者_JAVA技巧if some one can help me with that. I'm building a twitter module that shows the latest tweets with a certain #hashtag. Loading the data is not the problem. The problem is choosing the best solution for displaying the data. I want to show it like this:

[the link to twitter author_url]

[title] by [author_url]

[close the link]

Thanks for the help.

twitter.install file: (my custom fields)

 array(
      'twitter_id' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => ''
      ),
      'author' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => ''
      ),
      'author_url' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => ''
      ),
      'published' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => ''
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE
      ),
      'description' => array(
        'type' => 'text',
        'not null' => FALSE
      ),
      'link' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE
      ),
      'image' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE
      ),
    ),
    'primary key' => array('twitter_id'),
  );

  return $schema;
}


You should collaborate with http://drupal.org/project/twitter instead of writing a new module.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜