diff --git a/client/Application.cfm b/client/Application.cfm index ddbd4f3..1e1b76c 100644 --- a/client/Application.cfm +++ b/client/Application.cfm @@ -38,7 +38,9 @@ The prefix is now dynamic in case 2 people want to run blog.cfc on the same mach - + + + @@ -132,13 +134,16 @@ The prefix is now dynamic in case 2 people want to run blog.cfc on the same mach + + - + + diff --git a/client/admin/stats.cfm b/client/admin/stats.cfm index 5c15434..ece9430 100644 --- a/client/admin/stats.cfm +++ b/client/admin/stats.cfm @@ -34,8 +34,8 @@ select count(email) as totalsubscribers - from tblblogsubscribers - where tblblogsubscribers.blog = + from #application.tableprefix#tblBlogSubscribers + where #application.tableprefix#tblBlogSubscribers.blog = and verified = 1 @@ -66,22 +66,22 @@ - select count(tblblogcomments.id) as totalcomments - from tblblogcomments, tblblogentries - where tblblogcomments.entryidfk = tblblogentries.id + select count(#application.tableprefix#tblBlogComments.id) as totalcomments + from #application.tableprefix#tblBlogComments, tblblogentries + where #application.tableprefix#tblBlogComments.entryidfk = tblblogentries.id and tblblogentries.blog = - and tblblogcomments.moderated = 1 + and #application.tableprefix#tblBlogComments.moderated = 1 select categoryid, categoryname, count(categoryidfk) as total - from tblblogcategories, tblblogentriescategories - where tblblogentriescategories.categoryidfk = tblblogcategories.categoryid - and tblblogcategories.blog = - group by tblblogcategories.categoryid, tblblogcategories.categoryname + from #application.tableprefix#tblBlogCategories, #application.tableprefix#tblBlogEntriesCategories + where #application.tableprefix#tblBlogEntriesCategories.categoryidfk = #application.tableprefix#tblBlogCategories.categoryid + and #application.tableprefix#tblBlogCategories.blog = + group by #application.tableprefix#tblBlogCategories.categoryid, #application.tableprefix#tblBlogCategories.categoryname order by total desc @@ -93,7 +93,7 @@ select top 10 - tblblogentries.id, tblblogentries.title, count(tblblogcomments.id) as commentcount + tblblogentries.id, tblblogentries.title, count(#application.tableprefix#tblBlogComments.id) as commentcount from tblblogentries, tblblogcomments where tblblogcomments.entryidfk = tblblogentries.id @@ -117,20 +117,20 @@ select top 10 - tblblogcategories.categoryid, - tblblogcategories.categoryname, + #application.tableprefix#tblBlogCategories.categoryid, + #application.tableprefix#tblBlogCategories.categoryname, count(tblblogcomments.id) as commentcount - from tblblogcategories, tblblogcomments, tblblogentriescategories - where tblblogcomments.entryidfk = tblblogentriescategories.entryidfk + from #application.tableprefix#tblBlogCategories, tblblogcomments, #application.tableprefix#tblBlogEntriesCategories + where tblblogcomments.entryidfk = #application.tableprefix#tblBlogEntriesCategories.entryidfk and rownum <= 10 - and tblblogentriescategories.categoryidfk = tblblogcategories.categoryid - and tblblogcategories.blog = + and #application.tableprefix#tblBlogEntriesCategories.categoryidfk = #application.tableprefix#tblBlogCategories.categoryid + and #application.tableprefix#tblBlogCategories.blog = and tblblogcomments.moderated = 1 - group by tblblogcategories.categoryid, tblblogcategories.categoryname + group by #application.tableprefix#tblBlogCategories.categoryid, #application.tableprefix#tblBlogCategories.categoryname order by commentcount desc @@ -143,7 +143,7 @@ select top 10 searchterm, count(searchterm) as total - from tblblogsearchstats + from #application.tableprefix#tblBlogSearchStats where blog = and rownum <= 10 diff --git a/client/org/camden/blog/blog.cfc b/client/org/camden/blog/blog.cfc index 9a7f1e1..bbb80bb 100644 --- a/client/org/camden/blog/blog.cfc +++ b/client/org/camden/blog/blog.cfc @@ -36,6 +36,7 @@ + @@ -83,6 +84,7 @@ + @@ -91,7 +93,11 @@ - + + + + + @@ -153,7 +159,7 @@ - insert into tblblogcategories(categoryid,categoryname,categoryalias,blog) + insert into #application.tableprefix#tblBlogCategories(categoryid,categoryname,categoryalias,blog) values( , , @@ -221,7 +227,7 @@ - insert into tblblogcomments(id,entryidfk,name,email,website,comments,posted,subscribe,moderated,killcomment,subscribeonly) + insert into #application.tableprefix#tblblogcomments(id,entryidfk,name,email,website,comments,posted,subscribe,moderated,killcomment,subscribeonly) values(, , , @@ -255,7 +261,7 @@ - update tblblogcomments + update #application.tableprefix#tblBlogComments set subscribe = 0 where entryidfk = and email = @@ -289,7 +295,7 @@ - insert into tblblogentries(id,title,body,posted + insert into #application.tableprefix#tblBlogEntries(id,title,body,posted ,morebody ,alias ,username,blog,allowcomments,enclosure,summary,subtitle,keywords,duration,filesize,mimetype,released,views,mailed) @@ -394,14 +400,14 @@ select email - from tblblogsubscribers + from #application.tableprefix#tblBlogSubscribers where email = and blog = - insert into tblblogsubscribers(email, + insert into #application.tableprefix#tblBlogSubscribers(email, token, blog, verified) @@ -432,7 +438,7 @@ select username - from tblusers + from #application.tableprefix#tblUsers where username = and blog = @@ -442,7 +448,7 @@ - insert into tblusers(username, name, password, blog, salt) + insert into #application.tableprefix#tblUsers(username, name, password, blog, salt) values( , , @@ -460,8 +466,8 @@ - update tblblogcomments - set moderated = + update #application.tableprefix#tblBlogComments + set moderated = @@ -481,14 +487,14 @@ select categoryidfk - from tblblogentriescategories + from #application.tableprefix#tblBlogEntriesCategories where categoryidfk = and entryidfk = - insert into tblblogentriescategories(categoryidfk,entryidfk) + insert into #application.tableprefix#tblBlogEntriesCategories(categoryidfk,entryidfk) values(,) @@ -518,7 +524,7 @@ select username, password, salt - from tblusers + from #application.tableprefix#tblusers where username = and blog = @@ -549,8 +555,8 @@ select categoryid - from tblblogcategories - where + from #application.tableprefix#tblBlogCategories + where categoryid = @@ -571,7 +577,7 @@ - update tblblogsubscribers + update #application.tableprefix#tblBlogSubscribers set verified = 1 where token = @@ -589,12 +595,12 @@ - delete from tblblogentriescategories + delete from #application.tableprefix#tblBlogEntriesCategories where categoryidfk = - delete from tblblogcategories + delete from #application.tableprefix#tblBlogCategories where categoryid = @@ -605,7 +611,7 @@ - delete from tblblogcomments + delete from #application.tableprefix#tblBlogComments where id = @@ -629,18 +635,18 @@ - delete from tblblogentries + delete from #application.tableprefix#tblblogentries where id = and blog = - - delete from tblblogentriescategories + + delete from #application.tableprefix#tblBlogEntriesCategories where entryidfk = - delete from tblblogcomments + delete from #application.tableprefix#tblblogcomments where entryidfk = @@ -652,16 +658,19 @@ - delete from tblusers + delete from #application.tableprefix#tblUsers where blog = and username = + + + @@ -673,13 +682,15 @@ - select tblblogentries.id - from tblblogentries - where tblblogentries.id = - and tblblogentries.blog = - - and posted < - and released = 1 + select #application.tableprefix#tblBlogEntries.id + from #application.tableprefix#tblBlogEntries + where #application.tableprefix#tblBlogEntries.id = + and #application.tableprefix#tblBlogEntries.blog = + + + and posted < + and released = 1 + @@ -790,7 +801,7 @@ - + #xmlFormat(instance.blogTitle)##xmlFormat(arguments.additionalTitle)# @@ -801,11 +812,20 @@ {LAST_BUILD_DATE} BlogCFC http://blogs.law.harvard.edu/tech/rss - #xmlFormat(instance.owneremail)# - #xmlFormat(instance.owneremail)# + + #(variables.utils.EmailAntiSpam(instance.owneremail))# + #(variables.utils.EmailAntiSpam(instance.owneremail))# + Copyright 2008-#year(now())#, DotComIt LLC + + #xmlFormat(instance.itunesKeywords)# + Technology/Software How-To + Technology/Tech News #xmlFormat(instance.itunesSubtitle)# #xmlFormat(instance.itunesSummary)# + + + @@ -849,11 +869,8 @@ #dateStr# #xmlFormat(makeLink(id))# - + + #xmlFormat(instance.owneremail)# (#xmlFormat(instance.itunesAuthor)#) @@ -890,15 +907,15 @@ - + - + - - - + + + select distinct @@ -910,8 +927,8 @@ to_char(#preserveSingleQuotes(posted)#, 'dd') as posted_day - from tblblogentries - where + from #application.tableprefix#tblBlogEntries + where #preserveSingleQuotes(posted)# >= and #preserveSingleQuotes(posted)# <= @@ -930,15 +947,15 @@ - SELECT MONTH(tblblogentries.posted) AS PreviousMonths, - YEAR(tblblogentries.posted) AS PreviousYears, - COUNT(tblblogentries.id) AS entryCount - FROM tblblogentries - WHERE tblblogentries.blog = + SELECT MONTH(#application.tableprefix#tblblogentries.posted) AS PreviousMonths, + YEAR(#application.tableprefix#tblblogentries.posted) AS PreviousYears, + COUNT(#application.tableprefix#tblblogentries.id) AS entryCount + FROM #application.tableprefix#tblblogentries + WHERE #application.tableprefix#tblblogentries.blog = - AND YEAR(tblblogentries.posted) >= #fromYear# + AND YEAR(#application.tableprefix#tblblogentries.posted) >= #fromYear# - GROUP BY YEAR(tblblogentries.posted), MONTH(tblblogentries.posted) + GROUP BY YEAR(#application.tableprefix#tblblogentries.posted), MONTH(#application.tableprefix#tblblogentries.posted) ORDER BY PreviousYears DESC, PreviousMonths DESC @@ -950,7 +967,7 @@ select id, role, description - from tblblogroles + from #application.tableprefix#tblblogroles @@ -980,39 +997,40 @@ - select tblblogcategories.categoryid, tblblogcategories.categoryname, tblblogcategories.categoryalias, count(tblblogentriescategories.entryidfk) as entryCount - from (tblblogcategories + select #application.tableprefix#tblBlogCategories.categoryid, #application.tableprefix#tblBlogCategories.categoryname, #application.tableprefix#tblBlogCategories.categoryalias, count(#application.tableprefix#tblBlogEntriesCategories.entryidfk) as entryCount + from (#application.tableprefix#tblBlogCategories left outer join - tblblogentriescategories ON tblblogcategories.categoryid = tblblogentriescategories.categoryidfk) - left join tblblogentries on tblblogentriescategories.entryidfk = tblblogentries.id - where tblblogcategories.blog = + #application.tableprefix#tblBlogEntriesCategories ON #application.tableprefix#tblBlogCategories.categoryid = #application.tableprefix#tblBlogEntriesCategories.categoryidfk) + left join #application.tableprefix#tblBlogEntries on #application.tableprefix#tblBlogEntriesCategories.entryidfk = #application.tableprefix#tblBlogEntries.id + where #application.tableprefix#tblBlogCategories.blog = - and isNull(tblblogentries.posted, '1/1/1900') < - and isNull(tblblogentries.released, 1) = 1 + and isNull(#application.tableprefix#tblBlogEntries.posted, '1/1/1900') < + and isNull(#application.tableprefix#tblBlogEntries.released, 1) = 1 - group by tblblogcategories.categoryid, tblblogcategories.categoryname, tblblogcategories.categoryalias - order by tblblogcategories.categoryname + group by #application.tableprefix#tblBlogCategories.categoryid, #application.tableprefix#tblBlogCategories.categoryname, #application.tableprefix#tblBlogCategories.categoryalias + order by #application.tableprefix#tblBlogCategories.categoryname - select tblblogcategories.categoryid, tblblogcategories.categoryname, tblblogcategories.categoryalias - from tblblogcategories - where tblblogcategories.blog = - order by tblblogcategories.categoryname + select #application.tableprefix#tblBlogCategories.categoryid, #application.tableprefix#tblBlogCategories.categoryname, + #application.tableprefix#tblBlogCategories.categoryalias + from #application.tableprefix#tblBlogCategories + where #application.tableprefix#tblBlogCategories.blog = + order by #application.tableprefix#tblBlogCategories.categoryname - select count(tblblogentriescategories.entryidfk) as total - from tblblogentriescategories, tblblogentries - where tblblogentriescategories.categoryidfk = - and tblblogentriescategories.entryidfk = tblblogentries.id - and tblblogentries.released = 1 + select count(#application.tableprefix#tblBlogEntriescategories.entryidfk) as total + from #application.tableprefix#tblBlogEntriescategories, #application.tableprefix#tblBlogEntries + where #application.tableprefix#tblBlogEntriescategories.categoryidfk = + and #application.tableprefix#tblBlogEntriescategories.entryidfk = #application.tableprefix#tblBlogEntries.id + and #application.tableprefix#tblBlogEntries.released = 1 @@ -1037,10 +1055,10 @@ - select tblblogcategories.categoryID, tblblogcategories.categoryname - from tblblogcategories, tblblogentriescategories - where tblblogcategories.categoryID = tblblogentriescategories.categoryidfk - and tblblogentriescategories.entryidfk = + select #application.tableprefix#tblBlogCategories.categoryID, #application.tableprefix#tblBlogCategories.categoryname + from #application.tableprefix#tblBlogCategories, #application.tableprefix#tblBlogEntriescategories + where #application.tableprefix#tblBlogCategories.categoryID = #application.tableprefix#tblBlogEntriescategories.categoryidfk + and #application.tableprefix#tblBlogEntriescategories.entryidfk = @@ -1052,7 +1070,7 @@ select categoryname, categoryalias - from tblblogcategories + from #application.tableprefix#tblBlogCategories where categoryid = and blog = @@ -1071,7 +1089,7 @@ select categoryid - from tblblogcategories + from #application.tableprefix#tblBlogCategories where categoryalias = and blog = @@ -1087,7 +1105,7 @@ select categoryid - from tblblogcategories + from #application.tableprefix#tblBlogCategories where categoryname = and blog = @@ -1103,7 +1121,7 @@ select id, entryidfk, name, email, website, comments, posted, subscribe, moderated, killcomment - from tblblogcomments + from #application.tableprefix#tblBlogComments where id = @@ -1125,7 +1143,7 @@ select count(id) as commentCount - from tblblogcomments + from #application.tableprefix#tblblogcomments where entryidfk = @@ -1157,34 +1175,34 @@ - select tblblogcomments.id, tblblogcomments.name, tblblogcomments.email, tblblogcomments.website, - tblblogcomments.commentto_char(tblblogcomments.comments) as comments, tblblogcomments.posted, tblblogcomments.subscribe, tblblogentries.title as entrytitle, tblblogcomments.entryidfk - from tblblogcomments, tblblogentries - where tblblogcomments.entryidfk = tblblogentries.id + select #application.tableprefix#tblBlogComments.id, #application.tableprefix#tblBlogComments.name, #application.tableprefix#tblBlogComments.email, #application.tableprefix#tblBlogComments.website, + #application.tableprefix#tblBlogComments.commentto_char(#application.tableprefix#tblBlogComments.comments) as comments, #application.tableprefix#tblBlogComments.posted, #application.tableprefix#tblBlogComments.subscribe, #application.tableprefix#tblBlogEntries.title as entrytitle, #application.tableprefix#tblBlogComments.entryidfk + from #application.tableprefix#tblBlogComments, #application.tableprefix#tblBlogEntries + where #application.tableprefix#tblBlogComments.entryidfk = #application.tableprefix#tblBlogEntries.id and ( - tblblogcomments.comment + #application.tableprefix#tblBlogComments.comment comments like or - tblblogcomments.name like + #application.tableprefix#tblBlogComments.name like ) - and tblblogcomments.entryidfk = + and #application.tableprefix#tblBlogComments.entryidfk = - and tblblogentries.blog = + and #application.tableprefix#tblBlogEntries.blog = - and tblblogcomments.moderated = 1 + and #application.tableprefix#tblBlogComments.moderated = 1 and (subscribeonly = 0 or subscribeonly is null) - order by tblblogcomments.posted #arguments.sortdir# + order by #application.tableprefix#tblBlogComments.posted #arguments.sortdir# @@ -1208,42 +1226,44 @@ hint="Returns one particular entry."> + + - + - select tblblogentries.id, tblblogentries.title, + select #application.tableprefix#tblBlogEntries.id, #application.tableprefix#tblBlogEntries.title, - dateAdd('h', #instance.offset#, tblblogentries.posted) as posted, + dateAdd('h', #instance.offset#, #application.tableprefix#tblBlogEntries.posted) as posted, - dateAdd(hh, #instance.offset#, tblblogentries.posted) as posted, + dateAdd(hh, #instance.offset#, #application.tableprefix#tblBlogEntries.posted) as posted, - tblblogentries.posted + (#instance.offset#/24) as posted, + #application.tableprefix#tblBlogEntries.posted + (#instance.offset#/24) as posted, - date_add(posted, interval #instance.offset# hour) as posted, + date_add(posted, interval #instance.offset# hour) as posted, - tblblogentries.body, - tblblogentries.morebody, tblblogentries.alias, tblusers.name, tblblogentries.allowcomments, - tblblogentries.enclosure, tblblogentries.filesize, tblblogentries.mimetype, tblblogentries.released, tblblogentries.mailed, - tblblogentries.summary, tblblogentries.keywords, tblblogentries.subtitle, tblblogentries.duration - from tblblogentries, tblusers - where tblblogentries.id = - and tblblogentries.blog = - and tblblogentries.username = tblusers.username + #application.tableprefix#tblBlogEntries.body, + #application.tableprefix#tblBlogEntries.morebody, #application.tableprefix#tblBlogEntries.alias, #application.tableprefix#tblUsers.name, #application.tableprefix#tblBlogEntries.allowcomments, + #application.tableprefix#tblBlogEntries.enclosure, #application.tableprefix#tblBlogEntries.filesize, #application.tableprefix#tblBlogEntries.mimetype, #application.tableprefix#tblBlogEntries.released, #application.tableprefix#tblBlogEntries.mailed, + #application.tableprefix#tblBlogEntries.summary, #application.tableprefix#tblBlogEntries.keywords, #application.tableprefix#tblBlogEntries.subtitle, #application.tableprefix#tblBlogEntries.duration + from #application.tableprefix#tblBlogEntries, #application.tableprefix#tblUsers + where #application.tableprefix#tblBlogEntries.id = + and #application.tableprefix#tblBlogEntries.blog = + and #application.tableprefix#tblBlogEntries.username = #application.tableprefix#tblUsers.username select categoryid,categoryname - from tblblogcategories, tblblogentriescategories - where tblblogentriescategories.entryidfk = - and tblblogentriescategories.categoryidfk = tblblogcategories.categoryid + from #application.tableprefix#tblBlogCategories, #application.tableprefix#tblBlogEntriescategories + where #application.tableprefix#tblBlogEntriescategories.entryidfk = + and #application.tableprefix#tblBlogEntriescategories.categoryidfk = #application.tableprefix#tblBlogCategories.categoryid @@ -1258,7 +1278,7 @@ - update tblblogentries + update #application.tableprefix#tblBlogEntries set views = views + 1 where id = @@ -1355,26 +1375,26 @@ - select tblblogentries.id - from tblblogentries, tblusers - ,tblblogentriescategories + select #application.tableprefix#tblblogentries.id + from #application.tableprefix#tblblogentries, #application.tableprefix#tblusers + ,#application.tableprefix#tblblogentriescategories where 1=1 - and tblblogentries.blog = - and tblblogentries.username = tblusers.username + and #application.tableprefix#tblblogentries.blog = + and #application.tableprefix#tblblogentries.username = #application.tableprefix#tblusers.username - and tblblogentries.blog = tblusers.blog + and #application.tableprefix#tblblogentries.blog = #application.tableprefix#tblusers.blog - and tblblogentries.posted >= + and #application.tableprefix#tblblogentries.posted >= - and day(dateAdd(hh, #instance.offset#, tblblogentries.posted)) + and day(dateAdd(hh, #instance.offset#, #application.tableprefix#tblblogentries.posted)) - and day(dateAdd('h', #instance.offset#, tblblogentries.posted)) + and day(dateAdd('h', #instance.offset#, #application.tableprefix#tblblogentries.posted)) and dayOfMonth(date_add(posted, interval #instance.offset# hour)) - and to_number(to_char(tblblogentries.posted + (#instance.offset#/24), 'dd')) + and to_number(to_char(#application.tableprefix#tblblogentries.posted + (#instance.offset#/24), 'dd')) = @@ -1385,56 +1405,56 @@ - and month(dateAdd(hh, #instance.offset#, tblblogentries.posted)) = + and month(dateAdd(hh, #instance.offset#, #application.tableprefix#tblblogentries.posted)) = - and month(dateAdd('h', #instance.offset#, tblblogentries.posted)) = + and month(dateAdd('h', #instance.offset#, #application.tableprefix#tblblogentries.posted)) = and month(date_add(posted, interval #instance.offset# hour)) = - and to_number(to_char(tblblogentries.posted + (#instance.offset#/24), 'MM')) = + and to_number(to_char(#application.tableprefix#tblblogentries.posted + (#instance.offset#/24), 'MM')) = - and year(dateAdd(hh, #instance.offset#, tblblogentries.posted)) = + and year(dateAdd(hh, #instance.offset#, #application.tableprefix#tblblogentries.posted)) = - and year(dateAdd('h', #instance.offset#, tblblogentries.posted)) = + and year(dateAdd('h', #instance.offset#, #application.tableprefix#tblblogentries.posted)) = and year(date_add(posted, interval #instance.offset# hour)) = - and to_number(to_char(tblblogentries.posted + (#instance.offset#/24), 'YYYY')) = - + and to_number(to_char(#application.tableprefix#tblblogentries.posted + (#instance.offset#/24), 'YYYY')) = + - and tblblogentries.title = + and #application.tableprefix#tblblogentries.title = - and tblblogentriescategories.entryidfk = tblblogentries.id - and tblblogentriescategories.categoryidfk in () + and #application.tableprefix#tblblogentriescategories.entryidfk = #application.tableprefix#tblblogentries.id + and #application.tableprefix#tblblogentriescategories.categoryidfk in () - and tblblogentries.username = + and #application.tableprefix#tblblogentries.username = - and (tblblogentries.title like '%#arguments.params.searchTerms#%' OR tblblogentries.body like '%#arguments.params.searchTerms#%' or tblblogentries.morebody like '%#arguments.params.searchTerms#%') + and (#application.tableprefix#tblblogentries.title like '%#arguments.params.searchTerms#%' OR #application.tableprefix#tblblogentries.body like '%#arguments.params.searchTerms#%' or #application.tableprefix#tblblogentries.morebody like '%#arguments.params.searchTerms#%') - and (lower(tblblogentries.title) like '%#lcase(arguments.params.searchTerms)#%' OR lower(tblblogentries.body) like '%#lcase(arguments.params.searchTerms)#%' or lower(tblblogentries.morebody) like '%#lcase(arguments.params.searchTerms)#%') + and (lower(#application.tableprefix#tblblogentries.title) like '%#lcase(arguments.params.searchTerms)#%' OR lower(#application.tableprefix#tblblogentries.body) like '%#lcase(arguments.params.searchTerms)#%' or lower(#application.tableprefix#tblblogentries.morebody) like '%#lcase(arguments.params.searchTerms)#%') - and tblblogentries.id = + and #application.tableprefix#tblblogentries.id = - and tblblogentries.alias = + and #application.tableprefix#tblblogentries.alias = - and to_char(tblblogentries.posted + (#instance.offset#/24), 'YYYY-MM-DD HH24:MI:SS') <= + and to_char(#application.tableprefix#tblblogentries.posted + (#instance.offset#/24), 'YYYY-MM-DD HH24:MI:SS') <= and posted < @@ -1445,7 +1465,7 @@ and released = - order by tblblogentries.#arguments.params.orderBy# #arguments.params.orderByDir# + order by #application.tableprefix#tblblogentries.#arguments.params.orderBy# #arguments.params.orderByDir# @@ -1464,40 +1484,37 @@ - select - tblblogentries.id, tblblogentries.title, - tblblogentries.alias, + select + #application.tableprefix#tblblogentries.id, #application.tableprefix#tblblogentries.title, + #application.tableprefix#tblblogentries.alias, - dateAdd('h', #instance.offset#, tblblogentries.posted) as posted, + dateAdd('h', #instance.offset#, #application.tableprefix#tblblogentries.posted) as posted, - dateAdd(hh, #instance.offset#, tblblogentries.posted) as posted, + dateAdd(hh, #instance.offset#, #application.tableprefix#tblblogentries.posted) as posted, - tblblogentries.posted + (#instance.offset#/24) as posted, + #application.tableprefix#tblblogentries.posted + (#instance.offset#/24) as posted, date_add(posted, interval #instance.offset# hour) as posted, - tblusers.name, tblblogentries.allowcomments, - tblblogentries.enclosure, tblblogentries.filesize, tblblogentries.mimetype, tblblogentries.released, tblblogentries.views, - tblblogentries.summary, tblblogentries.subtitle, tblblogentries.keywords, tblblogentries.duration - , tblblogentries.body, tblblogentries.morebody - from tblblogentries, tblusers - where - tblblogentries.id in () - and tblblogentries.blog = - and tblblogentries.username = tblusers.username - - and tblblogentries.blog = tblusers.blog - - order by tblblogentries.#arguments.params.orderBy# #arguments.params.orderByDir# + #application.tableprefix#tblusers.name, #application.tableprefix#tblblogentries.allowcomments, + #application.tableprefix#tblblogentries.enclosure, #application.tableprefix#tblblogentries.filesize, #application.tableprefix#tblblogentries.mimetype, #application.tableprefix#tblblogentries.released, #application.tableprefix#tblblogentries.views, + #application.tableprefix#tblblogentries.summary, #application.tableprefix#tblblogentries.subtitle, #application.tableprefix#tblblogentries.keywords, #application.tableprefix#tblblogentries.duration + , #application.tableprefix#tblblogentries.body, #application.tableprefix#tblblogentries.morebody + from #application.tableprefix#tblblogentries, #application.tableprefix#tblusers + where + #application.tableprefix#tblblogentries.id in () + and #application.tableprefix#tblblogentries.blog = + and #application.tableprefix#tblblogentries.username = #application.tableprefix#tblusers.username + order by #application.tableprefix#tblblogentries.#arguments.params.orderBy# #arguments.params.orderByDir# select count(id) as commentCount, entryidfk - from tblblogcomments - where entryidfk in () + from #application.tableprefix#tblblogcomments + where entryidfk in () and moderated = 1 @@ -1518,9 +1535,9 @@ select categoryid,categoryname - from tblblogcategories, tblblogentriescategories - where tblblogentriescategories.entryidfk = - and tblblogentriescategories.categoryidfk = tblblogcategories.categoryid + from #application.tableprefix#tblblogcategories, #application.tableprefix#tblblogentriescategories + where #application.tableprefix#tblblogentriescategories.entryidfk = + and #application.tableprefix#tblblogentriescategories.categoryidfk = #application.tableprefix#tblblogcategories.categoryid @@ -1692,44 +1709,44 @@ select distinct relatedid - from tblblogentriesrelated + from #application.tableprefix#tblBlogEntriesrelated where entryid = union select distinct entryid as relatedid - from tblblogentriesrelated + from #application.tableprefix#tblBlogEntriesrelated where relatedid = select - tblblogentries.id, - tblblogentries.title, - tblblogentries.posted, - tblblogentries.alias, - tblblogcategories.categoryname + #application.tableprefix#tblBlogEntries.id, + #application.tableprefix#tblBlogEntries.title, + #application.tableprefix#tblBlogEntries.posted, + #application.tableprefix#tblBlogEntries.alias, + #application.tableprefix#tblBlogCategories.categoryname from - (tblblogcategories - inner join tblblogentriescategories on - tblblogcategories.categoryid = tblblogentriescategories.categoryidfk) - inner join tblblogentries on - tblblogentriescategories.entryidfk = tblblogentries.id - where tblblogentries.id = - and tblblogentries.blog = + (#application.tableprefix#tblBlogCategories + inner join #application.tableprefix#tblBlogEntriescategories on + #application.tableprefix#tblBlogCategories.categoryid = #application.tableprefix#tblBlogEntriescategories.categoryidfk) + inner join #application.tableprefix#tblBlogEntries on + #application.tableprefix#tblBlogEntriescategories.entryidfk = #application.tableprefix#tblBlogEntries.id + where #application.tableprefix#tblBlogEntries.id = + and #application.tableprefix#tblBlogEntries.blog = - and tblblogentries.posted <= #createodbcdatetime(postedDate)# + and #application.tableprefix#tblblogentries.posted <= #createodbcdatetime(postedDate)# - and tblblogentries.posted <= + and #application.tableprefix#tblblogentries.posted <= - and to_char(tblblogentries.posted + (#instance.offset#/24), 'YYYY-MM-DD HH24:MI:SS') <= + and to_char(#application.tableprefix#tblblogentries.posted + (#instance.offset#/24), 'YYYY-MM-DD HH24:MI:SS') <= and posted < @@ -1780,29 +1797,29 @@ SELECT count(entryId) AS relatedEntryCount - FROM tblblogentriesrelated, tblblogentries - WHERE tblblogentriesrelated.entryID = tblblogentries.id - AND (tblblogentriesrelated.entryid = + FROM #application.tableprefix#tblblogentriesrelated, #application.tableprefix#tblblogentries + WHERE #application.tableprefix#tblblogentriesrelated.entryID = tblblogentries.id + AND (#application.tableprefix#tblblogentriesrelated.entryid = - OR tblblogentriesrelated.relatedid = + OR #application.tableprefix#tblblogentriesrelated.relatedid = ) - AND tblblogentries.posted <= #createodbcdatetime(postedDate)# + AND #application.tableprefix#tblblogentries.posted <= #createodbcdatetime(postedDate)# - AND tblblogentries.posted <= + AND #application.tableprefix#tblblogentries.posted <= - AND to_char(tblblogentries.posted + (#instance.offset#/24), 'YYYY-MM-DD HH24:MI:SS') <= + AND to_char(#application.tableprefix#.posted + (#instance.offset#/24), 'YYYY-MM-DD HH24:MI:SS') <= - AND tblblogentries.posted < + AND #application.tableprefix#tblblogentries.posted < - AND tblblogentries.released = 1 + AND #application.tableprefix#tblblogentries.released = 1 @@ -1814,21 +1831,21 @@ - select - tblblogcategories.categoryname, - tblblogentries.id, - tblblogentries.title, - tblblogentries.posted - from - tblblogentries inner join - (tblblogcategories inner join tblblogentriescategories on tblblogcategories.categoryid = tblblogentriescategories.categoryidfk) on - tblblogentries.id = tblblogentriescategories.entryidfk - - where tblblogcategories.blog = + select + #application.tableprefix#tblBlogCategories.categoryname, + #application.tableprefix#tblBlogEntries.id, + #application.tableprefix#tblBlogEntries.title, + #application.tableprefix#tblBlogEntries.posted + from + #application.tableprefix#tblBlogEntries inner join + (#application.tableprefix#tblBlogCategories inner join #application.tableprefix#tblBlogEntriescategories on #application.tableprefix#tblBlogCategories.categoryid = #application.tableprefix#tblBlogEntriescategories.categoryidfk) on + #application.tableprefix#tblBlogEntries.id = #application.tableprefix#tblBlogEntriescategories.entryidfk + + where #application.tableprefix#tblBlogCategories.blog = order by - tblblogcategories.categoryname, - tblblogentries.posted, - tblblogentries.title + #application.tableprefix#tblBlogCategories.categoryname, + #application.tableprefix#tblBlogEntries.posted, + #application.tableprefix#tblBlogEntries.title @@ -1849,7 +1866,7 @@ select email, token, verified - from tblblogsubscribers + from #application.tableprefix#tblBlogSubscribers where blog = and verified = 1 @@ -1878,18 +1895,18 @@ - select tblblogcomments.id, tblblogcomments.name, tblblogcomments.email, tblblogcomments.website, - tblblogcomments.commentto_char(tblblogcomments.comments) as comments, tblblogcomments.posted, tblblogcomments.subscribe, tblblogentries.title as entrytitle, tblblogcomments.entryidfk - from tblblogcomments, tblblogentries - where tblblogcomments.entryidfk = tblblogentries.id + select #application.tableprefix#tblBlogComments.id, #application.tableprefix#tblBlogComments.name, #application.tableprefix#tblBlogComments.email, #application.tableprefix#tblBlogComments.website, + #application.tableprefix#tblBlogComments.commentto_char(#application.tableprefix#tblBlogComments.comments) as comments, #application.tableprefix#tblBlogComments.posted, #application.tableprefix#tblBlogComments.subscribe, #application.tableprefix#tblBlogEntries.title as entrytitle, #application.tableprefix#tblBlogComments.entryidfk + from #application.tableprefix#tblBlogComments, #application.tableprefix#tblBlogEntries + where #application.tableprefix#tblBlogComments.entryidfk = #application.tableprefix#tblBlogEntries.id - and tblblogcomments.entryidfk = + and #application.tableprefix#tblBlogComments.entryidfk = - and tblblogentries.blog = + and #application.tableprefix#tblBlogEntries.blog = - and tblblogcomments.moderated = 0 - - order by tblblogcomments.posted #arguments.sortdir# + and #application.tableprefix#tblBlogComments.moderated = 0 + + order by #application.tableprefix#tblBlogComments.posted #arguments.sortdir# @@ -1953,16 +1970,16 @@ - select tblblogroles.id - from tblblogroles, tbluserroles, tblusers - where (tblblogroles.id = tbluserroles.roleidfk and tbluserroles.username = tblusers.username) + select #application.tableprefix#tblblogroles.id + from #application.tableprefix#tblblogroles, #application.tableprefix#tbluserroles, tblusers + where (#application.tableprefix#tblblogroles.id = #application.tableprefix#tbluserroles.roleidfk and #application.tableprefix#tbluserroles.username = tblusers.username) and tblusers.username = and tblusers.blog = - select tblblogroles.id - from tblblogroles - left join tbluserroles on tbluserroles.roleidfk = tblblogroles.id - left join tblusers on tbluserroles.username = tblusers.username + select #application.tableprefix#tblblogroles.id + from #application.tableprefix#tblblogroles + left join #application.tableprefix#tbluserroles on #application.tableprefix#tbluserroles.roleidfk = #application.tableprefix#tblblogroles.id + left join tblusers on #application.tableprefix#tbluserroles.username = tblusers.username where tblusers.username = and tblusers.blog = @@ -2003,7 +2020,7 @@ select id - from tblblogroles + from #application.tableprefix#tblblogroles where role = @@ -2012,7 +2029,7 @@ select id - from tblblogroles + from #application.tableprefix#tblblogroles where role = @@ -2036,8 +2053,8 @@ - delete from tblblogcomments - where killcomment = + delete from #application.tableprefix#tblBlogComments + where killcomment = @@ -2047,7 +2064,7 @@ - insert into tblblogsearchstats(searchterm, searched, blog) + insert into #application.tableprefix#tblBlogSearchStats(searchterm, searched, blog) values( , , @@ -2062,7 +2079,7 @@ - update tblblogentries + update #application.tableprefix#tblblogentries set views = views + 1 where id = @@ -2107,8 +2124,8 @@ To unsubscribe, please go to this URL: no subscribers. I don't think this is an issue though. ---> - update tblblogentries - set mailed = + update #application.tableprefix#tblBlogEntries + set mailed = @@ -2136,7 +2153,7 @@ To unsubscribe, please go to this URL: select categoryalias - from tblblogcategories + from #application.tableprefix#tblBlogCategories where categoryid = @@ -2195,7 +2212,7 @@ To unsubscribe, please go to this URL: select posted, alias - from tblblogentries + from #application.tableprefix#tblBlogEntries where id = @@ -2370,7 +2387,7 @@ To unsubscribe, please go to this URL: - delete from tblblogentriescategories + delete from #application.tableprefix#tblBlogEntriescategories where categoryidfk = and entryidfk = @@ -2382,7 +2399,7 @@ To unsubscribe, please go to this URL: - delete from tblblogentriescategories + delete from #application.tableprefix#tblBlogEntriescategories where entryidfk = @@ -2400,7 +2417,7 @@ To unsubscribe, please go to this URL: select email - from tblblogsubscribers + from #application.tableprefix#tblBlogSubscribers where email = and token = @@ -2409,7 +2426,7 @@ To unsubscribe, please go to this URL: - delete from tblblogsubscribers + delete from #application.tableprefix#tblBlogSubscribers where email = and token = @@ -2428,7 +2445,7 @@ To unsubscribe, please go to this URL: hint="Removes all subscribers who are not verified."> - delete from tblblogsubscribers + delete from #application.tableprefix#tblBlogSubscribers where blog = and verified = 0 @@ -2578,7 +2595,7 @@ To unsubscribe, please go to this URL: - update tblblogcomments + update #application.tableprefix#tblBlogComments set name = , email = , website = , @@ -2640,7 +2657,7 @@ To unsubscribe, please go to this URL: - update tblblogentries + update #application.tableprefix#tblBlogEntries set title = , body = @@ -2739,16 +2756,16 @@ To unsubscribe, please go to this URL: - delete from - tblblogentriesrelated - where + delete from + #application.tableprefix#tblBlogEntriesrelated + where entryid = insert into - tblblogentriesrelated( + #application.tableprefix#tblBlogEntriesrelated( entryid, relatedid ) values ( @@ -2802,7 +2819,7 @@ To unsubscribe, please go to this URL: - update tblblogcomments set moderated=1 where id= + update #application.tableprefix#tblblogcomments set moderated=1 where id= @@ -2815,14 +2832,14 @@ To unsubscribe, please go to this URL: - delete from tbluserroles + delete from #application.tableprefix#tbluserroles where username = and blog = - insert into tbluserroles(username, roleidfk, blog) + insert into #application.tableprefix#tbluserroles(username, roleidfk, blog) values( , , @@ -2843,7 +2860,7 @@ To unsubscribe, please go to this URL: select entryidfk - from tblblogcomments + from #application.tableprefix#tblBlogComments where id = and email = @@ -2852,7 +2869,7 @@ To unsubscribe, please go to this URL: - update tblblogcomments + update #application.tableprefix#tblBlogComments set subscribe = 0 where entryidfk = @@ -2875,7 +2892,7 @@ To unsubscribe, please go to this URL: select password, salt - from tblusers + from #application.tableprefix#tblusers where username = - update tblusers + update #application.tableprefix#tblusers set password = , salt = where username = @@ -2909,7 +2926,4 @@ To unsubscribe, please go to this URL: - - - diff --git a/client/org/camden/blog/downloadtracker.cfc b/client/org/camden/blog/downloadtracker.cfc new file mode 100644 index 0000000..7b34bcc --- /dev/null +++ b/client/org/camden/blog/downloadtracker.cfc @@ -0,0 +1,367 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #xmlFormat(instance.blogTitle)##xmlFormat(arguments.additionalTitle)# + #xmlFormat(instance.blogDescription)# + #xmlFormat(instance.blogURL)# + + + + + + + + + + + + + + + + + + + + #xmlFormat(title)# + ]*>","","ALL")) gte arguments.excerpt>#xmlFormat(left(REReplaceNoCase(body,"<[^>]*>","","ALL"),arguments.excerpt))#...#xmlFormat(body)# [More] + #xmlFormat(makeLink(id))# + #dateStr# + + + + #xmlFormat(catlist)# + + + + + + + ")> + + + + + + + + + + + + + #xmlFormat(instance.blogTitle)##xmlFormat(arguments.additionalTitle)# + #xmlFormat(instance.blogURL)# + #xmlFormat(instance.blogDescription)# + #replace(lcase(instance.locale),'_','-','one')# + #dateFormat(blogNow(),"ddd, dd mmm yyyy") & " " & timeFormat(blogNow(),"HH:mm:ss") & utcPrefix & numberFormat(z.utcHourOffset,"00") & "00"# + {LAST_BUILD_DATE} + BlogCFC + http://blogs.law.harvard.edu/tech/rss + + #(variables.utils.EmailAntiSpam(instance.owneremail))# + #(variables.utils.EmailAntiSpam(instance.owneremail))# + Copyright 2008, DotComIt LLC + + #xmlFormat(instance.itunesKeywords)# + Technology/Software How-To + Technology/Tech News + + #xmlFormat(instance.itunesSubtitle)# + #xmlFormat(instance.itunesSummary)# + + + + + + + + + + #xmlFormat(instance.itunesKeywords)# + #xmlFormat(instance.itunesAuthor)# + + #xmlFormat(instance.owneremail)# + #xmlFormat(instance.itunesAuthor)# + + + + #xmlFormat(instance.itunesImage)# + #xmlFormat(instance.blogTitle)# + #xmlFormat(instance.blogURL)# + + #xmlFormat(instance.itunesExplicit)# + + + + + + + + + #xmlFormat(title)# + #xmlFormat(makeLink(id))# + + + ]*>","","ALL")) gte arguments.excerpt> + #xmlFormat(left(REReplace(body,"<[^>]*>","","All"),arguments.excerpt))#... + #xmlFormat(body)# + [More] + + + + #xmlFormat(categories[currentRow][catid])# + + #dateStr# + #xmlFormat(makeLink(id))# + #xmlFormat(instance.owneremail)# (#xmlFormat(instance.itunesAuthor)#) + + + + + #xmlFormat(instance.itunesAuthor)# + #xmlFormat(instance.itunesExplicit)# + #xmlFormat(duration)# + #xmlFormat(keywords)# + #xmlFormat(subtitle)# + #xmlFormat(summary)# + + + + + + + + + + ")> + + + + + + +---> + + + + dateAdd('h', #instance.offset#, #application.tableprefix#tblBlogEntries.posted) as posted, + + dateAdd(hh, #instance.offset#, #application.tableprefix#tblBlogEntries.posted) as posted, + + #application.tableprefix#tblBlogEntries.posted + (#instance.offset#/24) as posted, + + date_add(posted, interval #instance.offset# hour) as posted, + + #application.tableprefix#tblBlogEntries.body, + #application.tableprefix#tblBlogEntries.morebody, #application.tableprefix#tblBlogEntries.alias, #application.tableprefix#tblUsers.name, #application.tableprefix#tblBlogEntries.allowcomments, + #application.tableprefix#tblBlogEntries.enclosure, #application.tableprefix#tblBlogEntries.filesize, #application.tableprefix#tblBlogEntries.mimetype, #application.tableprefix#tblBlogEntries.released, #application.tableprefix#tblBlogEntries.mailed, + #application.tableprefix#tblBlogEntries.summary, #application.tableprefix#tblBlogEntries.keywords, #application.tableprefix#tblBlogEntries.subtitle, #application.tableprefix#tblBlogEntries.duration + from #application.tableprefix#tblBlogEntries, #application.tableprefix#tblUsers + where #application.tableprefix#tblBlogEntries.id = + and #application.tableprefix#tblBlogEntries.blog = + and #application.tableprefix#tblBlogEntries.username = #application.tableprefix#tblUsers.username + + + + select categoryid,categoryname + from #application.tableprefix#tblBlogCategories, #application.tableprefix#tblblogentriescategories + where #application.tableprefix#tblblogentriescategories.entryidfk = + and #application.tableprefix#tblblogentriescategories.categoryidfk = #application.tableprefix#tblBlogCategories.categoryid + + + + + + + + + + + + + + + update #application.tableprefix#tblBlogEntries + set views = views + 1 + where id = + + + + + + ---> + + + + + + + + + + + + + insert into #application.tableprefix#tblblogenclosuredownloads(id,entryid,ipaddress,http_referrer, HTTP_USER_AGENT, downloaddate, downloadtime, enclosure,Path, online ) + values( + , + + null, + + , + + , + , + , + #createodbcdate(now())#, #createodbctime(now())#, + , + , + + ) + + + + + + + + + + + + + + + + SELECT TOP 100 PERCENT dbo.#application.tableprefix#tblBlogEntries.id, dbo.#application.tableprefix#tblBlogEntries.posted, dbo.#application.tableprefix#tblBlogEntries.title, COUNT(dbo.#application.tableprefix#tblblogenclosuredownloads.entryid) AS TotalDownloads + FROM dbo.#application.tableprefix#tblBlogEntries INNER JOIN + dbo.#application.tableprefix#tblblogenclosuredownloads ON dbo.#application.tableprefix#tblBlogEntries.id = dbo.#application.tableprefix#tblblogenclosuredownloads.entryid + where dbo.#application.tableprefix#tblblogenclosuredownloads.downloaddate between #createodbcdate(startdate)# and #createodbcdate(enddate)# + GROUP BY dbo.#application.tableprefix#tblBlogEntries.id, dbo.#application.tableprefix#tblBlogEntries.posted, dbo.#application.tableprefix#tblBlogEntries.title + ORDER BY dbo.#application.tableprefix#tblBlogEntries.posted, dbo.#application.tableprefix#tblBlogEntries.title + + + + + + + + + + + + + + + select count(ad_MediaLog.MediaLogID) as totalviews, ad_Media.MediaText, ad_Media.Description + from ad_MediaLog, ad_Media + where ( ad_MediaLog.DateDisplayed between #createodbcdate(startdate)# and #createodbcdate(enddate)# ) and + ad_media.mediaID = ad_MediaLog.MediaID + group by ad_Media.MediaText, ad_Media.Description + + + + + + + + + + \ No newline at end of file diff --git a/client/org/camden/blog/page.cfc b/client/org/camden/blog/page.cfc index 94668f9..c509c3c 100644 --- a/client/org/camden/blog/page.cfc +++ b/client/org/camden/blog/page.cfc @@ -23,14 +23,14 @@ - delete from tblblogpages + delete from #application.tableprefix#tblblogpages where id = and blog = - delete from tblblogpagescategories + delete from #application.tableprefix#tblblogpagescategories where pageidfk = @@ -44,9 +44,9 @@ select tblblogcategories.categoryID, tblblogcategories.categoryname - from tblblogcategories, tblblogpagescategories - where tblblogcategories.categoryID = tblblogpagescategories.categoryidfk - and tblblogpagescategories.pageidfk = + from tblblogcategories, #application.tableprefix#tblblogpagescategories + where tblblogcategories.categoryID = #application.tableprefix#tblblogpagescategories.categoryidfk + and #application.tableprefix#tblblogpagescategories.pageidfk = @@ -58,7 +58,7 @@ select id, blog, title, alias, body, showlayout - from tblblogpages + from #application.tableprefix#tblblogpages where id = and blog = @@ -83,7 +83,7 @@ select id, blog, title, alias, body, showlayout - from tblblogpages + from #application.tableprefix#tblblogpages where alias = and blog = @@ -105,7 +105,7 @@ select id, blog, title, alias, body, showlayout - from tblblogpages + from #application.tableprefix#tblblogpages where blog = order by title asc @@ -127,7 +127,7 @@ - insert into tblblogpages(id, title, alias, body, blog, showlayout) + insert into #application.tableprefix#tblblogpages(id, title, alias, body, blog, showlayout) values( , , @@ -141,7 +141,7 @@ - update tblblogpages + update #application.tableprefix#tblblogpages set title = , alias = , @@ -154,13 +154,13 @@ - delete from tblblogpagescategories + delete from #application.tableprefix#tblblogpagescategories where pageidfk = - insert into tblblogpagescategories(pageidfk,categoryidfk) + insert into #application.tableprefix#tblblogpagescategories(pageidfk,categoryidfk) values( , diff --git a/client/org/camden/blog/textblock.cfc b/client/org/camden/blog/textblock.cfc index 1575f30..aa3c392 100644 --- a/client/org/camden/blog/textblock.cfc +++ b/client/org/camden/blog/textblock.cfc @@ -31,7 +31,7 @@ - delete from tblblogtextblocks + delete from #application.tableprefix#tblblogtextblocks where id = and blog = @@ -45,7 +45,7 @@ select id, label, body - from tblblogtextblocks + from #application.tableprefix#tblblogtextblocks where blog = and label = @@ -70,7 +70,7 @@ select id, label, body - from tblblogtextblocks + from #application.tableprefix#tblblogtextblocks where blog = and label = @@ -84,7 +84,7 @@ select id, label, body - from tblblogtextblocks + from #application.tableprefix#tblblogtextblocks where blog = order by label asc @@ -101,7 +101,7 @@ - insert into tblblogtextblocks(id, label, body, blog) + insert into #application.tableprefix#tblblogtextblocks(id, label, body, blog) values( , , @@ -113,7 +113,7 @@ - update tblblogtextblocks + update #application.tableprefix#tblblogtextblocks set label = , body = diff --git a/client/org/camden/blog/utils.cfc b/client/org/camden/blog/utils.cfc index 5c213e4..9229eff 100644 --- a/client/org/camden/blog/utils.cfc +++ b/client/org/camden/blog/utils.cfc @@ -92,4 +92,221 @@ + + +/** + * When given an email address this function will return the address in a format safe from email harvesters. + * Minor edit by Rob Brooks-Bilson (rbils@amkor.com) + * Update now converts all characters in the email address to unicode, not just the @ symbol. (by author) + * + * @param EmailAddress Email address you want to make safe. (Required) + * @param Mailto Boolean (Yes/No). Indicates whether to return formatted email address as a mailto link. Default is No. (Optional) + * @return Returns a string + * @author Seth Duffey (rbils@amkor.comsduffey@ci.davis.ca.us) + * @version 2, May 2, 2002 + */ + function EmailAntiSpam(EmailAddress) { + var i = 1; + var antiSpam = ""; + for (i=1; i LTE len(EmailAddress); i=i+1) { + antiSpam = antiSpam & "&##" & asc(mid(EmailAddress,i,1)) & ";"; + } + if ((ArrayLen(Arguments) eq 2) AND (Arguments[2] is "Yes")) return "" & antiSpam & ""; + else return antiSpam; + } + + + + + + ','all')> + + + + + + + function titleCase(str) { + return uCase(left(str,1)) & right(str,len(str)-1); + } + +/** +* Tests passed value to see if it is a valid e-mail address (supports subdomain nesting and new top-level domains). +* Update by David Kearns to support ' +* SBrown@xacting.com pointing out regex still wasn't accepting ' correctly. +* More TLDs +* Version 4 by P Farrel, supports limits on u/h +* Added mobi +* v6 more tlds +* +* @param str The string to check. (Required) +* @return Returns a boolean. +* @author Jeff Guillaume (SBrown@xacting.comjeff@kazoomis.com) +* @version 6, July 29, 2008 +* Note this is different from CFLib as it has the "allow +" support +*/ + function isEmail(str) { + return (REFindNoCase("^['_a-z0-9-]+(\.['_a-z0-9-]+)*(\+['_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,3})|(aero|asia|biz|cat|coop|info|museum|name|jobs|post|pro|tel|travel|mobi))$",arguments.str) AND len(listGetAt(arguments.str, 1, "@")) LTE 64 AND + len(listGetAt(arguments.str, 2, "@")) LTE 255) IS 1; + } + + function isLoggedIn() { + return structKeyExists(session,"loggedin"); + } + +/** + * An "enhanced" version of ParagraphFormat. + * Added replacement of tab with nonbreaking space char, idea by Mark R Andrachek. + * Rewrite and multiOS support by Nathan Dintenfas. + * + * @param string The string to format. (Required) + * @return Returns a string. + * @author Ben Forta (ben@forta.com) + * @version 3, June 26, 2002 + */ + function ParagraphFormat2(str) { +//first make Windows style into Unix style + str = replace(str,chr(13)&chr(10),chr(10),"ALL"); +//now make Macintosh style into Unix style + str = replace(str,chr(13),chr(10),"ALL"); +//now fix tabs + str = replace(str,chr(9),"   ","ALL"); +//now return the text formatted in HTML + return replace(str,chr(10),"
","ALL"); + } + +/** + * A quick way to test if a string is a URL + * + * @param stringToCheck The string to check. + * @return Returns a boolean. + * @author Nathan Dintenfass (nathan@changemedia.com) + * @version 1, November 22, 2001 + */ + function isURL(stringToCheck){ + return REFindNoCase("^(((https?:|ftp:|gopher:)\/\/))[-[:alnum:]\?%,\.\/&##!@:=\+~_]+[A-Za-z0-9\/]$",stringToCheck) NEQ 0; + } + +/** + * Converts a byte value into kb or mb if over 1,204 bytes. + * + * @param bytes The number of bytes. (Required) + * @return Returns a string. + * @author John Bartlett (jbartlett@strangejourney.net) + * @version 1, July 31, 2005 + */ + function KBytes(bytes) { + var b=0; + + if(arguments.bytes lt 1024) return trim(numberFormat(arguments.bytes,"9,999")) & " bytes"; + + b=arguments.bytes / 1024; + + if (b lt 1024) { + if(b eq int(b)) return trim(numberFormat(b,"9,999")) & " KB"; + return trim(numberFormat(b,"9,999.9")) & " KB"; + } + b= b / 1024; + if (b eq int(b)) return trim(numberFormat(b,"999,999,999")) & " MB"; + return trim(numberFormat(b,"999,999,999.9")) & " MB"; + } + +/* copied from soundings UDFs + to deal with the merging of the two apps +*/ + function arrayDefinedAt(arr,pos) { + var temp = ""; + try { + temp = arr[pos]; + return true; + } + catch(coldfusion.runtime.UndefinedElementException ex) { + return false; + } + catch(coldfusion.runtime.CfJspPage$ArrayBoundException ex) { + return false; + } + } + request.udf.arrayDefinedAt = arrayDefinedAt; + +
+ + + + + + + var inputReturn = arguments.input; + var pattern = ""; + var urlMatches = structNew(); + var inputCopy = arguments.input; + var result = ""; + var rightStart = ""; + var rightInputCopyLen = ""; + var targetNameMax = ""; + var targetLinkName = ""; + var i = ""; + + pattern = "(((https?:|ftp:|gopher:)\/\/)|(www\.|ftp\.))[-[:alnum:]\?%,\.\/&##!;@:=\+~_]+[A-Za-z0-9\/]"; + + while (len(inputCopy)) { + result = refind(pattern,inputCopy,1,'true'); + if (result.pos[1]){ + match = mid(inputCopy,result.pos[1],result.len[1]); + urlMatches[match] = ""; + rightStart = result.len[1] + result.pos[1]; + rightInputCopyLen = len(inputCopy)-rightStart; + if (rightInputCopyLen GT 0){ + inputCopy = right(inputCopy,rightInputCopyLen); + } else break; + } else break; + } + +//convert back to array + urlMatches = structKeyArray(urlMatches); + + targetNameMax = arguments.linkmax; + for (i=1; i LTE arraylen(urlMatches);i=i+1) { + targetLinkName = urlMatches[i]; + if (len(targetLinkName) GTE targetNameMax) { + targetLinkName = left(targetLinkName,targetNameMax) & "..."; + } + inputReturn = replace(inputReturn,urlMatches[i],'#targetLinkName#',"all"); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install/updater5.9.8.001/index.cfm b/install/updater5.9.8.001/index.cfm index e35adef..512f0df 100644 --- a/install/updater5.9.8.001/index.cfm +++ b/install/updater5.9.8.001/index.cfm @@ -7,7 +7,7 @@ 1. Choose hash and salt algorithms 2. Get DSN information 3. Validate database hasn't already been converted - 4. Change the length of the password field in tblusers table from 50 to 256 for MySQL, MSSQL, and Oracle or 255 for MSACCESS + 4. Change the length of the password field in tblUsers table from 50 to 256 for MySQL, MSSQL, and Oracle or 255 for MSACCESS 5. Add a new field called Salt to the tblusers table (256 varchar for MySQL, MSSQL, and Oracle or 255 text for MSACCESS) 6. Generate random Salt and hash the passwords for every user in the table 7. Update the blogcfc.ini.cfm with the crypto info used. @@ -131,7 +131,7 @@ dbname="blogCFC" name="myDSN" type="Columns" - table="tblusers"> + table="#application.tableprefix#tblUsers"> @@ -175,7 +175,7 @@ - ALTER TABLE `tblusers` CHANGE COLUMN `password` `password` VARCHAR(256) NULL DEFAULT NULL ; + ALTER TABLE `#application.tableprefix#tblUsers` CHANGE COLUMN `password` `password` VARCHAR(256) NULL DEFAULT NULL ; @@ -188,7 +188,7 @@ - ALTER TABLE `tblusers` ADD COLUMN `salt` VARCHAR(256) NULL DEFAULT NULL AFTER `password` ; + ALTER TABLE `#application.tableprefix#tblUsers` ADD COLUMN `salt` VARCHAR(256) NULL DEFAULT NULL AFTER `password` ; @@ -204,15 +204,15 @@ - ALTER TABLE tblusers + ALTER TABLE #application.tableprefix#tblUsers ADD salt varchar(256) NULL; - ALTER TABLE tblusers + ALTER TABLE #application.tableprefix#tblUsers ALTER COLUMN password varchar(256); - Unable to modify tblusers. + Unable to modify #application.tableprefix#tblUsers. @@ -223,7 +223,7 @@ ALTER TABLE - tblusers + #application.tableprefix#tblUsers MODIFY ( password VARCHAR2(256) NULL @@ -242,7 +242,7 @@ ALTER TABLE - tblusers + #application.tableprefix#tblUsers ADD ( salt VARCHAR2(256) NULL @@ -265,7 +265,7 @@ - ALTER TABLE tblusers + ALTER TABLE #application.tableprefix#tblUsers ALTER COLUMN Password TEXT(255) @@ -279,7 +279,7 @@ - ALTER TABLE tblusers + ALTER TABLE #application.tableprefix#tblUsers ADD COLUMN Salt TEXT(255) @@ -321,14 +321,14 @@ SELECT username, blog, password - from tblusers + from #application.tableprefix#tblUsers - UPDATE tblusers + UPDATE #application.tableprefix#tblUsers SET password = , salt = WHERE username = diff --git a/readme.md b/readme.md index 26fc511..0726388 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,19 @@ **Updates to BlogCFC** + +**2018/12/28 Update 2**: + +* Merged in my own BlogCFC Extension. + * Created download tracker code for tracking and reporting on enclosure downloads + * Added a tableprefix= config property. This is if you want to add a prefix to the table name and will be appended to all queries. If you use this, then you won't be able to use the SQL Generate scripts or the install/update package. + * Added BlogDBName argument to blog.cfc init. This refers to name of the blog in the database and allows you to use different db names in the config file vs the database. + * Added isAvailable argument to blog.cfc entryexists() and getEntry(). If passed in as true, will allow an entry to exist even if it is not available yet + * Tweaked RSS 2.0 generation to add media tags; I think this supports podcasting platforms other than iTunes. + * Added a bunch more functions to utils--don't remember what they are all used for. + +**ToDo**: +I still need to add scripts for the relevant new tables info. + **2018/12/28**: Since the project hasn't had an update in ages, I probably won't bother to try to do PRs back to the main branch, but decided to stick with BlogCFC for the moment for my own personal blog. @@ -16,4 +30,6 @@ I added a new property to the `blog.ini.cfm`: maxentriesadmin=10 -This allows you to show a different number of posts in the client UI compare to a different number of posts in the admin. \ No newline at end of file +This allows you to show a different number of posts in the client UI compare to a different number of posts in the admin. + +