Bryan Sammers Posted February 2, 2010 Posted February 2, 2010 Currently if I import a vbulletin forum to IPB, the links from my vbulletin board posts are not updated. Instead they stay in the old vbulletin way.However each time a user clicks on these links, an extra IPB query is executed to find the right IPB link for the old vB link.
Mark Posted February 2, 2010 Posted February 2, 2010 It would be a massive issue ;) Converting posts is already a very time-consuming and server-intensive process. To regex every individual post, calculate the new URL (which would involve a database query per link) would be crazy. The current method is much more friendly - those redirect pages make one database query to check the new URL and redirect - they're very efficient, and only apply to old posts. I did actually try doing what you're suggesting while testing out various ideas... it was evident that the current way is the best way ;)
Bryan Sammers Posted February 2, 2010 Author Posted February 2, 2010 Isn't it possible to write a simple script SELECT vbulletin_forumid, ipb_forumid foreach (vbulletin_forumid) { UPDATE ipb.post pregmatch("URL with vbulletinid" with "URL with ipb forumid") UPDATE ipb.blogpost pregmatch(vbulletinid with ipb forumid) UPDATE ipb.... } Same for thread, post, blog. It takes a few hours while the install process is going on. If it takes 12 hours - who cares? I am doing it in the night. No one cares about the install process. We do care about server speed once it goes life. We also care about having a true IPB forum after the import and not having wrong posts that need to be babysitted forever by an upgrade script. A "clean" solution is needed.
Wolfie Posted February 2, 2010 Posted February 2, 2010 What if it were done as a nightly task and when run, would convert a few links at a time? Also, when someone clicks a link, couldn't it convert the link in that post to the proper link? I would think that a small conversion here and there would eventually get all links converted, with a small load cost here and there, so that the end result is no longer needing to do look-ups. :)
Bryan Sammers Posted February 2, 2010 Author Posted February 2, 2010 I need it done as a one time solution. If it takes one day, so be it. The thing is I do not want to have slower queries after the switch to IPB.
Mark Posted February 2, 2010 Posted February 2, 2010 It's really not as simple as the pseudo-code you posted. There are two ways it *could* be done: There is a central table, conv_link with stores the vBulletin ID along with the IPB ID. You would need to take every record in that table (potentially millions), take each one in turn, then loop through every forum post, profile comment, blog entry, blog entry comment, personal message, etc (again, potentially millions) and perform a regex to search for anything which looks like a URL for that item (remember, you'll need to take into account http://www. vs. http:// and all other variations, so this is multiple searches on each post) and then replace it with the new URL. Or, you could take forum posts, profile comments, blog entries, blog entry comments, personal messages, etc. individually, search for the links within them, and then query the conv_link table for the matching link and replace. Both of these options aren't really feasible. The amount of server effort it takes to look up the correct URL and redirect a user is next to nothing (especially on your 8 core CPU ;)) - it won't cause problems. I guarantee you, trying to do something like this, would cause problems.
Bryan Sammers Posted February 2, 2010 Author Posted February 2, 2010 Both methods are good. Well I am thinking to go to ipb with all modules, the business product and branding free licence, thats around 800 $ . I just expect my forum to work without "workarounds". If it will be done within "steps" like every 100.000 posts take 12 hours - so be it. Then I run this script for a week in the night. Otherwise I am having vbulletin posts forever and they only work with the redirect tool. I do not feel comfortable with that and its definitely a big thing holding me back for switching. I'd write the script myself, unfortunately I am not familiar with good pregmatching. [url=" wrote a small script to manipulate the amazon links within my forum which multipled my amazon income, but that's what I got that far.
Mark Posted February 2, 2010 Posted February 2, 2010 You're not listening to what I'm telling you... if you want to ignore my advice and write a script to do it, best of luck to you... but I do actually know a little bit about conversions, and I'm telling you it's a bad idea ;)
Bryan Sammers Posted February 2, 2010 Author Posted February 2, 2010 I am listening. I just did not read about the problems when I'd use the script to convert my existing links. What kind of problems would occur?
Bryan Sammers Posted February 2, 2010 Author Posted February 2, 2010 I think it's a great service if there would be a way to change the posts etc. to IPB format. That would attract lots of possible switchers I think. But of course, you do decide.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.