replace outdated BBcode tag?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dougdirac
    Senior Member
    • Jul 2012
    • 425
    • 4.2.X

    [Forum] replace outdated BBcode tag?

    On my forum we used to have a BBcode [media] that embedded video files. After doing some updates and cleaning up things, that code no longer works. I'd like to replace it will the [video] tag.

    Is there a way to either search and replace those [media] tags with [video] or somehow map [media] to [video] so the vids in those old posts can work again?

    I tried making a custom BBcode [media] that had the replacement code [video]{param}[/video], but that didn't work. The line was just printed out with [video] not being parsed.
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    I'd suggest searching on vbulletin.org, the modification site, for other threads about this and if you find none, then make a thread asking about it. (But seriously, do a search first because I know it's been covered before and people hate to answer a question that has been answered several times before and so they won't.)

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • BirdOPrey5
      Senior Member
      • Jul 2008
      • 9613
      • 5.6.3

      #3
      For VB4 [video] to work it will need to be more than a simple search & replace. The video needs an option to work... [video=youtube]... for example.

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 73976

        #4
        What does a completed media tag look like?
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • dougdirac
          Senior Member
          • Jul 2012
          • 425
          • 4.2.X

          #5
          No idea what the replacement code for the media tag actually looks like. It supposedly was a custom BBcode, but when I took over as admin, the replacement code was literally "stuff". So wherever the code was used, the word "stuff" was there and you couldn't even see the video link in between the tags. At least with it disabled, one can copy and paste the link into a browser.

          Comment

          • dougdirac
            Senior Member
            • Jul 2012
            • 425
            • 4.2.X

            #6
            So digging through with the Suspect File Versions tool, it looks like that old [media] tag is likely from this AnyMedia plugin.



            Any way to do a search to specifically find where those [media] tags are? When I put that in a search box, it just looks for the word "media" and likely ignores BBcodes anyhow.

            Comment

            • Zachery
              Former vBulletin Support
              • Jul 2002
              • 59097

              #7
              You'd need to search the db directly, or get a third party modification that won't ignore bbcode.

              Comment

              • Wayne Luke
                vBulletin Technical Support Lead
                • Aug 2000
                • 73976

                #8
                Select from post where pagetext like '%[media]%';

                That should get you a list of posts with the tag. You can use replace into to change it or cleaner.php that comes with ImpEx.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment

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