Subject: YouTube Plugin

Posted on: 25/10/06 02:04am
By: jhackwith

This is one of several plugin ideas I'll be posting tonight that have been rattling around my think tank for some time. I'm busy with other projects right now, but I wanted to throw some of these ideas out for the community to discuss. If anyone wants to take up development for any of these, we'll be happy to provide server space and project management for free.

1. YouTube Plugin
A super-simple plugin that would do one thing: create a youtube autotag. Users would simply enter [youtube:cdifdm2c0G0] for example (with cdifdm2c0G0 being the video code from YouTube) and the video would be neatly embedded. Short but sweet.

YouTube Plugin

Posted on: 25/10/06 01:43pm
By: drshakagee

/**
* Implements the [youtube:] autotag.
*
*/
function plugin_autotags_youtube ($op, $content = '', $autotag = '')
{
    global $_CONF, $_TABLES;

    if ($op == 'tagname' ) {
        return 'youtube';
    } else if ($op == 'parse') {
        $whichtube = COM_applyFilter ($autotag['parm1']);
       
       $retval = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $whichtube . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $whichtube . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>';

       $content = str_replace ($autotag['tagstr'], $retval, $content);

        return $content;
    }
}



YouTube Plugin

Posted on: 25/10/06 01:51pm
By: spockjuh

this plugin is the one im searching for! hope its available soon

YouTube Plugin

Posted on: 25/10/06 01:55pm
By: Dirk

Actually, that already is a plugin. Put that function in a file plugins/youtube/functions.inc, create a "youtube" entry in the gl_plugins table and you have a youtube plugin ...

bye, Dirk

YouTube Plugin

Posted on: 25/10/06 01:58pm
By: drshakagee

Is there a current version of that universal plugin thing?

YouTube Plugin

Posted on: 25/10/06 02:09pm
By: Dirk

[QUOTE BY= drshakagee] Is there a current version of that universal plugin thing?[/QUOTE]
Unfortunately not. It's still okay for the most part, though. The exception being the install script, which doesn't work with register_globals=off. Use the install script from one of the plugins that ship with Geeklog. They're pretty generic.

bye, Dirk

YouTube Plugin

Posted on: 25/10/06 04:45pm
By: drshakagee

Here is a plugin I just made, it should work with the latest version of GL and the beta version.

No guarantees good luck.

I took all the code from the static pages plugin from the beta version of geeklog and adapted it to work with youtube. Do whatever you want with my part of this code, follow geeklogs rules for anything I used from the staticpage plugin.

[edit: no one reported any issues so I uploaded it to geeklog.net and changed the link here to reflect that]

YouTube Plugin

Posted on: 25/10/06 09:55pm
By: jmucchiello

Personally, I've just added a plugin to my system call 'custom'. Then whenever I need access to the PLG_* functions, I just go into lib-custom and add a plugin_whatever_custom function. Lot easier than making those microplugins. When 1.4 came out I had to make functions.inc file.

YouTube Plugin

Posted on: 25/10/06 11:45pm
By: jhackwith

Excellent, glad to see someone crank it out!

YouTube Plugin

Posted on: 27/10/06 12:57pm
By: drshakagee

So I notice a few people downloaded this, any problems with it?

YouTube Plugin

Posted on: 15/11/06 01:29pm
By: Anonymous

Could someone please explain, step by step, what to do do install this plugin? I downloaded your plugin but your "readme" file is a little too vague for application.

Thank you!

YouTube Plugin

Posted on: 15/11/06 02:02pm
By: Dirk

It installs just like any other Geeklog plugin. Easier, actually, since it doesn't have an admin section.

Start here: How to install Plugins - READ ME

bye, Dirk

YouTube Plugin

Posted on: 15/11/06 04:40pm
By: drshakagee

I am not in front of anything I can install it on, but when I get back in the office later I will rewrite the read me with better instructions.

I was also informed that by not including some licensing info for the stuff I took from the static pages plugin that it causes some issue with the gpl license.

I don't care one bit how or who uses my code but the original authors do deserve the credit that I neglected to cut and copy along with the code. Will try to clear up both issues when I get back to the office.


YouTube Plugin

Posted on: 16/11/06 05:34am
By: Anonymous

Hello,

i've installed the plugin: i've copied the directories and then i've installed the plugin from my geeklog's control panel.

But, it doesn't work. I've tried to put it in a new and in a comment ([youtube: 47xBiNxlNhQ]).

Is there any thing else to do for this plugin work?

I've register_globals=on

Thank you,
ismael

YouTube Plugin

Posted on: 16/11/06 09:36am
By: ddunn1662

This plugin rocks!!!
i followed the directions in the readme, and it runs perfectly!!
I wonder if something like this could be made for Break.com as well...

YouTube Plugin

Posted on: 16/11/06 01:52pm
By: Dirk

[QUOTE BY= ismael] But, it doesn't work. I've tried to put it in a new and in a comment ([youtube: 47xBiNxlNhQ]).[/QUOTE]
Depending on the Geeklog version you're running, you may have to make sure not to have a space after the colon (that was a bug in, I think, 1.3.11 or thereabouts).

bye, Dirk

Re: YouTube Plugin

Posted on: 19/11/06 06:00pm
By: Anonymous

I've installed the plugin successfully, but now I don't know how to use it.

I'd like to make a story submission with youtube showing up on the story. What must I do to make this happen?


Re: YouTube Plugin

Posted on: 20/11/06 04:24pm
By: Anonymous

Any ideas? Please?

Re: YouTube Plugin

Posted on: 20/11/06 05:00pm
By: Dirk

It's used like any other autotag - tag name, colon, id (of the movie, in this case) and all that in square brackets. There's even an example a few posts above ...

bye, Dirk

Re: YouTube Plugin

Posted on: 20/11/06 06:51pm
By: Anonymous

Thanks i figured it out. It's simply [youtube: idof video]


Re: YouTube Plugin

Posted on: 03/03/10 08:42pm
By: Anonymous

I know most everyone probably knows to do this... but thought it might be handy just in case...

You can alter the look by changing that one output line in the functions.inc.
E.g., here is what I did:

$retval = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $whichtube . '&hl=en_US&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param><param name="wmode" value="transparent" ></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/' . $whichtube . '&hl=en_US&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" width="640" height="505"></embed></object>';


I know it seems redundant to post this when you look at the code, but thought it might be handy.

Also, thanks for making the plugin installer for those lazy people like myself Smile

Re: YouTube Plugin

Posted on: 05/03/10 07:19am
By: beewee

If you use the Autotags plugin instead, you can also make similar tags for other video sites like Vimeo. And editing an tag is much easier in the Autotags plugin because you can edit the tags online.

One of the sites I'm working for, with a slightly pimped Youtube autotag, look at the right column: http://www.campersite.nl/bestemmingen/belgie/vlaanderen.php

Thanks anyway!

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=71313