Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2002, 04:48 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Can someone please tell me which hack this is?

I've been boing crazy trying to find it.

<---- Look to the left where it says Online/Offline. Can you please tell me which hack it is?

I wanted that hack so badly that I ended up doing my own version. It was as simple as adding an if statement to showthread.php.

Thanks in advence.
Reply With Quote
  #2  
Old 03-29-2002, 05:24 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not a hack, just a template mod. Look for offlinebit or something like that, and then you can put it wherever you want. You can see how I mod'ed my postbot at my site.
Reply With Quote
  #3  
Old 03-29-2002, 07:17 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here Zzed i'll give you a hand

first you have to edit the postbit template:

find: $onlinestatus

and place it after the $post[avatar]<p>

then open the both postbit_offline and replace the coding with:

offline

then open the postbit_online and replace the coding with:

online

Hope that helps Zzed

~gforce2001~
Reply With Quote
  #4  
Old 03-29-2002, 07:43 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you gforce2001.

I was trying to avoid modifying any templates. I have about 15 different styles and it is a pain to modify those 2 templates in every single one of them.

My implementation touches only showthread.php.

I added my code directly below this code:
PHP Code:
$counter=0;
while (
$post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

  if (
$postdone[$post[postid]]) {
    
$counter--;
    continue;
  } else {
    
$postdone[$post[postid]]=1;
  } 

This is what I added:
PHP Code:
//Online hack
  
$datecut time() - $cookietimeout;
  
$isonline=$DB_site->query_first("SELECT userid, sessionhash FROM session WHERE userid='$post[userid]' and lastactivity > $datecut");
  if(!
$isonline[userid]){
    
$onlinestat="<p>Offline<br>";
  }
  else{
    if(
$post[invisible]==1){
      if((
$bbuserinfo[usergroupid]==6) or ($bbuserinfo[userid]==$post[userid])){
        
$onlinestat="<p><table style=\"filter:glow(color=#C4C400, strength=3)\"><font face=\"verdana\" size=\"1\">Online</font></table><br>";
      }
      else{
        
$onlinestat="<p>Offline<br>";
      }
    }
    else{
      
$onlinestat="<p><table style=\"filter:glow(color=#C4C400, strength=3)\"><font face=\"verdana\" size=\"1\">Online</font></table><br>";
    }
  }
  
$post[posts]="$post[posts]$onlinestat"
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:53 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.03545 seconds
  • Memory Usage 2,197KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete