vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Online/Offline Status with Avatar Opacity (https://vborg.vbsupport.ru/showthread.php?t=46987)

Grendel602 12-25-2002 08:17 PM

We are working on that aspect right now hellsatan.

:)

Thanks for the input.

Grendel602 12-25-2002 09:12 PM

Done.

New updated Zip file is attached with updated install file.

Now users that do not have avatars will stay that way. In addition, if a user chooses not to view avatars he/she will not see them.

Before, the coding was not nested in that particular if/else.

- Nomb

:D

Chris M 12-25-2002 09:17 PM

Cool:)

Satan

alkatraz 12-26-2002 05:50 AM

Cool idea!

Nomb 12-26-2002 01:22 PM

Quote:

Originally posted by alkatraz
Cool idea!
Thanks. It's worked out quite well for us. The other thing you could do, I might, is make a default avatar (Something to do with your site, your logo maybe) and have vB assign it to new members until they choose one of their own. This way, you'd know if they were online or not.

:D

Kars10 12-26-2002 02:18 PM

If you want you can show the online/offline-status by hovering over the avatars:

In postbit_avataroffline

replace all with...

Code:

<img src="$avatarurl" border="0" alt="$post[ username] is offline!" style="filter:alpha(opacity=50)">
and in postbit_avatar

replace all with...

Code:

<img src="$avatarurl" border="0" alt="$post[ username] is online!">
Note: delete the empty space between [ and username!

Brad 12-26-2002 07:23 PM

Quote:

Originally posted by Nomb


Thanks. It's worked out quite well for us. The other thing you could do, I might, is make a default avatar (Something to do with your site, your logo maybe) and have vB assign it to new members until they choose one of their own. This way, you'd know if they were online or not.

:D

http://www.vbulletintemplates.com/mo...ghlight=avatar

Nomb 12-26-2002 07:37 PM

Quote:

Originally posted by Anime-loo


http://www.vbulletintemplates.com/mo...ghlight=avatar

Yea, I already implemented something similar at our boards. We are just using the noavatar.gif.

Here's a snippit of the code for admin/functions.php, although, you should edit private.php and announcement.php as well.

PHP Code:

        if ($post[avatarid]!=0) {
            
$avatarurl=$post[avatarpath];
        } else {
            if (
$post[hascustomavatar] and $avatarenabled) {
                
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
            } else {
                
$avatarurl="images/avatars/noavatar.gif";
            }
        }
        if (
$bbuserinfo[userid]>and !($bbuserinfo[showavatars])) {
            
$post[avatar]="";
        } else {
            if (
$post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
                 eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
              } else {
                 eval(
"\$post[avatar] = \"".gettemplate("postbit_avataroffline")."\";");
              }
        } 

Using this your members will have a "no avatar selected" avatar if they haven't used a custom avatar and it will still function like the others (Online/Offline low opacity status).

I'll probably update the hack later but I don't have time right now. :P

Here's the noavatar.gif file which should be placed in images/avatars/

Brad 12-26-2002 07:47 PM

i prefer editing the templates for something like that but whatever suits your fancy :p

Nomb 12-26-2002 07:50 PM

Quote:

Originally posted by Anime-loo
i prefer editing the templates for something like that but whatever suits your fancy :p
The whole point of this is to show Online/Offline Status via Avatar opacity. That, you cannot do in a template. It has to be coded in php.


All times are GMT. The time now is 12:50 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.01181 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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