Announcement

Collapse
No announcement yet.

youtube links

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

  • cooltechie
    started a topic youtube links

    youtube links

    We see many [youtube]http://www.youtube.com/watch?v=XXXXXX[/youtube].

    Is there automated way to fix that? It would certainly take forever if done manually.

    phpbb 3.0.4
    vbulletin 3.8.0
    clean import
    Last edited by cooltechie; Sun 18th Jan '09, 12:30pm.

  • Jerry
    replied
    Originally posted by cooltechie View Post
    There are other similiar type of issues [blahblah:###]example[/blahblah:###], but I don't know what this is called. What is the best search term to use?
    If you don't know what they are called then there is no way of looking for them, you'll just have to spot them as you go along.

    Leave a comment:


  • cooltechie
    replied
    Your detailed information certainly helped out.

    Thank you Jerry for your assistance with this.

    I'm sure I will run into more of these odd post migration issues from phpbb3.

    There are other similiar type of issues [blahblah:###]example[/blahblah:###], but I don't know what this is called. What is the best search term to use?

    Leave a comment:


  • Jerry
    replied
    You will need to edit, tools/cleaner.php which comes with impex.

    Set this to true, when you want to use it, then false afterwards (and remove ImpEx completely when done).

    PHP Code:
    $active false

    Then around line 98 you'll have this :

    PHP Code:
    #$text = preg_replace('##siU', '', $text); 
    Replace that with the code I gave you above.

    Then browse to the file, and make sure you've back up the vBulletin database first.

    Leave a comment:


  • cooltechie
    replied
    Forgive me. I don't understand how to use the code you provided. Do I paste that into a file?

    Leave a comment:


  • Jerry
    replied
    Ah, you'll need to use cleaner.php with a regex to clean that out, something like this should do it :

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

    Leave a comment:


  • cooltechie
    replied
    Sorry, I looked in the database and see that phpbb_posts has youtube listed as this:

    [youtube:123abc]http://www.youtube.com/watch?v=wA235SW[/youtube:123abc]

    How should I adjust your code?

    Leave a comment:


  • Jerry
    replied
    I'd back up the vBulletin database then run this SQL on it :

    Code:
    UPDATE vb_post SET pagetext=REPLACE(pagetext,"[youtube]","[url]")

    Leave a comment:


  • cooltechie
    replied
    Originally posted by Jerry View Post
    I would suggest replacing

    Code:
    [youtube]
    with


    Code:
    [url]
    Already imported from phpbb3, so how can [youtube] be replaced with [url]?

    Leave a comment:


  • cooltechie
    replied
    Originally posted by Steve Machol View Post
    You can try this unofficial and unsupported BB Code to add a YouTube tag:

    http://www.vbulletin.com/forum/showt...youtube+bbcode
    I looked at that thread but it only applies with video ID and not the entire URL. Since all the posts have been imported with full URL, I'm looking for a better solution to get the existing ones working.

    Leave a comment:


  • Jerry
    replied
    I would suggest replacing

    Code:
    [youtube]
    with


    Code:
    [url]

    Leave a comment:


  • bigwater
    replied
    While some bbcode is supported by vBulletin and some is not, the whole key to wrap your head around bbcode is that you are sandboxing html. You want to give your users the ability to use html in the board, without exposing the board to the risk of html.

    You can create any bbcode you want to show on the board, and you can go to any extreme you want to go with it, risk factors aside.

    Leave a comment:


  • Steve Machol
    replied
    You can try this unofficial and unsupported BB Code to add a YouTube tag:

    http://www.vbulletin.com/forum/showt...youtube+bbcode

    Leave a comment:

Loading...
Working...
X