vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Can someone please tell me which hack this is? (https://vborg.vbsupport.ru/showthread.php?t=36715)

Zzed 03-29-2002 04:48 PM

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.

filburt1 03-29-2002 05:24 PM

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.

g-force2k2 03-29-2002 07:17 PM

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 :D

~gforce2001~

Zzed 03-29-2002 07:43 PM

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"



All times are GMT. The time now is 08:58 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.00931 seconds
  • Memory Usage 1,725KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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