%
'EasyBlogAsp - Version 1.0
'Copyright 2002 hampton-smith sam@hampton-smith.com
'PHP, Flash, ASP and Perl from http://www.dotdragnet.co.uk/
'Downloaded from http://www.blogopedia.co.uk/
'This script is copyright 2002, sam@hampton-smith.com www.hampton-smith.com
'Licensed to Blogopedia in 2002
'COPYRIGHT NOTICE
'Copyright 2002 hampton-smith.com All Rights Reserved.
'Copyright 2002 Blogopedia All Rights Reserved
'This script may be used and modified free of charge by anyone so long as this copyright notice and the comments above remain intact. By using this script and its associated files, you agree to indemnify hampton-smith, Blogopedia and all other interested parties from any liability that might arise from it's use.
'Selling the code for this program without prior written consent is expressly forbidden. Obtain permission before redistributing this script over the Internet or in any other medium. In all cases copyright and header must remain intact.
'Without express permission from hampton-smith or Blogopedia, you may under no circumstances remove the link to www.blogopedia.co.uk from the pages that this script creates.
'We also request that should you make any improvements to this script, please be kind enough to let us know so that I may improve the Blogopedia version for the rest of the people who use it.
' ##################################################################
' ##################################################################
' ## ##
' ## CUSTOMISING THIS CODE TO MAKE USE OF SPECIFIC "BLOG" CODE ##
' ## ##
' ## This script has been designed to be upgradable, see below ##
' ## ##
' ##################################################################
' ##################################################################
' The following two functions, blogencode and blogdecode allow
' you to customise this script to replace certain elements of
' any blogs posted with an equivilent code. For example you could
' introduce a standard piece of text into the blog by simply putting:
' "[standard]" - but you need to add a couple of lines to the functions
' to acheive this.
'
' For example you could add to the function blogencode:
'
' thestring=replace(thestring, "[standard]", "This is some standard text")
'
' this would mean every place in your blog you put [standard]
' it will be replaced with the text "this is some standard text"
' NOTE: You should also include the reverse code in blogdecode
' to return the entry to how you entered it should you wish to edit
'
' thestring=replace(thestring, "This is some standard text", "[standard]")
'
' This action reverses the original "encoding", and will make for
' easier edits.
'
'
'
' ##################################################################
' ##################################################################
' ## ##
' ## THE FOLLOWING FUNCTIONS ALLOW FOR IMPLEMENTATION OF BLOGCODE ##
' ## ALTER THESE FUNCTIONS AT YOUR OWN RISK! ##
' ## ##
' ##################################################################
' ##################################################################
function blogencode(thestring)
' the following prevent the script from breaking when particular
' characters are used - do not remove!
thestring=Replace(thestring, """", """)
thestring=Replace(thestring, "'", "'")
thestring=Replace(thestring, "%", "%")
thestring=Replace(thestring, "*", "*")
thestring=Replace(thestring, vbcrlf, "
")
thestring=encodesmileys(thestring)
blogencode=thestring
end function
' ######## RETURN
TO VB CARRIAGE RETURNS FOR FORMS #########
function blogdecode(thestring)
thestring=decodesmileys(thestring)
thestring=Replace(thestring, "
", vbcrlf)
blogdecode=thestring
end function
' ##################################################################
' ##################################################################
' DO NOT ALTER BELOW THIS LINE
' ##################################################################
' ##################################################################
function encodesmileys(thestring)
blogfile = Server.MapPath("smileys.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objCountFile = objFSO.OpenTextFile(blogfile, 1, True)
news = objCountFile.ReadAll
objCountFile.Close
Set objCountFile = Nothing
Set objFSO = Nothing
smileycount=Split(news, "**")
For i=1 to Ubound(smileycount)
breakout=split(smileycount(i), "%%%")
thestring=replace(thestring, breakout(1), "
")
Next
encodesmileys=thestring
End Function
function decodesmileys(thestring)
blogfile = Server.MapPath("smileys.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objCountFile = objFSO.OpenTextFile(blogfile, 1, True)
news = objCountFile.ReadAll
objCountFile.Close
Set objCountFile = Nothing
Set objFSO = Nothing
smileycount=Split(news, "**")
For i=1 to Ubound(smileycount)
breakout=split(smileycount(i), "%%%")
thestring=replace(thestring, "
", breakout(1))
Next
decodesmileys=thestring
End Function
Sub toptable
%>
<%
End Sub
Sub topadtable
%>
<%
End Sub
Function passwordchecker()
URL = Request.ServerVariables("SCRIPT_NAME")
if request.form("button") = "log-out" then
session("password")=""
session("logon")=""
end if
if session("logon") = "true" and session("password")=password then
' session set ok, load page
session("logon")="true"
session("password")=password
displaypage
else
if request.form("password") = "" then
' form not posted and session not set, display logon box
displaylogon
else
' something posted, check it
session("password") = request.form("password")
if session("password") = password then
' session set ok, load page
session("logon")="true"
displaypage
else
displaylogon
end if
end if
end if
End function
function displaylogout()
%>
|
|
<%
end function
function displaylogon()
topadtable
%>
|
|
<%
bottomadtable
end function
%>