Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add Who's Online Locations From Admin CP Details »»
Add Who's Online Locations From Admin CP
Version: 1.00, by Trigunflame Trigunflame is offline
Developer Last Online: Nov 2019 Show Printable Version Email this Page

Version: 3.0.1 Rating:
Released: 06-25-2004 Last Update: Never Installs: 90
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 06-27-2004, 04:08 AM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ....
Reply With Quote
  #33  
Old 06-27-2004, 04:16 AM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i fixed it myself already !

heres how....


in : functions_online.php


find:

Code:
if ($value['showlink'] == 1)
{
	$userinfo['where'] = "<a href=\"$key?$session[sessionurl]\">$value[where]</a>";
}

replace with:

Code:
if ($value['showlink'] == 1)
{
$url = htmlspecialchars_uni(stripslashes($userinfo['location']));
$url = addslashes($url);
$url = preg_replace('/(s|sessionhash)=[a-z0-9]{32}(&|&amp;){0,1}/', '', $url);
if ($session['sessionurl'] != '')
{
if (strpos($url, '?') !== false)
{
$url .= "&amp;$session[sessionurl]";
}
else
{
$url .= "?$session[sessionurl]";
}}
	$userinfo['location'] = stripslashes(stripslashes($url));
	$userinfo['location'] = ereg_replace('&amp;','&',$userinfo[location]);
	$userinfo['where'] = "<a href=\"$userinfo[location]\">$value[where]</a>";
}

great hack !



Quote:
edited my post ....removed the function file include from the code ....
Reply With Quote
  #34  
Old 06-27-2004, 09:31 AM
Acido Acido is offline
 
Join Date: Apr 2003
Location: Argentina
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by teksigns
ok i fixed it myself already !

heres how....


in : functions_online.php


find:

Code:
if ($value['showlink'] == 1)
{
	$userinfo['where'] = "<a href=\"$key?$session[sessionurl]\">$value[where]</a>";
}

replace with:

Code:
if ($value['showlink'] == 1)
{
	require_once('./includes/functions_login.php');
	$userinfo['location'] = stripslashes(fetch_replaced_session_url(htmlspecialchars_uni(stripslashes($userinfo['location']))));
	$userinfo['location'] = ereg_replace('&amp;','&',$userinfo[location]);
	$userinfo['where'] = "<a href=\"$userinfo[location]\">$value[where]</a>";
}

great hack !
I cant find the code in functions_online.php
Reply With Quote
  #35  
Old 06-27-2004, 10:59 AM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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('&amp;','&',$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.
Reply With Quote
  #36  
Old 06-27-2004, 01:09 PM
PET's Avatar
PET PET is offline
 
Join Date: Jan 2002
Location: Timisoara/Romania
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

exactly what i need ! No need to manualy edit php's
Reply With Quote
  #37  
Old 06-27-2004, 01:31 PM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #38  
Old 06-27-2004, 02:10 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #39  
Old 06-27-2004, 02:16 PM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trigunflame
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('&amp;','&',$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.


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)
{
$url = htmlspecialchars_uni(stripslashes($userinfo['location']));
$url = addslashes($url);
$url = preg_replace('/(s|sessionhash)=[a-z0-9]{32}(&|&amp;){0,1}/', '', $url);
if ($session['sessionurl'] != '')
{
if (strpos($url, '?') !== false)
{
$url .= "&amp;$session[sessionurl]";
}
else
{
$url .= "?$session[sessionurl]";
}}
	$userinfo['location'] = stripslashes(stripslashes($url));
	$userinfo['location'] = ereg_replace('&amp;','&',$userinfo[location]);
	$userinfo['where'] = "<a href=\"$userinfo[location]\">$value[where]</a>";
}

hope this works for everyone else
Reply With Quote
  #40  
Old 06-27-2004, 04:33 PM
Bryan Ex's Avatar
Bryan Ex Bryan Ex is offline
 
Join Date: Feb 2004
Location: Canada
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #41  
Old 06-27-2004, 09:06 PM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by teksigns
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)
{
$url = htmlspecialchars_uni(stripslashes($userinfo['location']));
$url = addslashes($url);
$url = preg_replace('/(s|sessionhash)=[a-z0-9]{32}(&|&amp;){0,1}/', '', $url);
if ($session['sessionurl'] != '')
{
if (strpos($url, '?') !== false)
{
$url .= "&amp;$session[sessionurl]";
}
else
{
$url .= "?$session[sessionurl]";
}}
	$userinfo['location'] = stripslashes(stripslashes($url));
	$userinfo['location'] = ereg_replace('&amp;','&',$userinfo[location]);
	$userinfo['where'] = "<a href=\"$userinfo[location]\">$value[where]</a>";
}

hope this works for everyone else
Ill post an addition tonight or tomorrow, thats still way to much code to do something so simple.
Reply With Quote
Reply


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. The time now is 06:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05061 seconds
  • Memory Usage 2,326KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete