PDA

View Full Version : how to let make phpbb read same db as vbulletin


cheeta
Thu 30th Dec '04, 1:23pm
At the moment i'm working with my forum but now i also have phpbb running.

but the problem is phpbb has 2 extra fields called first_postid & last_postid

this also have to be updated when someone posts a thread @ vbulletin.

now someone created this script for me that fill in the correct postids. But that means I have to update every seconde. (run the file).

Is there no way to fit in something that generates the codes immedantly if you post @ the vbulletin??? So phpbb can also read the posts?


<?php

/************************************************** *************************

* fix.php

************************************************** *************************/

define('IN_PHPBB', true);

$phpbb_root_path = './';

include($phpbb_root_path . 'extension.inc');

include($phpbb_root_path . 'common.'.$phpEx);

//

// Start session management

//

$userdata = session_pagestart($user_ip, PAGE_INDEX);

init_userprefs($userdata);

//

// End session management

//

$page_title = 'FIX';

include($phpbb_root_path . 'includes/page_header.'.$phpEx);

//-----

$sql = "SELECT forumid

FROM " . FORUMS_TABLE . "";

if ( !($result = $db->sql_query($sql)) )

{

message_die(GENERAL_ERROR, 'Could not obtain topic1 information', '', __LINE__, __FILE__, $sql);

}

$forumidrow = array();

while( $row = $db->sql_fetchrow($result) )

{

$forumidrow[] = $row;

}

$db->sql_freeresult($result);

for($i = 0; $i < count($forumidrow); $i++)

{

$forumid = $forumidrow[$i]['forumid'];

$sql = "SELECT t.threadid, MAX(p.postid) AS topic_last_postid, MIN(p.postid) AS topic_first_postid

FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p

WHERE t.forumid = $forumid

AND t.threadid = p.threadid

GROUP BY t.threadid

ORDER BY t.lastpost DESC";

if ( !($result = $db->sql_query($sql)) )

{

message_die(GENERAL_ERROR, 'Could not obtain topic2 information', '', __LINE__, __FILE__, $sql);

}

$threadidrow = array();

while( $row = $db->sql_fetchrow($result) )

{

$threadidrow[] = $row;

}

$db->sql_freeresult($result);

for($j = 0; $j < count($threadidrow); $j++)

{

$threadid = $threadidrow[$j]['threadid'];

$sql = "UPDATE " . TOPICS_TABLE . "

SET topic_first_postid = " . $threadidrow[$j]['topic_first_postid'] . ", topic_last_postid = " . $threadidrow[$j]['topic_last_postid'] . "

WHERE threadid = " . $threadid;

if ( !$db->sql_query($sql, END_TRANSACTION) )

{

message_die(GENERAL_ERROR, "Could not insert ids", "", __LINE__, __FILE__, $sql);

}

echo('Thread ' . $threadid . ' geupdate<br />');



}

echo('Forum ' . $forumid . ' geupdate<br /><br />');

}



//----

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>



this is the script he gave to me. Maybe you have something at it? I'm using 3.0.0 vbulletin. the correct file is at the bottem of this post


i hope someone can help me out

Icheb
Thu 30th Dec '04, 1:58pm
You should immediately remove the publicly viewable source code.

And I am not sure what you are asking. Why do you want two identical forums, one using vB and the other using phpBB?

cheeta
Thu 30th Dec '04, 2:03pm
how can I ask for support without showing the code???

Dream On
Thu 30th Dec '04, 2:04pm
well this should be good idea if u can make it..

Mark.B
Thu 30th Dec '04, 2:05pm
I would say you probably won't be able to get support for this issue on this site as it's going to need a hack, you could try at www.vbulletin.org.

cheeta
Fri 31st Dec '04, 9:36am
the problem @ www.vbulletin.org (http://www.vbulletin.org) is that I need the information about the license but the sponser did bought it for us. So i don;t have it myself and its christmas / new year time so they don't answer

Zachery
Tue 4th Jan '05, 12:05pm
You are currently showing up as unlicensed. To be able to receive support here at vBulletin.com, we ask you to please click HERE (http://www.vbulletin.com/members/membersupport_priority.php) and enter your email address, to show us that you are licensed.

You will need to use your customer number and password (which will be in the email you got when you paid for your license) to access that page. Please note that your email is case sensitive.

Thank you.

cheeta
Tue 4th Jan '05, 5:40pm
my choise is 100% clear now i will drop vbulletin and go on with phpbb.

Because:
1. much better support
2. easy to edit
3. clear to understand
4. a lot of modifications to get for
5. friendly for visitors what vB isn't

so bye bye vB its just like microsh*t also bringing up bad software whit no support to just make a lot of money out it..

in a few more days i'll will be step over to phpbb and i hope a lot other people will do in the future because it aint worth the money

Zachery
Tue 4th Jan '05, 5:48pm
1. very doubtfull, but if you say so...
2. Not really :) Your not even using vBulletin 3.
3. vBulletin 3 is the cleanest coding I've seen
4. True there are more mods for phpbb, but there are way more stock vB features, which means there are less hacks needed ;)
5. We are a very friendly and welcoming community


You get support when you have purchased a license, which clearly you haven't :)

You are using a pirated old insecure version of vBulletin, which is part of your problem.

But good luck with your choice and good luck to your community :)

cheeta
Tue 4th Jan '05, 6:00pm
its just an bought version only i already told the sponser got the info and if you dont believe it call them and btw why is .nl site english :S

Zachery
Tue 4th Jan '05, 6:09pm
http://www.derbi-club.com/forum/index.php That is an illegal copy of vBulletin 2, with its version number 3 in the footer, it is not actually vBulletin 3, nor did we ever release a copy like it.

The copy on your forum is illegal, your sponsor did not buy it, they downloaded it from a wearz site or purchased it illegaly.

cheeta
Tue 4th Jan '05, 6:13pm
and on what base do u say it's illegal because we just have paid for is so...

Zachery
Tue 4th Jan '05, 6:20pm
If you bougt a license directly from vBulletin.com you can go into the members area and enter your email into the priorty support from

cheeta
Tue 4th Jan '05, 6:23pm
I already told that i didnt bought it myself our sponsor did. so i dont have the nr and password

Zachery
Tue 4th Jan '05, 6:23pm
Then ask your sponsor to do so.

Icheb
Tue 4th Jan '05, 7:41pm
I can assure you that the support here is world class. But you only get support for vBulletin if you can show that you are a licensed customer, so you can't logically blame Jelsoft for refusing support because you can't prove that you own a legitimate copy.
If you choose to pick on Jelsoft for not giving support to people who might have a pirated version, then I'm sorry.

Steve Machol
Wed 5th Jan '05, 1:40am
Thank you for your piracy report. That URL has been sent to our piracy team for follow-up. :)