I've updated http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacro

Oana is currently converting the video macro to a 2.0 macro. Lucky you! ;)

Thanks
-Vincent

On Wed, Sep 9, 2009 at 2:28 PM, Vincent Massol<[email protected]> wrote:
> Hi Arturo,
>
> On Sep 9, 2009, at 1:41 PM, Arturo Zambrano wrote:
>
>> Sergiu
>> You are right, the code looks like...
>>
>> <h1 id="HTrainingZone"><span>Training Zone</span></h1><p>You can
>> practice editing here.<br/></p><p>
>>
>> </p><div style="border: 1px solid #000; width: 520px; height:
>> 411px;"><object height="411" width="520">
>>
>> <param name="movie"
>>
>> value="http:~//www.dailymotion.com/swf/xr04b&amp;v3=1&amp;related=0"></param><param
>> name="allowFullScreen" value="true"></param><param
>> name="allowScriptAccess" value="always"></param><embed
>> allowfullscreen="true" allowscriptaccess="always" height="411"
>> src="http:~//www.dailymotion.com/swf/xr04b&amp;v3=1&amp;related=0"
>> style="border: 1px solid #000;" type="application/x-shockwave-flash"
>> width="520"></embed></object></div>
>>
>> but wiki code is:
>> {{velocity}}
>>
>> {{html}}#video("http://www.dailymotion.com/video/xr04b_xwiki-round-the-world";){{/html}}
>> {{/velocity}}
>>
>>
>> This escape character seems to be added automatically by xwiki.
>>
>> Any idea about how to avoid this behavior?
>
> It's a bit complex to explain but it's a pb of mixing content in 1.0 and 2.0
> syntax.
>
> Basically do this and it'll work:
>
> {{include document="Macros.Video"/}}
>
> {{velocity}}{{html wiki="true"}}
> #video("http://www.dailymotion.com/video/xr04b_xwiki-round-the-world";)
> {{/html}}{{/velocity}}
>
> Note the wiki="true" part which is important.
>
> Of course the best is to convert the Macros.Video page in 2.0 syntax.
>
> Thanks
> -Vincent
>
>> thanks!
>>
>> arturo
>>
>>
>> ps: I volunteer myself to document this once it is completed and add
>> this to the xwiki documentation
>>
>> of the macro video
>>
>>
>>
>> On Tue, Sep 8, 2009 at 8:53 PM, Sergiu Dumitriu <[email protected]> wrote:
>>
>>> Can you look at the HTML source of the document and see what was
>>> generated? In the first example I saw that the URLs were escaped, as
>>> in http:~// instead of http://
>>>
>>> On Tue, Sep 8, 2009 at 22:22, Arturo Zambrano<[email protected]>
>>> wrote:
>>>>
>>>> Thanks Vincent.
>>>> Now it shows an empty flash player box (screenshot attached), but no
>>>
>>> video
>>>>
>>>> is viewed (I 've checked the urls).
>>>> I tried both dailymotion and youtube.
>>>> Here is the code.
>>>> {{velocity}}
>>>> #includeMacros("Macros.Video")
>>>> {{/velocity}}
>>>>
>>>> {{velocity}}
>>>> {{html}}#video('
>>>>
>>>> http://www.dailymotion.com/video/xr04b_xwiki-round-the-world'){{/html}}<http://www.dailymotion.com/video/xr04b_xwiki-round-the-world%27%29%7B%7B/html%7D%7D>
>>>> {{/velocity}}
>>>>
>>>> {{velocity}}
>>>> {{html}}#video('
>>>
>>>
>>> http://www.youtube.com/v/p6vqcUTzPiw&hl=en&fs=1&;'){{/html}}<http://www.youtube.com/v/p6vqcUTzPiw&hl=en&fs=1&%27%29%7B%7B/html%7D%7D>
>>>>
>>>> {{/velocity}}
>>>>
>>>> Is anything I missed?
>>>>
>>>> thanks again.
>>>>
>>>> arturo
>>>>
>>>>
>>>>
>>>> On Tue, Sep 8, 2009 at 4:39 PM, Vincent Massol <[email protected]>
>>>
>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On Sep 8, 2009, at 9:31 PM, Arturo Zambrano wrote:
>>>>>
>>>>>> Hi,
>>>>>> I just installed Xwiki and Video Macro (uploaded and imported it as
>>>>>> described in the video macro page).
>>>>>>
>>>>>> As a  result of including the following code:
>>>>>>
>>>>>> {{velocity}}
>>>>>> #includeMacros("Macros.Video")
>>>>>> {{/velocity}}
>>>>>>
>>>>>> {{velocity wiki="false"}}
>>>>>> #video("http://www.dailymotion.com/video/xr04b_xwiki-round-the-world
>>>
>>> ")
>>>>>>
>>>>>> {{/velocity}}
>>>>>>
>>>>>> In the rendered page viewed with firefox  I get :
>>>>>>
>>>>>> <p/>
>>>>>> <div  style="border: 1px solid #000; width: 520px; height:
>>>>>> 411px;"><object
>>>>>> width="520" height="411"><param name="movie" value="http:~//
>>>>>> www.dailymotion.com/swf/xr04b&v3=1&related=0"></param><param
>>>>>> name="allowFullScreen" value="true"></param><param
>>>>>> name="allowScriptAccess"
>>>>>> value="always"></param><embed style="border: 1px solid #000;"
>>>>>> src="http:~//
>>>>>> www.dailymotion.com/swf/xr04b&v3=1&related=0"
>>>>>> type="application/x-shockwave-flash" width="520" height="411"
>>>>>> allowFullScreen="true" allowScriptAccess="always"></embed></object></
>>>>>> div>
>>>>>>
>>>>>> <p/>
>>>>>>
>>>>>> Note: this not the result of viewing the source code, this is how
>>>>>> the final
>>>>>> page looks like.
>>>>>>
>>>>>> I guess the problem is xwiki is not using the result of executing
>>>>>> the macro
>>>>>> as part of  the source code of the  page.
>>>>>>
>>>>>> I have also tried setting the "wiki" flag to true.
>>>>>>
>>>>>> Can anyone give me some piece of advice?
>>>>>
>>>>> The video macro you mention is a velocity macro written for the 1.0
>>>>> syntax and it thus generate HTML.
>>>>> Thus in syntax 2.0 you need to wrap it in the html macro.
>>>>>
>>>>> {{velocity}}{{html}}
>>>>> #video(....)
>>>>> {{/html}}{{/velocity}}
>>>>>
>>>>> In the future we'll either create a java macro for it or a wiki macro.
>>>>> For creating wiki macros, see:
>>>>> http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial
>>>>>
>>>>> This allows you to not have to add the includeMacros and it'll make
>>>>> the  macro avail in the wysiwyg editor too.
>>>>>
>
>
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to