Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
  1.  # 1
    Enable online videos like youtube etc to work inside comments

    Dependencies


    JQuery extension 1.1.2 or higher needs to be installed and enabled first in order for this to work. Do this right now

    Installation & Configuration
    All you have to do is enable the extension from the extensions page. You will see a new settings link on the sidepanel. Select the video sources or mp3 that u want allowed on the forum.
    Picture 1

    Usage
    *Does not work under preview, you have to submit your comment for it to work*
    If ExtendedTextFormatter is installed. just use a youtube link like http://www.youtube.com/watch?v=i1q_8QQO70Q and submit the comment.

    If you do not have ExtendedTextFormatter installed then you have to write a small html link like
    <a href="http://www.youtube.com/watch?v=i1q_8QQO70Q">Conan's Emmy Entry Hilarious!!!'</a>
    The extension will do the rest, and turn that link into an embed code so it plays right inside the comment.
    Conan Emmy entry

    You can embed, Youtube, Google Video, Myspace Video, iFilm and mp3 audio files

    Compatability
    Should work with any WYSIWYG. haven't tested but no reason why it should not work.
    the magic occurs after the comment is posted. So use anything to put a valid link and it should work
    Should work with BBcode, Markdown and Textile as well

    Thanks to Dinoboff


    Support this extension


    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 14th 2007
     # 2
    Bloody hell Schiz! Shall give this one a go pronto :)
    •  
      CommentAuthorpbear
    • CommentTimeMar 14th 2007
     # 3
    Does it pick up BBCode [url=...][/url] links?
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 14th 2007
     # 4
    it doesn't matter. It works on the client side. it transform any links in messages with youtube, google... video url into youtube, google... video
  2.  # 5
    Uploaded version 0.1 of JQMedia.
    •  
      CommentAuthor0bvious
    • CommentTimeMar 15th 2007
     # 6
    I can't seem to get this to work. Tried setting and unsetting JQuery etc.

    I tested a post here

    Any ideas?
    •  
      CommentAuthorVaz
    • CommentTimeMar 15th 2007
     # 7
    I seem to have screwed up.

    I installed without jquery. On realising, I uninstalled the extention and installed jquery. Then I re-enabled jqmedia. Tried another test post but doesnt seem to have worked.

    Anyone knw what might have happened?
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 15th 2007
     # 8
    For any extension problems in gneneral and JQ extension problems in particular, *please* include a link to your forum. This allows us to check several things right off the bat without having to ask you further questions.

    JQ extensions are sensitive to the order of activation with some other extensions. We can check this from your forum HTML headers quickly (if you include a link...) and make sure that this simple solution isn't all that's needed.

    A link directly to a post that isn't working as expected is even better!
    •  
      CommentAuthor0bvious
    • CommentTimeMar 15th 2007
     # 9
    I managed to get the extension to work. Two things:

    1. Why is there an enormous gap after the video (see here) ?
    2. Is it possible to add a video (using above method) AND a simple link to a page in YouTube?

    I only ask because when I added a link to a user page (i.e. not a video) the add-on tried to return a video and got locked in an infinite loop.

    Cheers...
    •  
      CommentAuthor0bvious
    • CommentTimeMar 15th 2007
     # 10
    I just noticed. On Firefox there is a huge gap after the video, on IE6 the video screws up the html of the page and scrunches it all up to the right of the box.

    What's happening?
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 15th 2007
     # 11
    @Schiz, breaks with prototype and moofx. Here's the fix:

    Line 66 from $VideoScript = '<script>$(document).ready(function(){';To $VideoScript = '<script type="text/javascript">(function($) { $(document).ready(function(){';
    And line 78 from $VideoScript .= '});</script>';To $VideoScript .= '});})(jQuery)</script>';
    •  
      CommentAuthor0bvious
    • CommentTimeMar 15th 2007 edited
     # 12
    I don't really know what that did, but I altered the code, and I still get a scrunched up post (see here) in IE6
  3.  # 13
    @Obvious the huge space is because u have 3 break tags after it. take em out. looks like u deleted external.png as well
    Regarding IE6
    OK its because the float isn't being cleared in IE, and the stuff that supposed to be below youtube are now on its side
    It will take me some time to fix this. I tried it before, made it work in firefox, but didn't check IE


    @Vaz, whats ur forum url?

    Stash thanks I'll fix that
    where did u get that fix. the jQuery documentation gives a different discussion
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 15th 2007
     # 14
    I got it from the jQuery docs...

    [-Stash-] goes and looks at them again...
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 15th 2007
     # 15
    The 3rd example on this page --> http://docs.jquery.com/Using_jQuery_with_Other_Libraries
    <html>
    <head>
    <script src="prototype.js"></script>
    <script src="jquery.js"></script>
    <script>
    jQuery.noConflict();

    // Put all your code in your document ready area
    jQuery(document).ready(function($){
    // Do jQuery stuff using $
    $("div").hide();
    });

    // Use Prototype with $(...), etc.
    $('someid').style.display = 'none';
    </script>
    </head>
    <body></body>
    </html>
  4.  # 16
    Uploaded version 0.2 of JQMedia.
  5.  # 17
    Uploaded version 0.2 of JQMedia.
  6.  # 18
    OK guys should work in IE.
    Tested in IE7
    Applied Stash fix as well
    •  
      CommentAuthor0bvious
    • CommentTimeMar 16th 2007
     # 19
    How about this problem I mentioned:
    2. Is it possible to add a video (using above method) AND a simple link to a page in YouTube?

    I only ask because when I added a link to a user page (i.e. not a video) the add-on tried to return a video and got locked in an infinite loop.

    Cheers...
  7.  # 20
    so u want 2 links
    one should be a video but the other should not.

    btw this extension is artificially limited to only work in comments
    show me the url where the infinite loop occurs
    • CommentAuthorjimmiejo
    • CommentTimeMar 18th 2007 edited
     # 21
    Can't seem to get it to work on our forum:

    http://younggogetter.com/forum/discussion/1495/testing-video-embed/

    JQuery 1.1.3 and JQMedia 0.2 are both enabled.
    • CommentAuthorabramelin
    • CommentTimeMar 18th 2007
     # 22
    it was working on me but suddenly it stopped working with me too :(
  8.  # 23
    jQuery needs to be enabled BEFORE u enable jQmedia
    ON your site its the other way around.
    Disable both Jquery and JQmedia, and then enable jQuery followed by jQmedia

    abramelin.
    Contrary to popular belief i do not have a magic wand.
    U have to give me more than just "stopped working"
    • CommentAuthorabramelin
    • CommentTimeMar 18th 2007
     # 24
    what can i say. its was working when i first installed it but now it stopped. i think it conflicts with one of the extension but i dont know which one :/
  9.  # 25
    why don't u include ur forum link ???????????
    • CommentAuthorabramelin
    • CommentTimeMar 19th 2007 edited
     # 26
    because i am working on local :/ i'll try to upload the forum to a web server and notify you
    •  
      CommentAuthorSkyBoy
    • CommentTimeMar 19th 2007 edited
     # 27
    I think JQMedia may be have a conflict with JQThickbox.
    If I enable JQThickbox (whatever load before or after JQMedia), than JQMedia does nothing in my test forum, otherwise it work fine.

    JQuery & JQThickbox are ver 1.1.3
    •  
      CommentAuthorMr Do
    • CommentTimeMar 19th 2007 edited
     # 28
    doesnt work for me, just creates a link. doesnt matter if I used extended text formatter og html, just displayes a link. does it have any incompability?
    • CommentAuthorabramelin
    • CommentTimeMar 19th 2007
     # 29
    Mr do i have the same problem
  10.  # 30
    Confirmed. JQmedia doesn't seem to work with JQthickbox.
    the problem is with both JQthickbox and JQmedia uses this code to get the paths
    if (!window.Vanilla){
    var Vanilla = new PathFinder();
    Vanilla.webRoot = Vanilla.getRootPath('script', 'src', 'js/global.js');
    Vanilla.styleUrl = Vanilla.getRootPath('link', 'href', 'vanilla.css');
    Vanilla.baseURL = Vanilla.params.httpMethod + Vanilla.params.domain + Vanilla.webRoot;
    }


    Atleast now we know where the conflict is occuring
    now to fix it :)
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 19th 2007 edited
     # 31
    Stick it in jquery.js?

    Incidentally I'm going to be updating jquery.js with the compatibility option enabled, so you will need to rip it out of JQmedia when I do. If you want to time this, let me know.
  11.  # 32
    that is not the issue.
    I already made JQmedia compatible.
    I'm using $jqm=jQuery.noConflict();
    $jqm(document).ready(function(){};'

    So it shouldn't conflict with any one.
    the problem is the Vanilla.webroot stuff.

    I haven't uploaded it yet. will uplaod once the issue with thickbox is resolved.
    it works with relative paths. So immediate fix is to use relative paths
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 19th 2007
     # 33
    That will only prevent conflit if script to use prototype are loade after yours or before jQuery.
    var $j = jQuery.noConflict(); should be put just after jQuery is loaded.
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 19th 2007
     # 34
    I just tried:if (!window.Vanilla){
    var Vanilla = new PathFinder();
    Vanilla.webRoot = Vanilla.getRootPath('script', 'src', 'js/global.js');
    Vanilla.styleUrl = Vanilla.getRootPath('link', 'href', 'vanilla.css');
    Vanilla.baseURL = Vanilla.params.httpMethod + Vanilla.params.domain + Vanilla.webRoot;
    }
    if (!window.Vanilla){
    var Vanilla = new PathFinder();
    Vanilla.webRoot = Vanilla.getRootPath('script', 'src', 'js/global.js');
    Vanilla.styleUrl = Vanilla.getRootPath('link', 'href', 'vanilla.css');
    Vanilla.baseURL = Vanilla.params.httpMethod + Vanilla.params.domain + Vanilla.webRoot;
    }
    alert(Vanilla.webRoot);
    And it is working. What is problem you get with this code?
  12.  # 35
    Uploaded version 0.3 of JQMedia.
    •  
      CommentAuthorMr Do
    • CommentTimeMar 20th 2007
     # 36
    could the problem be when ppl use a subfolder? I use domain.com/forum instead of just domain.com/ ..
  13.  # 37
    no thats not a problem
    try it now.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 20th 2007
     # 38
    Working with JQuery 1.1.4 and JQThickBox 1.1.4 for me, although I'm not getting the MP3 player showing up. If you'd mind taking a look Schiz, it's here.
  14.  # 39
    i tried accessing the mp3 player directly at this address
    http://exhibitq.com/talk/extensions/jQmedia/mediaplayer.swf
    and its not there?
    look for mediaplayer.swf, and tell me the correct path where it resides
    •  
      CommentAuthorMr Do
    • CommentTimeMar 20th 2007
     # 40
    my problem got fixed my repatching vanilla 1.1.2. To be more specific. the global.js needed to be overwritten again..
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 20th 2007
     # 41
    http://exhibitq.com/talk/extensions/JQMedia/mediaplayer.swf

    If you would like I can send this to you as a ZIP file...

    You have packaged up the extension inside a directory named "JQMedia", so I just uploaded the whole thing. I got it working by changing line 63 of jqmedia.js from: var mediaplayer = jqmediaPath.webRoot + 'extensions/jQmedia/mediaplayer.swf';to: var mediaplayer = jqmediaPath.webRoot + 'extensions/JQMedia/mediaplayer.swf';so that the cases match the rest of the extension.

    And I changed line 159 from: if (caption && sourceVideo!='playlist') embedCode.push('<p><a rel="nofollow" target="_blank" href="' + url+ '">' + caption + '</a><img src="' + jqmediaPath.webRoot +'extensions/jQmedia/external.gif" /></p>');to: if (caption && sourceVideo!='playlist') embedCode.push('<p><a rel="nofollow" target="_blank" href="' + url+ '">' + caption + '</a><img src="' + jqmediaPath.webRoot +'extensions/JQMedia/external.gif" /></p>');
    As a general observation, you seem to change from JQMedia to JQmedia to jQmedia quite freely, so this is probably what has caused the problem? For simplicity sake it might just be worth changing them all to JQMedia and be done with it.

    To help the language people, you should change lines 41-50 from this:$Context->Dictionary['ExtensionOptions'] = 'Extension Options';
    $Context->Dictionary['JQmedia'] = 'jQmedia';
    $Context->Dictionary['JQmediaSettings'] = 'jQmedia Settings';
    $Context->Dictionary['JQmediaNotes'] = 'These settings are specific to jQmedia. With this extension you can allow embedded online video services like Youtube etc. The user just enters a url to the youtube video and this extension will make it live, so you can watch it right inside the comment';
    $Context->Dictionary['JQmediaVideo'] = 'Select online video services to embed';
    $Context->Dictionary['JQmediaYoutube'] = 'Youtube video';
    $Context->Dictionary['JQmediaGoogle'] = 'Google video';
    $Context->Dictionary['JQmediaMyspace'] = 'Myspace video';
    $Context->Dictionary['JQmediaIfilm'] = 'Ifilm video';
    $Context->Dictionary['JQmediaMp3'] = 'Allow embedding of mp3 player';
    to this:$Context->SetDefinition('ExtensionOptions', 'Extension Options');
    $Context->SetDefinition('JQmedia', 'jQmedia');
    $Context->SetDefinition('JQmediaSettings', 'jQmedia Settings');
    $Context->SetDefinition('JQmediaNotes', 'These settings are specific to jQmedia. With this extension you can allow embedded online video services like Youtube etc. The user just enters a url to the youtube video and this extension will make it live, so you can watch it right inside the comment');
    $Context->SetDefinition('JQmediaVideo', 'Select online video services to embed');
    $Context->SetDefinition('JQmediaYoutube', 'Youtube video');
    $Context->SetDefinition('JQmediaGoogle', 'Google video');
    $Context->SetDefinition('JQmediaMyspace', 'Myspace video');
    $Context->SetDefinition('JQmediaIfilm', 'Ifilm video');
    $Context->SetDefinition('JQmediaMp3', 'Allow embedding of mp3 player');
    ref: http://lussumo.com/docs/doku.php?id=vanilla:development:languageupkeep

    I also noticed line 53 needs changing from:AddConfigurationSetting($Context, 'JQMEDIA_VERSION_EXT', '0.2');to this:AddConfigurationSetting($Context, 'JQMEDIA_VERSION_EXT', '0.3');So that the version number matches

    I've also been frivolous with default.php and changed line 66 onwards from $VideoScript = '<script>var $jqm=jQuery.noConflict();
    $jqm(document).ready(function(){';
    if ($Context->Configuration['JQMEDIA_ALLOW_YOUTUBE'] == '1') {
    $VideoScript .= '$jqm(\'#ContentBody .CommentBody a[@href^="http://www.youtube.com/"],#ContentBody .CommentBody a[@href^="http://youtube.com/"]\').jQmedia(\'youtube\');';}
    if ($Context->Configuration['JQMEDIA_ALLOW_GOOGLE'] == '1') {
    $VideoScript .= '$jqm(\'#ContentBody .CommentBody a[@href^="http://video.google."]\').jQmedia(\'google\');';}
    if ($Context->Configuration['JQMEDIA_ALLOW_MYSPACE'] == '1') {
    $VideoScript .= '$jqm(\'#ContentBody .CommentBody a[@href^="http://vids.myspace.com/"]\').jQmedia(\'myspace\');';}
    if ($Context->Configuration['JQMEDIA_ALLOW_IFILM'] == '1') {
    $VideoScript .= '$jqm(\'#ContentBody .CommentBody a[@href^="http://www.ifilm.com/"]\').jQmedia(\'ifilm\');';}
    if ($Context->Configuration['JQMEDIA_ALLOW_MP3'] == '1') {
    $VideoScript .= '$jqm(\'#ContentBody .CommentBody a[@href$=".mp3"]\').jQmedia(\'mp3\');';}
    $VideoScript .= '});</script>';
    to: $VideoScript = ' <script type="text/javascript">
    $j(document).ready(function(){
    ';
    if ($Context->Configuration['JQMEDIA_ALLOW_YOUTUBE'] == '1') {
    $VideoScript .= ' $j(\'#ContentBody .CommentBody a[@href^="http://www.youtube.com/"],#ContentBody .CommentBody a[@href^="http://youtube.com/"]\').jQmedia(\'youtube\');
    ';}
    if ($Context->Configuration['JQMEDIA_ALLOW_GOOGLE'] == '1') {
    $VideoScript .= ' $j(\'#ContentBody .CommentBody a[@href^="http://video.google."]\').jQmedia(\'google\');
    ';}
    if ($Context->Configuration['JQMEDIA_ALLOW_MYSPACE'] == '1') {
    $VideoScript .= ' $j(\'#ContentBody .CommentBody a[@href^="http://vids.myspace.com/"]\').jQmedia(\'myspace\');
    ';}
    if ($Context->Configuration['JQMEDIA_ALLOW_IFILM'] == '1') {
    $VideoScript .= ' $j(\'#ContentBody .CommentBody a[@href^="http://www.ifilm.com/"]\').jQmedia(\'ifilm\');
    ';}
    if ($Context->Configuration['JQMEDIA_ALLOW_MP3'] == '1') {
    $VideoScript .= ' $j(\'#ContentBody .CommentBody a[@href$=".mp3"]\').jQmedia(\'mp3\');
    ';}
    $VideoScript .= ' });
    </script>
    ';
    so that you end up with nice neat source to read in the final page :) Feel free to completely ignore this bit ;) Of course, I would include the type="text/javascript" bit and there's no reason not to use the shorter $j(document).ready(function(){ and $j(\'#ContentBody bits ;)

    Disclaimer: I don't know if the MP3 thing is working 100% with these changes as I don't have sound on my "work" machine ;)
  15.  # 42
    Uploaded version 0.4 of JQMedia.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 20th 2007
     # 43
    MP3 embeded player still isn't working for me because of the case inconsistencies of the paths.

    In jQmedia.js, line 64: var mediaplayer = jqmediaPath.webRoot + 'extensions/JQmedia/mediaplayer.swf';is still wrong. It needs to be JQMedia, not JQmedia.

    This is also the case in line 160:jqmediaPath.webRoot +'extensions/JQmedia/external.gif"should be:jqmediaPath.webRoot +'extensions/JQMedia/external.gif"

    In default.php, line 66:var $j=jQuery.noConflict(); is not needed as it's included in JQuery extension 1.1.4
  16.  # 44
    Uploaded version 0.5 of JQMedia.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 22nd 2007
     # 45
    Nailed it this time (for me anyway). Thanks for all the hard work Schiz, that's one kick arse extension now :)
    • CommentAuthorjoemad
    • CommentTimeMar 22nd 2007 edited
     # 46
    I added Jquery 1st and put a check next to it. Then I installed JQmedia, put a check next to it and put checks next to the JQmedia options (mp3, google video etc). I have the ExtendedTextFormatter too.

    When I insert the URLs of a google video or a mp3 I just get the URL (not the emdedded movie or mp3 player)

    http://www.joemadsamples.com/forum/comments.php?DiscussionID=35&page=1#Comment_103
  17.  # 47
    google video on ur site is working. I do not see where u tried out the mp3 player
  18.  # 48
    Uploaded version 0.5.1 of JQMedia.
    • CommentAuthorabramelin
    • CommentTimeMar 23rd 2007
     # 49
    working like a charm. but one question;
    how can i post youtube links without embedding them when this extension is on?
    • CommentAuthordigilee
    • CommentTimeApr 4th 2007 edited
     # 50
    Latest of both JQuery, (installed first) and JQMedia installed but nothing.
    Anyone care to mention why?
    I have the options for JQM all checked etc.

    http://a5d.org/tdf