YAFLogo

guest
  • guest
  • Guest Topic Starter
15 years ago
Here's how to create a youtube button in yafEditor:

Insert the following code into yafEditor.js (I put it in line 26):


case "youtube":
wrapSelection(textObj,"[youtube]","[/youtube]");
break;

Insert the following code into yafEditor.cs (I put it on line 198 after the CreateLink line):


RenderButton(writer, "youtube", "FormatText('youtube','')", "YouTube", "yafEditor/youtube.gif");

Attached is the image I will use for the editor. Add it to editors/yafEditor folder:

Hope you guys find this useful :wink:

rollntider
14 years ago
I got the case statement added, but

i cant figure out how to add the youtube gif.

thanks

guest
  • guest
  • Guest Topic Starter
14 years ago
chenimen wrote:

Here's how to create a youtube button in yafEditor:

Insert the following code into yafEditor.js (I put it in line 26):


case "youtube":
wrapSelection(textObj,"[youtube]","[/youtube]");
break;

Insert the following code into yafEditor.cs (I put it on line 198 after the CreateLink line):


RenderButton(writer, "youtube", "FormatText('youtube','')", "YouTube", "yafEditor/youtube.gif");

Attached is the image I will use for the editor. Add it to editors/yafEditor folder:

Hope you guys find this useful :wink:

do i have to recompile after doing this ??

jwendl
  • jwendl
  • 53% (Neutral)
  • YAF Developer
14 years ago
This is an excellent feature!
He felt that his whole life was some kind of dream and he sometimes wondered whose it was and whether they were enjoying it.

-Douglas Adams

muneeb_baig
14 years ago
Excelent piece of work!

Thank you very much.


-muneeb

DJGray
  • DJGray
  • 88.8% (Honored)
  • YAF Commander
14 years ago
This is really great, and I note that the code is already in the most current build. I'm running my YAF on GoDaddy, and they are running 1.9.1.2. The youtube tagging doesn't seem to be recognized by 1.9.1.2 though.

Any suggestions??

ca4nul
  • ca4nul
  • 60.2% (Friendly)
  • YAF Forumling
14 years ago
hi

could any body please post compiled bin directory (after embedding youtube code) . i don;t have VS right now so i can't compile it

thank you very much

continienzo
14 years ago
Sorry, I write here because I noticed that if I try using a youtube link for example this one (http://it.youtube.com/watch?v=QMf04ubvEhY) that has got the "it" before youtube.com the embed doesn't work 😞

EDIT: Here it seems to work, but with the code in the 1.9.3 version from repository doesn't work.. Any idea? Can you put the last code in repository for the youtube embedding? Thanks 🙂

Thanks

Enzo

continienzo
14 years ago
UP!!

No way to get you tube bbcode working in the 1.9.3 repository like it is working here please?

Thanks

auburner
  • auburner
  • 51.8% (Neutral)
  • YAF Forumling
13 years ago
I'm running YAF 1.9.1.8.

I can't find the bbcode.cs file to use the YouTube embedding fix described above.

Can anyone provide instructions on how to allow YouTube embedding on 1.9.1.8?

Thanks!

rollntider
13 years ago
i am having a hard time locating the bbcode.cs is it in the root folder or a sub folder?

i am running 1.9.1.8

*edit*

never mind i got it working. Turns out 1.9.1.8 has it in the code already, for some reason the your tube wasnt working at first and started today...no need to edit anything except the yaf file for the button

rollntider
13 years ago
test2005
13 years ago

If I'm not mistaken, the BBcode entries are included in the databse. I don't think there is a "file" to look at.

However, there are several posts that show what the XML import file should look like. Just search on it.!

HTH

:)


.....the man in black fled across the desert..........and the gunslinger followed.....

rollntider
13 years ago
where is the yafeditor.cs I dont see where to put that last line in for the image...anyone get it to work?
logan
  • logan
  • 100% (Exalted)
  • YAF Leader
13 years ago
I think its ForumEditor.cs in editors directory
test