vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to use Postnuke & VB with one UserDB (https://vborg.vbsupport.ru/showthread.php?t=33876)

Dontom 01-07-2002 09:13 AM

How to use Postnuke & VB with one UserDB: (got some requests to explain - here it is)

Install both to the same DB (PN uses a configurable prefix - so they won't mess up)

Upload a script that will regularly copy the contents of vbs Userdb to pn's userdb

(I use this cronned..)
PHP Code:

<?php
//connect to database
mysql_connect("localhost""yourDB""yourPW");
mysql_select_db("your db");
//empty pn userdb and fill it with fresh userdata
$query=mysql_query("delete from nuke_users");
$query=mysql_query("INSERT INTO nuke_users (uid,uname,email,url,user_sig,pass,user_icq) select userid,username,email,homepage,signature,password,icq from user");
$query=mysql_query("update nuke_users set umode='nested', theme='ExtraLite',timezone_offset='14.0'");

mysql_close();
?>

fill the table called "nuke_group_membership" so pn will recognize you as admin and the rest as regular users (you are in group 2, the rest is group 1)

change all urls in pn which have to do with registration to point to vb's reg-Page/usercp

Include vb's global.php and install Admin_online - people on your newssite will be shown as online reading news...
include Tubedoggs last x posts in your sideblock (works without changes in pn)

Thats it


User needs to log in once into pn and is recognized from then on.

Disadvantage: My cron runs hourly, so in the worst case a new user can't login into the PN-system for about 59 Minutes ;)

Advantage: No code manipulation needed, vb's & pn's Database remains untouched
you are able to Upgrade PN or VB without changing anything (as long as UserDB is not changed...)
You can integrate fantastic Modules, that are available to PN
-> Gallery ... (See it here )

see it in Action:
PN: http://www.mtb-news.de
Forum: http://www.mtb-news.de/forum

:-)
Tom

TigerLily 01-07-2002 04:11 PM

Thank you so much for sharing this! I've been looking and looking for a way to connect those two programs (getting ready to go live with PostNuke, have vb going). I could never find a simple answer, and thought I'd be spending weeks on this problem. I really do appreciate the information!

One question: How has your server performed while using both programs? That's a concern I have when going to so much dynamic content, but it will save so much time.

Thanks,
Kim:)

Dontom 01-07-2002 04:19 PM

until now without any problems - my news-page does not get the traffic my forums get, but both of them still perform well. yesterday 94 people were online simultaneously and I did not get db-errors (and the site still feeled fast :))
I am on a shared server...

TigerLily 01-07-2002 04:28 PM

Thanks again, Tom! And I looked at your site- very nice! I bet it's so much easier to maintain with PostNuke too. I'm really looking forward to using that program.

I was concerned about connecting PN and VB because we average about 100-120 users online for most of the day and into the night- even on weekends. Lately we're spiking up towards 200 at peak times. I made some tweaks to the database, and the server loads look good, just didn't want to crash the site or put a huge strain on the server if connecting the two programs caused problems.

I really enjoy PostNuke and Vbulletin, it's so great to find a way to use both of these excellent programs without having to hack everything to bits! I will let you know how it goes!

Thanks,
Kim:)

abdullah 01-07-2002 09:58 PM

thanx alot for the quick response and for this great work that made lots of jobs easier.
but i have some simple questions.
do we have to put both tables of pn and vb on the same db because we have different ones.
the other question though i dont think it has any relation but does this affect the permission system of PN.

thanks again Tom

Abdullah

JTMON 01-07-2002 10:02 PM

there's also vbPortal which is a port of post nuke made specifically for vb. It has all the same features and look as far as I can tell and was released here by wajones.

Dontom 01-08-2002 03:12 AM

Quote:

Originally posted by abdullah
thanx alot for the quick response and for this great work that made lots of jobs easier.
but i have some simple questions.
do we have to put both tables of pn and vb on the same db because we have different ones.
the other question though i dont think it has any relation but does this affect the permission system of PN.

thanks again Tom

Abdullah

Hi Abdullah,
no, you can put this on different db's - just change the cronned "insert into" to reflect aour databases...
you can even use different usergroups. on my pn there is admin, user and faq-maintainer - as long as users remain at the same userid everything will work... - you need to fill the nuke_group_membership table to reflect who is in which group
Tom

good luck!
Tom

owc 01-10-2002 09:30 PM

Can you pls Explain more for using PHP NUKE with Vb

Thnaks

abdullah 01-11-2002 12:10 AM

thanx again Tom

i will start backing up my database and do the integration.
If something went wrong i will let u know.

thanks.
Abdullah

Pilot 01-11-2002 11:06 AM

VBPortal is PHPNuke not PostNuke based.

www.phpportals.com

wakawaka 01-11-2002 11:15 PM

can some plz explain to me how to make cron work with the script? i am new to cron

Dontom 01-12-2002 04:05 AM

do a search for cron or cronjob @this forum - you will find what you need

wakawaka 01-12-2002 03:10 PM

i found an easier way then using cron m8. On the vbulletin register file, put your code at the bottom of the start activate section. I tried it on .702 version of podtnuke, but it gave me a error on security.php, so im trying it on .64, ill tell you how it works, cus if it does then there is no need for cron, cus it put the user in the db automatically

wakawaka 01-12-2002 03:17 PM

also wouldnt this reflect on the ability to have moderators on postnuke? I mean wouldn't dumping the db everytime a user registers make it hard to have different ppl as moderators and admins?

and also how do I fill in the nuke_group_membership to make me a admin? there were only 2 rows and colums and they were both full.

I dont mean to sound dumb, but this is an awsome hack, and i would like to get it right

wakawaka 01-12-2002 08:18 PM

it looks to me that this hack will also work for php-nuke.

plz reply if you want to know how to make this hack work automatically without the need for cron, it is very easy. Only took me like 10 minutes to figure out where to put the code.

Dontom 01-13-2002 04:39 AM

the cron thing has one advantage: if someone changes his pw on vb it is chnaged in pn too ;)

eac user has to be assigned to a usergroup - you can do this by setting all users till userid 10000 to user and set aourself to admin - as long as you have < 10000 Users everathing will work (I use Moderators on pn, too)

-=dm=- 01-28-2002 11:18 PM

Wow you have a killer site there:D

Dontom 01-29-2002 03:54 AM

Quote:

Originally posted by -=dm=-
Wow you have a killer site there:D
Thank you!
;)

-=dm=- 01-29-2002 10:38 AM

I saw your site its very wel integrated with vB.
can you please me with mine?
I did a clean install of postnuke yesterday only for this one:)
I have installed it on same db as my vbulletinboard.

thanx

dm

Dontom 01-29-2002 10:46 AM

follow the instructions in my first post - actually its really easy ;)

-=dm=- 01-29-2002 11:05 AM

hehe easy?( u r talking to a newbie:D)

ok I did a cron and cronjob search on this forum and didnt found what I want.
can u please explain:

PHP Code:

<?php
//connect to database
mysql_connect("localhost""yourDB""yourPW"); // is this database username & pw or database name & pw?
mysql_select_db("your db");// here should go my database name right?
do I have to change anything below?
//empty pn userdb and fill it with fresh userdata
$query=mysql_query("delete from nuke_users");
$query=mysql_query("INSERT INTO nuke_users (uid,uname,email,url,user_sig,pass,user_icq) select userid,username,email,homepage,signature,password,icq from user");
$query=mysql_query("update nuke_users set umode='nested', theme='ExtraLite',timezone_offset='14.0'");

mysql_close();
?>

so I put this one in a php file and upload to http://www.mydomain.dk/portal/nuke/cron.php (right?)

Im very sorry Tom I know Im asking to many questions but u see Im a newbie:( and php is not me.

thanx in advance
dm

fresh_froot 01-30-2002 02:40 PM

Waka...I'm interested in a cron free solution :) Can't wait to take a go at this one!

roscoluxxx 01-30-2002 09:36 PM

fill the nuke_group_membership with what exactly?

Dontom 01-31-2002 03:59 AM

setup postnuke as standalone - you will notice, that you are as admin in another group (dont know from memory - either 1 or 2) as the rest (normal user)
I filled this table with numbers according to this (userids from 0-10000 e.g and the correct setting (1,2, whatever). (did it in Excel;) ,exportet as csv and imported to pn - thats it!

roscoluxxx 01-31-2002 09:59 PM

Awesome thanks...

Here's what put in, and it works just fine. Anyone know an easy way to input a large range (200 thru 10000)?

INSERT INTO nuke_group_membership VALUES (1, X);
X being the userid.

Dontom 02-01-2002 04:10 AM

Quote:

Originally posted by roscoluxxx
Awesome thanks...

Here's what put in, and it works just fine. Anyone know an easy way to input a large range (200 thru 10000)?

INSERT INTO nuke_group_membership VALUES (1, X);
X being the userid.

super easy with excel - use 2 columns - one filled with a 1, the other with numbers from1-10000, eport as csv, import using phpmyadmin...

fresh_froot 02-01-2002 12:52 PM

That's exactly what I ended up doing :) Thanks!

fresh_froot 02-01-2002 12:58 PM

freshfroot=roscoluxxx @WORK ;)

SAWolf76 04-18-2002 10:57 PM

Quote:

change all urls in pn which have to do with registration to point to vb's reg-Page/usercp

Include vb's global.php and install Admin_online - people on your newssite will be shown as online reading news...
include Tubedoggs last x posts in your sideblock (works without changes in pn)
Well, I'm stuck here and would apresiate any help...... Can you explain these more?

For one where are all the links I need to change if possible?

where should I include vb's global.php? and what is Admin_online?

Thanks alot for a nice work which i've been looking around for... Hope you could help me with my questions..

Dontom 04-19-2002 04:56 AM

look at your nuke - all links that lead to a user.php should point to your forums member.php?s=&action=editprofile - nukes registration link should point to vbs registration file...

Either change the links in Nuke or create the corresponding files redirecting to vb... (meta tag)

Admin online is a hack (can be found here @vb.org), to add other location to vb's who is online display..... - so people who are just browsing the news-area are displayed as "Reading News"

I included vbs global.php in the second line of pn's modules.php

hope this helps....


with postnuke combined with vb it is easy to install gallery.sourceforge.net, too.

look at this: http://www.mtb-news.de/modules.php?o...ude=albums.php

SAWolf76 04-19-2002 02:11 PM

Quote:

Either change the links in Nuke or create the corresponding files redirecting to vb... (meta tag)
I like this idea better... Never done this :) so some help would be apresiated... Which files should I replace and what should they have in them?

I apresiate all of your help your doing me a huge favore here :)

SAWolf76 04-19-2002 04:09 PM

How do i add a block for the last x posts? I tryed everything but I can't seem to get it working?

SAWolf76 04-19-2002 05:21 PM

ok I installed the Admin_online hack but I can't get it to work with PN pages? Any help is apresiated.

I know I've bothered you a lot but your help is apresiated...

Winky 04-20-2002 08:32 PM

ok I am having a problem here I insert the code to update the nuke_users and it deletes all information but does not fill the table back up with info from user. I did a copy and paste and changed the password info. I must be missing something. Please help

Dontom 04-24-2002 05:35 AM

I don't understand this: if the Information gets deleted, there must be a connection to the db. Did you install vb & pn to different db's? Are you sure there are users in your vb-usertable?
Tom

SAWolf76 04-25-2002 05:11 PM

Dontom could you please help?? I can't get the last x posts to work on the PN block?? Could you tell me how u did it?

Dontom 04-25-2002 05:34 PM

step1)
install Tubedoggs Last xx posts hack

step2)
Try to see if it works

if it works proceed to 3 - otherwise back to 1 :)

3) create a new sideblock in PN - Name: Active posts Type: php
content: include('last10.php'); (check if path is correct - script will tell you if not....)

now this worked for me...

SAWolf76 04-25-2002 09:01 PM

Thanks... aperantly i was doing something wrong with the include command?? :rolleyes:

Well everything is almost perfect now :) any help with this?

Quote:

ok I installed the Admin_online hack but I can't get it to work with PN pages? Any help is apresiated.

alfaowner 07-23-2004 10:13 PM

would this still work with vb3? anyone know?

severewx 11-10-2004 10:04 AM

where would I find the files that have to do with PN registration so I can chang them to vb registration?


All times are GMT. The time now is 05:02 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.01217 seconds
  • Memory Usage 1,830KB
  • 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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