Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Tuesday, May 21 2013 @ 12:22 PM EDT


 Forum Index > Extensions > Plugins New Topic Post Reply
 YouTube Plugin
First | Previous | 1 2 | Next | Last
   
jhackwith
 10/25/06 02:04AM (Read 8572 times)  
+++--
Chatty
working

Status: offline


Registered: 07/24/04
Posts: 63
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.

"Beauty... is the shadow of God on the universe." ~ Gabriela Mistral -- Desolacíon
 
Profile Email Website
 Quote
drshakagee
 10/25/06 01:43PM  
+++++
Full Member

Status: offline


Registered: 10/01/03
Posts: 231
PHP Formatted Code

/**
* 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;
    }
}


 

Yes I am mental.
 
Profile Email Website
 Quote
spockjuh
 10/25/06 01:51PM  
++---
Junior

Status: offline


Registered: 06/30/04
Posts: 32
this plugin is the one im searching for! hope its available soon

 
Profile Email
 Quote
Dirk
 10/25/06 01:55PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
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

 
Profile Email Website
 Quote
drshakagee
 10/25/06 01:58PM  
+++++
Full Member

Status: offline


Registered: 10/01/03
Posts: 231
Is there a current version of that universal plugin thing?

Yes I am mental.
 
Profile Email Website
 Quote
Dirk
 10/25/06 02:09PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Quote by drshakagee: Is there a current version of that universal plugin thing?

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

 
Profile Email Website
 Quote
drshakagee
 10/25/06 04:45PM  
+++++
Full Member

Status: offline


Registered: 10/01/03
Posts: 231
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]

Yes I am mental.
 
Profile Email Website
 Quote
jmucchiello
 10/25/06 09:55PM  
+++++
Full Member

Status: offline


Registered: 08/29/05
Posts: 985
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.

 
Profile Email
 Quote
jhackwith
 10/25/06 11:45PM  
+++--
Chatty

Status: offline


Registered: 07/24/04
Posts: 63
Excellent, glad to see someone crank it out!

"Beauty... is the shadow of God on the universe." ~ Gabriela Mistral -- Desolacíon
 
Profile Email Website
 Quote
drshakagee
 10/27/06 12:57PM  
+++++
Full Member

Status: offline


Registered: 10/01/03
Posts: 231
So I notice a few people downloaded this, any problems with it?

Yes I am mental.
 
Profile Email Website
 Quote
Anonymous: what?
 11/15/06 01:29PM  

confused


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!

 
 Quote
Dirk
 11/15/06 02:02PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
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

 
Profile Email Website
 Quote
drshakagee
 11/15/06 04:40PM  
+++++
Full Member

Status: offline


Registered: 10/01/03
Posts: 231
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.


Yes I am mental.
 
Profile Email Website
 Quote
Anonymous: ismael
 11/16/06 05:34AM  



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

 
 Quote
ddunn1662
 11/16/06 09:36AM  
+----
Newbie
tired

Status: offline


Registered: 10/08/06
Posts: 3
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...

-Danny
 
Profile Email Website
 Quote
Dirk
 11/16/06 01:52PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Quote by ismael: But, it doesn't work. I've tried to put it in a new and in a comment ([youtube: 47xBiNxlNhQ]).

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

 
Profile Email Website
 Quote
Anonymous: helpme
 11/19/06 06:00PM  



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?


 
 Quote
Anonymous: help me
 11/20/06 04:24PM  

blank


Any ideas? Please?

 
 Quote
Dirk
 11/20/06 05:00PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
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

 
Profile Email Website
 Quote
Anonymous: hurrah
 11/20/06 06:51PM  



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


 
 Quote
First | Previous | 1 2 | Next | Last
Content generated in: 3.41 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content