vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help with Login stuff (https://vborg.vbsupport.ru/showthread.php?t=123966)

Grasty 08-14-2006 07:11 PM

Help with Login stuff
 
alright im trying to redesign my website and one of the things im trying to do is make it possible for users to login on the index of the site (non vb page) it needs to log them into the forums.

The reason i want to do this is because im also in the process of installing a hack by BillsPaintball which allows you to allow only certain usergroups to access non vb pages. So therefore I want to be able to login from the index.php page (which is a non vb page)

I am running VB 3.5.4 And also keep in mind i know nothing about php, so if you ask me a whole bunch of questions about coding, i will get lost. I used Dreamweaver so it coded everything for me. And any explanations and instructions are going to need to be detailed.

ok i got the login menu showing up and i can login fine with it. But im also getting this error

Fatal error: Call to a member function query_read() on a non-object in /home2/grastyz/public_html/login_inc.php on line 149

And heres my code for lines 148-151
Code:

// get total number of threads and posts
$getstats = $db->query_read('SELECT threadcount, replycount FROM ' . TABLE_PREFIX . 'forum');
while ($forum = $db->fetch_array($getstats))
{


AN-net 08-16-2006 02:35 PM

did u copy login.php and create login_inc.php?

if so, the simplest way to login is just use the html form provided by vbulletin. it will submit to login.php and then redirect back the page which the request was sent from.

anyways the reason for your error is because it has no backend, no global.php to setup the connection to the database.

Grasty 08-19-2006 12:26 AM

the login_inc.php is from a hack i downloaded here. all i did was take the file, change the forumpath and upload it and it gives me the error. i did notice that if i put in random characters for the forum path it still gives me the same error. But anyway, im still a little confused here

denniss 08-20-2006 12:07 AM

Where is the html form you mention?

Billspaintball 08-24-2006 12:36 AM

Quote:

Originally Posted by Grasty
the login_inc.php is from a hack i downloaded here. all i did was take the file, change the forumpath and upload it and it gives me the error. i did notice that if i put in random characters for the forum path it still gives me the same error. But anyway, im still a little confused here

The login_inc.php file is not the problem.
The problem lies on the page that includes the login_inc.php file.

Post your code for that page (not login_inc.php) in the hacks forum and I will look at it for you.


Edit:
Seen your code, posted the fix ;)


All times are GMT. The time now is 10:08 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.01618 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete