vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin Forum Sideblocks - Block - Users Online (https://vborg.vbsupport.ru/showthread.php?t=233965)

Lynne 10-23-2012 04:02 PM

I don't have time to look into do a rewrite here.

Big-K 10-24-2012 03:57 PM

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>
to
Code:

            <a class="username" href="{vb:link member, {vb:raw loggedin}}">
<vb:if condition=$loggedin['avatarurl']>
<img src="image.php?u={vb:raw loggedin.userid}" alt="{vb:raw loggedin.musername}" />
<vb:else />
<img class="avback" src="{vb:stylevar imgdir_misc}/unknown.gif" alt="{vb:raw loggedin.musername}" />
</vb:if></a>


Mark.B 10-24-2012 05:13 PM

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.

Big-K 10-25-2012 08:11 AM

Quote:

Originally Posted by Mark.B (Post 2375693)
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.

You're right and I've edited accordingly. The issue though is that the "<vb:if condition=$loggedin['avatarurl']>" syntax doesn't work due to incorrect placement of the block code. Could you please respond to my post #209?

patracy 12-15-2012 05:33 PM

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.

Lynne 12-15-2012 05:50 PM

Did you make sure to change the template name and also create the custom template? And did you add the widget to the layout?

Amaury 02-05-2013 06:14 AM

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?

Lynne 02-05-2013 03:58 PM

Quote:

Originally Posted by Amaury25 (Post 2402020)
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?

Remove the <br /> in here:
HTML Code:

<p>{vb:rawphrase there_are_x_online, {vb:raw content.totalonline}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>


Amaury 02-05-2013 04:15 PM

Quote:

Originally Posted by Lynne (Post 2402114)
Remove the <br /> in here:
HTML Code:

<p>{vb:rawphrase there_are_x_online, {vb:raw content.totalonline}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>


Thanks, Lynne. Removed it. :)

By the way, you made a slight mistake in that code above at the beginning.

Should be: {vb:rawphrase there_are_x_online_link,

Amaury 02-13-2013 05:18 PM

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:

Most users ever online was 118, 9/11/2012 at 4:16 AM.
...look like this:

Quote:

Most users ever online was 118,
at 9/11/2012.
I also want to add spacing in-between.

Instead of this:

Quote:

There are currently X users online.
X members and X guests
Most users ever online was 118
9/11/2012 at 4:16 AM.
User 1, User 2, User 3
...it would look like this:

Quote:

There are currently X users online.
X members and X guests

Most users ever online was 118
9/11/2012 at 4:16 AM.

User 1, User 2, User 3
Thanks in advance.


All times are GMT. The time now is 04:23 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
  • Page Generation 0.01238 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete