Tabbed Blocks
How do you creat tabbed blocks in Drupal ?
Eg on: http://stilbuero.de/jquery/tabs/#section-1
Check the solution on http://drupal.org/node/89338
Place blocks anywhere on the site
If you want to place blocks on a page or story or anywhere on your site , or on front page , here is a quick trick
Code for Recent Comments: Drupal 5
<?php
Top posters with total number of members
Displays Top posters with total number of members like on http://csqa.info
<?php $users = db_query("SELECT COUNT(nid) AS count, {users}.uid, {users}.name FROM {node} LEFT JOIN {users} ON {node}.uid = {users}.uid WHERE {node}.uid != 0 GROUP BY uid ORDER BY count DESC LIMIT 5");
while ($user = db_fetch_object($users)) {
print "uid."\">".$user->name."";
}
?>
<?php $users1 = db_query("SELECT Count(uid) as count1 from users");
while ($user1 = db_fetch_object($users1)) {
print "Total members: ".$user1->count1;
}
?>
Display joining date on Who's new block.
You will have to hack the user.module for this. So be careful while you upgrade.
Find this place at around line 570 in user.module (in function user_block):
<?php
case 2:
if (user_access('access content')) {
// Retrieve a list of new users who have subsequently accessed the site successfully.
$result = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', 0, 5);
while ($account = db_fetch_object($result)) {
$items[] = $account;
}
$output = theme('user_list', $items);
Add Scrollbars in Blocks
You can add scrollbars to blocks and make all the blocks of the same size. It works on IE and Firefox.Here is how you do it.Open you theme stylesheet ( style.css ) & add following code:
div.inner {
}
div.outer {
height: 200px;
overflow-y: scroll;
}
This will add horizontal scroll bar. If you wish to enter a vertical scrollbar too.. add the following line.
div.outer {
height: 200px;
overflow-y: scroll;
overflow-x: scroll;
}



