By dragon2000 on
Hi,
I've read this snippet:
http://www.drupalsnippets.com/snippet/type/php/custom-whos-online-block
but the problem is that it causes the need that somewhere in page.tpl, node.tpl or block.tpl
I have to call the function: print onlineuser_count()
wasn't it better if I could override the original function and simply use it instead of writing
a new function?
so, can you tell me what is the name of "Who's online block"'s function?
I want to override that function so that it doesn't show the name of online users.
thanks in advance.
Comments
RE:
Hi,
Search for user_block function in user.module, you have a nice example code here: http://drupal.org/node/66638
user_block() defines the block
http://api.drupal.org/api/function/user_block/6
The who's online block is the delta 3 one, and the code that creates it is:
There isn't a lot of scope for overriding the inner workings - but you can override the themable output eg
theme('user_list', $items, t('Online users'));or the translatable strings.see: http://api.drupal.org/api/function/theme_user_list/6 for the default theme implementation.
If you really want to alter the inner workings, either paste your altered code into a custom block or create your own module to define the block. I recommend creating a module vs pasting code into your site.