vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   vBulletin [2.2.8] and Post Nuke [.7.2.1] Integration (https://vborg.vbsupport.ru/showthread.php?t=45371)

Brew 11-03-2002 10:00 PM

vBulletin [2.2.8] and Post Nuke [.7.2.1] Integration
 
This post will be updated from time to time with new info. So check this first post whenever you want to see if there are any changes to the code or docs.

11-9-02 12:15pm est
Made the hack files into zip format.
Added BANNING in PostNuke! (cookie based atm)
Added a lot of instructions.
Changed the link to PostWrap at the bottom of this post.
A couple bug fixes.

11-05-02 12:50pm est
Fixed a bug in the display avatar in PostNuke user profile screen.
I changed the rar download to reflect this.
You can find the fix in this post:
https://vborg.vbsupport.ru/showthrea...984#post318984

The above fix is in the zip file attached.

11-04-02 11:00pm est
Updated both the docs and the rar file.
It includes instructions on disabling the PN Admin ability to add or modify users. Only the vBulletin admin screen should be use to update or delete users.

Added a to-do to the list for making the hack work when adding new custom fields. As it is now you should not add any custom fields untill this is worked out. Although you can add custom user fields with some tweaking of the hack. It just needs to be automated somehow...haven't figured out how yet.

Also added a to-do to be sure moderators can modify or delete users where allowed.

Be sure you re-read through the whole thing in case something was overlooked!

11-04-02 4:30pm est
Added a link to my test site at the bottom
Just noticed that I haven't done anything with the PostNuke admin. Don't use the PostNuke admin to change or delete users until I fix this.

---------------------------------------------------------------------

Before you install this hack I must say:

This hack was only tested and used on a new install of vBulletin!!!

Also...BACK UP YOUR DATABASE FIRST!!!!

Once vBulletin is installed you use a small set of scripts that pulls users from the PostNuke tables and inserts them into the vB tables. The only user in the vBulletin database MUST be the admin of vBulletin! If your database already has members then you will have to search out a script that will merge the PostNuke database into vBulletins database.

The insertion files are included in the rar file with the instructions.

Above all else you MUST verify that the user tables are identical in the userid and username columns between PostNuke and vBulletin! If not then the hack will NOT work and you'll get information for wrong users and the whole thing will get buggered up and may even destroy the viability of your current user database!!! So complete and error free mirroring between the two user databases is absolutely essential!

Kier's avatar to file hack MUST be used with this hack as I tried many hours to get the hack to work without it. If you know of a working way to get the avatar from vB to display in a non-vB script I would appreciate the heads up (yes I rummaged through the hacks here at vBulletin.org but none of them worked for me)

If you don't follow the above warnings then TUFF! You've been warned :smoke:

This hack was written using ver2.2.8 of vBulletin and ver .7.2.1 of PostNuke.

The hack is nearly 100% integration. That is to say that PostNuke will use the resources of vBulletin nearly 100% pertaining to the user system. If you find areas where there needs to be better integration or areas I have overlooked please let me know so I can correct it!

This hack shares the user names and ids, avatars, signatures and all other aspects of user information except permissions and groups(it does work with the PN groups though)....which I feel should be separate from each other anyway.

The only things I can think of that are not integrated is the private message system and the ability to add news to the front page from vBulletin and visa-versa. If you know of hacks that would do this would you please share it with me?

Some things this hack will do:

New users coming in from PostNuke who want to register will be redirected to vB to register.

Users who have used the vB registration form can log in to PN but not be allowed to do the same things as a fully registered user can do.

When users click their email link to finish registration they will then have registered status in PN.

The user profile screen in PN displays the same information used in vB.

When using Kier's avatar to file hack the user profile screen in PN will display the same avatar as the user has for vb. (again.....if you know how to get the avatar from vB I would appreciate the heads up!)

When a user needs to have a password emailed to them they will be redirected to the vB send password screen.


This is a very involved hack using 7 different files. I will try to give some support to this....But since I've had vBulletin for only a week (or so) I don't know how well I'll be able to. Yeah...sounds scary to hear but believe me the hack works :p

Thanks to all who would like to test this hack!

As you'll see I need a bit of work in the docs. If you could help with that I would appreciate it!


Some to-do things....

Make the hack more PostNuke API friendly.

Change areas to make it so it will automatically detect the table prefix for PostNuke.

Create a new field where one can poke info in for each domain in a multi-site setup then have the hack peek this field.

Integrate the news system of PostNuke into vBulletin so when news is posted it will be posted to a particular forum.

Make the docs easier to follow.

Clean it all up using appropriate syntax..ie...using arrays where needed in loops etc.

Add the ability for the hack to add custom fields from vB. As it is now you should NOT add any custom fields!

But, of course, only if there's enough interest in the hack for me to do this....

To see this hack in action visit the test site...this is ONLY a test site and is not open to the public. Only those interested in testing the hack may use it.

vBulletin and PostNuke integrated .... go ahead and create an account...mess with it...whatever...The test site will only be available until I am confident it is bug free then will be moved to another site and be live.

Also the test site is using a module called "PostWrap". It incorporates vBulletin logins into the main page and is not part of the hack above. You can find PostWrap at PostWrap 2.01 at PostNuke.com

chad777 11-04-2002 03:58 AM

just postnuke or will it work for phpnuke too ? crosses fingers ;)

Brew 11-04-2002 04:01 AM

Quote:

Originally posted by chad777
just postnuke or will it work for phpnuke too ? crosses fingers ;)
There is only slight differences between PhPNuke and PostNuke in the user tables.

Using PhPMyAdmin look at them and mark the differences...then adjust accordingly.

You'll also have to make adjustmenst with the group settings in the hack as I think PhPNuke does not use groups and permissions.

This is something I'll look into once this hack is completed is to integrate PhPNuke....

But from what I remember they are pretty much the same...though I could be mistaken as it's been a while since I've played with PhPNuke (over a year and a half)

Brew

thefreestyler 11-04-2002 08:04 AM

look great thanks

yahoooh 11-04-2002 11:34 AM

i hope it works with phpnuke which is the best
i will test it at my local host and i will see if it is good integration

thank u

yahoooh 11-04-2002 11:41 AM

ok it is just integration in registeration

i was searching about full integration ex. vbulletin used as module for phpnuke like phpbb2

but i think no one do it here

any one need register integration phpnuke 6.00 and vbulletin 2.2.8
tell me because i do it already and bazed on w4u hack

i wish in the future get full phpnuke and vbulletin integration as phpnuke and phpbb2 which be integrated allready

Brew 11-04-2002 01:02 PM

Quote:

Originally posted by yahoooh
i hope it works with phpnuke which is the best
i will test it at my local host and i will see if it is good integration

thank u

As I intimated in my earlier post ... I don't believe this hack will work with PhPNuke because of the groups and permissions system. If you try to make this work with it you'll probably have to take out those parts in the hack pertaining to this.

Doing so will mean that once someone registers they will automatically have access to using your site as a registered user. Email authentication will become null and void for your front page.

The only way around this would be to create a new field in nuke_users and then peeking into this field each and every time you want to restrict access to a feature in PhPNuke to registered users.....mucho work man....

My suggestion would be to upgrade to PostNuke from PhPNuke.

Brew 11-04-2002 01:11 PM

Quote:

Originally posted by yahoooh
ok it is just integration in registeration

i was searching about full integration ex. vbulletin used as module for phpnuke like phpbb2

but i think no one do it here

any one need register integration phpnuke 6.00 and vbulletin 2.2.8
tell me because i do it already and bazed on w4u hack


i wish in the future get full phpnuke and vbulletin integration as phpnuke and phpbb2 which be integrated allready

I wish you would have explained what full integration means. Fully using the user registration IS full integration. Excepting for the private messages and being able to post to the front page there's not a whole lot else you can do....well maybe the calendar. But those things have already been hacked I believe and if you search the forums here you may be able to find them.

And if you were looking for a module maybe you should turn to a module maker.....looking in hacks you may have a hard time finding modules.

Brew

Knux 11-04-2002 04:11 PM

I have a question... IF I have forums that have over 300 members and I am about to do A fresh install of vbulleitn 2.2.8 but I am going to dump the users back in, would this still work or would I have to do something so it would??

Brew 11-04-2002 04:26 PM

Quote:

Originally posted by Knux
I have a question... IF I have forums that have over 300 members and I am about to do A fresh install of vbulleitn 2.2.8 but I am going to dump the users back in, would this still work or would I have to do something so it would??
The main thing to remember is that the user id has to be the same between PostNuke and vBulletin. Once you have the user tables mirrored it should work great.

Using a utility to open up your sql database look in the "user" table for the userid numbers and take note of who is who. I mean for example user id 15 ok? Note the username for that id number.

Then go to the nuke_users table (or prefix_users depending on what prefix you're using) and do the same thing. All user ids MUST match between vBulletin and PostNuke. They must mirror each other without error.

If there is a utility to MERGE databases....wherein the users and their ids are re-arranged in such a way where all the users and their ids match between the two then it will work. Accurate mirroring is key to this to work.

Now If I didn't want to mirror and I just wanted to use one database I could have done that. And it probably wouldn't be too hard to tweak the hack in order to have only one database. I just feel it's better to have the two user databases seperate in case I drop one or the other....like maybe if I decided to stop using PostNuke...I'll want to keep the user tables in vB.

There could be multiple versions made of this hack. One for people with a new install of vB.....One where there are people in BOTH databases and one where there are people in the vB database but the PN database is empty. It would just take a bit of thought in how to go about it right.

Brew

Brew 11-04-2002 04:51 PM

Quote:

Originally posted by Knux
I have a question... IF I have forums that have over 300 members and I am about to do A fresh install of vbulleitn 2.2.8 but I am going to dump the users back in, would this still work or would I have to do something so it would??
I just happened to think about this...

What you could do is create a script that would insert your vBulletin users into the PN user tables. Just be sure to leave the user id null and MySQL will add them to the highest userid number within the table.

Then delete the users from the vB user table and userfields and then use the scripts that are in the rar file to put them into the vB tables.....all should work!

One caveat however.....you would have to make sure that the users in your vB database are different then the ones in your PN database. So if harroldM has an account in your vB database AND he has an account in your PN database you would not want to insert his information into the PN database or there will be a duplicate....and I am not sure what that would cause to the whole system...let alone your user who may find himself locked out.

let me know if I am clear enough on this :D

If there's enough demand I'll make a script that will put the users from vB into PN...

BTW...Backup your database first!!!!!

Brew

Brew 11-04-2002 04:55 PM

Don't forget if I am missing anything in the integration to please let me know :nervous:

darker1 11-04-2002 05:54 PM

What about getting it to work with xoops from www.xoops.org. Might be easier then phpnuke.

Brew 11-04-2002 05:56 PM

Quote:

Originally posted by darker1
What about getting it to work with xoops from www.xoops.org. Might be easier then phpnuke.

I don't have a clue about Xoops....never played with it.

Brew

w4u 11-04-2002 08:58 PM

Quote:

Originally posted by Brew

I wish you would have explained what full integration means.
Brew

Full integration- is not only user integration, or registration in both- it?s sharing management in one place, 1 user panel, 1 login/logout function and so on. (look into phpBB2 :))
Finally, vbb ?must? be hacked so it will turn into postnuke module.

To do so, you must change a lot of code and/or write ?bridge? between postnuke and vbb.

I managed to change some vbb code, so it can be displayed as postnuke module- with all headers, footers and blocks. But there are a lot of work to do: cookie problems, urls in vbb and so on?. I hope I?ll finish it someday :)

Brew 11-04-2002 09:42 PM

Quote:

Originally posted by w4u


Full integration- is not only user integration, or registration in both- it?s sharing management in one place, 1 user panel, 1 login/logout function and so on. (look into phpBB2 :))
Finally, vbb ?must? be hacked so it will turn into postnuke module.

To do so, you must change a lot of code and/or write ?bridge? between postnuke and vbb.

I managed to change some vbb code, so it can be displayed as postnuke module- with all headers, footers and blocks. But there are a lot of work to do: cookie problems, urls in vbb and so on?. I hope I?ll finish it someday :)

If all you want is one user panel just link to the user page either at vB or PN.

Why you think vB "must" be hacked into a module is beyond me and ludicrous. But hey....if you want to spend all that time to turn vB into a module power to you...and by the time you're done PN ver .725 will be here and your module will have to be written all over again. At least with the hack I'm doing people can have it now....

Ninth Dimension 11-04-2002 11:41 PM

In my opinion, Postnuke is a far better system that PHPNuke, so this hack initally looked interesting to me, but then I rememberd that I SWORE to never use a Nuke system again :)

But i am impressed with this hack, well done :)

w4u 11-05-2002 06:00 AM

Quote:

Originally posted by Brew


If all you want is one user panel just link to the user page either at vB or PN.

Why you think vB "must" be hacked into a module is beyond me and ludicrous. But hey....if you want to spend all that time to turn vB into a module power to you...and by the time you're done PN ver .725 will be here and your module will have to be written all over again. At least with the hack I'm doing people can have it now....

LUDICROUS??? So you think phpBB2 integration into nuke system is ludicrous too?? And vbPortal is a waste of time too??
Lol :) btw, it?s only your opinion. Integration is more than only some user transfers.

2 Ninth Dimension: sometimes it seems to me, that it?s easier to write own portal, than try to figure out some schemas in nuke. Yeah it?s good system, but far from perfection. Which is better? Imho it wil be postnuke (pnAPI :)), but it?s harder to learn than phpNuke.

Knux 11-05-2002 03:41 PM

Quote:

Originally posted by Brew


I just happened to think about this...

What you could do is create a script that would insert your vBulletin users into the PN user tables. Just be sure to leave the user id null and MySQL will add them to the highest userid number within the table.

Then delete the users from the vB user table and userfields and then use the scripts that are in the rar file to put them into the vB tables.....all should work!

One caveat however.....you would have to make sure that the users in your vB database are different then the ones in your PN database. So if harroldM has an account in your vB database AND he has an account in your PN database you would not want to insert his information into the PN database or there will be a duplicate....and I am not sure what that would cause to the whole system...let alone your user who may find himself locked out.

let me know if I am clear enough on this :D

If there's enough demand I'll make a script that will put the users from vB into PN...

BTW...Backup your database first!!!!!

Brew

Sounds good but I don't know that much PHP and I am limited on MySQL Knowledge. Is there any way that you could create a script to port my users to PostNuke???

Brew 11-05-2002 03:49 PM

I just made a change to the docs....I'll update the rar file in the first post to reflect this change:

----------------------------------------------------------------
Code:

In modules/NS-User/user.php near line 67 find the following:


        if ($userinfo['user_avatar']) {
            echo "<img src=\"images/avatar/$userinfo[user_avatar]\" alt=\"\"><br>\n";
        }

And change it to the following:

//` Display avatar from vB
                $userid=$userinfo['pn_uid'];
        if ($userid<=2) {$userid=1; }
                        $z = mysql_query("SELECT avatarid FROM user WHERE userid='$userid'");
                        $row = mysql_fetch_assoc($z);
        if ($row['avatarid']>'0') {
                        $avatartid=$row['avatarid'];
                        $z = mysql_query("SELECT avatarpath FROM avatar WHERE avatarid=$avatartid");
                    $row = mysql_fetch_assoc($z);
                        $avatarfile="forums/".$row['avatarpath']."";
                if (!file_exists($avatarfile)) {echo"<img src=\"URL TO BLANK GIF\"><br>\n";}//`change this to an error graphic or a default avatar if wanted
                        else {echo"<img src=\"$avatarfile\"><br>\n";}
                }
        else {
                        $z = mysql_query("SELECT avatarrevision FROM user WHERE userid='$userid'");//get customavatar rev num
                      $row = mysql_fetch_assoc($z);
        if ($row['avatarrevision']>'0') {
                        $avatarfile="forums/custom_avatars/avatar".$userid."_".$row['avatarrevision'].".gif";
                if (!file_exists($avatarfile)) { echo"<img src=\"URL TO BLANK GIF\"><br>\n";}//`change this to an error graphic or a default avatar if wanted
                  else { echo"<img src=\"$avatarfile\"><br>\n"; }
                }
        }

---------------------------------------------------------------

The above fixes a bug of when showing avatars in the PostNuke User Profile screen.

Brew

Brew 11-05-2002 04:51 PM

Quote:

Originally posted by Knux


Sounds good but I don't know that much PHP and I am limited on MySQL Knowledge. Is there any way that you could create a script to port my users to PostNuke???

As i was saying you would have to be sure that no two users were the same between the two databases.

To create a script that would first verify that all user id and names are unique and delete duplicate ids and names from one or the other database would be beyond my capability and time.

My suggestion would be to find a source for sql snippets someplace. Of find an existing app that has this and see how they did it.

Another thing you can do is ask in a IRC channel for help...which I am doing at the moment....try looking for a #php or #mysql channel.

If I come across a way to do this I'll let you know.

Brew

Brew 11-06-2002 05:07 PM

hhhmmm.....

Has anyone tried this hack?

There's not a single bug in it someone wants to tell me about?

:nervous:

Brew

Knux 11-06-2002 07:30 PM

well I would try it but now I gotta go out and figure this stuff out.... Also I was askin if you could make that script that ports vb users to postnuke...

Mythril 11-09-2002 01:55 AM

can someone please post an zip file I cant extract the rar file even with the rar extracter. Thanks

Brew 11-09-2002 02:33 AM

There will be a new download tomorrow night with several bug fixes....Hold on till after that, ok?

Brew

Quote:

Originally posted by Mythril
can someone please post an zip file I cant extract the rar file even with the rar extracter. Thanks

Mythril 11-09-2002 03:15 AM

okay thanks see ya tommorow :)

Brew 11-09-2002 03:30 PM

First post updated with new files....

They are now zip too!

https://vborg.vbsupport.ru/showthrea...446#post318446

:glasses:

Knux 11-10-2002 07:28 PM

hey do you think you could make a script to port vb users to postnuke?? That way I could use this hack....

Knux 11-12-2002 12:36 AM

Nevermind I will use Mysticle's hack to prot my users form vb to postnuke then I will use your hack to intergrate them ;)!


BTW hisn hack can be found at: http://www.ctjeep.org/modules.php?op...download&cid=3

I will let you know later how this works out :D!

Katana Myronson 11-14-2002 04:59 PM

this looks awesome!

Hurricane 12-02-2002 01:22 AM

OK, I think I have a problem here! In the docs it says:

Code:

Near line 919 find the following:

//` put password into PN user table
$pnuser='$bbuserinfo[userid]';
if ($pnuser=1) {$pnuser=2; }
  $DB_site->query("UPDATE nuke_users SET pn_pass='".addslashes(md5($newpassword))."' WHERE pn_uid='$pnuser'");

That completes the hacks for forums/member.php!

I think it is missing what I am to look for. HELP! I am now way into this and I am missing stuff? :(

EDIT--

It looks like another problem:

Code:

In the PostNuke file modules/NS-Your_Account/user/modules/user.php find the following near the top:

function edituser($htmltext)
{
    $ThemeSel = pnConfigGetVar('Default_Theme');

Seems I do not have this file at all. :(

Sorry guy, this really needs some work. And I know the sad part is that I am sure you have put many, many hours into it. You are close, but it has issues.

Hurricane 12-11-2002 01:59 PM

For anyone thinking about doing this, be patient. I am working on some corrections and update install file. I tried to contact Brew, but never got a reply. It is a nice setup. I have also done it with a fully populated VB and moved my members to postnuke.

Sit tight I will post my findings soon! :)

we_scooter 12-12-2002 09:22 PM

Does this mean that we can integrate, VB with PHP nUKE??
regarding the users registerations and latests topics..??

bharvey42 12-20-2002 04:09 AM

Quote:

Originally posted by we_scooter
Does this mean that we can integrate, VB with PHP nUKE??
regarding the users registerations and latests topics..??

you people should really read the posts. this DOESN'T WORK WITH PHPNUKE

IT WORKS WITH POSTNUKE.

If you use phpnuke and really want this to work upgrade to PostNuke.

Grendel602 12-24-2002 09:40 PM

I've tried using this hack with no luck. I had the same problems that Hurricane was talking about. There are things that aren't quite right with the install file.

Brew, where ya at man? This hack is huge ... if you get it done!!!

Nomb 12-30-2002 03:24 PM

I'm going to be looking at this hack in a week or so. If I figure it out I'll post here. If Brew get's back and fixes it ... Woohoo!

( :

niudlezz 01-09-2003 06:04 PM

Hello guys, I just did this hack and it worked! Is there a way we can make it so that all PN users who sign up on the site can post on the forum as well with the same username? The hack only ports the users over, so if new users were to sign up afterwards, it wouldn't work. Is there a way we can make it so that all PN users can post on the forum as well with the same DB?

Hurricane 01-19-2003 02:26 PM

I have successfully tied them together! (Well for a while anyway) There are quite a few bumps in this project and I am still working through it. I have just been quite busy. I have all the scripts for moving the members from vBulletin into Post Nuke. As soon as I can get my sh*t together I will post it all here. This is a wonderful hack. Another MAJOR change I made was to keep the databases seperate. It is more load on the server as it has to do more queries, but it is worth it.

Let's keep this alive!

dkny 01-21-2003 07:23 AM

Quote:

Originally posted by Hurricane
I have successfully tied them together! (Well for a while anyway) There are quite a few bumps in this project and I am still working through it. I have just been quite busy. I have all the scripts for moving the members from vBulletin into Post Nuke. As soon as I can get my sh*t together I will post it all here. This is a wonderful hack. Another MAJOR change I made was to keep the databases seperate. It is more load on the server as it has to do more queries, but it is worth it.

Let's keep this alive!

Good luck on the integration, alot of heads are counting on you, including myself. I'm Please keep us updated! :banana:

C.Birch 01-21-2003 10:03 AM

where is this file:

modules/NS-Your_Account/user/modules/user.php

i dont have it :(


All times are GMT. The time now is 04:22 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.01555 seconds
  • Memory Usage 1,890KB
  • 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
  • (3)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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