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)
-   -   Deluxe vB User login and access control on non vB pages (https://vborg.vbsupport.ru/showthread.php?t=108026)

Paul_Hollibone 07-09-2006 11:35 PM

Hey Guys.

I have an issue regarding this hack.

It is actually working fine, and it was on my old server aswell.

However, since I moved across to a new server, this error has been appearing on all the pages I have that chdir script on. The error is as follows.

Fatal error: Call to a member function unlock_tables() on a non-object in /home/thrillhi/public_html/forums/includes/functions.php on line 4419

And it is appearing just at the bottom of my page's.

A link to it can be found here: www.thrillhistory.com

Thanks guys for your assistance.

Paul_Hollibone 07-12-2006 01:09 AM

Hey Guys, is anyone able to help an Aussie?

Billspaintball 07-12-2006 03:35 AM

I think it may be the MySQL/PHP config on your new server but Im not sure.

TheJackal56 07-13-2006 03:21 AM

Just wanted to say this works great!

I do have a couple of questions:

1. The login never times out, you have to actually click logout.
Is there a way to set a timeout?

2. On both Login and Logout can the VB menus that display(logout you have to actually click out of) can the code actually hide these menu's.

Thanks,

Bob

Billspaintball 07-13-2006 03:39 AM

Quote:

Originally Posted by TheJackal56
1. The login never times out, you have to actually click logout.
Is there a way to set a timeout?

It should have the same timeout as your site.
Do you have a session expire time set in your Admin CP?
Quote:

2. On both Login and Logout can the VB menus that display(logout you have to actually click out of) can the code actually hide these menu's.
Im not 100% sure what you mean here?
Can you give me a little more detail please.

TheJackal56 07-13-2006 05:23 AM

Session timeout is set in the admincp

I have attached to screen shots.

Both screens stay up until you click continue or hit the back button.

Billspaintball 07-14-2006 04:47 AM

Quote:

Originally Posted by TheJackal56
Session timeout is set in the admincp


I have attached to screen shots.

Both screens stay up until you click continue or hit the back button.

Thats weird.
I havent come accross this before.

In the "Cookies and HTTP Header Options" section of the Admon CP what happens if you turn the "Remove Redirection Message Pages" setting off?

Aotw 07-16-2006 09:53 AM

I have installed the login to our page and it works, but now i need to modify the design a bit. I have added a css file to the login_inc.php but i need to add some linke behaviour with css class. Here is one of the lines i need to modify, i have tried some but no sccess, only getting errors then i do it.

PHP Code:

echo"<a href=\"".$forumpath."search.php?$session[sessionurl]do=getnew\">$vbphrase[new_posts]</a>: $newposts<br />";} 

I alos having a problem with our cutenews installation on the same page, wich started direct after i added the login addon. Been trying to get some support at their site but no luck, maybe someone here could help?

Getting following error.
Quote:

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/kreativi/public_html/portal/news/inc/functions.inc.php on line 43

SKNY 07-17-2006 01:06 AM

For the CSS.. heres what I did.

The page I included the login_inc.php already had a CSS Style Sheet applied to it so I just used the class...


Anyway part of my style sheet.

PHP Code:

<style>

.
orange{
    
color:#FF9300;
    
text-decoration:none;
}

.
orange2{
    
color:#FF9300;
}

.
orange_9{
    
color:#FF9300;
    
text-decoration:none;
    
font-size:9px;
}
<
style

Now all I did was add the class to the line of code I needed to apply a style to..


PHP Code:

echo "<br><a href=\"".$forumpath."search.php?$session[sessionurl]do=getnew\" class=\"orange\">New Posts</a>: $newposts<br />"

The above is the same code as yours below, however I didn't want to use the vB Phrase so I entered my own text.. other than that its the same as yours.

notice this part...

PHP Code:

class=\"orange\"> 

thats how you enter the class, and when you include the script onto your page the part with the class should have been styled..

As for the CuteNews thingy Im not sure.. I'll need to see the file functions.inc.php and the rest of your code.

Anyway hope I was of some help

- SKNY

Aotw 07-17-2006 09:41 AM

That helped alot SKNY, needed an example how to write the class in the php code, THX. :cool:

mnz 07-18-2006 01:57 AM

i sent you a PM billspaintball. :)

Aotw 07-18-2006 08:31 PM

Got another problem here now, wich i belive is realted to this login addon, since it disables our page navigation system then i adding the 4 lines of code that should be at top of the page. Our navigation looks like index.php?action=home and displays a root.php page inside index.php. You can se part of the navigation system that are in index.php.
PHP Code:

elseif($action == 'home')
     {include(
'root.php');} 

If i adding the 4 lines of codes, that points to global.php in my forum folder, i'm getting "header allready sent", but if i add it index.php the navigation stops working and reloads the same page then you click on a link in the menu.

If you need to see more of the code, just tell me here or send me a pm, except for this problem it is working just fine.

SKNY 07-18-2006 09:31 PM

try this


PHP Code:

elseif($action == 'home'
     {require_once(
'root.php');} 


Aotw 07-18-2006 10:05 PM

Quote:

Originally Posted by SKNY
try this


PHP Code:

elseif($action == 'home'
     {require_once(
'root.php');} 


No changes, still reloads the same page. Other suggestions are welcome.

Billspaintball 07-19-2006 02:59 AM

Quote:

Originally Posted by Aotw
No changes, still reloads the same page. Other suggestions are welcome.

$action may be given a variable in global.php I spose.
If thats the cause renaming your $action variable would fix it.

Aotw 07-19-2006 07:11 AM

Quote:

Originally Posted by Billspaintball
$action may be given a variable in global.php I spose.
If thats the cause renaming your $action variable would fix it.

I tried to rename $action to several other options but didnt help me out. I gonna talk to my friend that made that navigation system then i get a chance to se if he have any soloutions, but if anyone here have something else i could try, it will be welcome.

Billspaintball 07-20-2006 12:27 AM

If you have access to the person who designed the nav system, that would be the easiest way to get this conflict fixed.

TheJackal56 07-22-2006 03:15 PM

Quote:

Originally Posted by Billspaintball
Thats weird.
I havent come accross this before.

In the "Cookies and HTTP Header Options" section of the Admon CP what happens if you turn the "Remove Redirection Message Pages" setting off?

Yes I have all of them set and have tried all possible settings.

I just cannot get the session to timeout or get rid of those pages.

A17roolz 07-24-2006 06:52 PM

Anyone know how to get this working on the same page as vBExternal (using the news fetch).

Sean James 07-27-2006 10:36 PM

awesome script billspaintball, anyway of adding total members in the statisics also?

Sean James 07-28-2006 12:37 AM

also is this script XHTML compliant?

when i check my site for compliancy i get these errors:

Quote:

# Error Line 87 column 73: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

...design.com/forums//login.php" method=post onsubmit=md5hash(vb_login_password,


Billspaintball 07-28-2006 05:08 AM

Quote:

Originally Posted by Griffin80
awesome script billspaintball, anyway of adding total members in the statisics also?

Ive been asked about that before.
Yes it is certainly possible, I just need some time to do it. (been flat out since the new baby)

Quote:

also is this script XHTML compliant?
Probably not.
Im a tad uneducated (and lazy) when it comes to XHTML compliance :(

Sean James 07-28-2006 06:25 AM

congrates on the new baby ;)

I found time today anyways and modifed the script and its almost 100% validated on my site except from 2 errors i made myself modifying the layout.

One problem i am having is with the link showing double // for example when a unregisterd user clicks register they r sent to this link:
http://www.bluepearl-design.com/forums//register.php?s=

Here is a link to the test page using this script:
http://www.bluepearl-design.com/test.php

AndrewMS 07-29-2006 11:48 AM

Hi Billspaintball,

I get this error, only when I'm not logged.
Code:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /includes/functions.php on line 4259

Warning: preg_replace() [function.preg-replace]: Empty regular expression in /includes/functions.php on line 4259

Can you help me?

EDIT: fixed!!:cool:

Kungfu 07-29-2006 05:52 PM

Fatal error: Cannot use object of type vB_Database as array in /public_html/admin/common.php on line 53

line 53:
$udb->start($db['host'],$db['user'],$db['pass'],$db['name']);

because i have another sql database for my site that it calls it does this. How can i stop it from trying to make a vb array database? Thanks.

Sean James 07-29-2006 05:58 PM

any ideas why i am getting double // in my urls? been trying so many different combinations of paths and i just cant seem to figure it out hehe

Kungfu 07-30-2006 03:13 AM

Quote:

Originally Posted by Griffin80
any ideas why i am getting double // in my urls? been trying so many different combinations of paths and i just cant seem to figure it out hehe

what did you put for a path?

Kungfu 07-30-2006 03:16 AM

either change this $forumpath = "http://www.yoursite.com/forums/";
to
$forumpath = "http://www.yoursite.com/forums";

or

go into the login_inc and find

You have to <a href=\"".$forumpath."/register.php?s=$session[sessionhash]\"

take out that / in front of register

You have to <a href=\"".$forumpath."register.php?s=$session[sessionhash]\"
should be this.

AndrewMS 07-30-2006 12:03 PM

Quote:

Originally Posted by Kungfu
Fatal error: Cannot use object of type vB_Database as array in /public_html/admin/common.php on line 53


line 53:
$udb->start($db['host'],$db['user'],$db['pass'],$db['name']);

because i have another sql database for my site that it calls it does this. How can i stop it from trying to make a vb array database? Thanks.


I think you got this error because vbulletin has a variable called $db. Try to rename your variable, $db_site instead of $db.

Kungfu 07-30-2006 11:31 PM

Quote:

Originally Posted by AndrewMS
I think you got this error because vbulletin has a variable called $db. Try to rename your variable, $db_site instead of $db.

ouch ok, guess i gotta do what i gotta do. thanks and ill try that.

A17roolz 07-31-2006 01:33 PM

Quote:

Originally Posted by A17roolz
Anyone know how to get this working on the same page as vBExternal (using the news fetch).

Anyone?

PitPunks 08-05-2006 04:04 PM

When i am logged in it says im not, and when i login it jsut redirects me to my vbulletin forum.

Billspaintball 08-07-2006 12:40 AM

Quote:

Originally Posted by A17roolz
Anyone?

No.
They are not really compatible.

Easiest thing is to is add a login functionaly to vB external.

Billspaintball 08-07-2006 12:45 AM

Quote:

Originally Posted by PitPunks
When i am logged in it says im not, and when i login it jsut redirects me to my vbulletin forum.

Check the cookies and path settings in the troubleshooting guide (post 2)
Also flush your browser cache and make sure you force a page refresh (CTRL+F5)

PitPunks 08-07-2006 02:21 AM

many thank you, it was the chache.

Now.. i must edit it to suit my needs :)

Thanks bill :)

fredtp 08-08-2006 02:55 AM

This is a great script! having a problem though. when browsing to the external site containing the login box while not logged in (cookies cleared) instead of showing the normal site, i get the forum login page. when i log in i get a 404 error because its looking for login.php in the root directory (not the forum directory). What i'd like is for a non-logged-in user navigates into the page, they see the normal page plus the login box. i've tried the simple page as suggested in the instructions and same thing happens. if i am logged in prior to going to the page, it works fine.
your help is appreciated, thanks

Billspaintball 08-08-2006 10:56 PM

Quote:

Originally Posted by fredtp
when browsing to the external site containing the login box while not logged in (cookies cleared) instead of showing the normal site, i get the forum login page. when i log in i get a 404 error because its looking for login.php in the root directory (not the forum directory).

Sounds like somthing has gone wrong with your paths.
Do step two of troubleshooting to confirm the path, then make sure that it matches
PHP Code:

<?php
// Edit the lines below to show path to your forums
$forumpath "http://www.yoursite.com/forums/";

in your login_inc.php file and also
PHP Code:

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

On the page with the login box.

Quote:

What i'd like is for a non-logged-in user navigates into the page, they see the normal page plus the login box.
Thats how it usually works.
Quote:

i've tried the simple page as suggested in the instructions and same thing happens. if i am logged in prior to going to the page, it works fine.
your help is appreciated, thanks

erinys 08-09-2006 02:09 PM

Hey bill! you should port this to 3.6, since it allready works with it without a problem ;)

delive 08-09-2006 02:14 PM

Hey, I'm still getting problems with the logging in, then it doesn't show me logged in. Sometimes, if I clear my cookies it will work. Then the next time I turn on my computer, or anyone elses for that matter, it won't work. The cookies setting in vb is set to /. I really dont understand why this keeps happening.

Another question, is there a way to decrease the loading times? I've gotten a couple comments that it takes a while for the page to load and it gets stuck when grabbing the users information after they logged in. Am I the only one that gets that?

Mr_Bob 08-09-2006 06:51 PM

Quote:

Originally Posted by Aotw
I alos having a problem with our cutenews installation on the same page, wich started direct after i added the login addon. Been trying to get some support at their site but no luck, maybe someone here could help?

Getting following error.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/kreativi/public_html/portal/news/inc/functions.inc.php on line 43[/CODE]

I found a solution for this! :D

Well, it's not really a solution, but it will get rid of the error. I've just started using Cutenews, and found that this error really does not effect Cutenews....at all. It's simply very annoying and makes your website look unprofesional. So, I found that the best thing to do is simply turn off error reporting in the Cutenew's shownews.php file. If you are unsure how to do that, browser into your shownews.php file and at the very top you'll see
PHP Code:

error_reporting (E_ALL E_NOTICE); 

Just change that to
PHP Code:

error_reporting (0); 

See, if you can't beat it, cover it up. Loads of government officials have done it, now we can too ;).

While I'm posting, any progress on the avatar issues yet :D. When I "succeeded' in this I tried to tackle that again...still not finding a good solution.


All times are GMT. The time now is 10:51 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.02414 seconds
  • Memory Usage 1,862KB
  • 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
  • (11)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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