###########################################################################
# FAO Forum Mod 1.0 for ServerHacker Portal - Snitz2000 Forums #
# Original Mod idea & coding by: Duane Wingett - dibley@globalnet.co.uk #
###########################################################################
Please feel free to use or modify this mod, or redistribute this code as part of
another mod. Please do ensure that any relevant work of mine is acredited to :
Dibley (Duane Wingett). Thank you.
Description:
This mod allows the admin to designate which forum will be the FAO forum from the admin area.
Then if any member posts a message with another member's username in the subject header of
a topic in this designated forum, the next time the member who the message is for logs on
a notificataion will be visible near their private Message notification area.
Difficulty of mod installation:
- Easy.
Files in this Zipfile:
- admin_fao_forum.asp
- Readme.txt (This file)
Requirements:
- Private Message Mod ( or somewhere else to position the FAO notification)
WARNING:
- Please note that I do not take any responsibilty for any lose or damage caused
by installation or attempted installation of all or any of these files. I do
not take any responsibilty for the accuracy or completeness of these instructions
- Any line numbers quoted in this document are approximate. They will vary depending
upon what mods are already present in your forum.
- I do not make excuses for the way any of my .asp code is written. I am not a .asp
web developer, more of a .asp enthusiast!
- Please be aware that depending on where the code is inserted you may have to change
the prior line of code to end with
& vbNewLine
rather than
& vbNewLine & _
- You may also need to add a Response.Write in front of the " on the lines that follow the insertion.
FRIENDLY ADVICE:
1. BACKUP any important files relating to the files in this mod, ie your forum's original copyof the files which require modification.
2. TEST this mod on your TEST forum first.
Installation Procedure:
1. Unzip all files into a temporary folder.
2. Copy the following files to your main forum directory.
- admin_fao_forum.asp
3a. Edit Config.asp and at approximately line 130 insert
Dim strFaoForum_ID '<-- FAO Forum MOD
3b. and at approximately line 410 insert
strFaoForum_ID = Application(strCookieURL & "STRFAOFORUM_ID") '<-- FAO Forum MOD
4. Edit privatemess.asp to add notification to the main pages.
At around line 225 after
else
Response.Write "[No active topics ] " & vbNewline
end if
Response.Write "</font>" & vbNewline
add...
'## Start FAO Mod ##
'## Get FAO Message count from DB
'## Forum_SQL
Dim FAO_Count
If strDBType = "access" then
strSql = "SELECT COUNT(" & strMemberTablePrefix & "TOPICS.TOPIC_ID) AS [FAO_COUNT] "
Else
strSql = "SELECT COUNT(" & strMemberTablePrefix & "TOPICS.TOPIC_ID) AS FAO_COUNT "
End if
'## Gives list of topics since last visit.
strSql = strSql & "FROM " & strMemberTablePrefix & "TOPICS "
strSql = strSql & "WHERE " & strMemberTablePrefix & "TOPICS.FORUM_ID = " & strFaoForum_ID & " "
strSql = strSql & "AND " & strMemberTablePrefix & "TOPICS.T_SUBJECT Like '%" & strDBNTUserName & "%' "
strSql = strSql & "AND " & strTablePrefix & "TOPICS.T_LAST_POST > '"& Session(strCookieURL & "last_here_date") & "'"
strSql = strSql & ";"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn
If Not rs.EOF Then
FAO_Count = rs("FAO_COUNT")
Else
FAO_Count = 0
End If
rs.close
set rs = nothing
'## End Getting number of FAOs from DB
'## Display FAOs for current member
Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewline
if FAO_Count > 0 then
Response.Write "[ There is <span class=""spnMessageText""><a href=""forum.asp?FORUM_ID=" & strFaoForum_ID& """><b>" & FAO_Count & "</b> new "
if FAO_Count = 1 then
Response.Write "FAO"
else
Response.Write "FAOs"
end if
Response.Write "</a></span> for you ] " & vbNewline
else
Response.Write "[No new FAOs for you ] " & vbNewline
end if
Response.Write "</font>" & vbNewline
'## End FAO Mod ##
Before
end if
end if
5. Edit admin_home.asp to add the chart admin link to the main admin page.
At around line 165 add...
" <!-## Begin FAO MOD Code ##-->" & vbNewLine & _
" <LI><span class=""spnMessageText""><a href=""admin_fao_forum.asp"">Config FAO Forum</a></span></LI>" & vbNewLine & _
" <!-## End FAO MOD Code ##-->" & vbNewLine & _
6. Create a forum for use as the FAO forum
7. Log into the Admin section and setup the FAO forum configuration to point to the FAO forum you have just created.
I hope some one finds this litle mod useful. Enjoy.
-------------------------------------------------------------------
The mod zipfile may be download from:
http://www.users.globalnet.co.uk/~dibley/mods/FaoMod.zip