Recent Topics

1 Nov 28, 2005 15:58    

I have downloaded the product and I like the looks of it...

I am considering offering blogs to certain users of my bulletin board (vbulletin software).

I would like to limit WHO can create a blog and wondered how difficult it is to add some php code during the registration process where I would open and check the users tables in my vbulletin database and only allow certain members to create blogs.

On the surface this does not sound difficult since I have written a number of VB hacks myself.

any thoughts or ideas before I hack the code and write the interface?

thanks in advance.

- jeff

2 Nov 28, 2005 20:39

jeffj, you might be able to do what you want with a self-written plugin that reacts on the event "LoginAttempt".

Your plugin's LoginAttempt method would check your vbulletin database and if the user is allowed, you just create a new user in b2evo (if it does not exist already). You can even set the same password then / authenticate him/her against vbulletin and keep the passwords in sync (update the b2evo password, if the user could get authenticated against vbulletin, but not against b2evo in your initial check if the user exists, with that password).

If you create a new user, you can then also create a new Blog for him.

Take a look at the LDAP plugin, which does basically the same (but does not create a blog, but is quite simple).

Hmm.. speaking about it I realize that you're probably not using Phoenix.. ;)

With 0.9.1 you should be able to hack it into the veriflog() function (do yourself a favour and use require/include to just add one line at the appropriate place) and use the concept of [url=http://cvs.sourceforge.net/viewcvs.py/evocms/b2evolution/blogs/plugins/_ldap.plugin.php?view=auto]Phoenix' LDAP plugin[/url].

But the cleanest way would be to wait for Phoenix to become stable and write a generic vbulletin plugin.. :)

3 Nov 28, 2005 21:00

I was thinking more along the lines of inserting new code in your php code for when a new user attempt to create their blog site. I would take the username and password and then simply add code to check to see if they exist in the vb database and have the correct privilages and if so - let them proceed - otherwise stop the signup process.

thanks

4 Nov 28, 2005 21:23

With signup process you mean "Register new account..."?

Hooking into veriflog() / LoginAttempt() is quite the same, even more effective in this case.

The user just tries to login and if he has privileges his/her blog gets created and he/she is logged in. If it fails (wrong password or not enough vbulletin perms) it returns "Wrong login/pwd.".

If you want to allow registering of new users always, but create a blog for just some of them in "special cases" you'll have to hook elsewhere (take a look at /htsrv/register.php then).

It would be interesting to see how we could provide a good hook for that with Phoenix (or beyond).


Form is loading...