vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Very Unique Hack Request (https://vborg.vbsupport.ru/showthread.php?t=48109)

Guidster 01-25-2003 02:23 AM

Very Unique Hack Request
 
I would like to memorialize a fallen friend on my board by making it appear that he is online with us 27/7 and users can select his name from the online list to learn a little about who is was.....Basically a user account that always gives the impression that its online.

Is this a possibility? This would be a GREAT trubute to my friend.

Thanks

Logician 01-25-2003 08:21 AM

Edit index.php, find

PHP Code:

  $numberinvisible=$numberregistered-$numbervisible

After that add:

PHP Code:

// User Always ONline Hack
// User's user name:
$special_users_username='MyUser';
// User's thread:
$special_users_threadid=1000;
 
$activeusers="<a href=\"showthread.php?".$session[sessionhash]."&threadid=$special_users_threadid\"><b>$special_users_username</b></a>, ".$activeusers;
 
$totalonline++;
 
$numberregistered++;
// User Always ONline Hack 

(Edit username and threadid above).

This hack adds the username to who is online list in the main page ( but not to online.php) taking the first position in that list and listed as BOLD too. If someone clicks that name, he is taken to a thread you entered its id above.

Enjoy..

Guidster 01-25-2003 10:01 PM

Thank you SO much for this! This means a tremendous amount to me and the users of my board! I am going to go and put it up right now!

Logician 01-25-2003 11:23 PM

Quote:

Originally posted by Guidster
Thank you SO much for this! This means a tremendous amount to me and the users of my board! I am going to go and put it up right now!
yw.. I noticed that you applied it and it works ok in your board.. However don't forget to edit threadid in hack code and point to a thread related to your friend, because threadid is broken in your board. ;)

Guidster 01-26-2003 03:30 PM

Quote:

Originally posted by Logician

yw.. I noticed that you applied it and it works ok in your board.. However don't forget to edit threadid in hack code and point to a thread related to your friend, because threadid is broken in your board. ;)

I am working on an appropriate thread today. In the meantime, as you witnessed, it just states that the requested thread is invalid.

Thanks again, his father was in tears when he saw this tribute to his son!

Automated 02-13-2003 09:36 AM

Would it be possiable to get this to show up on the online.php page and also to make the user's status "Online!" in the postbit?

Thanks
Matthew

Automated 02-13-2003 09:45 PM

please?

Webdork 02-14-2003 11:41 PM

Nice gesture!

Automated 02-15-2003 10:14 PM

Quote:

Originally posted by Automated
Would it be possiable to get this to show up on the online.php page and also to make the user's status "Online!" in the postbit?

Thanks
Matthew

Anyone ?

Automated 02-17-2003 10:13 PM

Quote:

Originally posted by Automated
Would it be possiable to get this to show up on the online.php page and also to make the user's status "Online!" in the postbit?

Thanks
Matthew

Please :chinese:

Guidster 01-04-2005 02:06 AM

I once again want to thank Logician for this wonderful hack that has become a cornerstone of our site and a wonderful memorial to a fallen comrade. We finally got around to upgrading the site to vB3 and would like to know if this hack will still play and be nice with the latest version. If not, can it be modified to do so? Thank you for any and all assistance that can be provided!

noppid 01-04-2005 02:47 AM

Hat's off to both of you! For concieving the idea and bringing it to reality.

Logician 01-04-2005 03:06 PM

1 Attachment(s)
Here is the Vb3 version.

RoC-RTCWCentral 01-04-2005 05:27 PM

This is a great way of paying tribute to a gone but definitely not forgotten friend. Thanks for making this suggestion Guidster and to Logician for making it a reality.

RoC

jw00dy 01-05-2005 12:31 AM

Quote:

Originally Posted by Logician
Here is the Vb3 version.

Thank you so much for this updated version. I'm the guy implementing this (with Guidster) and it's worked GREAT! So thank you.

Question: Is their any way to get the name to list first (top row, first person) & make it so when you click on this user that it takes you to his thread?

So far it does list him on the top row, but my name (Woody_CRF) is always first?

TIA, I really appreciate this.

Logician 01-05-2005 08:20 AM

1- To make the user first to list, here is the code to change:
find:
PHP Code:

    if ($bbuserinfo['userid'])
    {
        
// fakes the user being online for an initial page view of index.php
        
$bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
        
$userinfos = array
        (
            
$bbuserinfo['userid'] => array
            (
                
'userid' => $bbuserinfo['userid'],
                
'username' => $bbuserinfo['username'],
                
'invisible' => $bbuserinfo['invisible'],
                
'inforum' => 0,
                
'lastactivity' => TIMENOW,
                
'usergroupid' => $bbuserinfo['usergroupid'],
                
'displaygroupid' => $bbuserinfo['displaygroupid'],
            )
        );
    }
    else
    {
        
$userinfos = array();
    }
    
$inforum = array();
        
// Logician hack : This user is always on in forum home useronline section
        
$userid_of_always_on_user 2;
        
$userinfos[$userid_of_always_on_user]['userid'] = $userid_of_always_on_user
        
$userinfos[$userid_of_always_on_user]['username'] = 'My User'
        
$userinfos[$userid_of_always_on_user]['invisible'] = 0;
        
$userinfos[$userid_of_always_on_user]['inforum'] = 0;
        
$userinfos[$userid_of_always_on_user]['lastactivity'] = TIMENOW;
        
$userinfos[$userid_of_always_on_user]['usergroupid'] = 2;
        
$userinfos[$userid_of_always_on_user]['displayusergroupid'] = 2;
        
// Logician hack : This user is always on in forum home useronline section 

replace it as

PHP Code:

// Logician hack : This user is always on in forum home useronline section
        
$userid_of_always_on_user 2;
        
$userinfos[$userid_of_always_on_user]['userid'] = $userid_of_always_on_user
        
$userinfos[$userid_of_always_on_user]['username'] = 'My User'
        
$userinfos[$userid_of_always_on_user]['invisible'] = 0;
        
$userinfos[$userid_of_always_on_user]['inforum'] = 0;
        
$userinfos[$userid_of_always_on_user]['lastactivity'] = TIMENOW;
        
$userinfos[$userid_of_always_on_user]['usergroupid'] = 2;
        
$userinfos[$userid_of_always_on_user]['displayusergroupid'] = 2;

    if (
$bbuserinfo['userid'])
    {
        
// fakes the user being online for an initial page view of index.php
        
$bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
        
        
$userid_of_always_myself $bbuserinfo['userid'];
        
$userinfos[$userid_of_always_myself]['userid'] = $bbuserinfo['userid']; 
        
$userinfos[$userid_of_always_myself]['username'] = $bbuserinfo['username']; 
        
$userinfos[$userid_of_always_myself]['invisible'] = $bbuserinfo['invisible'];
        
$userinfos[$userid_of_always_myself]['inforum'] = 0;
        
$userinfos[$userid_of_always_myself]['lastactivity'] = TIMENOW;
        
$userinfos[$userid_of_always_myself]['usergroupid'] = $bbuserinfo['usergroupid'];
        
$userinfos[$userid_of_always_myself]['displayusergroupid'] = $bbuserinfo['displaygroupid'];
    
    }
    else
    {
        
//
    
}
    
$inforum = array();
// Logician hack : This user is always on in forum home useronline section 

2- To link a thread instead of his profile, edit member.php, find:
PHP Code:

if ($find == 'firstposter' AND $threadid

BEFORE that add:
PHP Code:

// Logician hack : This user is always on in forum home useronline section
if ($userid==XX) {header("Location: http://www.yoursite.com/forum/showthread.php?$session[sessionurl]t=YY");}
// Logician hack : This user is always on in forum home useronline section 

(Remember to update XX for userid of the user, YY for thread id and the url to your board in the code above)

Logician 01-05-2005 08:25 AM

btw if you like to release this hack here you have my permission to do so with your own name. I have too many hack releases so I don't want to release many more as it is hard for me to support them.

jw00dy 01-07-2005 05:51 AM

LOL, that's pretty funny :D I'd have to actually know what it says and what each function is doing to support it ;)

I got the 2nd part implemented and it's working GREAT!!! Thank you.

I did have to adjust one minor thing in the member.php part of the hack. For some reason vB 3.0.4 (which we have) didn't like the $session[sessionurl] part of the link (I don't see session url's with this version at all), so I removed it and it's working as hoped. Otherwise when you click on it you still get the the members profile link with his number, but it returns a blank page.

Just as an example is anyone else uses this.

Original
PHP Code:

// Logician hack : This user is always on in forum home useronline section 
if ($userid==XX) {header("Location: http://www.domain.com/forum/showthread.php?$session[sessionurl]t=YY");} 
// Logician hack : This user is always on in forum home useronline section 

Should be:
PHP Code:

// Logician hack : This user is always on in forum home useronline section 
if ($userid==XX) {header("Location: http://www.domain.com/forums/showthread.php?t=YY");}                
// Logician hack : This user is always on in forum home useronline section 

Again, don't forget to change XX to the UserID Number, YY to the Thread number, & www.domain.com to your domain.

Thanks again Logician. I don't know if you realize how much we appreciate this or not, but WE REALLY DO!!! So thank you. :up:

nitro 02-07-2006 01:03 AM

Any idea what hook location this would work under for 3.5 ?

It still works as an edit fine but Iv tried just about every relavent looking hook possible with no joy, I think forumhome_loggedin arives to late.


All times are GMT. The time now is 04:44 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.01358 seconds
  • Memory Usage 1,826KB
  • 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
  • (8)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete