关于向drupal中添加js的问题
//请问大家有熟悉drupal的吗?我想在user.module中的user_authenticate函数中插入一段script,请问如何做?
function user_authenticate($name, $pass) {
global $user;
// Try to log in the user locally. Don't set $user unless successful.
if ($account = user_load(array('name' => $name, 'pass' => $pass, 'status' => 1))) {
// Check if the e-mail is denied by an access rule.
// Doing this check here saves us a user_load() in user_login_validate()
// and introduces less code change for a security fix.
if (drupal_is_denied('mail', $account->mail)) {
form_set_error('name', t('The name %name is registered using a reserved e-mail address and therefore could not be logged in.', array('%name' => $account->name)));
return;
}
else {
//我想在登陆成功后在这里插入一段script,请问如何插入,试了一个晚上,用drupal_add_js总是不行
$user = $account;
return $user;
}
}
...全文
相关推荐
Drupal 6 Javascript And Jquery
例如,可以通过添加`drupal_add_js()`函数来引入外部JavaScript文件或内联JavaScript代码。
drupal主题制作指南
>```使用Drupal的清理缓存功能清除可能存在的缓存问题。
Theme_Guide_Drupal
**区域和区块**:Drupal 使用区域和区块来管理页面布局。了解如何添加、配置这些元素对于定制页面布局至关重要。3.
menu_attributes
修复错误意味着查找并解决代码中的问题,而任务可能包括添加新功能、优化性能或者更新文档。6. **Pull Request (PR)**: PR是向项目主仓库提交更改的方式。
bootstrap-8.x-3.11
扩展性强:该主题支持许多Drupal模块,允许开发者添加更多的功能和自定义行为。5. 社区支持:Drupal和Bootstrap都有庞大的开发者社区,遇到问题时可以寻求帮助,获得解决方案。"


基础编程
