Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Who's Online page (http://www.mysidiaadoptables.com/forum/showthread.php?t=4725)

parayna 12-11-2014 08:00 AM

Who's Online page
 
Hey guys. How would you make it so that the Who's Online page on your site displays names like this:

USERNAME, USERNAME, USERNAME, USERNAME (etc)

So like each name is seperated by only a comma and is on the same line and not underneath each other like in the table (the default one where there is multiple fields filled in). It would only go onto the new line if/when the last name is too big to fit in the space left on the page, in which case it would go underneath the first name.

Basically I have already removed the other fields as I didn't think that my members would like their gender being displayed, or their money (as has been the case on a few sites, people have started begging those with loads of money to donate to them) And the nickname and how many pets people had fields just seemed pointless to me, for my site at least. At the moment it displays names like this:

USERNAME,
USERNAME,
USERNAME,
(etc)

How would I go about fixing it? I have been tinkering with the code but nothing I do/look up seems to help... would it be to do with the CSS, or the view file? Or something? XD

Thanks,

~Parayna

Kyttias 12-11-2014 10:10 AM

Try commenting out $onlineLink->setLineBreak(TRUE); in view/onlineview.php? If you add a comma after the span with the username, it'll be showing up after even the last one, but that can't be helped (and works out well, if you left in the Total Visitors:). In addition to the comma you added after the username, you'll want to add a space, too. ^^

The class .onlinelistt is giving the span holding the username a width of 17%. It's being defined in **root**/css/online.css, so you can safely remove the width line.

It's hard for me to test this since I'm the only member on my site. @_@ But to recap, the entire while statement in onlineview.php should now look like this:

PHP Code:

while($username $stmt->fetchColumn()){
            
$user = new Member($username);
            
$user->getprofile();
            
$onlineLink = new Link("profile/view/{$username}");
            
$onlineLink->setClass("onlinelist");
            
$onlineText "<span class='onlinelistt'>{$user->username}, </span>";                      
            
$onlineLink->setText($onlineText);
            
$document->add($onlineLink);                     
        } 

And I think you already found the line to modify in lang/lang_online.php to remove the top of the pseudo-table that was going on, so I won't need to go into that. ^^

parayna 12-11-2014 12:20 PM

Thank you! It worked! ^_^


All times are GMT -5. The time now is 09:45 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.