Twitter Mod 2.0
[CREATE]
TWEETS
REPLYID#VARCHAR(10)#NOTNULL##
TOPICID#VARCHAR(10)#NOTNULL##
FORUMID#VARCHAR(10)#NOTNULL##
CATID#VARCHAR(10)#NOTNULL##
TWITTERID#VARCHAR(20)#NOTNULL##
[END]Dim objWshShell : Set objWshShell = Server.CreateObject("WScript.Shell")
m_intOffsetMinutes = objWshShell.RegRead("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
Set objWshShell = Nothingm_intOffsetMinutes = 420<!--#INCLUDE FILE="TwitterMOD/twitter/twitter.asp" -->
<!--#INCLUDE FILE="TwitterMOD/ShortURL.asp" -->
<%
Dim blnTweet
if MethodType = "Edit" or _
MethodType = "EditTopic" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "Topic" or _
MethodType = "TopicQuote" then
if MethodType <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_TOPIC_AUTH, " &_
"T.T_STATUS, T.T_AUTHOR, T.T_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F, " &_
strActivePrefix & "TOPICS T" &_
" WHERE C.CAT_ID = T.CAT_ID " &_
" AND F.FORUM_ID = T.FORUM_ID " &_
" AND T.TOPIC_ID = " & Topic_ID & ""
else
'## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_TOPIC_AUTH " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F" &_
" WHERE C.CAT_ID = F.CAT_ID " &_
" AND F.FORUM_ID = " & Forum_ID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result fLang(strLangPost_Info00030), 0
else
blnTweet = rsStatus("F_TOPIC_AUTH")
blnCStatus = rsStatus("CAT_STATUS")
strCatTitle = rsStatus("CAT_NAME")
blnFStatus = rsStatus("F_STATUS")
Forum_ID = rsStatus("FORUM_ID")
Forum_Type = rsStatus("F_TYPE")
strForum_Title = rsStatus("F_SUBJECT")
if MethodType <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
strTopicAuthor = rsStatus("T_AUTHOR")
strTopicTitle = rsStatus("T_SUBJECT")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if'## Twitter Mod ##
if MethodType = "Topic" then
strReturnURL = "topic.asp?TOPIC_ID=" & NewTopicID
strReturnTxt = fLang(strLangPost_Info00770)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & NewTopicID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
elseif MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & NewReplyID
strReturnTxt = fLang(strLangPost_Info00780)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (REPLYID, TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & NewReplyID & "', '" & Topic_ID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
elseif MethodType = "EditTopic" then
strReturnURL = "topic.asp?TOPIC_ID=" & Topic_ID
strReturnTxt = fLang(strLangPost_Info00780)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & Topic_ID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
elseif MethodType = "Edit" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & Reply_ID
strReturnTxt = fLang(strLangPost_Info00780)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (REPLYID, TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & Reply_ID & "', '" & Topic_ID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
else
strReturnURL = chkString(Request.Form("refer"),"refer")
strReturnTxt = fLang(strLangBack_Forum00010)
end if
if blnTweet = 1 then
Dim strTweetURL, strBitURL, strTweetID
if instr(strTweetURL,"http") then
strTweetURL = strReturnURL
else
strTweetURL = strForumURL & strReturnURL
end if
strBitURL = " " & BitLy(strTweetURL)
strTweetID = Tweet(mid(txtMessage, 1, 140 - Len(strBitURL)) & strBitURL)
strSql = strSql & strTweetID & "')"
my_Conn.execute(strSql)
end if
'## End Twitter Mod ##strTweetID = Tweet(mid(txtMessage, 1, 140 - Len(strBitURL)) & strBitURL)
strTweetID = Tweet(mid(txtMessage, 1, 138 - Len(strBitURL) - Len(strDBNTUserName)) & " " & strDBNTUserName & " " & strBitURL)<!--#INCLUDE FILE="TwitterMOD/twitter/twitter.asp" -->
<!--#INCLUDE FILE="TwitterMOD/ShortURL.asp" -->
<%
Dim blnTweet
if MethodType = "Edit" or _
MethodType = "EditTopic" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "Topic" or _
MethodType = "TopicQuote" then
if MethodType <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_PRIVATEFORUMS, " &_
"T.T_STATUS, T.T_AUTHOR, T.T_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F, " &_
strActivePrefix & "TOPICS T" &_
" WHERE C.CAT_ID = T.CAT_ID " &_
" AND F.FORUM_ID = T.FORUM_ID " &_
" AND T.TOPIC_ID = " & Topic_ID & ""
else
'## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_PRIVATEFORUMS " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F" &_
" WHERE C.CAT_ID = F.CAT_ID " &_
" AND F.FORUM_ID = " & Forum_ID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result fLang(strLangPost_Info00030), 0
else
blnTweet = rsStatus("F_PRIVATEFORUMS")
blnCStatus = rsStatus("CAT_STATUS")
strCatTitle = rsStatus("CAT_NAME")
blnFStatus = rsStatus("F_STATUS")
Forum_ID = rsStatus("FORUM_ID")
Forum_Type = rsStatus("F_TYPE")
strForum_Title = rsStatus("F_SUBJECT")
if MethodType <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
strTopicAuthor = rsStatus("T_AUTHOR")
strTopicTitle = rsStatus("T_SUBJECT")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if'## Twitter Mod ##
if MethodType = "Topic" then
strReturnURL = "topic.asp?TOPIC_ID=" & NewTopicID
strReturnTxt = fLang(strLangPost_Info00770)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & NewTopicID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
elseif MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & NewReplyID
strReturnTxt = fLang(strLangPost_Info00780)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (REPLYID, TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & NewReplyID & "', '" & Topic_ID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
elseif MethodType = "EditTopic" then
strReturnURL = "topic.asp?TOPIC_ID=" & Topic_ID
strReturnTxt = fLang(strLangPost_Info00780)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & Topic_ID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
elseif MethodType = "Edit" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & Reply_ID
strReturnTxt = fLang(strLangPost_Info00780)
strSql = "INSERT INTO " & strTablePrefix & "TWEETS (REPLYID, TOPICID, CATID, FORUMID, TWITTERID) VALUES ('" & Reply_ID & "', '" & Topic_ID & "', '" & Cat_ID & "', '" & Forum_ID & "', '"
else
strReturnURL = chkString(Request.Form("refer"),"refer")
strReturnTxt = fLang(strLangBack_Forum00010)
end if
if blnTweet = 0 then
Dim strTweetURL, strBitURL, strTweetID
if instr(strTweetURL,"http") then
strTweetURL = strReturnURL
else
strTweetURL = strForumURL & strReturnURL
end if
strBitURL = " " & BitLy(strTweetURL)
strTweetID = Tweet(mid(txtMessage, 1, 140 - Len(strBitURL)) & strBitURL)
strSql = strSql & strTweetID & "')"
my_Conn.execute(strSql)
end if
'## End Twitter Mod ##strTweetID = Tweet(strDBNTUserName & ": " & mid(txtMessage, 1, 137 - Len(strBitURL) - Len(strDBNTUserName)) & " " & strBitURL)<!--#INCLUDE FILE="ShortURL.asp"-->
<%
response.write BitLy("http://fixonefree.com")
%>
Originally posted by iane87Is this still ok to install? What exactly does it do? I am getting more and more information via twitter and was looking for a good way to incorporate it to my forum. Thanks!
Twitter MOD 2.0 has been released...