vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Simple vB User login and access control on non vB pages (https://vborg.vbsupport.ru/showthread.php?t=100992)

Billspaintball 05-31-2006 12:24 AM

Quote:

Originally Posted by pcwfreak
Is there a way of making it remember a user without the 'Remember me?' checkbox?

Thanks.

Im at work at present so I havent had a chance to try this yet.
It may or may not work, and make sure you back up your login_inc.php first.

Find
PHP Code:

// Display login boxes + button
// You can style this with html or CSS as normal if desired.
echo"
    <form action=\""
.$forumpath."/login.php\" method=post onsubmit=md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)>
    <script type=text/javascript src=\""
.$forumpath."/clientscript/vbulletin_md5.js\"></script>
    User Name:<br>
    <input name=vb_login_username type=text id=navbar_username onfocus=if (this.value == '
$vbphrase[username]') this.value = ''; size=10 />
            
    <br>Password:<br>
    <input name=vb_login_password type=password size=10 />
    </br>
        
    <label for=cb_cookieuser_navbar><input name=cookieuser type=checkbox id=cb_cookieuser_navbar value=1 checked=checked />
    Remember Me?<br /></label>
    
        
    <input type=submit title=
$vbphrase[enter_username_to_login_or_register] value=\"Log In\" />
        
    <input type=hidden name=s value=
$session[sessionhash] />
    <input type=hidden name=do value=login />        
    <input type=hidden name=vb_login_md5password />
    <input type=hidden name=vb_login_md5password_utf />

    </form>
"


And replace with
PHP Code:

// Display login boxes + button
// You can style this with html or CSS as normal if desired.
echo"
    <form action=\""
.$forumpath."/login.php\" method=post onsubmit=md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)>
    <script type=text/javascript src=\""
.$forumpath."/clientscript/vbulletin_md5.js\"></script>
    User Name:<br>
    <input name=vb_login_username type=text id=navbar_username onfocus=if (this.value == '
$vbphrase[username]') this.value = ''; size=10 />
            
    <br>Password:<br>
    <input name=vb_login_password type=password size=10 />
    </br>
        
    <input type=submit title=
$vbphrase[enter_username_to_login_or_register] value=\"Log In\" />
        
    <input type=hidden name=s value=
$session[sessionhash] />
    <input type=hidden name=do value=login />
    <input type=hidden name=cookieuser id=cb_cookieuser_navbar value=1 checked=checked />    
    <input type=hidden name=vb_login_md5password />
    <input type=hidden name=vb_login_md5password_utf />

    </form>
"



pcwfreak 05-31-2006 10:32 AM

It seems to be working properly right now. Thanks!

ThatsIt 05-31-2006 03:06 PM

This is my situation. I installed the Simple -version on my forum and it was working perfectly. No problems what-so-ever, things were going as smooth as I could hope.

Then I decided to setup a test forum, and proceeded by creating a testvb folder, protected it with htaccess and installed the test forum along with the Simple login extension. This is where the problems begun.

According to vB instructions, the 'Path to Save Cookies' setting (Cookies and HTTP Header options) must be set to the directory of individual forums, if one runs more than one forum on the same domain. In my case, this meant that I set the path on my live forum to '/forums/' and on my test forums to '/testvb/forums/'.

This, of course, meant that the Simple login extension stopped working on my live forums since the 'Path to Save Cookies' setting should be set to '/'. If, on the other hand, I leave the live forums setting to '/', then I am not able to log on to my test forums at all, while the extension works perfectly on the live forums.

Does anyone see a way around this problem, or am I just out of luck. Is it possible to use this extension simultaneously and successfully on test forum thats running on the same domain with the 'live forum'.

Rated 06-06-2006 12:24 AM

Really cool hack, but i can't use it because i have a random banner / header script going on, and the..
PHP Code:

<?php 
    chdir
('/path/to/your/forums');  
    require_once(
'/path/to/your/forums/global.php');   
    require_once(
'/path/to/login_inc.php'); 
?>

Makes it no longer work :(

Dammit, any fix ? :)

Billspaintball 06-06-2006 02:01 AM

Quote:

Originally Posted by Rated

Dammit, any fix ? :)

Maybe.
Can you post the first dozen lines or so of your page so we can have a look.

Billspaintball 06-08-2006 11:24 PM

Confirmed working on vB 3.6 Beta 1
:D

Rated 06-09-2006 03:20 AM

Hi bill,

Ive not got the error codes handy - but ill show you my random banner script, if this doesn't help i will add it again and show the error codes that are confliciting with this script.

PHP Code:

<?php 
// Random Picture v0.1 
// (c) Guido Faecke, GF-Data Inc. 

  
$pic_dir 'images/banners/'
   
  
$counter 0

  
$d dir($pic_dir); 
  while(
$entry=$d->read()) { 
    if (
$entry != "." && $entry != "..") { 
      
$array[] = $entry
      
$counter++; 
    } 
  } 
  
$d->close(); 
  
$counter--; 
  
$which rand(0$counter); 
?>
<? echo '<img src="'.$pic_dir.$array[$which].'" border="0">'; ?>

Thanks for the help :)

Billspaintball 06-09-2006 03:35 AM

Quote:

Originally Posted by Rated
Hi bill,

Ive not got the error codes handy - but ill show you my random banner script, if this doesn't help i will add it again and show the error codes that are confliciting with this script.

PHP Code:

<?php 
// Random Picture v0.1 
// (c) Guido Faecke, GF-Data Inc. 

  
$pic_dir 'images/banners/'
   
  
$counter 0

  
$d dir($pic_dir); 
  while(
$entry=$d->read()) { 
    if (
$entry != "." && $entry != "..") { 
      
$array[] = $entry
      
$counter++; 
    } 
  } 
  
$d->close(); 
  
$counter--; 
  
$which rand(0$counter); 
?>
<? echo '<img src="'.$pic_dir.$array[$which].'" border="0">'; ?>

Thanks for the help :)

Have you tried something like
PHP Code:

<?php
chdir
('/path/to/your/forums');   
require_once(
'/path/to/your/forums/global.php');    
// Random Picture v0.1 
// (c) Guido Faecke, GF-Data Inc. 

  
$pic_dir 'images/banners/'
   
  
$counter 0

  
$d dir($pic_dir); 
while(
$entry=$d->read()) { 
    if (
$entry != "." && $entry != "..") { 
      
$array[] = $entry
      
$counter++; 
    } 
  } 
  
$d->close(); 
  
$counter--; 
  
$which rand(0$counter); 
?>
<? echo '<img src="'.$pic_dir.$array[$which].'" border="0">'; ?>

//whatever stuff you like goes here.
<?php  
// And we put this where we want the login box
    
require_once('/path/to/your/login_inc.php');  
?>


Rated 06-09-2006 01:02 PM

I don't really understand that, the random image script goes inside a table, and the php code your supposed to put at the top of the page won't work if it's in the table too, right? :s

Billspaintball 06-10-2006 02:58 AM

Quote:

Originally Posted by Rated
I don't really understand that, the random image script goes inside a table, and the php code your supposed to put at the top of the page won't work if it's in the table too, right? :s

Ok, I thought that what you posted was at the top of the page.

Correct, my code wont work if its not at the very top of the page (before any output anyhow).

I suspect that your banner script may be broken because of the directory change in my script.
What was the exact error message you got?
You can change back to current directory after my script if you like.
I will post the code to do that as soon as I remember how...


All times are GMT. The time now is 08:22 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
  • Page Generation 0.01253 seconds
  • Memory Usage 1,781KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete