Announcement

Collapse
No announcement yet.

UBB7.4 -> Cleaner.php help

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

  • UBB7.4 -> Cleaner.php help

    I tried to sort this out myself by looking at the mirad of examples for others... sorry, it just isn't sinking in.

    This is what I had after importing several test posts (created specifically for the cleaner script)

    These are UBB7.4 UBB Codes

    Standard font attributes:

    <span style="font-weight: bold">bold text</span>
    <span style="font-style: italic">italic text</span>
    <span style="font-family: 'Arial'">font type-arial</span>
    <span style="font-family: 'Verdana'">font type-verdana </span>
    <span style="font-size: 10pt">font size 10 </span>
    <span style="font-size: 11pt">font size 11 </span>
    <span style="text-decoration: underline">underlined text</span>
    <span style="text-decoration: line-through">strikethrough text</span>
    <span style="color: #000099">font color-blue text</span>
    <span style="color: blue">font color-blue text</span>

    Spoiler tag (want to remove these from posts)

    <div class="ubbcode-block"><div class="ubbcode-header">Click to reveal.. <input type="button" class="form-button" value="Show me!" onclick="toggle_spoiler(this, 'Yikes, my eyes!', 'Show me!')" /></div><div class="ubbcode-body"><div style="display: none;">spoiler</div></div></div>

    Generic quoted text tag:

    <div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body">quoted text</div></div>

    "user" quoted text tag:

    <div class="ubbcode-block"><div class="ubbcode-header">Originally Posted By: Mike Greene</div><div class="ubbcode-body">quoted users text</div></div>


    I understand that 'preg_replace' is what I want to be updating / adding to in the cleaner script but I've been thrashing around with this for a while now with not a lot of forward progress

    I would also imagine before I can deal with the below UBB tags I'll need to create equivilant BB code tags in vB then adapt cleaner.php to fix them up as well.

    UBB Media tags

    MySpace Video

    [video:myspace]myspace.com/profile/2993kdkaj[/video]

    Yahoo Video

    <embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=11356308" type="application/x-shockwave-flash" width="425" height="350"></embed>

    YouTube Video

    <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/m72vP3TxjIA"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/m72vP3TxjIA" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"> </embed></object>

    Google Video

    <embed style="width:425px; height:350px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=2189983577217813012&hl=en" flashvars=""></embed>

  • #2
    Im not sure what your asking...

    But I had an eve board and moved in ti VB.

    The cleaner worked in that all those html codes you posted, were auto changed to the proper [bb] coded needed.

    After you run the cleaner you will need to ...
    Once cleaner has been run successfully you must rebuild the Rebuild Post Cache in the AdminCP > Maintenance > Update Counters

    I hope that helps

    Comment


    • #3
      Every import is different I guess.

      I was asking for help on the proper preg_replace syntax on getting the above strings fixed.

      I got all of them sorted out myself with exception of the following:

      <div class="ubbcode-block"><div class="ubbcode-header">Click to reveal.. <input type="button" class="form-button" value="Show me!" onclick="toggle_spoiler(this, 'Yikes, my eyes!', 'Show me!')" /></div><div class="ubbcode-body"><div style="display: none;">spoiler</div></div></div>

      I suspect I'll probably have to do a combination of a static replacement in addition to a regex to get those cleaned up. Since there is no equivalent "spoiler tag" in vB I just want to strip away all the spoiler tags from the hidden text.

      I haven't worked on the custom tags for the media (youtube... etc) videos, might just end up turning them into links instead.

      Comment


      • #4
        Know What You Mean ...

        I'm in the middle of testing a DCForum to vBulletin conversion, and have similar issues. Jerry was good enough to craft the appropriate regex to fix my URL tags, but I feel silly coming back every time I have a different code sequence I need to pull.

        What would be really sweet (*hint-hint*) would be some kind of quickie tutorial on the preg_replace process - maybe a description of the statement and what you replace to get a certain result. I know most of us would rather do it ourselves, but without a little knowledge, I don't really want to start to experiment on the database ...

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X