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-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 06:14 AM.

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.01095 seconds
  • Memory Usage 1,783KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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