Jump to content

(Converting to IPB) Please manipulate existing links in posts to IPB links

Bryan Sammers

Recommended Posts

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 ;)

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...