Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Auth_vBulletin and Authentication

(Page 2 of 2)
> >
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
 

In Reply To
OK, I must be missing something here.... now it just prints out:


sub { my $output; if ($ENV{SCRIPT_NAME} =~ /nph-build/) { $output = ''; } else { $output = Links::SiteHTML::display('include_login'); } return $output; }


I presume that this means that it isn't being parsed as a script and is being presented as HTML instead. And yes, this is using .shtml pages.[/reply]
The variable you placed in the include_header template should be parsed just like all the other variables in the template. This part shouldn't depend on whether the page is html, shtml, php or whatever. The only reason you would need .shtml files for this code to work would be to parse the <!--#exec cgi="/cgi-bin/log.cgi" --> SSI command.

I installed this plugin and, after some initial troubles, got it working. My main problem was that I had saved the new include_login template as "include_login" and not "include_login.html" (it gave me HTTP 500 errors). Once I changed that, it all worked fine.

I created a Template Global called 'log', and then used this code in the 'include_header.html' template:
Code:
<div id="logbar">
<%log%>
</div>

Of course, I also had to change the paths in the log.cgi file, and the path in the SSI command.

I hope that helps. :-)

Quote Reply
Re: [Red5] Auth_vBulletin and Authentication In reply to
Yup, I spotted those issues as well.

After more tweaking, it was hanging on the dynamic pages and producing nothing on the static pages (which was progress believe it or not). However, it isn't worth my time to spend another day on it, so I will perhaps come back to it later and try again from scratch.

In the mean time, I hope that GT will consider an update to it. *hint*
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
In Reply To:
In the mean time, I hope that GT will consider an update to it. *hint*

Indeed, because it doesn't really do much in its current state. It's such a great idea and it's so close to being awesome - it just needs updating. <hint>

:-)
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
In Reply To:
The problem is that the Auth_vBulletin plugin doesn't work with current versions of vBulletin - and that is what needs fixing really.
Just to clarify, I am using this plugin on a dynamic site running Links 3.2 and vB 3.6 and it works fine.

Sorry I can't be of more help in helping to fix the problem. I have moved away from static sites as they seemed to be less able to take advantage of the user functions when compared with dynamic sites.
Quote Reply
Re: [aus_dave] Auth_vBulletin and Authentication In reply to
In Reply To:
In Reply To:
The problem is that the Auth_vBulletin plugin doesn't work with current versions of vBulletin - and that is what needs fixing really.

Just to clarify, I am using this plugin on a dynamic site running Links 3.2 and vB 3.6 and it works fine.

Sorry I can't be of more help in helping to fix the problem. I have moved away from static sites as they seemed to be less able to take advantage of the user functions when compared with dynamic sites.

The problem is that I have nearly 600,000 links in the directory in 400,000 categories. I am not sure that the dynamic system is the best option - it could kill the server if Google did a full crawl. I might be wrong on that.

It does work on the dynamic pages, yes, but a lot of people buy Links because of its SEO friendliness.
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
If you use rewrite rules you can retain the search engine friendly aspects by making the dynamic URLs appear static even though they are not. If there are 600,000 detailed pages in your site it might actually be beneficial to server resources, as you remove the need to regularly rebuild each of the pages (a lot of which would be rarely looked at probably). Plus think of the disk space you will save :).

You are running a huge directory though, most of the Links sites I operate are much smaller. In any case, I was just clarifying that the plugin itself still works, but something in the core vB or Links code has probably changed.
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
Is there any chance that someone from GT can comment on this please and advise whether the mod will be fixed or not?

If not, I will completely uninstall it, rather than continue to use the embarrasing fudge that I have now that doesn't really work properly.
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
If you send me admin access and a user login, I can take a look at it. However, as aus_dave has mentioned, it does work.

Adrian
Quote Reply
Re: [brewt] Auth_vBulletin and Authentication In reply to
In Reply To:
However, as aus_dave has mentioned, it does work.


No, it doesn't! Smile It works for dynamic pages, but NOT for static pages - it always shows the user as logged out. Nor is it possible to log in through the Links 'log in' box (at least on mine).

Not much point in sending you a link I am afraid as I have currently removed all of the log in sections from the templates so that it can't tell the user that they aren't logged in (when they are). I will have to put them back in at some point and ask for some assistance then, thanks.
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
Whether or not the static pages show the user as being logged in or not is a completely cosmetic thing (it is only controlled via javascript, is not a 100% indicator of if they are logged in). That alone is not an indicator of whether or not the plugin is working.

Adrian
Quote Reply
Re: [brewt] Auth_vBulletin and Authentication In reply to
In Reply To:
Whether or not the static pages show the user as being logged in or not is a completely cosmetic thing (it is only controlled via javascript, is not a 100% indicator of if they are logged in). That alone is not an indicator of whether or not the plugin is working.

Huh? So if they are logged in and the static pages alway tells them they are logged out, but the dynamic ones tell them they are logged in, you think that is working? It may be 'cosmetic' but it makes the plugin a nightmare, and it is BROKEN. Also, users can't log in through Links on mine - even if I use exactly the same details on the vBulletin log in. Nor does the registration via Links appear to work properly.

You shouldn't be offering it as a mod if it doesn't work properly.

Surely if it is just cosmetic, it won't be hard to fix or offer a patch solution? Please? Smile
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
You could use SSI

<!--#include virtual="/vb.php"-->

my vb.php is something like this.

Code:

<?php
chdir("path/to/forum");
require('../forum/global.php');
include('../forum/includes/functions_user.php');

// user logged in
if ($vbulletin->userinfo['userid'])
{
echo "<a href=/forum/login.php?$session[sessionurl]do=logout&amp;logouthash=$logouthash";
echo $vbulletin->userinfo['logouthash'];
echo ">";
echo " Log Out";
echo "</a>";
}

// user logged out
if ($vbulletin->userinfo['userid'] == '')
{
print '<a href="/forum/register.php" rel="nofollow">Register</A>';
if ($vbulletin->userinfo['userid'] == 0)
{
echo "<a href=\"/cgi-bin/dir/user.cgi?url=" . $_SERVER['REQUEST_URI'] . "\" rel=\"nofollow\">Login</a>";
}
}
?>

Last edited by:

garrynz: Nov 19, 2006, 2:03 AM
Quote Reply
Re: [garrynz] Auth_vBulletin and Authentication In reply to
In Reply To:
You could use SSI

<!--#include virtual="/vb.php"-->

my vb.php is something like this.

Code:

<?php
chdir("path/to/forum");
require('../forum/global.php');
include('../forum/includes/functions_user.php');

// user logged in
if ($vbulletin->userinfo['userid'])
{
echo "<a href=/forum/login.php?$session[sessionurl]do=logout&amp;logouthash=$logouthash";
echo $vbulletin->userinfo['logouthash'];
echo ">";
echo " Log Out";
echo "</a>";
}

// user logged out
if ($vbulletin->userinfo['userid'] == '')
{
print '<a href="/forum/register.php" rel="nofollow">Register</A>';
if ($vbulletin->userinfo['userid'] == 0)
{
echo "<a href=\"/cgi-bin/dir/user.cgi?url=" . $_SERVER['REQUEST_URI'] . "\" rel=\"nofollow\">Login</a>";
}
}
?>

That looks great. I will give it a go when I get back from the pub Crazy Wink

Thanks.
Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
In Reply To:
Also, users can't log in through Links on mine - even if I use exactly the same details on the vBulletin log in. Nor does the registration via Links appear to work properly.
This plugin allows you to use the vBulletin authentication code instead of the in-built Links code. This means that you can only register using the vBulletin side, not the Links side.

The same applies for logging in. You can provide a login form in the Links part of the site, but the form needs to post the data to /forums/login.php (or wherever you have vB installed). It's easiest to cut and paste the login box from vBulletin into Links and modify the styles etc.

If I understand you correctly you are still having problems even though you are doing things as explained above. I am happy to have a quick look at your site if you want to PM me a URL.

One of my Links sites uses a modified version of this plugin to integrate very tightly with vBulletin, including areas like the newsletter subscription. For the most part it works pretty well and gives users a seamless transition between each part of the site Smile.
Quote Reply
Re: [aus_dave] Auth_vBulletin and Authentication In reply to
Hmm, I can't seem to get this to work. I have the php file included and working. I don't get any error messages, so the include files are being found. BUT the 'userid' is always returned as '0'... so I get the 'Login' message every time.

Any idea what might be causing this please? I have checked that the username is registered and appears in the Admin section. The dynamic pages are still working just fine and showing the user as logged in.

Any ideas?

Code:
chdir("path/to/forum");
require('../forum/global.php');
include('../forum/includes/functions_user.php');

// user logged in
if ($vbulletin->userinfo['userid'])
{
echo "<a href=/forum/login.php?$session[sessionurl]do=logout&amp;logouthash=$logouthash";
echo $vbulletin->userinfo['logouthash'];
echo ">";
echo " Log Out";
echo "</a>";
}


Quote Reply
Re: [swissbob] Auth_vBulletin and Authentication In reply to
I worked out the problem. I needed to place the 'require' part of your code at the top of the page before any cookies are sent. Once the php had been moved, it worked just fine.

This involved changing all of the templates for the static HTML pages.
> >