[Deprecated, use Aeva] YouTube BBCode v2.6

Started by Nao 尚, September 27, 2007, 05:51:05 PM

Previous topic - Next topic

Yahmez

Thanks for the reply!
I used Karl's script and it worked perfectly. Avea is working well too. Kudos.

gm112

Minimal changes required to get this thing running on RC2 :P.


1) Copy install-2.0.rc1.xml, paste it.
2) Rename the copied version install-2.0.rc2.xml.
3) In install-2.0.rc2.xml, go to the very bottom. Find:
  <file name="$sourcedir/Subs-Editor.php">
<operation>
<search position="after"><![CDATA[ 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt['flash']),]]></search>
<add><![CDATA[
'youtube' => array('code' => 'youtube', 'before' => '[youtube]', 'after' => '[/youtube]', 'description' => $txt['youtube']),
]]></add>
</operation>
</file>


4) Replace that code with:
<file name="$sourcedir/Subs-Editor.php">
<operation>
<search position="after"><![CDATA[
array(
'image' => 'flash',
'code' => 'flash',
'before' => '[flash=200,200]',
'after' => '[/flash]',
'description' => $txt['flash']
),
]]></search>
<add><![CDATA[
array(
'image' => 'youtube',
'code' => 'youtube',
'before' => '[youtube]',
'after' => '[/youtube]',
'description' => $txt['youtube']
),
]]></add>
</operation>
</file>


5) Save the file, package it as a zip, and upload. Enjoy! =)

Someone may have already upped a fix, and that's fine :P. I just wanted to contribute to the community a bit.. (should release some of his own creations as mods..)

Nao 尚

I would release a RC2 version, but I'm not sure it's worth spending time on it when I have plans to rewrite the mod to use a minimal Aeva engine...
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Arantor

People do like using [youtube] at times. Can come in handy on some types of forum where they don't explicitly want auto linkage.
Holder of controversial views, all of which my own.

Nao 尚

I don't know... Probably needs being discussed.
I think it's better to not require any tag around the YT urls. Feels more natural to me.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Arantor

Then you would need to think about a converter for all the folks who've used this one (me included)
Holder of controversial views, all of which my own.

Nao 尚

There's already a converter script... It was written by Karl. It's both in the YTBBC page and in the Aeva package, I believe. I may include it in the admin area at some point. No time to deal with all of this for now, though.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

backend

This mod is no longer working, not sure why? I would assume it has to do with the SMF update to 1.1.2.

Can anyone help on fixing this please? I just don't see any video, it is blank. I cant uninstall it either.

thank you

kai920

Quote from: backend on December 16, 2009, 11:49:10 AM
This mod is no longer working, not sure why? I would assume it has to do with the SMF update to 1.1.2.


I hope you mean 1.1.11!

backend

Quote from: kai920 on December 16, 2009, 12:33:02 PM
Quote from: backend on December 16, 2009, 11:49:10 AM
This mod is no longer working, not sure why? I would assume it has to do with the SMF update to 1.1.2.

Yes sorry that is what I meant :)

What do you think is the better way to go?

1-Remove this mod and reinstall it again? (I hope this won't create any problems for all the Youtube clips that have already been posted)

or


2-Try to apply the manual edits for the new SMF version?



Thanks a lot


I hope you mean 1.1.11!

backend

I think I got to the bottom of this:

When the video has a size specified (by default, the youtube bbc, gives it a width and length) the video doesn't show.

So I have to modify the following line in post.template.php

'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', '

to remove the sizes.


But the problem is, what about all the other hundreds of videos that are already posted with a size specified??? how can I change those?

my solution is merely a temporary work-around. I need this to work like before, where clicking the 'Youtube' BBC would give you [youtube=425,350][/youtube] and you would just insert a youtube video ID in it.

Not sure why this stopped working all of a sudden????

Nao 尚

The easy solution...?

Uninstall YTBBC
Install Aeva Media (look into the last page of the Aeva topic)
Download Aeva 7.0.706 (i.e. the older version), extract the converter script, run it.
You should be good.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Arantor

* Arantor thinks the really easy solution would be a single SQL query on the database, but maybe he's a bit warped on the whole "easy/hard" thing...
Holder of controversial views, all of which my own.

Nao 尚

Well, of course but what about very large forums?

Plus, it'd have to be a regex query... Not too comfortable with these (on SQL I mean).

Or, if the size is always the same -->

UPDATE smf_messages SET body=REPLACE(REPLACE(REPLACE(body, '[youtube]', ''), '[youtube=425,350]', ''), '[/youtube]', '') WHERE body LIKE '%youtube%';

I guess that would work...? And it could be fast, too. (I'm not sure whether it'd be faster without the WHERE clause.)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Arantor

Ah, I was talking about [youtube=425,350] => [youtube] only, my bad, which is a single replace op.
Holder of controversial views, all of which my own.

Nao 尚

Oh... Right.

Then yeah, definitely, it'd be faster that way.

UPDATE smf_messages SET body=REPLACE(body, '[youtube=425,350]', '[youtube]');

(At this point, removing the WHERE is definitely faster, I guess.)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Afro

DOES THIS WORK FOR 2.0 RC2 NOW

Nao 尚

YES, WITH A FEW CHANGES!
IF YOU DON'T WANT TO APPLY THEM, JUST USE AEVA! :P
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Afro

Quote from: Naolington on December 27, 2009, 05:05:04 AM
YES, WITH A FEW CHANGES!
IF YOU DON'T WANT TO APPLY THEM, JUST USE AEVA! :P

I USE AEVA but it would be good to have YOUTUBE bbc logo on the post page.

what changes needs  to be done ?

Nao 尚

Just read the topic.

And really, YT logo? It's soooo 2000's ;D
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Advertisement: