![]() |
Add Who's Online Locations From Admin CP
General Info
This hack was requested to be available on Vbulletin 3. Being bored, I figured I would take the task in hand and complete it, to be better than it ever was before. The original designer of the hack (on Vbulletin 2) is the well known Chen Avinadav, which being the great coder that he is, I dont particularly agree with his methods in this case, which he used a an excess query to select data from a template and loop through. This uses the built in datastore of vb3, therefore using No extra queries. Therefore this hack is Completely original, in every way. I have used a different method, for accomplishing this, and the control panel I have created is intuitive and utlilizes a great many of vbulletins built in controls and phrases. Looking at the code itself on the admin panel alone you will see I didnt just throw this together and slap it on the site. Total creation time was around 4 hours, the code itself not being the main part, just mainly working out issues with the control panel etc.. Features My version which is completely new, allows you to add the filename for the who's online along with the location name, and URL Title of the link. The control panel which was the longest part, is pretty concise in how it works considering what I did to it. Provides a good bit of error checking to keep from accidentally doing stuff you didn't intend to do. Also should note, the deletion part of the script uses JavaScript to confirm whether or not you wish to delete the selected Location. I hope this gets a lot of installs, being as that my other 2 hacks/bug fixes were really just something I did in a few minutes and didn't put a great deal of effort into, judging by the fact I didnt have to "edit" any vbulletin files, to do what I wanted. This is really my first release on this site, that I can say I believe is unique in its effort, and shows some insight on things for the newer coders out there. I have put a great deal of effort into the setup of everything as well as the readme file to be concise and as easy to read and understand as possible. Hopefully hack of the month, lol.. j/k Installation I have provided an readme file inside of the zip, with information on how to install the hack, and what needs to be done to do so. Its a fairly easy installation, as you only have to add things. Other Misc. Files To Modify: 2 Total Modifications: 6 Installation Difficulty: Easy Version Updates Version 1.0 = First Release Version 1.1 = Fixed Weird Query Error For Some People Version 1.2 = Added ability to enable/disable links for locations Click install if you like. Thanks. :) https://vborg.vbsupport.ru/ |
Would this be able to differ things such as, index.php, index.php?page=contact, index.php?page=links all as different who's online locations?
So basically, using vbindex created pages, would I be able to add the extra pages to the who's online with this hack? |
WOW so usefull :) nice work :)
|
Quote:
--------------------------------------------------------------------- Would this be able to differ things such as, index.php, index.php?page=contact, index.php?page=links all as different who's online locations? So basically, using vbindex created pages, would I be able to add the extra pages to the who's online with this hack? --------------------------------------------------------------------- Maybe later I will implement that, but right now that would be way too much trouble. In the array I would have to specify what variable would determine which pages to look for, I obviously wouldnt just make it to match against ?page= only, then i would have to have it loop through sub arrays for that. Thats a lot more than what this hack is generally designed for, its just to add it for different .php files. If you want, a little later I will create a seperate hack and paste it in this thread just for that purpose of allowing multiple locations per .php file. PHP Code:
|
installation was flawless :up:
|
Were the instructions clear enough for your liking? How about the control panel? I wanna fix anything wrong if you see it.. lol
|
excellent, a very useful hack- thankyou!
|
Works perfectly. Big Thanx !
|
Wasn't expecting this to come along so soon!
Getting an SQL error on the first install step at the moment. Attempting to work out why now. :) |
Hmm, can you paste the error, it should work fine with about any type of vb3 installation. Do you have table prefixes etc..?
|
Here you go... No table prefixes - I don't like to over-complicate.
Quote:
|
This looks great! Thanks for sharing with the community :)
|
I'm getting an error as well during the first step (running whos_online.php)
Code:
Database error in vBulletin 3.0.1: |
Same error as myself.
|
Try This
PHP Code:
|
That worked, thank you. :)
|
Ok good, I reuploaded the zip file with the fix. Should work fine now for everyone.
|
Not sure where I went wrong... It doesn't seem to have worked. No errors, it just says that locations I have added are unknown locations.
|
Show me a screenshot of your current (custom_online.php) in the browser. If you put the modifications where I told you, it should work just fine.
Remember its doing this based on single filenames, I havn't added support for multiple pages via ?this=that etc... |
The first posted fix resolved my issue as well. It's working now.
The one minor thing I'd change it the ability to NOT show a link to the particular location. I've managed to obtain that with this hack by just putting a space in the URL Display field. But a checkbox or something to not show a link would be nice.. Other than that, this was a MUCH needed hack and should become part of vBulletin |
Quote:
|
Question
If you have to files with same name but in 2 seperate directories how would you add them? For example forum/index.php /links/index.php |
Awesome Hack!!!! I have been pulling my hair out trying to figure out how to do this manually - your a life saver!
** Chris Clicks Install! |
Ok people, cause of 58Sniper I updated the hack to allow you to enable/disable whether links are shown or not for locations.
Enjoy. |
Quote:
Maybe try renaming one of them to a slightly different name, ie index2.php this can be done easily enough in vbulletins configuration files plus the // Example define('THIS_SCRIPT','index2.php'); directive at the top of each script name, helps the script know what its current filename is, when it referrs to itself. |
Quote:
At least this is a jumping point. |
Quote:
|
i got it btw but you may wanna add that to your first post :) to just overwrite the file :)
|
Quote:
---------------------------------------------------------- I would like this as well, along with being to distinguish between 2 index.php in 2 diff dirs. At least this is a jumping point. ---------------------------------------------------------- It would require a good bit of modification, I might release an update for that in a day or 2. Quote: ---------------------------------------------------------- i got it btw but you may wanna add that to your first post to just overwrite the file ---------------------------------------------------------- Well you need to replace that code in the readme, on the (functions_online.php) file also, as I changed some directives. |
Thanks a lot. This is exactly what I needed. Installed fine. :)
|
i found a bug !
example : forum installed at: /forum i have a script thats installed at and uses the forum engine .... /forum/links/links.php my script shows up in the whos online fine and is clickable before i add the new custom discription. once i add it... it shows up and displays fine . however the link is not pointing to the correct location the link tried to take me to : /forum/links.php not /forum/links/links.php can you please fix .... |
ok i fixed it myself already !
heres how.... in : functions_online.php find: Code:
if ($value['showlink'] == 1) replace with: Code:
if ($value['showlink'] == 1) great hack ! Quote:
|
Quote:
|
Quote:
--------------------------------------------------------- if ($value['showlink'] == 1) { require_once('./includes/functions_login.php'); $userinfo['location'] = stripslashes(fetch_replaced_session_url(htmlspecia lchars_uni(stripslashes($useri nfo['location'])))); $userinfo['location'] = ereg_replace('&','&',$userinfo[location]); $userinfo['where'] = "<a href=\"$userinfo[location]\">$value[where]</a>"; } --------------------------------------------------------- That is not a bug in the script, all this does is compare filenames which im using vbulletins method. No way would i Include (functions_login.php) a Whole other functions file into the login functions.. a much easier way to do it im sure. |
exactly what i need ! No need to manualy edit php's :)
|
Acido ,
you must have already installed his hack inorder to find the code ...... if you havent installed the hack itself then the code will not be there. |
Awesome, I'll take a look at this when 3.0.2 is released.. :)
I don't want to do any more modifying when there is another upgrade just around the corner. |
Quote:
ok i altered it so you it dont use the include any longer ...... this is the code im using now and it works just the same without the include . Code:
if ($value['showlink'] == 1) hope this works for everyone else |
Just so I'm clear before installing... will this work for indexing php pages outside the VB main directory? For example, an integrated application like a gallery script.
|
Quote:
|
All times are GMT. The time now is 04:26 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|