Forum Themes:
Welcome !

Youtube Editor Button?

Change Page: 12 > | Showing page 1 of 2, messages 1 to 15 of 27
Author Message
ErEf

  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
  • Status: offline
Youtube Editor Button? Mon. Jan 11, '10 1:12 PM (permalink)
2
[Helpful answer received] / [List Solutions Only]
is this a feature that will be added to next versions?
<message edited by Samuel on Tue. Jan 26, '10 10:23 AM>
 
#1
FreddyD

  • Total Posts : 835
  • Reward points : 41220
  • Joined: Mar 02 '02
  • Location: Louis Lake
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 11:48 AM (permalink)
2
Eref, you can add the buttons yourself with this article:

http://www.aspplayground.net/forum/tm.aspx?m=400713&high=buttons

I was looking to do the same and found this thread in addition to the instruction, so I thought I would let you know.
 
#2
ErEf

  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 12:40 PM (permalink)
5
thnx freddyd, I appreciate your help.

but I probably would understand Russian better than this:
Second Method - in code behind
Instead of declaring your custom buttons in the ToolsFile.xml, you can also create them on the server by using the provided Telerik RadEditor's Server-Side API, e.g.:

you know, a feature so much asked about should be standard in the software. asppgd is great when you also have programmig skills, or you have a professional forum one can pay a programmer. I just manage with my cut and paste skills if it isn't to difficult and with the next update, all modifications are gone.
 
#3
ErEf

  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 3:01 PM (permalink)
0
I think I have to learn Russian

Sam, RTEcustomJS.js is in ~/js not in ~editor/

i found ~/editor/RegToolsFile.xml
I added this tool
<tool name="Insert a Youtube movie" shortcut="CTRL+Y" iconurl="~/editor/icon_youtube.gif"/>
I uploaded this icon

 
 
I did find RTEcustomjs.js in ~js/

So I updated RTEcustomJS.js
Directly under
         RadEditorCommandList["Show Smilies"] = 
                 function(commandName, editor, oTool) { 
                     restorePoint = editor.CreateRestorePoint(); 
                         editor.ShowDialog( 
                         RTEDialogLocation + "customsmiley.aspx" 
                         , arg 
                         , 470 
                         , 450 
                         , InsertSmiley 
                         , null 
                         , "Smilies"); 
                     return false; 
                 }; 

I inserted this
   RadEditorCommandList["Insert a Youtube movie"] = 
                 function(commandName, editor, oTool) { 
                     restorePoint = editor.CreateRestorePoint(); 
                     EditorPasteHtml("[tube]" + editor.GetSelectionHtml() + "[/tube]");             };  

 
and.. taddaaaa.. the youtube button
 
<message edited by ErEf on Tue. Jan 26, '10 12:43 AM>
 
#4
yvangkwheng

  • Total Posts : 1
  • Reward points : 60
  • Joined: Jan 25 '10
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 6:01 PM (permalink)
0
nice code. i hope this function gonna be added to the next version.
<message edited by yvangkwheng on Mon. Jan 25, '10 7:49 PM>



 
#5
ErEf

  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Tue. Jan 26, '10 1:09 AM (permalink)
0
Sam,
 
I was looking into the code for this youtube button to unlink the inserted url and wrap the [tube] around it the same time, so that just one action is needed, just clicking the youtube button.
 
How can I add the unlink feature to the youtube button?
 
#6
Samuel

  • Total Posts : 11858
  • Reward points : 180790
  • Joined: May 23 '01
  • Status: offline
Re:Admin sub menu Tue. Jan 26, '10 10:29 AM (permalink)
0
To unlink, you can add this function call to your custom command function in the JS file, before calling the EditorPasteHtml function:

editor.Document.execCommand("Unlink", false, null);





ASPPlayground.NET
~ see our Version 4 plans here

 
#7
ErEf

  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Fri. Feb 5, '10 11:21 AM (permalink)
0
RTEcustomJS.js is in ~/js

i found ~/editor/RegToolsFile.xml
I added this tool
<tool name="Insert a Youtube movie" shortcut="CTRL+Y" iconurl="~/editor/icon_youtube.gif"/>
I uploaded this icon

  
goto  RTEcustomjs.js in ~js/ 
update directly under
         RadEditorCommandList["Show Smilies"] = 
                 function(commandName, editor, oTool) { 
                     restorePoint = editor.CreateRestorePoint(); 
                         editor.ShowDialog( 
                         RTEDialogLocation + "customsmiley.aspx" 
                         , arg 
                         , 470 
                         , 450 
                         , InsertSmiley 
                         , null 
                         , "Smilies"); 
                     return false; 
                 }; 

Inserted this
        RadEditorCommandList["Insert a Youtube movie"] =
                 function(commandName, editor, oTool) {
                     restorePoint = editor.CreateRestorePoint();
         editor.Document.execCommand("Unlink", false, null);
                     EditorPasteHtml("[tube]" + editor.GetSelectionHtml() + "[/tube]");                 };

 
and.. taddaaaa.. the youtube button with unlink option
so members just have to paste the youtube link select the link and press the youtube button
 
 
 
#8
Guest
Re:Admin sub menu Tue. Dec 28, '10 2:43 AM (permalink)
5

 
#9
    Guest
    Re:Admin sub menu Tue. Dec 28, '10 2:44 AM (permalink)
    0
    checking youtube videos..
     
    #10
      Samuel

      • Total Posts : 11858
      • Reward points : 180790
      • Joined: May 23 '01
      • Status: offline
      Re:Admin sub menu Tue. Dec 28, '10 2:20 PM (permalink)
      0
      [This post was marked as helpful]
      Just so everyone is aware: The code shown in the above discussion is obsolete. The current version of software does not require any code modification to add buttons. You can set up button for any PGDCode in the Custom PGDCode section of the AdminCP.
      ASPPlayground.NET
      ~ see our Version 4 plans here

       
      #11
      ErEf

      • Total Posts : 931
      • Reward points : 7835
      • Joined: Feb 15 '04
      • Status: offline
      Re:Admin sub menu Fri. Dec 31, '10 12:04 AM (permalink)
      0
      I have seen more intelligent youtube implementations on different fora. The software automatically recognizes the youtube / gmail video links and converts them to an embedded video thumbnail. After clicking the thumbnail a pop-up (like replying to a message) appears and plays the vid, while the background is darkgrey
      example
      http://forum.fok.nl/topic/1259956#66457233
       
      #12
      dborup

      • Total Posts : 3
      • Reward points : 685
      • Joined: Dec 14 '10
      • Status: offline
      Re:Admin sub menu Sun. Jan 30, '11 2:29 AM (permalink)
      0
      I cannot get the Youtube stuff to work
        
       
       An example code that allows embeding of youtube video can be written as follows: 
       Pattern:
       \[(tube)\]http\:\/\/www\.youtube\.com\/watch\?v\=([^\[]+)\[\/\1\]   
       Replace With:
       <object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/$2&rel=1"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/$2&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"> </embed></object>   
       Purpose: Post youtube video 
       Example: [tube]http://www.youtube.com/watch?v=123456[/tube] 
       Begin Tag: [tube] 
       End Tag: [/tube] 
       ECMAScript Compliant and Ignore Case checked 
          


       
       
      #13
      dborup

      • Total Posts : 3
      • Reward points : 685
      • Joined: Dec 14 '10
      • Status: offline
      Re:Admin sub menu Sun. Jan 30, '11 2:45 AM (permalink)
      0
      When i Preview my messages in comes up, but not when i post the messeages :(

       
      #14
      Samuel

      • Total Posts : 11858
      • Reward points : 180790
      • Joined: May 23 '01
      • Status: offline
      Re:Admin sub menu Mon. Jan 31, '11 9:19 AM (permalink)
      0
      I have a slightly different code:
      Pattern:
      \[(tube)\]http\:\/\/[a-z]{2,3}\.youtube\.com\/(?:watch\?v\=|v\/)([^\[]+)\[\/\1\]

      Replace with:
      <object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/$2&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$2&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

      give it a try.
      ASPPlayground.NET
      ~ see our Version 4 plans here

       
      #15
      Online Bookmarks Sharing: Share/Bookmark
      Change Page: 12 > | Showing page 1 of 2, messages 1 to 15 of 27

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9