Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 SkyDrive support

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
MarcelG Posted - 21 March 2008 : 02:27:58
I've created a mod for SkyDrive support (http://oxle.com/topic.asp?tid=5177) and I am willing to make it into a documented mod if someone thinks it's a useful mod.

Please let me know what you think.<
3   L A T E S T    R E P L I E S    (Newest First)
philsbbs Posted - 23 March 2008 : 19:57:29
keep me posted<
MarcelG Posted - 21 March 2008 : 06:12:51
Okay, in short.
To the function FormatStr, add this line: fString = ReplaceSkyDriveTags(fString)

Old code
if strAllowForumCode = "1" then
		fString = extratags(fString)
		end if

New code
if strAllowForumCode = "1" then
		fString = extratags(fString)
		fString = ReplaceSkyDriveTags(fString)
	end if

The function itself, also to be added to inc_func_common.asp:
Function ReplaceSkyDriveTags(fString)
 	Dim oTag, cTag
 	Dim roTag, rcTag
 	Dim oTagPos, cTagPos
 	Dim nTagPos
 	Dim counter1, counter2
 	Dim strCodeText
 	Dim Tagcount
 	Dim strTempString, strResultString
 	TagCount = 2
  	Dim CodeTags(2,2,2)
 	Dim strArray, strArray2

 	CodeTags(1,1,1) = "[skydrive]"
	CodeTags(1,2,1) = "[/skydrive]"

	'function EmbedFLV(URL, width, height, menu, quality, bg, bg2, nav, fcolor, bcolor, lcolor, autostart)
	'only url is entered in the post, the rest is up to us
	CodeTags(1,1,2) = "<div><iframe scrolling=""no"" marginheight=""0"" marginwidth=""0"" frameborder=""0"" style=""width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;"" src="""
	CodeTags(1,2,2) = """></iframe></div>"

 	CodeTags(2,1,1) = "[SKYDRIVE]"
 	CodeTags(2,2,1) = "[/SKYDRIVE]"
 	CodeTags(2,1,2) = CodeTags(1,1,2)
 	CodeTags(2,2,2) = CodeTags(1,2,2)

 	strResultString = ""
 	strTempString = fString

 	for counter1 = 1 to TagCount

 		oTag   = CodeTags(counter1,1,1)
 		roTag  = CodeTags(counter1,1,2)
 		cTag   = CodeTags(counter1,2,1)
 		rcTag  = CodeTags(counter1,2,2)
 		oTagPos = InStr(1, strTempString, oTag, 1)
 		cTagPos = InStr(1, strTempString, cTag, 1)

 		if (oTagpos > 0) and (cTagPos > 0) then
 		 	strArray = Split(strTempString, oTag, -1)
 		 	for counter2 = 0 to Ubound(strArray)
 		 		if (Instr(1, strArray(counter2), cTag) > 0) then
 		 			strArray2 = split(strArray(counter2), cTag, -1)
					strCodeText = trim(strArray2(0))
					if lcase(left(strCodeText,7)) <> "http://" then 'embed code used
					strCodeText= mid(strCodeText, instr(strCodeText,"http://"), (instr(strCodeText,"""></iframe")-instr(strCodeText,"http://")))
					end if
					strCodeText = replace(strCodeText, "/self.aspx/","/embedrowdetail.aspx/")
					strCodeText = replace(strCodeText, "/embedgrid.aspx/","/embedrowdetail.aspx/")
					if instr(strCodeText,"/embedrow.aspx/") > 0 then
					roTag = Replace(roTag, "height:66px;","height:26px;")
					end if 
 					if instr(strCodeText,",") > 0 or _
	 					instr(strCodeText,")") >0 or _
	 					instr(strCodeText,"(") >0 or _
	 					instr(strCodeText,";") >0 or _
	 					instr(strCodeText,"""") >0 or _
	 					instr(strCodeText,"<") >0 or _
	 					instr(strCodeText,">") >0 or _
	 					instr(strCodeText,"[") >0 or _
	 					instr(strCodeText,"]") >0 or _
	 					instr(strCodeText,",") >0 then
 					strCodeText = "illegal"
 					end if
 		 			strResultString = strResultString & roTag & strCodeText & rcTag & strArray2(1)
 		 		else
 		 			strResultString = strResultString & strArray(counter2)
 		 		end if	
 		 	next  

			strTempString = strResultString
 			strResultString = ""
 		end if
	next

	ReplaceSkyDriveTags = strTempString
end function

The modification to the function ChkURLs in inc_func_common.asp, to prevent the urls between the tags from being handled:
old code:
				(UCase(Right(strArray(Counter-1), 5)) <> "[IMG]") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[URL]") and _

New code:
				(UCase(Right(strArray(Counter-1), 5)) <> "[IMG]") and _
				(UCase(Right(strArray(Counter-1), 10)) <> "[SKYDRIVE]") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[URL]") and _

That should be it.

The function itself needs to have some checks in it to make sure only a valid Skydrive.live.com URL is entered.
I'll work on that this weekend.

<
balexandre Posted - 21 March 2008 : 06:00:27
and why not...?

count me on if you need any help... here is the icon and the javascript for using [ skydrive ] [ /skydrive ] tags



inc_iconfiles.asp ADD
Const strIconSkyDrive = "icon_SKYDRIVE.gif|23|22"


inc_code.js ADD
// Microsoft Sky Drive
function skydrive() {
	var text = getText();
	if (helpstat){
		alert("Microsoft Sky Drive.\n\nUSE: [skydrive]Microsoft Sky Drive URL[/skydrive]");
	} else if (basic) {
		AddTxt=" [skydrive]" + text + "[/skydrive]";
		AddText(AddTxt);
	} else {
		if (text) {
			txt=prompt("Microsoft Sky Drive URL",text);
		} else {
			txt=prompt("Microsoft Sky Drive URL","Text");
		}
		if(txt!=null) {
			AddTxt=" [skydrive] "+txt+" [/skydrive]";
			AddText(AddTxt);
		}
	}
}


inc_post_buttons.asp ADD

Response.Write "<a href=""Javascript:skydrive();"" tabindex=""-1"">" & getCurrentIcon(strIconSkyDrive,"Insert SkyDrive File","align=""top""") & "</a>"



Now, all I missed was the right line numbers, and of course inc_func_common.asp...

All we need is you magic in that file <

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000 Version 3.4.07