![]() |
This hack was requested on vBulletin.com.
It lets you add possible locations to Who's Online, directly from the Admin CP. This is good if you are using external hacks, that use vBulletin's system. You probably know that users browsing these external files have Unknown Location (or Main Index for non-admin viewers) next to them. With this hack, you can easily add a new custom location with ease! It's also designed in a way that won't let you overwrite existing locations. ('dummy protection' as I like to call it ;)) The locations you add are not stored in their own table, because I really felt that would be waste of space and resource. Instead, I store the locations in the template table, in one special template dedicated to this data. It was a lot harder to do it this way, btw. :) Please let me know if you find any bugs, or if this script doesn't work with files in child folders (this is my main concern). This can be easily remove (just undo changes to online.php), so please don't fear to try it out! A nice screen shot is in my next post. |
Top part is the Admin CP, bottom is Who's Online.
|
Hmmm, trying it out, but I get a 404 when I submit a change ...
since the admin_online.php is in the admin folder, should this: Code:
<form action="online.php" name="name" method="post"> Code:
<form action="../online.php" name="name" method="post"> |
Sorry, that's my bad.
Download admin_online.php again and upload to your server. I changed the file name in the last minute and forgot to update the <form> tags. |
Hmmm ... still says "online.php" in the form FF :(
|
Thanks for seeing it Chen....
Going to install for testing.... |
Sounds great, going 2 install it 2
Thanks Firefly |
Edit remove isn't working for me. Anyone tried to edit or remove?
Changed: makelinkcode("edit"," online.php?s=$session[sessionhash]&action=edit&locnum=$locnum"). makelinkcode("remove",".online.php?s=$session[sessionhash]&action=remove&locnum=$locnum"). paths to reflect where the online.php exists makelinkcode("edit","../online.php?s=$session[sessionhash]&action=edit&locnum=$locnum"). makelinkcode("remove","../online.php?s=$session[sessionhash]&action=remove&locnum=$locnum"). Problems still with edit remove as mentioned by Crinos. Added a total of 3 links. Last was lastposts.php for the Filename and Viewing Last 10 Posts! for the Description. ......Will wait now. |
Ok, download admin_online.php once again and upload to your server.
Sorry again for all of this. You see, originally the filename was just online.php, but to keep you from confusing it with the regular online.php (in the forums folder), I renamed it. |
No apologies necessary. That's why we're in the beta room :D . Appreciate the work.
I am still getting 404's. The edit and remove still don't work. At least on this end. Anyone else testing this please post what you get. |
I got this a few times:
Database error in vBulletin 2.2.1: Invalid SQL: SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, session.host, user.showemail, user.receivepm FROM session LEFT JOIN user USING (userid) WHERE session.lastactivity > ORDER BY user.username mysql error: You have an error in your SQL syntax near 'ORDER BY user.username ' at line 6 mysql error number: 1064 |
Hi SirSteve,
I'm not sure why this would create a problem as such. You may want to upload the online.php and overwrite your hacked one. then see if you get the error. If you don't, then you probably copy and pasted a boo boo. ;) |
Hmmm, seems to be working fine now after I downloaded that new attachment a few moments ago ... I could add/edit/delete just fine, so far ... no bugs yet :)
Hey FF, if I wanted to include main sections within the site that are non VB-powered, should I just include the global.php and specify them in the admin_online script so that people see who are viewing these sections in who's online? I got a quiz script in PHP and I kinda wanted to include it in who's online too, but it ain't VB-powered :) Thanks! |
Hmmm. I used a new online.php and rehacked and still have the same problem.
/community/admin/online.php?action=edit&locnum=1 The links are still pointing to /admin/online.php. If I ../ before this It still doesn't work. The edit delete functions are still not correct for me. See a problem...? <html><head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"> <meta http-equiv="MSThemeCompatible" content="Yes"> <link rel="stylesheet" href="../cp.css"> <title>Who's Online - Location Manager</title></head> <body leftmargin="10" topmargin="10" marginwidth="10" marginheight="10"> <form action=".php" name="name" method="post"> <input type="hidden" name="s" value=""><input type="hidden" name="action" value=""> <br><table cellpadding='1' cellspacing='0' border='0' align='center' width='90%' class='tblborder'><tr><td> <table cellpadding='4' cellspacing='0' border='0' width='100%'> <tr class='tblhead'> <td><p><b><span class='tblhead'>Filename</span></b></p></td> <td><p><b><span class='tblhead'>Description for it</span></b></p></td> <td><p><b><span class='tblhead'>Options</span></b></p></td> |
fwiw, I was using a VB 2.0.3 online.php file (coz the 2.2.0 version was buggy back then), and that's what I modified for this hack. I didn't upgrade to 2.2.1 coz of the amount of hacks I installed on my forums, and it being a very minor release, I didn't need it (made lots of fixes to 2.2.0 via the Bug Section of vb.com) ...
And with the admin_online.php I downloaded just a couple of hours ago, it is now putting the correct filename on the form (admin_online.php instead of online.php) ... so I guess that fixed it :) |
Ah,,,
Well, I have 2.2.1. I went ahead and uploaded a fresh online.php to work with since you posted that yours was working. Rehacked with the same results. Look at the above code. :stupid: :eek: |
Hey Hooper, I said "fwiw" because I don't think the version of online.php was important to the hack ... but anyway...
Look at the code just below what you posted ... it should have another set of form tags, which should look like this: Code:
<form action="admin_online.php" name="name" method="post"> |
Yes sir,
I've downloaded the new attatchment 3 times today. I had the online.php pretty hacked up before. That's why I used a fresh one this morning after seeing it posted that you had it working. Nope. Here is the whole code I get. <edited>by Hooper</edited> |
Hmmm, strange, well I can tell you that it does work pretty well ... I think it'll only give you a 404 if it's not pointing to the correct file in the form ...
I'm attaching the raw admin_online.php file that I am using, just to be sure ... if this is not allowed FF, feel free to delete it :) |
WORKED!!!!!!!!!!!!!!!!!!!!!!!!!
Why the heck am I getting the same file all day that I downloaded early this morning? I must be getting the old file over and over or something. Go try a download. Rename your good one on the server and install what you download. Please try that. Thanks. Your file worked. |
Kewl :) Must've been a caching problem with either the browser or maybe the attachment feature itself, I dunno ...
So far I'm not experiencing any bugs on this one, and works as advertised. Maybe it's safe to move it out of the Beta forum :) btw, still interested in that non-VB/global.php question I had, if it's possible :D Great hack! |
Yeah!!!! It works! :D
This is going to be nice! I agree. I am getting ready to see if I can get my "outside non vb powered schtuff" to work. I have about 8 or 9 outside of vBull that need a linking! Yeah. About ready for full release. Thanks Chen. Nice Hack. |
Am I missing something here or should the last10posts.php be a link to the file????
|
You could use HTML to do a link tag on that location in the description:
Code:
Viewing <a href="last10posts.php">Last 10 Posts</a> |
Geez... I guess I just want the hack to do everything now don't I... :p
Ok.. I'll do that. |
Works like a charm. This is a super improvement. Just think, If this can be (and hopefully will) added to a vBulletin release, it will make adding internal links for WOL so much easier. This is fine for me as is. Maybe we can get the outside linking to work with the non vBpowered. ;)
I had several hand coded links I installed into the online.php since Kevin showed me how to do it. This is a whole lot faster and easier. |
Might wanna include some instructions on how to include it in the VB admin control panel once it's released (although I think that's the plan when FF made it).
I already did by adding it into the admin/index.php :) |
Well let's here it....? :D You incorporated the new admin with the main admin? If so, spill the beans on the how.... :)
|
Well, since it wasn't really a part of any general category in the admin panel, I just put it below the vBulletin Options (which I have renamed "General Options" in my own VB)
Anyway, in admin/index.php, find: Code:
makenavselect("Options","<hr>"); Code:
makenavoption("Who's Online Options","admin_online.php?t=0","<br>"); http://canislupus.opentechsupport.ne...woloptions.jpg |
Super.... Going to do it. Your admin panel looks as good as your site! ;)
|
Perfect!!
That is right where it should be. (left top is the link). |
Perfect :)
|
So it works on 2.2.1 now? If so, what does it take to get the script running?
|
[QUOTE]Originally posted by LuBi
So it works on 2.2.1 now? If so, what does it take to get the script running? |
I'm going to split all posts from Hooper and Crinos in a bit, I'm as well already confused. :)
https://vborg.vbsupport.ru/showthread.php?s=&threadid=32879 Tell me if the title of the thread is not appropriate. :) Does this work ok or not? I want to release it as soon as possible, but I want to make sure it works perfect first! :D |
[QUOTE]Originally posted by Hooper
Works like a charm. This is a super improvement. Just think, If this can be (and hopefully will) added to a vBulletin release, it will make adding internal links for WOL so much easier. This is fine for me as is. Maybe we can get the outside linking to work with the non vBpowered. ;) I had several hand coded links I installed into the online.php since Kevin showed me how to do it. This is a whole lot faster and easier. |
I was thinking of doing that, since eventually the ideal thing would be removing all locations from online.php and putting them into the Admin CP.
Would also make it easier to translate these locations to other languages. |
Some of the locations wouldn't be so easy to move into this system. The ideal way would be to totally rethink the way the system works, which I may also end up doing.
|
How can we include the session hash?
I tried this - Editing their <a href="sedit.php?s=$session[sessionhash]&action=show">signature</a>, and it didn't parse the hash... |
Try this DarkReaper.
In online.php, (after installing this hack) find this: Code:
$userinfo[where] = $text; Code:
eval("\$userinfo[where] = \"".addslashes($userinfo[where])."\";"); |
All times are GMT. The time now is 04:47 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|