Using video/flash in topics? - نوشته شده در (30140 Views)
Retired Support Moderator
MarcelG
مطلب: 2625
2625
I've been fiddling around with some javascript to circumvent the Eolas patents which will change IE very soon. Based on those javascript functions I decided to create some additional forumcode that allows users to embed video/flash directly in their posts, at least in IE and on Windows.
demo: http://oxle.com/topic.asp?tid=3392 (it looks differently when your logged in/not logged in, so you can use demo/demo to log in).
Update 20-02-2006: Installation guide & fix for non-oxle code forums is available at http://oxle.com/topic.asp?tid=3437<
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Moderator
AnonJr
مطلب: 5768
5768
Given that I'm working on a band's website, working with video and flash is always a welcome addition. Count me in as anxiously waiting. bigsmile<
نوشته شده در
Junior Member
Helterskelter
مطلب: 331
331
Very good.....
Just made me late for work, watching all the clips though......<
نوشته شده در
Senior Member
tribaliztic
مطلب: 1532
1532
Yes, videos in topics would be cool.. That way the users could comment the videos also. Now I use the Classifieds Mod that I modified to show files in different categories but then there is no comments. It's very secure though.. There is NO way to link to the files from another server =)
<
/Tribaliztic
- www.gotlandrace.se -
نوشته شده در
Retired Support Moderator
MarcelG
مطلب: 2625
2625
I've just discovered that the method I'm currenlty using is not very safe, and an easy target for cross site scripting attacks. I'll focus on getting this straight before releasing it as a mod out in the open. If you want you can have a look at the source at oxle (login demo/demo)
http://oxle.com/source.asp?page=embedding.js (look at the last 4 functions)
http://oxle.com/scoure.asp?page=inc_func_common.asp (look at the function extratags)
The input syntax for the embedding is like this:
urltowmvfile[/wmv;">
The outpoutsyntax for the embedded video is this:
<script language="javascript">EmbedWMVideoT("urltowmvfile",320,240,false);</script>
This is handled by the extratags function. However, I just tried the following:
[wmv]urltowmvfile",480,320,true,"false[/wmv]
And, indeed inc_func_common.asp interpreted the code like this:
<script language="javascript">EmbedWMVideoT("urltowmvfile",480,320,true,"false",320,240,false);</script>
The last 4 parameters are completely ignored by the functions : Result ; a video that's 480 pixels wide, and 320 tall, and that autostarts...sad
I think I need to find a method that strips the comma's from the input, breaking the embedding.
Update I updated the functions to stop as soon as there are more than the required parameters. I now just need to prevent access to other functions. For instance, this works too:
[wmv]bla");EmbedWMVideo("MU",800,600,"true");//[/wmv;"><
نوشته شده در
Support Moderator
Shaggy
مطلب: 6780
6780
Quickest way would be to filter out the double quote, which is an illegal character for Windows filenames anyway wink
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
نوشته شده در
Retired Support Moderator
MarcelG
مطلب: 2625
2625
I think I fixed it. Instead of using the extratags function, I created 4 seperate functions ; ReplaceWMVTags, ReplaceQTTags, ReplaceVMATags and ReplaceFlashTags. These functions are constructed like this:
In these functions, I check if the part between the tags contains an illegal character ( ,()"; ) and if so, I replace the entire part between the tags with the text "illegal". This value is then parsed in the javascript function, which gives stops the execution of the function, and gives an error message back. Demo: http://oxle.com/topic.asp?tid=3393 (login demo/demo).
More details:
http://oxle.com/source.asp?page=embedding.js (look at the last 4 functions)
http://oxle.com/source.asp?page=inc_func_common.asp (look at the 4 functions mentioned above)

Perhaps someone knows a more clever way of handling these tags, so all input is appreciated!<
نوشته شده در
Retired Support Moderator
MarcelG
مطلب: 2625
2625
Created installation guide for this mod: http://oxle.com/topic.asp?tid=3437<
نوشته شده در
Forum Moderator
AnonJr
مطلب: 5768
5768
Wow. I've definatly got to try this when I get home.<
نوشته شده در
Senior Member
tribaliztic
مطلب: 1532
1532
I'm gonna try this one today! Thanks alot Marcel! <
/Tribaliztic
- www.gotlandrace.se -
نوشته شده در
Senior Member
tribaliztic
مطلب: 1532
1532
Is there any way to have an icon or something on forum.asp that show if there is an embedded video in the topic? I think it would be nice to those with a slow connection =)
<
/Tribaliztic
- www.gotlandrace.se -
شما باید یک متن وارد کنید