external module question..

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by adnasa on November 29, 2010 at 7:54pm

Hey guys

I've built an external (mini-)module with the help of this page: http://views-help.doc.logrus.com/help/views/api

using the views_api(),
with this module I only wanted to introduce new tables and fields to the views module, view type "Node".

Right now it looks good to me, but I still have this gut feeling telling me that I should ask you guys the following question...
– how do I ensure that this module is 'safe' ?
– so far I've included the views_api(), views_handlers() and views_data()? is there another method I need to include?

please keep in mind that this is the very first time I built the module, so be nice.

Thanks in advance.

Categories:

Comments

No the three hooks should be

Posted by dawehner on November 29, 2010 at 8:51pm

No the three hooks should be enough for you if you have your own custom handlers. If you don't have them you can drop views_handlers.

The one caveat is that if

Posted by merlinofchaos on November 29, 2010 at 10:37pm

The one caveat is that if you're trying to add fields to $data['node'] you should use hook_views_data_alter() for that.

thank you

Posted by adnasa on November 29, 2010 at 11:40pm

@dereine, @merlinofchaos: thanks for the help guys, appreciate it.

@merlinofchaos: yes your right, but no I'm not trying to add new fields to @data['node'].

Thanks!
/A

YEAH, BABY!

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /