Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    sql
    sql is offline
    Junior Member
    Join Date
    Oct 2003
    Location
    hell
    Posts
    8
    Member #
    3702
    can anyone help me convert this..

    <EMBED SRC='http://www.blah.net/wma/blah.wma' width=300 height=50 AutoStart=true ShowStatusBar=1></EMBED>
    into

    [wma]http://www.blah.net/wma/blah.wma[/wma]
    i was doing preg_replace.. .. am stuck..

    thank.
    sql.

  2.  

  3. #2
    Member Seraph's Avatar
    Join Date
    Sep 2003
    Posts
    81
    Member #
    3090
    PHP Code:
    $wma preg_replace"#<embed src=[\\"'](\\S+?)\\.wma['\\"].+?"."></embed>#ie""\\[wma\\]\\\\1\\[/wma\\]"$wma ); 
    to convert it back
    PHP Code:
    $wma preg_replace"#\\[wma\\](.+?)\\[/wma\\]#ie""#<EMBED SRC='\\\\1' width=300 height=50 AutoStart=true ShowStatusBar=1></EMBED>#"$wma); 

  4. #3
    sql
    sql is offline
    Junior Member
    Join Date
    Oct 2003
    Location
    hell
    Posts
    8
    Member #
    3702
    wow.. thank you..and can u do this one too

    PHP Code:
    <embed src='http://www.mysite.com/blah.swf' quality=high type="application/x-shockwave-flash" width=450 height=400></embed
    to

    PHP Code:
    [flash]http://www.mysite.com/blah.swf[/flash] 

  5. #4
    Member Seraph's Avatar
    Join Date
    Sep 2003
    Posts
    81
    Member #
    3090
    PHP Code:
    $flash preg_replace"#<embed src=[\\"'](\\S+?)\\.swf['\\"].+?"."></embed>#ie""\\[flash\\]\\\\1\\[/flash\\]"$flash ); 
    to convert it back
    PHP Code:
    $flash preg_replace"#\\[flash\\](.+?)\\[/flash\\]#ie""#<embed src='\\\\1' quality=high type='application/x-shockwave-flash' width=450 height=400></embed>#"$flash); 

  6. #5
    sql
    sql is offline
    Junior Member
    Join Date
    Oct 2003
    Location
    hell
    Posts
    8
    Member #
    3702
    hmm.. this look like the same thing

    i use $txt for both flash and wma (it has to be)... so when i put this and do the flash .. it turn to [wma] .... there is a different in the url.. the extension .. .wma and .swf ... can you check on that too ?

  7. #6
    Member Seraph's Avatar
    Join Date
    Sep 2003
    Posts
    81
    Member #
    3090
    ok fixed in both posts just change $wma and $flash to $txt

  8. #7
    sql
    sql is offline
    Junior Member
    Join Date
    Oct 2003
    Location
    hell
    Posts
    8
    Member #
    3702
    .. yup .. thank you Seraph. $ transfer.. haha

  9. #8
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    If you wanted to get wacky with this, you could use XSL-T to convert:
    Code:
    <xsl:template match="//EMBED">
        <xsl:text>[wma]</text>
        <xsl:value-of select="@SRC" />
        <xsl:text>[/wma]</text>
    </xsl:template>

  10. #9
    Member Seraph's Avatar
    Join Date
    Sep 2003
    Posts
    81
    Member #
    3090
    whats xsl-t never head of it


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:51 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com