The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Trying to fix QUOTES from Invision import
All of the previous quotes in my posts from my Invision import are fubarred. I have found several methods that use preg_replace to fix the post, but none of them have converted anything. The problem is, I don't know enough php to understand the preg_replace statements so I can fix the posts.
Here is one I pulled from a program called QuoteFix.php Code:
function translatesmilies($text) { $text = preg_replace('#<!--QuoteBegin-{1,2}([^"]*)\+-->([^"]*)<!--QuoteEBegin-->#si', "[quote]Originally posted by \\1\n[b]", $text); $text = preg_replace('#<!--QuoteBegin-{1,2}([^"]*)\+([^"]*)-->([^"]*)<!--QuoteEBegin-->#si', "[quote]Originally posted by \\1@\\2\n[b]", $text); $text = preg_replace('#<img src=\'([^"]*)\' border=\'0\' alt=\'user posted image\'(\s/)?>#siU', '[img]\\1[/img]', $text); return $text; } Here is an actual post with a quote, as it's stored in the database: Code:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="95%"> <tbody><tr><td> QUOTE (JSK @ Sep 25 2013, 09:09 PM)</td></tr> <tr><td id="QUOTE"><!--QuoteEBegin--> <!--QuoteBegin-gmoss+Sep 25 2013, 03:52 PM--> <table align="center" border="0" cellpadding="3" cellspacing="1" width="95%"> <tbody><tr><td>QUOTE (gmoss @ Sep 25 2013, 03:52 PM)</td></tr><tr><td id="QUOTE"><!--QuoteEBegin--> on a small bore 2 stroke, it hurts me as much as helps. <!--QuoteEnd--></td></tr> </tbody> </table><!--QuoteEEnd--> I agree and wouldn't put one on my small bore 2-stroke, the clutch/rider relationship is too intimate. However if I was on a kick-start only 4-stroke I might consider one. <!--QuoteEnd--> </td></tr> </tbody> </table> <!--QuoteEEnd--> Not sure I understand this. The Rekluse does not change the rider/clutch relationship at all, except when you get below say 2500 rpms. No small bore bike is going to be making any power that low anyway. You can slip the clutch normally. I have tried to undestand the preg_replace statements but for the life of me, I just don't standstand the syntax. Any help would be appreciated. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|