Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-12-2014, 06:48 PM
pattycake pattycake is offline
 
Join Date: Jan 2009
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04649 seconds
  • Memory Usage 2,470KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (1)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete