Youtube Editor Button?

Author Message
ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Youtube Editor Button? - Mon. Jan 11, '10 1:12 PM
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>

FreddyD
  • Total Posts : 834
  • Reward points : 41160
  • Joined: Mar 02 '02
  • Location: Louis Lake
Re:Admin sub menu - Mon. Jan 25, '10 11:48 AM
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.

ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Re:Admin sub menu - Mon. Jan 25, '10 12:40 PM
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.

ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Re:Admin sub menu - Mon. Jan 25, '10 3:01 PM
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>

yvangkwheng
  • Total Posts : 1
  • Reward points : 60
  • Joined: Jan 25 '10
Re:Admin sub menu - Mon. Jan 25, '10 6:01 PM
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>




ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Re:Admin sub menu - Tue. Jan 26, '10 1:09 AM
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?

Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Tue. Jan 26, '10 10:29 AM
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


ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Re:Admin sub menu - Fri. Feb 5, '10 11:21 AM
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
 
 

Guest
Re:Admin sub menu - Tue. Dec 28, '10 2:43 AM
5


Guest
Re:Admin sub menu - Tue. Dec 28, '10 2:44 AM
0
checking youtube videos..

Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Tue. Dec 28, '10 2:20 PM
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


ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Re:Admin sub menu - Fri. Dec 31, '10 12:04 AM
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

dborup
  • Total Posts : 3
  • Reward points : 685
  • Joined: Dec 14 '10
Re:Admin sub menu - Sun. Jan 30, '11 2:29 AM
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 
    


 

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


Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Mon. Jan 31, '11 9:19 AM
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


dborup
  • Total Posts : 3
  • Reward points : 685
  • Joined: Dec 14 '10
Re:Admin sub menu - Mon. Jan 31, '11 9:29 AM
0
Nope that dosent work :( only shows the video in Preview and not when Published  

Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Mon. Jan 31, '11 9:40 AM
0
I believe it could be related to Javascript (we do code translation with Javascript). See if there is any JS error on the page. If so, try refreshing the Custom PGDCode table and see if it helps.
ASPPlayground.NET
~ see our Version 4 plans here


ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Re:Admin sub menu - Wed. Feb 2, '11 3:01 AM
0
hey sam.
 
I see a nice popup for inserting youtube movies
is this an update to be released?

Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Wed. Feb 2, '11 8:00 AM
0
If you are referring to the youtube button you see on the editor, it is part of the 3.8 release. You just have to add the button for the [tube] code on the Custom PGDCode page in the AdminCP.
ASPPlayground.NET
~ see our Version 4 plans here


ErEf
  • Total Posts : 931
  • Reward points : 7835
  • Joined: Feb 15 '04
Re:Admin sub menu - Fri. Feb 4, '11 1:25 AM
0
I do have that button, and it sort of modifies the youtube link
But I do not have that pop-up I see here to insert the youtube link

Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Fri. Feb 4, '11 3:13 AM
0
[This post was marked as helpful]
You can check out the "e.g." beside the "Javascript to Execute" textbox. There is one js function that does popup:
ed.bringUpPrompt('Prompt Label', '[open]{0}[/close]');

I have this in my textbox:
ed.bringUpPrompt('Enter the Youtube Link', '[tube]{0}[/tube]')

ASPPlayground.NET
~ see our Version 4 plans here


smallfish1
  • Total Posts : 1
  • Reward points : 60
  • Joined: Feb 25 '11
Re:Admin sub menu - Fri. Feb 25, '11 12:29 AM
0
i hope this function gonna be added to the next version.
 
 


Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Tue. Apr 12, '11 2:00 PM
0
Thanks for asking, but this feature is already in the current version. You can in fact try it online @
http://www.aspplayground.net/v3/default.aspx
ASPPlayground.NET
~ see our Version 4 plans here


ec
  • Total Posts : 5
  • Reward points : 1340
  • Joined: Aug 18 '11
Re:Admin sub menu - Mon. Aug 22, '11 7:07 AM
0
dborup


Nope that dosent work :( only shows the video in Preview and not when Published  

I am having a similar issue.
See attached images
 
Attached Image(s)

ec
  • Total Posts : 5
  • Reward points : 1340
  • Joined: Aug 18 '11
Re:Admin sub menu - Mon. Aug 22, '11 7:08 AM
0
ec


dborup


Nope that dosent work :( only shows the video in Preview and not when Published  

I am having a similar issue.
See attached images



3rd image
Attached Image(s)

Samuel
  • Total Posts : 11785
  • Reward points : 168350
  • Joined: May 23 '01
Re:Admin sub menu - Mon. Aug 22, '11 12:07 PM
5
Hi EC,
 
That could be an issue with folder permission. Do this:
  1. Go to Custom PGDCode, and "Refresh" the entire table (top right corner button). See if it fixes the problem.
  2. If not, you need to examine the permission for the ~/upfiles folder. The software is having problem writing a JavaScript file to the folder, trying to replace a file named ~/upfiles/pgdcodexxxxxxxx.js. Delete this file currently on the server and refresh the PGDCode table again.
  3. You can check the upfiles folder permission by going to System Related Options -> Server Checker in the AdminCP.
ASPPlayground.NET
~ see our Version 4 plans here


ec
  • Total Posts : 5
  • Reward points : 1340
  • Joined: Aug 18 '11
Re:Admin sub menu - Mon. Aug 22, '11 12:19 PM
0
Samual,
Yep it was a permissions issue.
Added ASPNET and Internet Guest Account with full permissions.
 
Thank you again.