vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Who's Online journal addition (https://vborg.vbsupport.ru/showthread.php?t=48151)

sabret00the 01-26-2003 04:27 AM

Who's Online journal addition
 
i'm sure for a coder of any more experience than myself this is a peice of :p but for me i've stumbled, basically i'm trying to make the online.php say "Viewing Journal of {username} but i've stumbled, i tried to adapt apfeifer "Show Who's Profile User is Viewing in Who's Online" hack to accomodate my needs, but upon testing realised i just didn't do anything, help me please, someone!!! :)

Open online.php and find
PHP Code:

  global $thread$post$forum$event$gotforum$hideprivateforums$bbuserinfo$timeformat$enableemail$enablepms$bbtitle$usergroupdef$numberguests

just before the semi-colon add
PHP Code:

$DB_site

Now find
PHP Code:

    case 'gallery':
      
$userinfo[where] = "Viewing Picture <a href='gallery.php?s=$session[sessionhash]'>Gallery</a>";
      break; 

and directly below it add
PHP Code:

    case 'journal':
      
$userid explode("="$userinfo[location]);
      
$username=$DB_site->query("SELECT username FROM user WHERE userid='$userid'");
      
$username=$DB_site->fetch_array($username);
      if (!
$username[username]) {
        
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
      } else {
        
$userinfo[where] = "Viewing journal of <a href='journal.php?journalid=$userid&action=view&s=$session[sessionhash]'>$username[username]</a>";
      }
      break; 

Now find
PHP Code:

  case 'gallery.php':
    
$userinfo[activity] = 'gallery';
    break; 

and directly below it add
PHP Code:

  case 'journal.php':
    
$userinfo[activity] = 'gallery';
    break; 

Save, Close and upload ;)

sabret00the 01-26-2003 04:50 PM

does nobody have a clue as how to make this work?

Brad 01-27-2003 11:44 PM

Try changing this:

PHP Code:

case 'journal':
      
$userid explode("="$userinfo[location]);
      
$username=$DB_site->query("SELECT username FROM user WHERE userid='$userid'");
      
$username=$DB_site->fetch_array($username);
      if (!
$username[username]) {
        
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
      } else {
        
$userinfo[where] = "Viewing journal of <a href='journal.php?journalid=$userid&action=view&s=$session[sessionhash]'>$username[username]</a>";
      }
      break; 

to this:

PHP Code:

case 'journal':
      
$userid explode("="$userinfo[location]);
      
$username=$DB_site->query("SELECT username FROM user WHERE userid='$userid'");
      
$username2=$DB_site->fetch_array($username);
      if (!
$username2[username]) {
        
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
      } else {
        
$userinfo[where] = "Viewing journal of <a href='journal.php?journalid=$userid&action=view&s=$session[sessionhash]'>$username2[username]</a>";
      }
      break; 

then change this:

PHP Code:

case 'journal.php':
    
$userinfo[activity] = 'gallery';
    break; 

to this:

PHP Code:

case 'journal.php':
    
$userinfo[activity] = 'journal';
    break; 


sabret00the 01-28-2003 06:03 PM

thanks loo :D :D :D :D :D, i'll try it now

sabret00the 01-28-2003 06:28 PM

sadly it didn't work, but hey you tried so thank you!

Bane 02-11-2003 07:52 PM

This SHOULD work :) Let me know if not.

OPEN online.php

Remove any journal stuff you added

FIND
PHP Code:

    case 'spider':
      
$userinfo[where] = "Search Engine Spider";
      break; 





ABOVE that INSERT
PHP Code:

// [BEGIN Edit] Show Who's Journal is being read
    
case 'journal':
      
$userid explode("="$userinfo[location]);
      
$username=$DB_site->query("SELECT username FROM user WHERE userid='$userid[2]'");
      
$username=$DB_site->fetch_array($username);
      if (!
$username[username]) {
        
$userinfo[where] = "Viewing <a href='journal.php?s=$session[sessionhash]'>Journals</a>";
      } else {
        
$userinfo[where] = "Viewing Journal of <a href='journal.php?s=$session[sessionhash]&userid=$userid[2]&action=view'>$username[username]</a>";
      }
      break;
// [END Edit] Show Who's Journal is being read 





FIND
PHP Code:

  case '/robots.txt':
    
$userinfo[activity] = 'spider';
    break; 





ABOVE that INSERT
PHP Code:

// [BEGIN Edit] Show Who's Journal is being read
  
case 'journal.php':
    
$userinfo[activity] = 'journal';
    break;
// [END Edit] Show Who's Journal is being read 


sabret00the 02-20-2003 12:42 PM

yay it works, thank you so much bane ^_^

Bane 02-20-2003 01:03 PM

=) Glad to help.

Rose 02-20-2003 01:25 PM

:$ I hope you don't mind, but with a minor edit here and there, this has helped me greatly to add a few locations to my WOL. :D Thanks! :$

zefman 03-08-2003 05:55 AM

thks too ! i have added this feature for my board :)

the journal hack is a fantastic thing but suffer of the absence of possibility to search in the members journals


All times are GMT. The time now is 01:44 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.01086 seconds
  • Memory Usage 1,780KB
  • 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
  • (14)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete