vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Avatar's opacity according to user's status (online/offline) (https://vborg.vbsupport.ru/showthread.php?t=64606)

Torben 07-27-2004 03:21 PM

Cool hack.
To clarify, the code posted above doesn't do anything for the actual posts being made right? So am I to disregard the original hack on the first page and use what's posted above instead or do I use both?

SmartGnome 07-27-2004 03:32 PM

Thanks guys, install was a piece of cake...... great feature

Install is clicked

The Coldwood 07-28-2004 12:42 AM

It is quite hard to install that hack - I will tell you that.

alastair 09-04-2004 08:13 PM

i installed the version the second two guys thought of

/me thumbs up

Cold Steel 09-26-2004 05:55 PM

I couldn't get the memberlist to show non-opaque avatars, so I didn't even try the memberinfo.

But the second version of postbit works great. Installed -- thanks!

Code Monkey 10-31-2004 05:01 PM

A little less code.

PHP Code:


                   
<if condition="$show['avatar']">
                    &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurlalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0"<if condition="$post[IsOnline] == false"style="filter:alpha(opacity=30);-moz-opacity:0.3;opacity: 0.3;"</if> /></a>
          </if> 


Code Monkey 10-31-2004 05:57 PM

Actually, there is no need for the code in functions_bigthree.php in MEMBERINFO. There is probably some already existing value in the others to check too.

MEMBERINFO

use the existing info in $userinfo['action'] like this

PHP Code:

            <if condition="$show['avatar']">
                <
td><img src="$userinfo[avatarurl]alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none<if condition="$userinfo['action'] == false">;filter:alpha(opacity=40);-moz-opacity:0.4;opacity: 0.4;</if>" /></td>
            <else />
                <
td>&nbsp;</td>
            </if> 


Code Monkey 10-31-2004 08:38 PM

You can get rid of the switch in bigthree by just difining in the existing code.

PHP Code:

    $onlinestatus 0;
    
$user['IsOnline'] = false;
    
// now decide if we can see the user or not
    
if ($user['lastactivity'] > $datecut AND $user['lastvisit'] != $user['lastactivity'])
    {
        if (
$user['invisible'])
        {
            if ((
$permissions['genericpermissions'] & CANSEEHIDDEN) OR $user['userid'] == $bbuserinfo['userid'])
            {
                
// user is online and invisible BUT bbuser can see them
                
$user['invisiblemark'] = '*';
                
$onlinestatus 2;
                
$user['IsOnline'] = true;
            }
        }
        else
        {
            
// user is online and visible
            
$onlinestatus 1;
            
$user['IsOnline'] = true;
        }
    } 

Saves a switch statement. But memberlist_resultsbit doesn't seem to access this info.

yoyoyoyo 02-17-2005 12:51 PM

very cool hack! I just discovered this and it installed fine in 3.0.6, in less than 3 minutes... thanks much!

TTG 03-10-2005 01:56 PM

Neat little hack .. thanks
Clicked install


All times are GMT. The time now is 04:21 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.01242 seconds
  • Memory Usage 1,753KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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