Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


JQmedia

24567

Comments

  • 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
  • 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.
  • 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?
  • Uploaded version 0.3 of JQMedia.
  • could the problem be when ppl use a subfolder? I use domain.com/forum instead of just domain.com/ ..
  • no thats not a problem
    try it now.
  • 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.
  • 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
  • my problem got fixed my repatching vanilla 1.1.2. To be more specific. the global.js needed to be overwritten again..
  • 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 ;)
  • Uploaded version 0.4 of JQMedia.
  • 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
  • Uploaded version 0.5 of JQMedia.
  • Nailed it this time (for me anyway). Thanks for all the hard work Schiz, that's one kick arse extension now :)
  • 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
  • google video on ur site is working. I do not see where u tried out the mp3 player
  • Uploaded version 0.5.1 of JQMedia.
  • working like a charm. but one question; how can i post youtube links without embedding them when this extension is on?
  • 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
  • Yeah, I would be interested to know too. same problem nothing shows up!
  • digilee, you're running Vanilla 1.1.1 and IIRC, JQMedia utilises some new JS from Vanilla 1.1.2 (if I do remember correctly, then that needs to be listed as a dependency Schiz). Try updating Vanilla and then enabling JQM again...
  • That did it! update ... actually now other things are knackered PLUS the videos have stopped working.
  • When pasting the url, the videos work fine but have the url also visible below the video. Is there a way to remove the url besides having to write html?
  • u mean if u just paste the url, u don't want the url as caption.
    But if u write html with a caption, then u want it to appear.

    U can take the caption out completely if u want. commnet out this line from JQmedia.js
    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>');
  • Hello, nice addon :) Is it possible to add dailymotion on it ? Thx a lot & great job !
  • Now this works great for me! Can you make the Mp3 Player show up when a Mp3 is uploaded to the server (per Attachments plugin)? (Yeah, you can post the URL to the file, then it works, but People can't really be bothered to remember the path to the upload-directory and stuff....) Also digilee's 'hide url' question is interesting! Peace.
  • Hi, Have just started using both Vanilla and the JQ media add on, works great except that my users are able to change the Jqmedia settings, I.e they can select and deselect which video files can be used, it is the same settings pannel I have as an administrator, I would like to disable this, so only I can select the files accepted etc.. Can anyone help. Here is my work in progress. Http://forum.corfu-media.co.uk Thanks Gaeth
  • Hi, awesome plugin! Could you tell me what to do if i want the videos only embedet when i put bbcode tags around it? i still want to have the ability to post links to those sites normally.
  • Nice work! Thanks. What about support for http://vimeo.com/ as well? (It has some really solid content on in terms of motion graphics etc)
  • Yeah, what Gareth said! If I could turn off the jQmedia Setting for Users I could get rid of the 'Settings'-Tab for normal Users all together. I REALLY want to do this. It just would make things even simpler. Please, if anybody knows how to set the jQmedia-Setting to Admin only, I would be most grateful. Thanks!
Sign In or Register to comment.