Active
Project:
User Voice
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2010 at 09:18 UTC
Updated:
15 Oct 2010 at 15:34 UTC
why use block to show js code?
js code must inserting before tag, so it was better if you remove block and added hook_footer.
also is better to use permission access
thanks.
/**
* Implementation of hook_perm().
*/
function user_voice_perm() {
return array('access user voice');
}
/**
* Implementation of hook_footer().
*/
function user_voice_footer($main = 0) {
if (user_access('access user voice')) {
return theme('user_voice');
}
}
Comments
Comment #1
bohart* js code must inserting before < / body > tag
Comment #2
mikemccaffreyI'd like to second the request to move the code into the hook_footer function. That is the standard way that other similar modules such as admin_menu handle things.
Comment #3
picxelplay commentedperformance is also way better this way.