pattycake
01-12-2014, 06:48 PM
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
function translatesmilies($text) {
$text = preg_replace('#<!--QuoteBegin-{1,2}([^"]*)\+-->([^"]*)<!--QuoteEBegin-->#si', "[quote]Originally posted by \\1\n", $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', '\\1', $text);
return $text;
}
Here is an actual post with a quote, as it's stored in the database:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="95%">
<tbody><tr><td>
[B]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.
If I run the above preg_replace, it doesn't find anything to change.
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.
Here is one I pulled from a program called QuoteFix.php
function translatesmilies($text) {
$text = preg_replace('#<!--QuoteBegin-{1,2}([^"]*)\+-->([^"]*)<!--QuoteEBegin-->#si', "[quote]Originally posted by \\1\n", $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', '\\1', $text);
return $text;
}
Here is an actual post with a quote, as it's stored in the database:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="95%">
<tbody><tr><td>
[B]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.
If I run the above preg_replace, it doesn't find anything to change.
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.