Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2002
Posts: 147
Member
Member
Offline
Joined: Mar 2002
Posts: 147
I would like to add pages to the online.php. I have succeeded in doing so but.....

When a user shows up as being on one of those pages there is a 0 after the page description on the Who's online page.

i.e. Anonymous 05/30/02 01:27 PM Viewing an External page0

When using the IIP online.php modification it works fine.

What am I missing?

Sponsored Links
Joined: Apr 2002
Posts: 206
Member
Member
Offline
Joined: Apr 2002
Posts: 206
it's one of those weird bugs noone has tracked down yet...

Joined: Mar 2002
Posts: 147
Member
Member
Offline
Joined: Mar 2002
Posts: 147
But... The IIP does not show up with a 0 at the end.

JustDave. Let me in on your little secret.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
LoL no secret stuff going on there... but if you want to talk about the majestic 7 or the aurora project we might get a bunch of .gov hits around here.

I'm not sure if that 0 is being added by specific text editor carriage returns or what. All that is needed is an entry in the online.php file in the related language directory. In the online.php file add a variable that uses the name of the page you wish to show up in the "Who's Online" screen.

Example:

If your page is named mypage.php you would create a variable such as:
$ubbt_lang['mypage'] = "Looking at my page!";

or for a page named guestbook.php you would add this variable:
$ubbt_lang['guestbook'] = "Reading the Guest Book!";

Also, the easiest way for the database to be updated with the online information is to use .threads for sending the header and footer. The ubbt.inc.php script adds the page name to the online data. (also, this way they carry the same look through out too)

And, just to note, proabably check the variables in the online.php script and make sure there are no control characters present at the ends of the strings. Maybe backspacing from the double quote a character or two then typing them back in would help?

Joined: Mar 2002
Posts: 147
Member
Member
Offline
Joined: Mar 2002
Posts: 147
Thanks Dave.

That's the method that I have been using. I checked the file and and found nothing different than the other entries there.

I even tried manually typing the line in so it wasnt a copy and paste. Top of the file bottom of the file. No luck.

Sponsored Links
Joined: Mar 2002
Posts: 147
Member
Member
Offline
Joined: Mar 2002
Posts: 147
Ok... Here is some more info for you.

I only see the 0 if the user viewing the external page is anonymous.

So the "bug" must be somewhere after line 188 of online.php .

Joined: Mar 2002
Posts: 147
Member
Member
Offline
Joined: Mar 2002
Posts: 147
If $What = the page you are viewing and $Extra is what your are doing there i.e.veiwing post "xxxxxxx"

Is it possible with the external pages the variable $Extra is being identified(or being undefined which makes more since since a null = 0) as a 0?

So now what you are seeing is $What$Extra or "Page you are viewing"0

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
That's a good point and it may very well be the case. I'll take a look at things to see if I can find out if that's the case. (I been currious about this myself)

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
It's funny how when you go looking for something that's usually there, it's not. I sat and waited for 10 mins for an anonymous user to show up with no avail.. LoL I'll keep looking at things. Maybe it will jump out.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I think I found the error and have the fix. I'm posting this in the Bug board too.

In the online.php script find this (line 273-276):

$anonrow[$x]['Username'] = $Username;
$anonrow[$x]['Last'] = $Last;
$anonrow[$x]['What'] = $What;
$anonrow[$x]['Extra'] = $Extra;

Change that to this:

if (!$Extra) {$Extra = "";}
$anonrow[$x]['Username'] = $Username;
$anonrow[$x]['Last'] = $Last;
$anonrow[$x]['What'] = $What;
$anonrow[$x]['Extra'] = $Extra;


You were right about a null or zero value being returned by the query results. The $Extra variable is set to a blank string prior to the while loop but during the loop it is the value of field returned from the query.

Sponsored Links
Joined: Mar 2002
Posts: 147
Member
Member
Offline
Joined: Mar 2002
Posts: 147
Cool. That worked.

Thanks JustDave.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Can this method be used with non-php pages?

for example photos.pl doesn't seem to work.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I don't think so as that's not a php script. Using a php script you can use ubbt's send_header function to have pages placed in the online table.

Joined: Mar 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 13
Seeing how old this thread is and new versions out since, has the method for adding external pages changed? I'm curious to add some pages, but not sure what I need to do to the existing non-ubbt php page

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
hmmmm... I believe a mod was written for a WOL Pal, if I se it I'll post a link


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)