+ Reply to Thread
Results 1 to 8 of 8

Thread: Youtube plugin

  1. #1
    DC187 is offline Registered User
    Join Date
    Apr 2009
    Posts
    10
    Downloads
    1
    Uploads
    0

    Default Youtube plugin

    Hi all,

    I've just written my first roundcube plugin which embeds youtube videos when a youtube url is found in the message body.

    Forgive me but I only started using php a few days ago and so found it a challenge getting the regex to work.

    At the moment it only works with plain text messages, for some reason the regex wouldn't match on html or alternative types, maybe someone with greater skills than me can shed some light on why!?

    Comments and improvements much welcomed.

    Cheers
    Last edited by DC187; 05-06-2010 at 03:52 PM.

  2. #2
    Julius Caesar's Avatar
    Julius Caesar is offline Super Moderator
    Join Date
    Oct 2008
    Location
    Netherlands
    Posts
    501
    Downloads
    38
    Uploads
    1

    Default

    I haven't used it, but please don't use the <center>-tag. Try to use <div style="text-align:center;"> ... </div>
    Julius Caesar

    You can download the Groupvice4 theme here.
    Sie können Groupvice4 hier herunterladen.

  3. #3
    DC187 is offline Registered User
    Join Date
    Apr 2009
    Posts
    10
    Downloads
    1
    Uploads
    0

    Default

    Thanks,

    I've made that change and re-attached.
    Last edited by DC187; 05-08-2010 at 12:27 PM.

  4. #4
    DC187 is offline Registered User
    Join Date
    Apr 2009
    Posts
    10
    Downloads
    1
    Uploads
    0

    Default

    Hi all,

    I've updated this plugin which now embeds youtube video in some html messages.
    Different clients write the <a> tags differently, so far I have tested this with html format emails sent by outlook, thunderbird and roundcube webmail.

    If you have a better method of doing this I would love to hear as I have to setup an array of strings to search for in order to match the html of different clients.

    Feedback welcome

    James
    Attached Files

  5. #5
    DC187 is offline Registered User
    Join Date
    Apr 2009
    Posts
    10
    Downloads
    1
    Uploads
    0

    Default

    Oh it works with messages sent from gmail as well

  6. #6
    afrozenminute is offline Registered User
    Join Date
    May 2010
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default

    Not workig

  7. #7
    dziobak is offline Registered User
    Join Date
    Dec 2009
    Location
    Poland
    Posts
    184
    Downloads
    4
    Uploads
    0

    Default

    Read about adding a plugin to Roundcube. Use logs and debug, and then write something like this...
    Quote Originally Posted by afrozenminute View Post
    Not workig

  8. #8
    DC187 is offline Registered User
    Join Date
    Apr 2009
    Posts
    10
    Downloads
    1
    Uploads
    0

    Default

    Not working doesn't really offer too many clues as to the problem.

    It could be the <a> tag(s) haven't been matched.

    To test whether the plugin is working you can send an email to yourself via roundcube with a youtube video link, it should match that.

    If it works for some mail but not others I'd be interested to know what client was used to write the message and the format of the youtube URL from the original message source.

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts