View Full Version : IPB Snapback Removal
HuangA
01-08-2005, 10:00 PM
Hi all;
First hack release, so excited :D
Ok... Anyways, so I imported from IPB 2.0 a few months back only to notice that it carried over the ugly ### from IPB. Since VB doesn't have such code built in, it's an eyesore to have it there and I finally decided to code a mini hack to remove it.
What this hack does is basically it goes through the list of posts in your database, checks for (unfortunetly only) the instance of ### appended at the end of each quote. I don't think it will remove multiple instance of it if someone did multi quote, but you can fix that by running this multiple times.
So, anyways, here's the hack and a short blurp on how to install it :)
Files to Upload: 1
Files to Edit: 1
Supported Version: UNHACKED VB3.0.5
Support Location: This thread
DO NOT FORGET TO BACK UP YOUR DATABASE BEFORE YOU USE THIS SCRIPT. ALL CHANGES MADE ARE UNREVERSABLE AND I WILL NOT BE HELD RESPONSIBLE FOR ANY SCRIPT FAILURES.
Brent H
01-09-2005, 09:31 PM
Great idea :D
I've been preparing to help an IPB2 board switch to vB and I always just made a custom bbcode to replace that with just a space. This seems much cleaner though.
Erwin
01-09-2005, 09:45 PM
At least you have seen the light and converted to the right program. ;)
HuangA
01-09-2005, 09:52 PM
I think this can also be used to strip other bb codes that you may have previously installed but does not get carried over. If I have time, I may be interested to see if I can also code it in such a way so it searches for [bbcode=BLAH] type of bbcode...
Erwin, I've been eyeing VB since forever; IPB had always been the free escape ;)
Thanks for the input guys, greatly appreciate it. It'd be great if you click the install button if you install it :)
Jerry
01-10-2005, 09:52 AM
cleaner.php can take out static bbcode, I can parse snap back to the correct vB post id, though I need a IPB database with snapback in it to be able to dev it.
HuangA
01-11-2005, 02:35 PM
Jerry, what I tried to do with this script is to remove it from the quoted posts because the current vb doesn't have as a default bbcode. Is it possible for you to modify the importer to remove it while importing? Currently it imports as such
blah blah blah, this text is quoted from a previous message
[snapback]_pid_of_quoted_message
Blah blah blah, this is the replied text
I do believe I have my old IPB database still archived on the server; can you please PM me a way to drop the database file dump (.sql? .csv?) to you so you can look into updating the ImpEx?
Cheers.
Jerry
01-11-2005, 02:45 PM
PM sent.
Also you can use [ post ] tags
HuangA
01-12-2005, 04:11 AM
PM sent.
Also you can use [ post ] tags
last reply
593515
(testing)
Edit:
Ah... I see... I don't know if I can update the current script to reflect it accordingly... Are postid's retained during the transfer? As far as I know (I may be wrong) the postid is an auto_increment value, which means if certain posts in between were deleted, the ladder ones will be one (or more) postid's off, right?
IE:
IPB Postid 1 / VB Postid 1: Hi blah blah blah
IPB Postid 2 / VB Postid 2: Hello, replying to postid1
IPB Postid 3 / -----------: @$%^ this board is @$% (Admin DELETE)
IPB Postid 4 / VB Postid 3: hey, I like this board
IPB Postid 5 / VB Postid 4: quote + snapback to (IPB) 4 I'll second that comment!
If you do a [post] for that one, would it not snap back to 4, which becomes itself?
Brent H
01-12-2005, 08:14 AM
At least you have seen the light and converted to the right program. ;)
LOL my INITIAL forum choice was vB ;) I'm helping others see the light. Wooot.
Jerry
01-13-2005, 01:04 AM
......which means if certain posts in between were deleted, the ladder ones will be one (or more) postid's off, right?........
ImpEx imports the import post id so this can be sorted out even if posts are deleted or moved as its linked to the imported post and not the counters.
Have a look at the post table for the id and the importpostid.
Its a 1-2-1 mapping from ImpExDatabase::get_posts_ids() to swap them out.
HuangA
01-13-2005, 10:49 AM
I may have done additional recounts / rebuilds through admincp after my installation, but for example, here's what my db looks like after import (and running for a few months)
postid threadid importthreadid importpostid
2 2 3 3
3 2 3 4
4 3 4 5
6 3 4 7
the above was primarly the reason why I thought it wouldn't work :/
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.