vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Add-On Modules & Modifications

 
 
Thread Tools Display Modes
  #1  
Old 02-08-2004, 01:04 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Add Your Homepage to Your "Who's Online" Locations

This simple mod will allow you to add your homepage to the "Who's Online" locations on your forum.

First, open your includes/functions_online.php file and look for:
PHP Code:
        case 'index':
            
$userinfo['action'] = $vbphrase['viewing_index'];
            
$userinfo['where'] = "<a href=\"$vboptions[forumhome].php?$session[sessionurl]\">$vboptions[bbtitle]</a>";
            break; 
Right below that Add:
PHP Code:
        case 'home':
            
$userinfo['action'] = 'Viewing Homepage';
            
$userinfo['where'] = "<a href=\"$vboptions[homeurl]?$session[sessionurl]\">$vboptions[hometitle]</a>";
            break; 
Next, look for:
PHP Code:
    case 'cron.php'// this shouldn't occur but just to be sane 
Replace that with:
PHP Code:
    case 'cron.php'// this shouldn't occur but just to be sane
        
$userinfo['activity'] = 'home';
        break; 
Upload your includes/functions_online.php file and you're done.
  #2  
Old 02-08-2004, 02:48 PM
Zachery's Avatar
Zachery Zachery is offline
Super Moderator
 
Join Date: Jan 2004
Posts: 3,157
Default Re: Add Your Homepage to Your "Who's Online" Locations

Mmm helpfull for me now i can modify vBXirc to do the same
__________________
Zachery
vBadvanced Support & SysAdmin

  #3  
Old 02-09-2004, 11:33 PM
Acido Acido is offline
Member
 
Join Date: Jan 2004
Posts: 60
Thumbs up Re: Add Your Homepage to Your "Who's Online" Locations

Quote:
Originally Posted by Faranth
Mmm helpfull for me now i can modify vBXirc to do the same
Exactly !

Big thanx Brian !!!
  #4  
Old 02-10-2004, 08:47 AM
Rids Rids is offline
Junior Member
 
Join Date: Jan 2004
Posts: 28
Default Re: Add Your Homepage to Your "Who's Online" Locations

Nice addon, it works a treat
  #5  
Old 02-10-2004, 04:28 PM
PET's Avatar
PET PET is offline
Member
 
Join Date: Feb 2004
Location: Timisoara/Romania
Posts: 41
Default Re: Add Your Homepage to Your "Who's Online" Locations

hmm...i replace adv_index.php with index.php and the forum index is now index2.php. When a user is in FORUM INDEX (index2.php) i get this :

Unknown Location
/ro-hattrick/vb/index2.php

Do you know ho can i modify this to write Forum Index ?

P.S. Sorry for posting here...but i don't want to create another thread.
  #6  
Old 02-19-2004, 06:45 PM
bigjay bigjay is offline
Junior Member
 
Join Date: Feb 2004
Posts: 5
Default Re: Add Your Homepage to Your "Who's Online" Locations

works thanks!
  #7  
Old 03-04-2004, 12:11 PM
Morrus Morrus is offline
Member
 
Join Date: Feb 2004
Posts: 79
Default Re: Add Your Homepage to Your "Who's Online" Locations

I'm having some difficulty getting this to work. It's not breaking anything, so no major worries, but users are still showing up as "Unknown Location".

Does it make a difference that my vBa homepage is called "news.php"?

For those who changed this to cover over pages, too (I have a links hack and vBXIRC installed), would you be so kind as to show me how you did it? I don't understand the phrasing system well enough to be able to tweak it. Thanks!
  #8  
Old 03-10-2004, 03:36 AM
BNR34Freak BNR34Freak is offline
Junior Member
 
Join Date: Feb 2004
Posts: 2
Default Re: Add Your Homepage to Your "Who's Online" Locations

I never got it to work it just shows "unknown location" in bold. I do have my vBA page named as home.php which may be a problem but I'm not 100% sure it could be.
  #9  
Old 03-10-2004, 03:49 AM
Morrus Morrus is offline
Member
 
Join Date: Feb 2004
Posts: 79
Default Re: Add Your Homepage to Your "Who's Online" Locations

Yeah, I'm still having that problem. It's not a major issue, though - I know what the displayed URL means.
  #10  
Old 03-21-2004, 09:29 PM
Acido Acido is offline
Member
 
Join Date: Jan 2004
Posts: 60
Default Re: Add Your Homepage to Your "Who's Online" Locations

Is Not working for me

I have adv_index as forum home page, and users there show the correct location in Who's Online.
But user listing all the forums (index.php) are still showed as "Unknown Location"

can you give a hand ?
  #11  
Old 03-26-2004, 12:25 PM
Preds Preds is offline
Junior Member
 
Join Date: Mar 2004
Posts: 20
Default Re: Add Your Homepage to Your "Who's Online" Locations

Works great. Installed w/o difficulty on my vB 3.0.0 board.

Thanks!
  #12  
Old 03-28-2004, 02:11 PM
FleaBag's Avatar
FleaBag FleaBag is offline
Member
 
Join Date: Mar 2004
Posts: 99
Default Re: Add Your Homepage to Your "Who's Online" Locations

Thanks for this.
  #13  
Old 03-28-2004, 02:32 PM
jluerken's Avatar
jluerken jluerken is offline
Member
 
Join Date: Mar 2004
Posts: 68
Default Re: Add Your Homepage to Your "Who's Online" Locations

Hi Brian,

I set this
PHP Code:
case 'home'
            
$userinfo['action'] = 'Viewing Homepage'
            
$userinfo['where'] = "<a href=\"$vboptions[homeurl]?$session[sessionurl]\">$vboptions[hometitle]</a>"
            break; 
to this
PHP Code:
case 'home'
            
$userinfo['action'] = 'Viewing Portal'
            
$userinfo['where'] = "<a href=\"$vboptions[homeurl]?adv_index.php\">Portal</a>"
            break; 
But its not showing up?
Can you give me a hint please?
  #14  
Old 04-01-2004, 05:16 PM
buro9 buro9 is offline
Junior Member
 
Join Date: Mar 2004
Posts: 2
Default Re: Add Your Homepage to Your "Who's Online" Locations

Quote:
Originally Posted by Brian
Next, look for:
PHP Code:
    case 'cron.php'// this shouldn't occur but just to be sane 
Replace that with:
PHP Code:
    case 'cron.php'// this shouldn't occur but just to be sane
        
$userinfo['activity'] = 'home';
        break; 
Upload your includes/functions_online.php file and you're done.
I found this end solution to that block of code worked better:

PHP Code:
  case '/':
  case 
'':
  case 
'cron.php'// this shouldn't occur but just to be sane
  
case "$vboptions[forumhome].php":
    
// HACK : START : VBADVANCED
    // $userinfo['activity'] = 'index';
    
if (strpos($userinfo['location'], "forum") === false) {
      
$userinfo['activity'] = 'home';
    } else {
      
$userinfo['activity'] = 'index';
    }
    
// HACK : END : VBADVANCED
    
break; 
Essentially, I have these URL's:
http://www.bowlie.com/ - vBadvanced
http://www.bowlie.com/forum/ - vBulletin

The word "forum" that I search for is the directory name for the forum, by checking whether it exists in the users location (as per session db table) I can differentiate between the vbadvanced homepage and the forum index.

Note that this would also solve my other problem of how to recognise other pages such as the hosting page:
http://www.bowlie.com/hosting/

As I could just put a new switch within the 'false' block in the 'if' statement to check for the existence of other folder names.

Might be useful to someone
  #15  
Old 04-01-2004, 11:40 PM
cLord's Avatar
cLord cLord is offline
T.A.F.K.A.M.
 
Join Date: Mar 2004
Posts: 124
Default Re: Add Your Homepage to Your "Who's Online" Locations

ThanX!
Works 100%

cLord
  #16  
Old 04-02-2004, 07:24 AM
cLord's Avatar
cLord cLord is offline
T.A.F.K.A.M.
 
Join Date: Mar 2004
Posts: 124
Default Re: Add Your Homepage to Your "Who's Online" Locations

Well...
It worked for a couple of minutes and then all of a sudden it stopped and I have the same problem as the other people in this thread!

Please help,
cLord
  #17  
Old 04-07-2004, 07:36 AM
jluerken's Avatar
jluerken jluerken is offline
Member
 
Join Date: Mar 2004
Posts: 68
Default Re: Add Your Homepage to Your "Who's Online" Locations

I always get this, no matter what I do:
Unknown Location
/forum/adv_index.php?

At the moment I am using this code:
case 'adv_index':
$userinfo['action'] = 'Viewing Portal';
$userinfo['where'] = "<a href=\"$vboptions[homeurl]?adv_index.php\">CFN Portal Page</a>";
break;

Can someone please tell me how I can get rid of this and exchange this that 'Portal Page' is displayed?
  #18  
Old 05-04-2004, 11:22 AM
iguanairs iguanairs is offline
Senior Member
 
Join Date: Mar 2004
Location: MA
Posts: 116
Default Re: Add Your Homepage to Your "Who's Online" Locations

Hello,
I believe I located what everyones problem is,however,I could be mistaken. Initially when I first installed this,I too had temporary and occasional success with it reading everything correctly,but I was also receiving the "unknown" as well. Today,I reinstalled this. This time however,I did something different. I open my "includes/functions_online.PHP file with word pad,and made the necessary changes using cut and paste. (I am lazy!) I DID NOT UPLOAD IT YET!
I then REOPENED it and looked for the code again. Well the cut and paste did not line up with the existing code and added a space under the line as well. I manually aligned everything so it matched the existing code,and removed the space after the "cron" change. I then installed it. I haven't received the unknown location error since.
This may be the same problem everyone else is having. Take a look! If i knew how to write the PHP in those blocks like all the advanced PHP writers do,I would have added some examples. Hope this description helps everyone!
__________________
Herp Center | Reptile Forums
  #19  
Old 05-05-2004, 05:25 AM
ogetbilo's Avatar
ogetbilo ogetbilo is offline
Member
 
Join Date: Apr 2004
Posts: 68
Default Re: Add Your Homepage to Your "Who's Online" Locations

Hi buro9,
To display other folders (like the ''hosting" one you did) on the who is online page, I modified this code

PHP Code:
  case '/':
  case 
'':
  case 
'cron.php'// this shouldn't occur but just to be sane
  
case "$vboptions[forumhome].php":
    
// HACK : START : VBADVANCED
    // $userinfo['activity'] = 'index';
    
if (strpos($userinfo['location'], "forum") === false) {
      
$userinfo['activity'] = 'home';
    } else {
      
$userinfo['activity'] = 'index';
    }
    
// HACK : END : VBADVANCED
    
break; 
to

PHP Code:
case '/':
        case 
'':
        case 
'cron.php'// this shouldn't occur but just to be sane

           
case "$vboptions[forumhome].php":
    
// HACK : START : VBADVANCED
    // $userinfo['activity'] = 'index';
    
if (strpos($userinfo['location'], "forum") === false) {
      if (
strpos($userinfo['location'], "ABCD"))
        {
        
$userinfo['activity'] = 'ABCD';
        }
      else
        {
        
$userinfo['activity'] = 'home';
        }
    } else {
      
$userinfo['activity'] = 'index';
    }
    
// HACK : END : VBADVANCED
    
break; 
I also added a
case 'ABCD':
$userinfo['action'] = $vbphrase['ABCD'];

under the $userinfo['activity'] switch (and added the necessary phrase of course). But I still couldn't get it work. It still shows me the 'home' page when somebody is in the ABCD.

Where am I wrong?
  #20  
Old 05-24-2004, 01:41 AM
hkeleher hkeleher is offline
Junior Member
 
Join Date: May 2004
Posts: 4
Default Re: Add Your Homepage to Your "Who's Online" Locations

I'm getting the following as well:

Unknown Location
/forum/forum_index.php?

I've tried tweaking it but I don't know php at all. Kinda lost on this one, heheh.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 -4. The time now is 02:52 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.