【发布时间】:2013-06-07 04:01:43
【问题描述】:
我之前没有为 Drupal 开发过任何模块,我想我真的只是想验证一下这是否“正确”,我希望有人能提供帮助。它是为 Drupal 7 开发的,用于将 javascript 文件注入页面的页脚
sessioncam.module 文件:
<?php
/**
* @file
* The code below adds the sessioncam.js file in the footer section of your site
*/
?>
<?php
drupal_add_js(drupal_get_path('module', 'sessioncam') .'/sessioncam.js', array('type' => 'external', 'scope' => 'footer')) ;
?>
sessioncam.info 文件:
name = SessionCam
description = Module to inject the SessionCam recorder code
core = 7.x
感谢任何帮助
【问题讨论】:
-
是的,看起来是正确的。你也测试过吗?
-
嗨@Lenin 感谢您的快速回复。该标签似乎也可以正常工作。我想我只是没想到它看起来“如此简单”,如果这是正确的表达方式
-
你学会了第一个剪辑。现在,您将超越并学习惯例并不断发展。 :)