Announcement

Collapse
No announcement yet.

phpBB 2 BBcode problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jerry
    replied
    Originally posted by mgurain
    PHP Code:
    [glow=red:234a498735]some text[/glow:234a498735
    To go from that to this :
    some text

    You'd need this :

    PHP Code:
    $text preg_replace('#\[glow=([^:]*):([a-z0-9]+)\](.*)\[/glow:\\2\]#siU''[color=$1]$3[/color]'$text); 
    Then put that on line 77 of cleaner.php

    Leave a comment:


  • mgurain
    replied
    Hello,

    Ok, give me 1 string you want matched and cleaned out.
    I gave examples in post #9 , ok take this one :

    PHP Code:
    <span style="filter: glow(color={GLOWCOLOR}); height:20"
    which is parsed now in VB as :

    PHP Code:
    [glow=red:234a498735]some text[/glow:234a498735
    phpBB BBcode was :

    PHP Code:
    [glow=red]some text[/glow

    thanks for your help Jerry, I appreciated.

    Leave a comment:


  • Jerry
    replied
    Originally posted by mgurain
    Hello Jerry,,

    1. Can I open the board for posting, then do the cleaner.php any time (not re-import) and not lose the new data ?
    Yes you can, though backup the database before running cleaner.php on a live board, always.

    Originally posted by mgurain
    2. Can you help me configer the cleaner.php at least for one expression, then I will do the rest ?
    Ok, give me 1 string you want matched and cleaned out.

    Originally posted by mgurain
    also : where should I place the Regular Expressions ? is it here :

    PHP Code:
    $replacer = array(
    "<img>" => "[img]",
    "" => "",
    "" => "",
    "" => "",
    "" => ""
    ); 
    or some where else ?
    Some where else, the $replacer array is for static strings, i.e. simple matching. The regular expression goes on line 77, 91 or 119 depending on what you want to clean out, where the code is commented out like so :

    PHP Code:
    #$text = preg_replace('##siU', '', $text); 
    Originally posted by mgurain
    3. Should I then run the cleaner as I stated by calling it by typing the URL ?!! it seems will hang because explorer can not handle all of the database date shown in one webpage !!

    thanks.
    You can call it from the command line also, just pipe the output into results.html for instance, or /dev/null if you dont care about the return codes. the current version isn't a propper CLI version yet.

    Leave a comment:


  • mgurain
    replied
    Hello Jerry,,

    1. Can I open the board for posting, then do the cleaner.php any time (not re-import) and not lose the new data ?

    2. Can you help me configer the cleaner.php at least for one expression, then I will do the rest ?

    also : where should I place the Regular Expressions ? is it here :

    PHP Code:
    $replacer = array(
    "<img>" => "[img]",
    "" => "",
    "" => "",
    "" => "",
    "" => ""
    ); 
    or some where else ?

    3. Should I then run the cleaner as I stated by calling it by typing the URL ?!! it seems will hang because explorer can not handle all of the database date shown in one webpage !!

    thanks.
    Last edited by mgurain; Tue 5 Apr '05, 3:31am.

    Leave a comment:


  • Jerry
    replied
    I see you edited your post, all this is custom and not defaut phpBB code.

    Leave a comment:


  • Jerry
    replied
    Originally posted by mgurain
    Hello,,

    1. How to configer cleaner.php ?

    2. How to run cleaner.php ?

    3. what does it do exactly ?
    All the comments and explanations are in the file itself, it replaces text using str_replace() or using a regular expression, if you set it up for that.

    Originally posted by mgurain
    4. I want to resolve other BBcodes such as :
    HTML Code:
     [align=justify]some text[/align] 
    [left]some text[/left]
    [right]some text[/right]
    Then you will need to add the regular expression code to 000.php to do it on the first past or use cleaner.php tp swap it out after the import.

    Leave a comment:


  • mgurain
    replied
    Hello,,

    1. How to configer cleaner.php ?

    2. How to run cleaner.php ?

    3. what does it do exactly ?

    4. I want to resolve other BBcodes such as :
    HTML Code:
     [align=justify]some text[/align] 
    [left]some text[/left]
    [right]some text[/right]
    knowing these codes from bbcode.php from phpBB :

    PHP Code:
    // align
    $text preg_replace("/\[align=(left|right|center|justify):$uid\]/si"$bbcode_tpl['align_open'], $text);
    $text str_replace("[/align:$uid]"$bbcode_tpl['align_close'], $text);
     
     
     
    // image_url_herecode..
     
    $patterns[] = "#\[left:$uid\](.*?)\[/left:$uid\]#si";
    $replacements[] = $bbcode_tpl['left'];
    // [right]image_url_here
    code..
     
    $patterns[] = "#\[right:$uid\](.*?)\[/right:$uid\]#si";
    $replacements[] = $bbcode_tpl['right']; 
    also :

    HTML Code:
     <!-- BEGIN video --> 
    
    <div align="center"><embed src="{URL}" width={WIDTH} height={HEIGHT}></embed></div>
    
    <!-- END video -->
    
    <!-- BEGIN web --><iframe width="100%" height="350" src="{URL}"></iframe><!-- END web -->
    
    <!-- BEGIN hr --><hr noshade color='#000000' size='1'><!-- END hr -->
    
    <!-- BEGIN fade_open -->
    
    <span style="height: 1; Filter: Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, FinishX=100%)">
    
    <!-- END fade_open -->
    
    <!-- BEGIN fade_close -->
    
    </span>
    
    <!-- END fade_close -->
    
    <!-- BEGIN glow_open --><span style="filter: glow(color={GLOWCOLOR}); height:20"><!-- END glow_open -->
    
    <!-- BEGIN glow_close --></span><!-- END glow_close -->
    
    <!-- BEGIN shadow_open --><span style="filter: shadow(color={SHADOWCOLOR}); height:20"><!-- END shadow_open -->
    
    <!-- BEGIN shadow_close --></span><!-- END shadow_close -->
    
    <!-- BEGIN highlight_open --><span style="background-color: {HIGHLIGHTCOLOR}"><!-- END highlight_open -->
    
    <!-- BEGIN highlight_close --></span><!-- END highlight_close -->
    
    <!-- BEGIN s_open --><s><!-- END s_open -->
    
    <!-- BEGIN s_close --></s><!-- END s_close -->
    
    <!-- BEGIN google --><a href="http://www.google.com/search?q={QUERY}" target="_blank">{STRING}</a><!-- END google -->
    
    <!-- BEGIN left --><img src="{URL}" border="0" align="right" /><!-- END left -->
    
    <!-- BEGIN right --><img src="{URL}" border="0" align="left" /><!-- END left -->
    
    <!-- BEGIN scrollleft_open --><span><marquee direction="left"><!-- END scrollleft_open -->
    
    <!-- BEGIN scrollleft_close --></marquee></span><!-- END scrollleft_close -->
    
    <!-- BEGIN scrollright_open --><span><marquee direction="right"><!-- END scrollright_open -->
    
    <!-- BEGIN scrollright_close --></marquee></span><!-- END scrollright_close -->
    
    <!-- BEGIN scrollup_open --><span><marquee direction="up"><!-- END scrollup_open -->
    
    <!-- BEGIN scrollup_close --></marquee></span><!-- END scrollup_close -->
    
    <!-- BEGIN scrolldown_open --><span><marquee direction="down"><!-- END scrolldown_open -->
    
    <!-- BEGIN scrolldown_close --></marquee></span><!-- END scrolldown_close -->

    thanks in advance,,
    Last edited by mgurain; Mon 4 Apr '05, 4:30pm.

    Leave a comment:


  • Jerry
    replied
    Originally posted by mgurain
    If I open the board now for posting, then if I would like to do the same re-import or clean will that affect the new posts after the import ?
    Only open a board once the import is complete and finished, if you re-do the import again you will loose the new data.

    Originally posted by mgurain
    also, I did run clean.php by a direct URL call, but that seem to be hanging, was my method ok ? or there is a better solution ?
    cleaner.php has to be configured for what strings you want to to swap out.

    Leave a comment:


  • mgurain
    replied
    Hello,,

    Thanks Jerry again,,

    If I open the board now for posting, then if I would like to do the same re-import or clean will that affect the new posts after the import ?

    also, I did run clean.php by a direct URL call, but that seem to be hanging, was my method ok ? or there is a better solution ?

    thanks in advance,,

    Leave a comment:


  • Jerry
    replied
    Originally posted by mgurain
    Hello,,


    thanks very much Jerry,

    I have some more small questions before doing :

    I have changed some fourms to be subforums of other in new VB, will that affect the re-import ?
    As long has you haven't removed the importforumid they should be fine.

    Originally posted by mgurain
    also what should I re-import now ? only the threads ?
    what about the user ids, I noticed that they changed after import ? will the re-import do recognize them ?
    Threads & posts. The id's have to change they are vBulletin id's not the source id's if you want the source id's they are user.importuserid.

    Leave a comment:


  • mgurain
    replied
    Hello,,


    thanks very much Jerry,

    I have some more small questions before doing :

    I have changed some fourms to be subforums of other in new VB, will that affect the re-import ?

    also what should I re-import now ? only the threads ?
    what about the user ids, I noticed that they changed after import ? will the re-import do recognize them ?

    thanks in advance,,

    Leave a comment:


  • Jerry
    replied
    That is what cleaner.php is for, also the sizes are parsed out as it imports the posts if you don't want to use the cleaner you will have to add this code to line 116 of impex/systems/phpBB2/000.php

    Code:
    $text = preg_replace('#\[align=center:([a-z0-9]+)\](.*)\[/align:\\1\]#siU','[center]$2[/center]',$text);

    Leave a comment:


  • mgurain
    replied
    Hello,,

    what about the important problem :

    [align=center:82bf55b395]some text[/align:82bf55b395]

    ??

    Leave a comment:


  • ZacUSNYR
    replied
    go to the smiles section in admincp - it only imports them but doesn't put them in the current smilies.

    Leave a comment:


  • mgurain
    started a topic phpBB 2 BBcode problem

    phpBB 2 BBcode problem

    Hello,,

    I have just imported all of phpBB 2.0.13 posts into my new VB3, but I have this big problem :

    all the posts with some BBcodes are not displayed correctly in VB,

    e.g. :

    [align=center:82bf55b395]some text[/align:82bf55b395]

    also smilles :

    :idea:
    :twisted:

    also I think I solved the BBcode : size with custom BBcode in VB but I am not sure of the {option} part ? How will it convert for example size=4 to the corresponding size=4 in VB ?

    I am in a big trouble if I don't solve this !!

    thanks in advance,,

Related Topics

Collapse

Working...
X