Need Help Writing Function - Postet den (6907 Views)
Senior Member
leatherlips
Innlegg: 1838
1838
I'm working on a new mod for my forum but am having trouble writing the function in inc_func_common.asp.
I think I'm getting close to making this work but need some help.
I'm basically working on a new [media] tag. What you do is place a url to virtually any video from YouTube, Dailmotion, Vimeo or any site like that and it will open in a lightbox style pop up. It will also open swf files, mp3 files, flv files, images... just about anything.
Here is what I have so far...
I know there is already a Online Video MOD but I would like to write a new one that is able to be more robust.
Anyone willing to help me on this?
   
 Sidestørrelse 
Postet den
Senior Member
leatherlips
Innlegg: 1838
1838
I think I got it! I may write this up as a mod if anyone has an interest in it.
Postet den
Average Member
Panhandler
Innlegg: 783
783
It looks good. . .I'd be interested in trying it out.
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Looks nice. I'll be happy to play with it, myself.
Postet den
Senior Member
leatherlips
Innlegg: 1838
1838
Great! Sometime over the weekend I'll post what I have and maybe you guys could help me improve it.
Postet den
Junior Member
phoenixtaz13
Innlegg: 129
129
good day to all..... :)

any update on this?.....
Postet den
Senior Member
leatherlips
Innlegg: 1838
1838
I kind of let this go. I'll post what I have done in the next week or so during my break.
Postet den
Senior Member
leatherlips
Innlegg: 1838
1838
I finally got around to putting this together although it is still in BETA. You can get it from here:

http://www.snitzbitz.com/mods/details.asp?Version=All&mid=317

Please post any issues or fixes here so I can take it out of beta.
Thanks! smile
Postet den
Advanced Member
Etymon
Innlegg: 2396
2396
This looks promising! Thank you for the hard work leatherlips!
Postet den
Advanced Member
Etymon
Innlegg: 2396
2396
I have some code for you ...
See how your MOD looks here: http://www.rba-licking.com/topic.asp?TOPIC_ID=53
(this is a temporary post for the purpose of this reply - will be deleted later)

Play with a mock test post here: http://www.rba-licking.com/post.asp?method=Topic&FORUM_ID=33

Use the following icon (on the web site above) to insert a file into the [media][/media] tags:
Use the following .swf file (from the American Sign Language web site) to test the MOD:
http://www.aslpro.com/religious/f/forgiveness.swf


Additional MOD Code:

Reminder Note: Remember to include your .js files in inc_header_short.asp as well.

inc_code.js
Code:
function mediabox() {
var text = getText();
if (helpstat) {
alert("Media Tag plays various media formats.\n\nUSE: [media]http://www.domaingoeshere.com/media.swf[/media]");
} else if (basic) {
AddTxt="[media]" + text + "[/media]";
AddText(AddTxt);
} else {
if (text) {
txt=prompt("URL Link to media file.",text);
} else {
txt=prompt("URL Link to media file.","Text");
}
if (txt!=null) {
AddTxt="[media]"+txt+"[/media]";
AddText(AddTxt);
}
}
}


inc_iconfiles.asp
Code:
Const strIconEditorMediaBox = "icon_editor_media_box.gif|23|22"

inc_post_buttons.asp
Code:
		Response.Write     "<a href=""Javascript:mediabox();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorMediaBox,"Insert Media","align=""top""") & "</a>" & vbNewLine


mediaboxAdv_1.1.6.js
Code:
//          playerpath: 'http://www.yoursite.com/forum/media/player.swf', // Path to the mediaplayer.swf or flvplayer.swf file
playerpath: '<% =strForumURL %>', // Path to the mediaplayer.swf or flvplayer.swf file

Code:

//          NBpath: 'http://www.yoursite.com/forum/media/NonverBlaster.swf', // Path to NonverBlaster.swf
NBpath: '<% =strFourmURL %>media/NonverBlaster.swf', // Path to NonverBlaster.swf


inc_func_common.asp
If you want force the Play Media link to flow in a sentence next to other text as in the following example:

My Media - Play Media
... instead of ...
My Media -
Play Media

... then alter the original MOD code like the code below:

Code:
'   CodeTags(1,1,2) = "<div><script language=""javascript"">EmbedMedia("""
' CodeTags(1,2,2) = """,290,300,false)</script></div><div></div>"

CodeTags(1,1,2) = "<script language=""javascript"">EmbedMedia("""
CodeTags(1,2,2) = """,290,300,false)</script>"

Postet den
Junior Member
Giumer
Innlegg: 163
163
hi all i am have installad this mod look this topic http://www.giumer.it/forum/topic.asp?TOPIC_ID=173 only 1 info for firefox not look ? or iam not good instalation ? thx ! sorry for me english
=======================
http://www.Giumer.it/forum

=======================
Du må legge inn en melding