![]() |
Lynne,
I'm on 4.2.0, I've followed every instruction twice, disabled all hooks and still can't get this to show. All I see is "Array". Any more ideas? Can I PM you my site details? |
Quote:
|
Quote:
|
Update:
Thank you, Lynne The Great In case anyone has issues, make sure to put in the name of the custom template in the block configuration page (Template To Use). That's the part I missed - Think that should be added to the instructions. Does anyone know how to make this into Avatars? |
Quote:
Quote:
|
1 Attachment(s)
Quote:
|
Quote:
PHP Code:
However you'll need to account for the fact as it stands you'll just get a long line of avatars; you need something in the template code to make them wrap after 4 avatars. Also bear in mind this adds 1 query per avatar. |
Quote:
|
You could rewrite the query that gets the users online and JOIN with the avatar table and get the avatar that way and then you don't get an extra query per user for the avatar. (Check the query for the post user since that query grabs and avatar for the user.)
|
Lynne - Is it possible for you to help create a code for those who want Avatars like Mark.B's?
|
I don't have time to look into do a rewrite here.
|
Thanks. Here's What I did to show Avatars. The only snag is that nothing is shown for users with no avatars. Hope someone can clean it up.
I changed Code:
<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a> Code:
<a class="username" href="{vb:link member, {vb:raw loggedin}}"> |
Your second <img> tag (after the <else> tag) needs to point to wherever your "unknown.png" or "unknown.gif" avatar is - whatever image you want showing up for people with no avatars basically.
|
Quote:
|
Can't seem to get this to display on my forum at all. I'm using 4.2.0 and used the instructions in the files step by step. Simply nothing displayed at all in my sidebar.
|
Did you make sure to change the template name and also create the custom template? And did you add the widget to the layout?
|
How I can get "X members and Y guests" on the same line as "There are currently X members online"? I was increasing forum_sidebar_width for something else and noticed nothing changed in that.
I'm assuming you have line breaks somewhere by default? |
Quote:
HTML Code:
<p>{vb:rawphrase there_are_x_online, {vb:raw content.totalonline}} |
Quote:
By the way, you made a slight mistake in that code above at the beginning. Should be: {vb:rawphrase there_are_x_online_link, |
I actually reverted that change because it was causing problems with our thread titles not staying on one line, and I didn't want to trim titles lower than 20 (default is 30).
However, now I also want to line break the most visitors to reduce the sidebar width even more to hopefully restore the title trimming to the default 30. I tried adding a <br />, but it made this: Quote:
Quote:
Instead of this: Quote:
Quote:
|
You would just add an extra <br /> where you want an extra line.
HTML Code:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /></p> |
Quote:
|
Then add two of them instead of one.
|
Quote:
Quote:
|
I would put it with the others I had added:
Code:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /><br /></p> |
Quote:
Code:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p> Code:
Most users ever online was {1}. <br />{2} at <span class="time">{3}</span>. |
Thanks for this Lynne!
Anyone using the Sidebar Anywhere by BOP5 if you want this block to work on other pages follow the steps below: REPLACE TEMPLATE CODE: Code:
<vb:if condition="$show['loggedinusers']"> WITH: Code:
<li> |
Thanks for posting that Lee Roberts.
|
Hi Lynn, I have attempted this twice. I correctly followed all the steps to the best of my knowledge and the block shows up on my page. It was minus the actual numbers of online users ect. However my bigger issue is that as soon as I enable the plugin I get this errror code at the top of my header. BTW I am running 4.2.2
Parse error: syntax error, unexpected 'is' (T_STRING) in /home/cafeflir/public_html/includes/class_bootstrap.php(1419) : eval()'d code on line 145 Warning: Cannot modify header information - headers already sent by (output started at ..../includes/class_bootstrap.php(1419) : eval()'d code:145) in ..../includes |
Quote:
|
Quote:
https://vborg.vbsupport.ru/external/2013/11/1.png?1 |
I finally got this to appear but purely accidental. I tried reinstalling it again and still got the prior error so I was gonna uninstall it. I removed the plugin I had created and got side tracked removing the rest . When I looked at my forum home page I saw it there. So it ended up working without that plugin mentioned in the install. Could it be using another plugin that was already installed?
|
The plugin for this is only to cache the template. You really don't need the plugin in order for this to work at all, it is just good to cache your templates.
|
Lynne, Wouldn't it just be a simple code change if you wanted this to show only certain usergroups... thus turning it into say a STAFF ONLINE.
I know about the 'staff online' block but that doesn't work for me, I would love to give this one a try and just add a code change to show only specific usergroups 'online' |
Quote:
|
All times are GMT. The time now is 01:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|