The MU forums have moved to WordPress.org

Who can make me a plugin for a jscript (6 posts)

  1. blips
    Member
    Posted 17 years ago #

    For my users i have a video plugin that is not working if a media_player.js file is linked in header.php.
    I want to offer both ways of playing video.

    Can someone make this javascript file into a plugin so the user can choose between the 2 plugins?

    Or is there a condition i can put around the link that determines if that first plugin is activated? and in that way is not doing anything with the js file.

  2. mickemus
    Member
    Posted 17 years ago #

    It depends very much on the plugin... If it picks up the urls automatically or if you need to tag it so the plugin recognises it!! If it is the later you can run two simultaneously without any hassle (cough cough).

    Basically, if it is in plugin form the user would activate just one at a time (remind them though) so that should sort you out.

    I've been mucking about with wp-ExtremeVideo (still need to follow the instructions properly though) which plays many formats of video (including stuff hosted elsewhere such ass Google and YouTube). You can find it here:
    http://www.rossgerbasi.com/2006/01/21/extreme-video-plugin-20/

  3. blips
    Member
    Posted 17 years ago #

    I think I know all the plugins for video, also the one you mentioned. I'm talking about a video_play.js that needs to be in the header.php or index.php to function.This is not a plugin but a change in the source-code!!

    It basicaly plays the video you link to and it works great. But if you have another video plugin avtive it overrules that specific plugin. That is why my question is can someone make me plugin so our users can decide if they want the simple plugin (javascript) or the more complicated plugin and in that way I do not have to change the sourcecode.
    Another option would be if a certain plugin is active skip activating the script. I do not know if you can do that.( I know you can detect the presence of a plugin or is that the same as activated.)

  4. drmike
    Member
    Posted 17 years ago #

    Ditto on wp-ExtremeVideo. Worked fine out of the box. I even hacked it and provided a download link.

  5. blips
    Member
    Posted 17 years ago #

    Alright you guys, I think I have to word it different to explain what is going on. (English is not my native language)

    I have a video_play.js that detects links to video in a post. And if you show a picture that links to that video and click it, it will play the video with the same size of the picture. How cool is that?
    To be able to do that I have to put the link to that script into header.php or index.php.
    All of that works great. But now comes the challenge;

    If I link that script and activate a video-plugin called vPIP, the plugin vPIP does not work, video_play.js overrules the vPIP plugin.

    I want to give my users a choice between video_play.js and vPIP therefore I need to have a plugin to activate or deactivate video_play.js OR a statement around the script that can detect if vPIP is active or not and in the case vPIP is active it has to ignore video_play.js

    I hope i made it more clear this time. I will make another post to tell everyone about the video-plugin vPIP working in MU.

  6. blips
    Member
    Posted 17 years ago #

    To answer my own question;

    I looked in the sidebar how they did it to activate widgets or not in other words how to detect if a plugin is active or not.
    It is just an "if" condition to see if the plugin exist, in this case exist means not if the plugin is there but it means it is activated as I found out doing tag clouds in the sidebar.
    Now I asume i can stick the same "if" in the header and load or not load the script.
    Anyone interested in this or I'm on my own with this one again.?

About this Topic