DONATE NOW TO HELP UPGRADE LIBCOM.ORG

"Online users"

19 posts / 0 new
Last post
madashell's picture
madashell
Offline
Joined: 19-06-06
Apr 17 2007 23:53
"Online users"

The list of online users doesn't have any spaces or line breaks between users now. Is it supposed to look like this? Because it makes it a bit difficult to distinguish all the posters on the list.

Mike Harman
Offline
Joined: 7-02-06
Apr 18 2007 00:02

hmm, it's messed up in IE6 and 7, firefox it looks great wink

madashell's picture
madashell
Offline
Joined: 19-06-06
Apr 18 2007 00:07

Ah. Using my parents computer at the moment, they have an irrational phobia of things that can be downloaded for free.

Mike Harman
Offline
Joined: 7-02-06
Apr 18 2007 00:11

put some padding in and stuck it down bottom for now.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 18 2007 09:12

I reckon it looks better at the bottom anyway.... but yeah the css doesn't work in in IE.

Mike Harman
Offline
Joined: 7-02-06
Apr 18 2007 09:27

The commas don't work because IE is shit. But I don't understand why the text doesn't wrap. If we have more than about 15 registered users online it'll cause problems (or lower resolutions).

Going to remove space around comma and replace with padding quickly.

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Apr 18 2007 11:36

added to privatemsg* and libcommunity pages

jef costello's picture
jef costello
Offline
Joined: 9-02-06
Apr 23 2007 11:19

how is it coded, because just now there were two rows of online users but the first row was Alf, then jef, then costello was o the second line followed by another 8 or so names. Is this just a glitch or has it been coded to push up to make a secod line rather than continue down (by adding a line on top rather than on the bottom)
I'm using firefox .

edit: ok it's stopped doing it now.

Mike Harman
Offline
Joined: 7-02-06
Apr 23 2007 11:24

it's not very happy at the moment - we're trying to get it into a proper comma seperated list but not perfect at all yet.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 23 2007 15:14

Problem is it shouldnt be a list. Should re-do it imo.

Mike Harman
Offline
Joined: 7-02-06
Apr 23 2007 15:19

yeah I thought that css would work, but it doesn't, sorry sad

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 23 2007 15:24

not your fault! Felix if you see this - we could do with a hand figuring out how to format it as not a list i think, its in the users.module.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Jun 8 2007 21:00

bump

Felix Frost's picture
Felix Frost
Offline
Joined: 30-12-05
Jun 9 2007 10:38

I can help you with this, but how would you like it to look? I'm not sure what you mean with "format it not as a list".

Mike Harman
Offline
Joined: 7-02-06
Jun 9 2007 12:01

The default output of the users is ul li. We made it look like a comma seperated list via css (li.after) etc. but it's got internet explorer compatibility issues. So an easier thing might be a foreach $user something something - output as simply a list seperated by commas rather than unordered list.

Don't worry about it too much, I'm gradually picking things up and might be able to attack it over the next few weeks, but on the other hand feel free if you fancy it!

Felix Frost's picture
Felix Frost
Offline
Joined: 30-12-05
Jun 9 2007 13:48

It's easy to change, and all the concerned functions are themeable. Right now it's using a generic Drupal function for making lists of stuff . If you make the changes there, this might change how other listed stuff on the site looks, but you can also make the changes for the user list only.

Mike Harman
Offline
Joined: 7-02-06
Jun 9 2007 14:01

Yeah it's changing it just for user lists and replacing the function we want to do. I was hoping there was a "display as comma seperated" function somewhere but I don't think so.

Felix Frost's picture
Felix Frost
Offline
Joined: 30-12-05
Jun 9 2007 15:08

Here's a new user_list function for you. I haven't tested it though, so it will probably need some debugging.

function theme_user_list($users, $title = NULL) {
  $output = '<div class="item-list">';
  if (isset($title)) {
    $output .= '<h3>'. $title .'</h3>';
  }
  if (!empty($users)) {
    foreach ($users as $user) {
      $data = theme('username', $user);
      $output .= $data . ', ';
    }
  }
  $output .= '</div>';
  return $output;
}
Mike Harman
Offline
Joined: 7-02-06
Jun 9 2007 18:44

thankyou muchly!