Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Intergrate VB security to non-vB page Details »»
Intergrate VB security to non-vB page
Version: 1.00, by certify certify is offline
Developer Last Online: Sep 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-02-2002 Last Update: Never Installs: 27
 
No support by the author.

This is a simple Hack which will utilize VB security and will automatically foward back to the referrer url after login or register. Enjoy!

We have been using this hack for almost 8 months now on our online exam
http://www.certifyexpress.com/exam/microsoft/mcse/

Show Your Support

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

Comments
  #12  
Old 04-10-2002, 08:37 AM
certify's Avatar
certify certify is offline
 
Join Date: Nov 2001
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is the code in

/home/kinedac/public_html/forums/global.php on line 78
Reply With Quote
  #13  
Old 04-10-2002, 09:34 AM
Sparkz's Avatar
Sparkz Sparkz is offline
 
Join Date: Nov 2001
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't have time to test this now, but I think he could do 1 of 2 things.

1. Enter an absolute path for the admin/config.php in the global.php file, ie /home/kinedac/www/forums/admin/config.php or something to that extent.

2. Change directory before including the file. Something like this:
PHP Code:
$curdir getcwd ();
chdir ("/home/kinedac/www/forums");
include_once (
"global.php");
chdir ($curdir); 
I think the last one, if working, would be the cleanest way, since it does not involve editing a vbulletin file.

Again, I have not tested this...

-Sparkz
Reply With Quote
  #14  
Old 04-10-2002, 08:42 PM
kineda kineda is offline
 
Join Date: Jan 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Sparkz! It works fine now!
Reply With Quote
  #15  
Old 04-10-2002, 08:43 PM
Sparkz's Avatar
Sparkz Sparkz is offline
 
Join Date: Nov 2001
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My pleasure
Reply With Quote
  #16  
Old 04-12-2002, 01:29 AM
CloakSim CloakSim is offline
 
Join Date: Dec 2001
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any clue on how to set this to a certain user group?
Reply With Quote
  #17  
Old 04-13-2002, 03:50 PM
TheCaver TheCaver is offline
 
Join Date: Oct 2001
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why does it return to the Users CP rather than the referring page?

JC
Reply With Quote
  #18  
Old 04-21-2002, 08:15 PM
x69 x69 is offline
 
Join Date: Jan 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having some problems getting this working..
heres my test.php file
PHP Code:
<?php
echo "before";
//Begin VB Security Intergration Hack
include_once("/www/vhosts/vcdquality.com/html/forum/global.php");

        if (
$bbuserinfo[userid]==0)
        {
            
            
$thispage=urlencode("$PHP_SELF");
                
header("Location:[url]http://www.vcdquality.com/forum/usercp.php?urloverride=1&prevpage=[/url]".$thispage);
                
        }
//End VB Security Intergration Hack
echo "after";
?>
some code here
I get no errors or anything.. all my script outputs is 'before'
what am i doing wrong? Thanks in advance

http://www.vcdquality.com/test.php
Reply With Quote
  #19  
Old 05-10-2002, 01:41 AM
ThoughtDiver ThoughtDiver is offline
 
Join Date: Apr 2002
Location: Fort Wayne, IN
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I execute my nonvb page with the code in it, whether I'm logged in or not, it just goes to the page and it's a blank white screen.

#!/usr/local/bin/php
<?php
//Begin VB Security Intergration Hack
include_once("/full/home/path/html/forums/global.php");

if ($bbuserinfo[userid]==0)
{

$thispage=urlencode("$PHP_SELF");

header("Location:http://www.site.com/forums/usercp.ph...de=1&prevpage=".$thispage);

}
//End VB Security Intergration Hack
?>
[HTML PAGE HERE]

Any ideas?
Thanks,
Scott
Reply With Quote
  #20  
Old 05-10-2002, 07:56 AM
certify's Avatar
certify certify is offline
 
Join Date: Nov 2001
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TheCaver
Why does it return to the Users CP rather than the referring page?

JC
You need to add the below code in global.php

===Find this====
$ipaddress=$REMOTE_ADDR;
$scriptpath=$REQUEST_URI;

===And add this after the line above===
if(!$urloverride) { $scriptpath=$REQUEST_URI; }
else { $scriptpath=urldecode($prevpage); }
Reply With Quote
  #21  
Old 05-10-2002, 08:07 AM
certify's Avatar
certify certify is offline
 
Join Date: Nov 2001
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

x69,

Change to this and test it again.

include_once($DOCUMENT_ROOT . "/forum/global.php");
echo "before";
Reply With Quote
Reply

Thread Tools

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 11:44 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
  • Page Generation 0.06564 seconds
  • Memory Usage 2,302KB
  • 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
  • (2)bbcode_php
  • (1)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
  • (2)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