changelog.txt 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667
  1. Changes by Jacob Barkdull 2017-04-09
  2. --------------------------------------------------------------------------------
  3. * Added new language setting option
  4. - Setting the `$language` setting to 'auto' will now cause HashOver to
  5. detect and use the system's locale. This is now the default.
  6. * Added new public `$usesUserTimezone` setting
  7. - This setting controls whether the comment dates use the server's
  8. timezone or the user's local timezone. This is only possible in
  9. JavaScript mode, not PHP mode.
  10. * Added new public `$countIncludesDeleted` setting
  11. - This setting controls whether deleted comments are included in the
  12. standard comment count as well as in the count used in the
  13. "Show X Other Comments" hyperlink.
  14. * Return of the "Popular Comments" section!
  15. - This feature has been nonfunctional since the introduction of AJAX
  16. support. It is now functional again.
  17. * Fixed comment ownership issues
  18. - When posting a comment while logged out or editing an existing
  19. comment and changing the name, the AJAX returned comment was not
  20. displaying the "Edit" button or indicating proper ownership. This is
  21. now fixed, though may see more improvements.
  22. * Changed date permalink URLs
  23. - Permalink URLs now include a relative path along with the fragment in
  24. order to exclude the HashOver form specific URL queries.
  25. * Changed `$collapsesUI` setting behavior
  26. - Previously, the button used to display the HashOver UI was the same
  27. button used to display all comments when `$collapsesComments` is
  28. enabled. This caused a few problems, and so is no longer the case.
  29. The behavior is now such that clicking the button simply displays the
  30. HashOver UI as it would be display be displayed with the
  31. `$collapsesUI` setting disabled.
  32. - Fixed button not being displayed when there are no comments.
  33. - Other minor improvements.
  34. * Added message area explaining what HTML and Markdown is allowed in comments.
  35. * Fixed incorrect `comment-needed` locale being displayed for failed replies.
  36. * XML and JSON comment files now use OS specific line endings.
  37. * Removed form position from locales; we don't always know where the form is.
  38. * Default theme: Removed padding from reply form, the bubble is now the form.
  39. * Default theme: Added some simple style to the optional form labels.
  40. * Default theme: Improved styling of messages.
  41. * The "Accepted HTML" form title has been split into two separate locales.
  42. * Improved message timeouts, they are now separated by form type.
  43. * Added innerHTML as allowed HTMLTag attribute for creation by array.
  44. * Added "mobile" and "tablet" keywords to mobile device detection regex.
  45. * Changed the text for some of the optional form labels.
  46. * The long format of comment post dates and times is now localized.
  47. * The comment post date and time formats are now fully configurable.
  48. * Renamed CSS class `hashover-sort-count` back to `hashover-count-sort`.
  49. * Added accepted Markdown string to all locales.
  50. * Other small bug fixes.
  51. Changes by Jacob Barkdull 2017-04-04
  52. --------------------------------------------------------------------------------
  53. * Default theme: Now using border-box everywhere.
  54. * Fixed: Locale text left unescaped in login field titles.
  55. Changes by Jacob Barkdull 2017-03-25
  56. --------------------------------------------------------------------------------
  57. * Fixed uncaught syntax error in AJAX response.
  58. * Improved how HashOver accesses its loader script.
  59. Changes by Jacob Barkdull 2017-03-24
  60. --------------------------------------------------------------------------------
  61. * No longer escaping Unicode in "JSON to coding standard" function.
  62. * Fixed possible XSS vulnerabilities.
  63. * Now using PHP's hideous namespacing.
  64. * Avatar bug fix and improvements.
  65. Changes by Jacob Barkdull 2017-03-21
  66. --------------------------------------------------------------------------------
  67. * Fixed error messages failing to redirect user back to comment form.
  68. * Added Chinese locale by Mr. Q and Takeman.
  69. Changes by Jacob Barkdull 2017-03-19
  70. --------------------------------------------------------------------------------
  71. * `Locales` class renamed to `Locale`.
  72. * Renamed public `locale` method of `Locale` class to `get`.
  73. * Renamed public `$locale` property of `Locale` class to `text`.
  74. * Added new public `set` method to `Locale` class.
  75. Changes by Jacob Barkdull 2017-03-11
  76. --------------------------------------------------------------------------------
  77. * Locales now adds C slashes by default.
  78. * Fixed Strict Mode uncaught syntax error.
  79. * Now requiring instead of including setup PHP files.
  80. Changes by Jacob Barkdull 2017-02-25
  81. --------------------------------------------------------------------------------
  82. * hashover/scripts/setup.php
  83. - Added type checking to JSON settings loading process.
  84. - Added allowed domain name check in referer checking.
  85. - Now assuming false in referer check.
  86. * hashover/scripts/hashover.php
  87. - public function `getCommentCount` now returns a string value instead
  88. of setting the value of the public `$commentCount` property.
  89. * hashover/scripts/javascript-mode.php
  90. - When comments are collapsed the more link now uses the comment count.
  91. - Now using the alternative syntax for control structures in PHP code
  92. nested within the JavaScript code. This is easier to read, however,
  93. all nested PHP code in the JavaScript will be removed eventually.
  94. - Now using the like/dislike count returned by the `like.php` AJAX
  95. request, removing the need for the JavaScript code to handle
  96. increasing and decreasing the like/dislike count, and allowing the
  97. code to know if the request executed successfully. Additionally, an
  98. error message is now displayed to the user under rare circumstances.
  99. * hashover/scripts/settings.php
  100. - Added new public boolean `$collapsesUI` setting.
  101. Previously named `$initialHide`, this sets whether the entire comment
  102. form, thread, and end links are collapsed. The standard link used to
  103. display the collapsed comments will be displayed, clicking the link
  104. will load all of the comments. In the future, this behavior may
  105. change to display the collapsed comments instead of loading them all
  106. or -- once pagination is implemented -- to display the first page.
  107. - Added new public array `$allowedDomains` setting.
  108. This setting allows you list what domains are allowed to remotely
  109. load the HashOver script files. This is useful for loading HashOver
  110. files located on a web host with PHP from another host without PHP,
  111. or loading HashOver files located on a subdomain from the top level
  112. of a website. Please use this format '*.example.com'.
  113. - public `$setCookies` setting renamed to `$setsCookies`.
  114. * hashover/scripts/htmltag.php
  115. - Switched singleton and pretty print parameter order.
  116. - Allow more characters in tag and attribute names.
  117. - Added new method for creating attributes from a given array.
  118. - Added new method for appending text to attributes from a given array.
  119. - Allow creating attributes when object is instantiated.
  120. - Small performance improvements.
  121. * hashover/scripts/htmloutput.php
  122. - Reduced code base size by ~12.1%
  123. - Small performance improvements.
  124. * hashover/api/rss.php
  125. - Code tags are now converted to pre tags to ensure proper whitespace.
  126. * hashover/scripts/like.php
  127. - This file now returns JSON data containing a like and/or dislike
  128. count or an error message under rare circumstances.
  129. - Main code moved into a function.
  130. - Removed most instances of `exit`.
  131. - Added code comments
  132. * Added: <big>, <em>, <small>, <strong>, <sub> and <sup> as allowed HTML tags.
  133. * Added code to check for PHP extensions HashOver depends on.
  134. * Added error messages for missing PHP extensions.
  135. * Added language specific reusable code for generating error messages.
  136. * Added "Status" locale string to all locales.
  137. * Removed CSS class `hashover-edit` in favor of `hashover-comment-edit`.
  138. * Renamed CSS class `hashover-count-sort` to `hashover-sort-count`.
  139. * Improved support for multiple line ending styles in comment files.
  140. * Improved JSON data format support.
  141. * Minor locale improvements.
  142. * Small code improvements.
  143. Changes by Jacob Barkdull 2016-01-05
  144. --------------------------------------------------------------------------------
  145. * hashover/scripts/javascript-mode.php
  146. - Updated Copyright year.
  147. - Small code changes.
  148. * Added: Danish translation by Jacob Moen.
  149. * Merged: Further improvements to German locale.
  150. * Changed "Be the first to comment!" to "No comments yet." in all locales.
  151. * Now hiding unused comment text of "No comments yet." notice.
  152. Changes by Jacob Barkdull 2016-01-02
  153. --------------------------------------------------------------------------------
  154. * Merged: New public `$setCookies` setting for enabling and disabling cookies.
  155. * Merged: Improvements to German locale.
  156. Changes by Jacob Barkdull 2016-12-03
  157. --------------------------------------------------------------------------------
  158. * Now using MCRYPT_DEV_URANDOM instead of MCRYPT_RAND.
  159. * Small CSS changes.
  160. Changes by Jacob Barkdull 2016-10-28
  161. --------------------------------------------------------------------------------
  162. * Added loading indicator to embedded images.
  163. * Fixed: Loading indicator not showing on "Show X Other Comments" link.
  164. * Fixed: User being logged in as Anonymous when posting a comment.
  165. * Fixed: Use Japanese ellipsis.
  166. * Small improvements to multibyte support.
  167. * Other small changes.
  168. Changes by Jacob Barkdull 2016-09-20
  169. --------------------------------------------------------------------------------
  170. * Allow admin to change comment moderation status when editing comments.
  171. * Allow admin to view and edit comments marked as deleted.
  172. * Allow admin to edit all applicable comment information, not just the body.
  173. * Differentiate between deleted, marked deleted, and unreadable comments.
  174. * Small improvements to support for multibyte locale strings.
  175. * Minor locale changes.
  176. * Minor bug fixes.
  177. Changes by Jacob Barkdull 2016-08-28
  178. --------------------------------------------------------------------------------
  179. * Added 3 new comment sorting methods
  180. - "By replies" sorts comments by the number of replies each comment has,
  181. in ascending order. Meaning the more replies a comment has, the more
  182. towards the top the comment appears.
  183. - "By discussion" sorts comments by the total number of replies they
  184. have including replies to replies. Meaning the more discussion has
  185. happened, the more towards the top the comment appears.
  186. - "By popularity" sorts threads by the sum of likes minus the sum of
  187. dislikes for each comment in the thread. Meaning the more likes a
  188. comment has, and the more likes its replies have, the more towards
  189. the top the entire comment thread appears.
  190. * Added protection against `target="_blank"` vulnerability
  191. - Hyperlinks that open in a new tab/window, especially those linking to
  192. external websites, now use a `rel="noopener noreferrer"` attribute to
  193. help prevent potential phishing attacks.
  194. * hashover/scripts/htmltag.php
  195. - HTMLTag children are now stored as object references instead of as
  196. strings, this allows tag attributes and inner HTML to be set and/or
  197. changed after the children have been appended to their parent tags.
  198. * hashover/scripts/javascript-mode.php
  199. - Fixed: `EOLTrim ()` function only trimming a single carriage return
  200. from beginning and ending of strings.
  201. * Added: Dutch locale.
  202. * Fixed: External image tooltips weren't localized.
  203. * Fixed: The HashOver homepage, RSS, and source code links weren't localized.
  204. * Fixed: Comments with Twitter @handle names sorted higher than normal names.
  205. * Fixed: Anonymous comments sorted by name were incorrectly ordered.
  206. * Minor code improvements.
  207. Changes by Jacob Barkdull 2016-05-17
  208. --------------------------------------------------------------------------------
  209. * Fixed: Non-Gravatar default avatars using PNG image on mobile devices.
  210. Changes by Jacob Barkdull 2016-05-14
  211. --------------------------------------------------------------------------------
  212. * Updated animated loading GIFs.
  213. * Added easy element creation function.
  214. * Removed sprintf function.
  215. Changes by Jacob Barkdull 2016-04-19
  216. --------------------------------------------------------------------------------
  217. * Added loading indicators to elements that trigger heavy AJAX requests.
  218. * Fixed: "0 Likes" remaining displayed after sorting comments by likes.
  219. Changes by Jacob Barkdull 2016-03-15
  220. --------------------------------------------------------------------------------
  221. * Small style changes for Like, Edit, and Reply hyperlinks
  222. - Pages with small fonts no longer cause button icons to be clipped.
  223. - Button hyperlink text now vertically centered.
  224. * Bug fix
  225. - Showing "undefined" in JavaScript mode and nothing in PHP mode
  226. instead of configured anonymous name in Reply hyperlink tooltip for
  227. comments without a name.
  228. * Improved Japanese locale.
  229. * Minor style changes.
  230. Changes by Jacob Barkdull 2016-01-25
  231. --------------------------------------------------------------------------------
  232. * `hashover.js` file moved
  233. - `hashover.js` moved into `hashover/` directory, this allows you to
  234. rename the HashOver root directory without having to modify
  235. `hashover.js` as well. This also allows you to have multiple
  236. versions of HashOver running on your server without conflicts, each
  237. version simply needs its own directory.
  238. * Improved HTTP root path to allow HashOver to run from a sub-directory.
  239. * Comments from logged in users now have `hashover-user-owned` class.
  240. * Fixed: One popular comment more than configured limit being shown.
  241. * Fixed: `fieldOptions` setting not being synced.
  242. * Removed public `$JSONSettingsFile` setting.
  243. * Improved popular comment sorting.
  244. * Small code improvements.
  245. Changes by Jacob Barkdull 2016-01-09
  246. --------------------------------------------------------------------------------
  247. * Fixed: Administrative comment deletion requiring name and password.
  248. * Fixed: Posting comment without a file value posts comment normally.
  249. Changes by Jacob Barkdull 2016-01-04
  250. --------------------------------------------------------------------------------
  251. * hashover/scripts/writecomments.php
  252. - Fixed: All comments from unlogged in users posting with default name.
  253. - Other small bug fixes.
  254. Changes by Jacob Barkdull 2016-01-03
  255. --------------------------------------------------------------------------------
  256. * Improved Markdown
  257. - Added support for Github-style code blocks.
  258. - Now ignoring nested patterns, allows multi-underscore "blank space."
  259. - Now allowing an underlined word to appear on a line by itself.
  260. * hashover/scripts/writecomments.php
  261. - Fixed: Unfinished <code> tags not being escaped.
  262. * hashover/scripts/javascript-mode.php
  263. - Improved embedded images, now automatically closes upon error.
  264. - Fixed: Thread link not displayed on some replies after sorting.
  265. - Fixed: Tabs and spaces being trimmed from block HTML tags.
  266. * hashover/scripts/jsminifier.php
  267. - Now removing entire line when removing single-line code comments.
  268. - Smarter indentation and whitespace removal.
  269. Changes by Jacob Barkdull 2016-01-01
  270. --------------------------------------------------------------------------------
  271. * Improved Markdown, allow the erroneous use of grave accents as apostrophes.
  272. * Now only getting the current date once when parsing comments.
  273. * Small bug fixes.
  274. Changes by Jacob Barkdull 2015-12-31
  275. --------------------------------------------------------------------------------
  276. * Fixed: Posting date, status, other fields are updated when editing comments.
  277. * For better posting dates, time is no longer compared when parsing comments.
  278. * Minor improvements, CSS changes.
  279. Changes by Jacob Barkdull 2015-12-30
  280. --------------------------------------------------------------------------------
  281. * Fixed: Local IP address blocklist not being checked.
  282. * Fixed: Comment post date not taking time into account.
  283. * Improved Markdown, now parsing Markdown in RSS.
  284. * Added code comments to SpamCheck class.
  285. Changes by Jacob Barkdull 2015-12-28
  286. --------------------------------------------------------------------------------
  287. * Fixed: "In reply to ..." link loses onClick event handler after sorting.
  288. * Added code comments for Encryption class.
  289. Changes by Jacob Barkdull 2015-12-24
  290. --------------------------------------------------------------------------------
  291. * Added basic markdown support.
  292. Changes by Jacob Barkdull 2015-12-17
  293. --------------------------------------------------------------------------------
  294. * Added optional required field options
  295. - The login inputs can now be individually set as required, meaning a
  296. user will not be able to post or edit a comment, or login, without
  297. properly filling the specific fields.
  298. * Fixed: Login inputs with empty values aren't passed to the login method.
  299. * Fixed: More comments are automatically shown when URL jump points to form.
  300. * Fixed: Messages close after 10 seconds of the first one opened, not the last.
  301. * Improved how failed comment post handling works.
  302. * Removed individual settings for enabled login fields in favor of an array.
  303. * Added locale string for individual required input error messages.
  304. * Added a CSS class for styling required login inputs.
  305. * Changed locales to reflect optional and required fields.
  306. * Minor modifications to some icons.
  307. * Improved custom login code.
  308. * Renamed a couple variables.
  309. * Reordered some functions.
  310. * Improved default theme.
  311. Changes by Jacob Barkdull 2015-12-12
  312. --------------------------------------------------------------------------------
  313. * Locales
  314. - Replaced "_TITLE_", "_NUM_", and "_TIME_" with format specifiers.
  315. - Now using printf functions instead of str_replace for locale strings.
  316. - "Top of Thread" changed to "In reply to %s".
  317. - Merged improvements to Spanish locale.
  318. - Added Brazilian Portuguese locale.
  319. - Added Romanian locale.
  320. * hashover/scripts/writecomments.php
  321. - Login code decoupled into separate files.
  322. - `kickback ()` method no longer exits script.
  323. - Class methods now have return values.
  324. - Methods for posting and editing comments now return the comment as an
  325. array when AJAX requests are made. This allows the receiving code to
  326. encode the comment as JSON for AJAX requests.
  327. * Added new Login and DefaultLogin classes
  328. - New login class for handling custom login mechanisms.
  329. - New default login class for default login mechanism.
  330. * hashover/scripts/postcomments.php
  331. - New file for posting comments, both the traditional way and via AJAX.
  332. - This file also handles login.
  333. * hashover/scripts/javascript-mode.php
  334. - Added AJAX comment posting and editing.
  335. - Comment and e-mail form validation now applies to edit forms as well.
  336. - Edit forms now have their own message element for displaying errors.
  337. - Fixed: Onclick only attached to one embedded image per comment.
  338. - Fixed: Only one of multiple open message dialogs closing.
  339. - Reply parsing now has access to their parent comment.
  340. - "Top of Thread" changed to "In reply to <parent comment name here>".
  341. - Improved XSS escaping and utilizing it more.
  342. - Very minor performance/memory improvements.
  343. - Removed duplicate code.
  344. * hashover/scripts/settings.php,
  345. hashover/scripts/hashover.php
  346. - Logic for comment reply nesting modified to allow a configurable
  347. number of indentation levels, after which the thread is flattened.
  348. - Added public $usesAJAX setting.
  349. - Added public $streamDepth setting.
  350. - Added public $JSONSettingsFile setting.
  351. - Added public $loginMethod setting.
  352. - Settings can now be set in a local JSON file.
  353. * hashover/scripts/setup.php
  354. - Merged in code to automatically adjust settings.
  355. * hashover/scripts/readcomments.php
  356. - Missing comment search now ~60% faster (~100 ms for 1000 comments).
  357. * hashover/scripts/database.php,
  358. hashover/scripts/parsesql.php
  359. - Improved syntax of SQL statements.
  360. - Tables are now created upon first posted comment.
  361. - Conformed method return values to expected behavior.
  362. - Removed redundant comment counting code.
  363. - Bug fixes.
  364. * Users re-logged in when editing comments
  365. - If the user editing a comment changes their name, they are now
  366. automatically logged in with that new name. This allows them to
  367. continue to edit or delete their comment after saving their initial
  368. edit, as otherwise they would still be logged in with the old name
  369. and not have editing or deletion rights.
  370. * Improved GET, POST, and COOKIE data filtering
  371. - PHP code implementing HashOver should no longer see it affecting the
  372. GET, POST, or COOKIE data in the global namespace in any way, as this
  373. data is now filtered as required instead of all at once.
  374. * Improved error handling
  375. - Classes now throw Exceptions, and try/catch blocks are used to display
  376. the error messages, `escapeOutput ()` has been removed and the new
  377. `displayErrors ()` in the new Misc class is used as a wrapper instead.
  378. * hashover/scripts/htmloutput.php
  379. - Comment thread link function modified to include parent comment name.
  380. * hashover/scripts/hashover.php
  381. - `initiate ()` split into two methods, an added `finalize ()` method.
  382. - Comments are no longer automatically parsed during initialization.
  383. - Fixed: Most popular comments being sorted in reverse order.
  384. * All images are now in a single directory
  385. - Subdirectories "/pngs" and "/svgs" have been merged with "/images",
  386. this simplifies the generation of paths to these image files, and
  387. makes the pathnames easier to remember and type out.
  388. * hashover/scripts/cookies.php
  389. - Fixed: Cookies set with port, causing issues on ports other than 80.
  390. * Removed closing PHP tags
  391. - All class files and files intended for inclusion consisting entirely
  392. of PHP code no longer have a closing PHP tag, the developers of PHP
  393. recommend doing so for such files and it helps prevent a
  394. "headers already sent" error on poorly configured web servers.
  395. * Coding style changes
  396. - Code following PHP opening tags is no longer indented one level,
  397. except where PHP code is being aligned with other text in the
  398. document, as with JavaScript code for example.
  399. - My standard for function return types in languages like C, and other
  400. Object Oriented languages like Java, is to place a newline after the
  401. class method keywords and return type, which are to be on their own
  402. line. My hope was for PHP to eventually gain strict function return
  403. type declarations, and for my standard to apply to PHP as well.
  404. While PHP has gained scalar type declarations with version 7, the way
  405. it's implemented is to specify the type, preceded by a colon, after
  406. the function parameter list. This is ugly, and doesn't work well with
  407. my standard style, so a different approach will be taken, for now,
  408. the newlines will simply be done away with.
  409. - Most associative array keys with underscores have been renamed to use
  410. dashes instead. This is for readability, ease of typing, and the
  411. separation in naming convention makes it easier to differentiate
  412. HashOver specific variables from PHP global variables, and allows for
  413. easier search and replace of just HashOver variables when necessary.
  414. * Added files:
  415. hashover/scripts/defaultlogin.php,
  416. hashover/scripts/login.php,
  417. hashover/scripts/misc.php,
  418. hashover/scripts/postcomments.php,
  419. hashover/scripts/postdata.php,
  420. hashover/scripts/locales/pt_br.php,
  421. hashover/scripts/locales/ro.php
  422. Changes by Jacob Barkdull 2015-10-25
  423. --------------------------------------------------------------------------------
  424. * hashover/scripts/settings.php,
  425. hashover/scripts/setup.php
  426. - Remove requirement of unique administrative login name.
  427. Changes by Jacob Barkdull 2015-10-13
  428. --------------------------------------------------------------------------------
  429. * hashover.js,
  430. hashover/scripts/htmloutput.php
  431. - URL-encode URL queries as well as URLs in URL queries.
  432. - URL-encode page title, improves handling of Unicode page titles.
  433. Changes by Jacob Barkdull 2015-08-23
  434. --------------------------------------------------------------------------------
  435. * hashover/scripts/setup.php
  436. - Fixed administrative login.
  437. Changes by Jacob Barkdull 2015-08-15
  438. --------------------------------------------------------------------------------
  439. * hashover/scripts/writecomments.php
  440. - Added 5 second delay to failed comment edit or deletion.
  441. This throttles login attempts by malicious users, making brute-force
  442. login attempts a less viable option for attackers.
  443. - Two CRLF end of lines are now used in e-mail notification messages.
  444. Changes by Jacob Barkdull 2015-08-11
  445. --------------------------------------------------------------------------------
  446. * hashover/api/count-link.php,
  447. hashover/scripts/hashover-javascript.php
  448. - Now taking port numbers into account for referer checking.
  449. - Removed unnecessary preg_match () function call.
  450. Changes by Jacob Barkdull 2015-08-06
  451. --------------------------------------------------------------------------------
  452. * hashover/scripts/htmloutput.php
  453. - Login button no longer shown if names and/or passwords are disabled.
  454. * hashover/scripts/writecomments.php
  455. - Now using proper CRLF (\r\n) for e-mail message body.
  456. - Check for parent comment e-mail and encryption keys before using them.
  457. - When editing a comment, the new comment data array is now merged with
  458. the old comment data array, instead of overriding each key.
  459. Changes by Jacob Barkdull 2015-08-02
  460. --------------------------------------------------------------------------------
  461. * Conform to coding standard
  462. - All class files now exit with a notice when executed directly.
  463. - Now using strict comparisons instead of shorthand ifs. This prevents
  464. unnecessary type juggling.
  465. - Some variables have been renamed.
  466. * hashover/scripts/javascript-mode.php
  467. - Fixed: Reply and Edit form actions set to wrong (old) filename. Form
  468. action values are now set to `$_SERVER['PHP_SELF']`, which once this
  469. file is included is `hashover-javascript.php`.
  470. * hashover/scripts/database.php,
  471. hashover/scripts/parsesql.php
  472. - SQL now stores and uses e-mail MD5 hash for Gravatar icons.
  473. - Rearranged statements for easier reading.
  474. * New settings
  475. - Set whether users can login and logout with:
  476. public bool $allowsLogin = true;
  477. - Set whether a user's first comment automatically logs them in with:
  478. public bool $usesAutoLogin = true;
  479. * hashover/scripts/htmloutput.php
  480. - Notification e-mail subscription checkbox no longer shown if e-mail
  481. address field is disabled.
  482. - Login button no longer shown when user logins are disabled, however,
  483. the logout button is still shown for users who are still logged in.
  484. * hashover/api/count-link.php,
  485. hashover/api/json.php,
  486. hashover/api/latest.php,
  487. hashover/scripts/hashover-javascript.php
  488. - Now using application/javascript instead of text/javascript, this
  489. helps ensure more servers will correctly compress HashOver's
  490. JavaScript and JSON output when compression is enabled on the server.
  491. Changes by Jacob Barkdull 2015-07-29
  492. --------------------------------------------------------------------------------
  493. * hashover/scripts/javascript-mode.php
  494. - The JSON object for comment data is now iterated over by array key,
  495. instead of enumerable properties. When the comment data consisted of
  496. nested objects, enumerable property iteration was necessary, however,
  497. the nested objects were replaced with arrays a while ago.
  498. Although bad practice, developers sometimes add custom Prototype
  499. methods to all Objects, Arrays, and/or Strings in the document.
  500. Therefore iterating over the comment data by enumerable properties
  501. isn't efficient and requires more work be done the more custom
  502. methods are added to their Prototype.
  503. This change also means other JavaScript on the same page as HashOver
  504. will not conflict with HashOver if it happens to modify Prototypes.
  505. - Changed some variable names.
  506. - $() function breaks coding standard, renamed.
  507. - Fixed: Early versions of Firefox, Chrome, and Internet Explorer don't
  508. support Element.classList, fallback functionality has been added.
  509. * hashover/scripts/htmloutput.php
  510. - Fixed "JavaScript" hyperlink pointing to the wrong (old) filename.
  511. - Minify based on operating system's end of line, not just Unix-style.
  512. * hashover/scripts/templater.php
  513. - Convert template output to operating system's end of line style.
  514. * hashover/scripts/parsexml.php
  515. - Fixed: Carriage returns not being trimmed from body.
  516. Changes by Jacob Barkdull 2015-07-10
  517. --------------------------------------------------------------------------------
  518. * hashover.js,
  519. hashover/scripts/javascript-mode.php,
  520. hashover/scripts/javascript-output.php
  521. - javascript-mode.php renamed to hashover-javascript.php.
  522. - javascript-output.php renamed to javascript-mode.php.
  523. - `head` variable now only defined when needed.
  524. - `body` variable removed.
  525. - Conform to coding standard.
  526. - Minor bug fixes.
  527. * hashover/api/count-link.php
  528. - Use strict comparison.
  529. Changes by Jacob Barkdull 2015-06-25
  530. --------------------------------------------------------------------------------
  531. * hashover/scripts/setup.php
  532. - Strip "Magic Quotes" from POST, GET, and COOKIE data if enabled.
  533. * hashover/scripts/statistics.php
  534. - Conform to coding standard.
  535. Changes by Jacob Barkdull 2015-06-22
  536. --------------------------------------------------------------------------------
  537. * hashover/scripts/writecomments.php
  538. - Password cookie now stored as Blowfish hash (requires a re-login).
  539. - E-mail cookie now stored as Mcrypt string (requires a re-login).
  540. - Valid e-mail and HTTP prefix checks now also performed for cookies.
  541. - Login no longer performs spam check.
  542. * hashover/scripts/encryption.php
  543. - `decrypt ()` now fails if any encryption hash offset is undefined.
  544. * hashover/scripts/htmloutput.php
  545. - Password input placeholder and title changes to "Confirm Password"
  546. when editing a comment, as this is what that field is actually for.
  547. It is normally automatically filled by the browser.
  548. * hashover/scripts/cookies.php
  549. - `clear ()` function now uses `expireCookie ($cookie)` function.
  550. - `expireCookie ($cookie)` now uses `set ($name [, $value, $date])`.
  551. Changes by Jacob Barkdull 2015-06-21
  552. --------------------------------------------------------------------------------
  553. * hashover/themes/default/style.css
  554. - Fixed: Mobile CSS SVG background-image being applied to actual login
  555. inputs element, instead of :before selector.
  556. Changes by Jacob Barkdull 2015-06-20
  557. --------------------------------------------------------------------------------
  558. * hashover/scripts/javascript-output.php
  559. - Minor performance and memory optimizations.
  560. * hashover/scripts/jsminifier.php
  561. - Smarter newline removal.
  562. Changes by Jacob Barkdull 2015-06-19
  563. --------------------------------------------------------------------------------
  564. * Most code has moved to the TildeHash Coding Standard
  565. - Indention is done with tabs, only one per code block.
  566. - Curly braces are to be used wherever possible, including switches.
  567. - Class property and method names use camelCase.
  568. - Function definition names in the global namespace use snake_case.
  569. - All variable names, in any scope or namespace, use snake_case.
  570. - Variable and function naming convention demands only real words.
  571. - Strict comparisons are to be used wherever possible.
  572. - Class and function curly braces go on their own line.
  573. - There should be a space before any function parentheses.
  574. - There should be a space before and after any equals.
  575. - There should be a space after function parameters and array items.
  576. - There should be a newline after class method keywords.
  577. - There should be a blank line before a return following multiple lines.
  578. - There should be a blank line before a break following multiple lines.
  579. - This coding standard is not final. Complete and detailed
  580. documentation and rationale is forthcoming.
  581. Discussion and suggestions are welcomed.
  582. * Major rewrite of JavaScript mode
  583. - HashOver no longer adds any variables or functions to the global
  584. namespace, this means HashOver is now isolated. HashOver won't
  585. interfere with other JavaScript on the same page, and users and
  586. malicious JavaScript won't be able to write to HashOver's variables
  587. or execute its functions that aren't meant to be remotely executed.
  588. - Image tags are no longer used, instead the "background-image" CSS
  589. style attribute is used. This results in fewer HTTP requests, and
  590. avoids many performance issues related to image tags that don't apply
  591. to background image style, such as width and height calculations and
  592. onload event handling. This also avoids performance issues associated
  593. with ad-blockers, such as "Adblock Plus".
  594. - Almost all inline HTML has been removed from the JavaScript code,
  595. instead a new class has been added that generates the HTML for use in
  596. both the JavaScript mode and in PHP mode. This means that inline HTML
  597. is still present in the generated JavaScript code users receive, but
  598. it's not present in the actual JavaScript source code. The code
  599. doesn't make use of JavaScript's built-in functions such as
  600. "document.createElement ()" as these functions executed hundreds or
  601. thousands of times are far too slow.
  602. - Inline JavaScript event attributes (onClick="", etc) have been
  603. removed as well. Instead they are added after the comments are
  604. appended to the page's DOM. This will allow for a "hybrid" mode in
  605. the future, where HashOver will execute in PHP mode, but JavaScript
  606. will also be executed to handle various interactive behaviors.
  607. - When enabled, JavaScript code can now be returned to the user in a
  608. minified form, however, this code is not obfuscated. The code also
  609. includes a smaller Copyright notice and a link to the non-minified
  610. JavaScript code, as such is a requirement of the AGPL.
  611. - HashOver's JavaScript execution time is now displayed in the console
  612. of modern web browsers, when present.
  613. - JavaScript now uses Strict Mode.
  614. - The JSON data for comments is now passed to the JavaScript after its
  615. PHP code has executed, and -- when enabled -- after it's been
  616. minified. This makes minification faster, as the JSON data is
  617. returned without pretty print when JavaScript minification is
  618. enabled, and therefore it doesn't need to be minified anyway.
  619. - Element.classList.add () is used instead of appending classes to
  620. Element.className. This allows for easy adding and removing of
  621. classes by name, and is slightly faster.
  622. - Improved how various warning messages are handled. Namely, error
  623. messages now have a different class than normal messages.
  624. - Reply, Edit, and Like links are no longer included in the JSON
  625. comment data. This greatly reduces the size of the JavaScript.
  626. - Reply and Edit links now change to "Cancel" links after opening their
  627. respective forms when clicked. When clicked again, they remove their
  628. respective form and revert back to their initial state.
  629. - Specific fields can no longer be disabled via JavaScript, instead
  630. they are enabled or disabled in the Settings class.
  631. * Major rewrite of PHP mode
  632. - PHP mode is now a port of JavaScript mode. It should follow it
  633. closely, excluding features that aren't possible with plain HTML,
  634. such as interactive forms and sorting, likes, etc.
  635. - PHP mode is implemented via object now. And should be instantiated
  636. before any output is sent, as HashOver sets various cookies.
  637. You implement it like so:
  638. <?php
  639. $hashover = new HashOver ('php', 'title', 'URL');
  640. ?>
  641. <!DOCTYPE html>
  642. ...
  643. <div id="hashover">
  644. <?php
  645. echo $hashover->displayComments ();
  646. ?>
  647. </div>
  648. * Changes to how comments are stored
  649. - Comments no longer contain plain text "\n" nor "<br>" tags. Comments
  650. are stored multi-lined and parsed upon reading. When displayed,
  651. comments are first parsed by paragraph, with each paragraph getting
  652. wrapped in a <p> tag, and then by line, with each line ending with a
  653. <br> tag. This allows different paragraph spacing via CSS, and
  654. reduces the size of the JavaScript output.
  655. * Changes to where HTML is located
  656. - Most HTML has been moved to the new class HTMLOutput. This class
  657. holds the HTML that is used in both JavaScript mode and PHP mode.
  658. * User login information
  659. - User login information is no longer placed in the document as hidden
  660. inputs, instead, when posting a comment the cookies set on the user's
  661. browser will be used as their login credentials.
  662. * Password inputs no longer have cookie value
  663. - This means that user passwords aren't placed in the value attribute
  664. of the "Password" field of the various forms. This should,
  665. technically provide some extra security from malicious JavaScript
  666. that happens to be on the same page as HashOver.
  667. Users shouldn't notice any difference, since web browsers
  668. automatically fill password type inputs anyway.
  669. * Changes to theme HTML templates
  670. - HTML layout templates are now parsed by the new Templater class. The
  671. structure of layout templates should be much easier to understand, as
  672. the layout templates no longer use JavaScript variable concatenation.
  673. Instead, a curly brace format is used.
  674. For example:
  675. {hashover:name} displays the user's name.
  676. {comment:sort_date} displays the sort date from the JSON data.
  677. {placeholder:test} displays a "placeholder" span tag.
  678. * New settings
  679. - Set whether users can enter their own name with:
  680. public bool $allowsNames = true;
  681. - Set whether users can protect their comments with a password with:
  682. public bool $allowsPasswords = true;
  683. - Set whether users can enter an e-mail address with:
  684. public bool $allowsEmails = true;
  685. - Set whether users can enter a website with:
  686. public bool $allowsWebsites = true;
  687. - Set whether comments must be approved before they appear with:
  688. public bool $usesModeration = false;
  689. - Position for primary form; options: 'top' or 'bottom'
  690. public string $formPosition = 'top';
  691. - Set whether to display labels above inputs with:
  692. public bool $usesLabels = false;
  693. - Set whether forms have "Cancel" buttons with:
  694. public bool $usesCancelButtons = false;
  695. - Set whether JavaScript output should be minified with:
  696. public bool $minifiesJavaScript = false;
  697. - Set how much to minify JavaScript code, options: 1, 2, 3, 4
  698. public int $minifyLevel = 4;
  699. - Set whether user deleted files are unlinked from the filesystem with:
  700. public bool $userDeletionsUnlink = false;
  701. * Removed unused public string $indention setting
  702. Indention has been done using CSS for a while now.
  703. * Added files:
  704. hashover/images/pngs/pending-icon.png,
  705. hashover/images/svgs/pending-icon.svg,
  706. hashover/scripts/locales/tr.php,
  707. hashover/scripts/hashover.php,
  708. hashover/scripts/htmloutput.php,
  709. hashover/scripts/htmltag.php,
  710. hashover/scripts/javascript-output.php,
  711. hashover/scripts/jsminifier.php,
  712. hashover/scripts/templater.php,
  713. * Renamed files:
  714. hashover/images/pngs/delicon.png to deleted-icon.png
  715. hashover/images/svgs/delicon.svg to deleted-icon.svg
  716. hashover/api/count_link.php to count-link.php,
  717. hashover/scripts/php-mode.php to phpmode.php,
  718. hashover/scripts/displaycomments.php to commentparser.php
  719. * Deleted files:
  720. hashover/hashover.php
  721. * Added Turkish locale by Tunay Eren Uyar (@T_E_U_Tunay)
  722. * RSS now uses DOMDocument.
  723. * Execution time is one-third lower with a large number of comments (1000+).
  724. * Execution time is now in milliseconds, or in seconds if >= 1 second.
  725. * Memory peak usage now properly stated as Mib.
  726. * Fixed embedded images losing their events after sorting comments.
  727. * Removed unused public string $parses_huge setting.
  728. * Many variables and functions have been renamed.
  729. * Improved SQL, table names are no longer snake_case'd thread directory names.
  730. * "hashover_form" renamed to "hashover-form" in both HTML and CSS.
  731. * Avatars no longer check Gravatar response codes.
  732. * Minor improvements to some images.
  733. * Other minor bug fixes.
  734. Changes by Jacob Barkdull 2015-04-03
  735. --------------------------------------------------------------------------------
  736. * hashover/scripts/javascript-mode.php,
  737. hashover/scripts/php-mode.php
  738. - Inputs in the primary form are no longer separated into two divs on
  739. mobile devices. Going forward, this should be done with CSS.
  740. - Image format is no longer added as a class to the "hashover" div to
  741. aid in styling on mobile devices. Instead "hashover-mobile" is, and
  742. the default class is "hashover-desktop".
  743. * hashover/scripts/php-mode.php
  744. - Removed <span> tag.
  745. * hashover/themes/default/style.css
  746. - "svg" class references changed to "hashover-mobile".
  747. Changes by Jacob Barkdull 2015-04-01
  748. --------------------------------------------------------------------------------
  749. * hashover/scripts/javascript-mode.php
  750. - Improved how various warning messages are handled.
  751. - Logout button now has `hashover-logout` class.
  752. * hashover/scripts/php-mode.php
  753. - Logout button now has `hashover-logout` class.
  754. Changes by Jacob Barkdull 2015-03-31
  755. --------------------------------------------------------------------------------
  756. * hashover.js
  757. - Each script tag now has an ID of "hashover-script-<script number>"
  758. - The current HTMLScriptElement length is now passed to `hashover.php`.
  759. - Added some code comments.
  760. * hashover/api/latest.php
  761. - Added functionality to trim comments to specific length.
  762. * hashover/api/count_link.php
  763. - Improved how HTML is appended to page.
  764. * hashover/scripts/avatars.php
  765. - Use new Gravatar settings.
  766. * hashover/scripts/javascript-mode.php
  767. - A new class was added to the "Post a Comment" title element.
  768. - A new class was added to the logged in user name element.
  769. - A new class was added to the comment count and sort dropdown menu div.
  770. - A new class was added to the primary form avatar div.
  771. - Replaced some `.innerHTML` statements with `.textContent`.
  772. - Improved how HTML is appended to page.
  773. - Show first comment image in primary form when logged out.
  774. - Show Gravatar image in reply form when logged in.
  775. - Applied e-mail warning messages to login button.
  776. - Improved how various warning messages are handled.
  777. * hashover/scripts/php-mode.php
  778. - A new class was added to the "Post a Comment" title element.
  779. - A new class was added to the logged in user name element.
  780. - A new class was added to the primary form avatar div.
  781. - Replaced some JavaScript `.innerHTML` statements with `.textContent`.
  782. - Show first comment image in primary form when logged out.
  783. - Show Gravatar image in reply form when logged in.
  784. * hashover/scripts/settings.php
  785. - Added trimwidth setting value for latest comments.
  786. - Added extra settings for configuring default Gravatar images.
  787. * hashover/scripts/widget-output.php
  788. - "-widget" appended to classes to avoid conflicts with primary CSS.
  789. - Merged improvements from javascript-mode.php.
  790. - Improved how HTML is appended to page.
  791. * hashover/themes/default/widget-style.css
  792. - "-widget" appended to classes to avoid conflicts with primary CSS.
  793. * hashover/themes/default/widget-layout.html
  794. - Removed <span> tag.
  795. Changes by Jacob Barkdull 2015-03-24
  796. --------------------------------------------------------------------------------
  797. * hashover.js
  798. - Improved URL query parsing.
  799. - API scripts no longer loaded asynchronously.
  800. * hashover/scripts/javascript-mode.php,
  801. hashover/themes/default/style.css,
  802. hashover/themes/1.0-ported/style.css
  803. - Moved "hashover-first" and "hashover-deleted" CSS classes into
  804. "hashover-comment" element class attribute.
  805. Changes by Jacob Barkdull 2015-03-21
  806. --------------------------------------------------------------------------------
  807. * hashover.js
  808. Improved how URL queries in the script tag are passed to HashOver.
  809. * hashover/scripts/like.php
  810. - Fixed dislike function.
  811. - Changed `$like` variable to `$comment`.
  812. - Other minor fixes.
  813. * hashover/scripts/readcomments.php
  814. Treat unreadable comment files as deleted.
  815. * hashover/scripts/settings.php
  816. - Renamed public string variable `$uses_icons` to `$icon_mode`.
  817. - `$icon_mode` now has three possible values
  818. 'image' - Displays an image avatar.
  819. 'count' - Displays a number relative to the comment parent.
  820. 'none' - Displays no avatar at all.
  821. * hashover/themes/default/layout.html,
  822. hashover/themes/modern/layout.html,
  823. hashover/themes/1.0-ported/layout.html
  824. - Moved HTML for avatar into javascript-mode.
  825. - Removed unused "name" attribute from form tags.
  826. * hashover/scripts/javascript-mode.php,
  827. hashover/scripts/php-mode.php,
  828. hashover/scripts/widget-output.php,
  829. hashover/scripts/displaycomments.php
  830. - Changes to accommodate `$uses_icons` variable name change and new
  831. 'none' `$icon_mode` option. Wrap avatar in span tag.
  832. - Added workaround for Chrome bug.
  833. Anchor "jump" tags aren't followed if the linked element isn't
  834. on the page before the page begins loading.
  835. - Added "Top of Thread" link back in PHP mode.
  836. - Forms no longer displayed in popular comments.
  837. - Improved how "hashover" DIV tag is appended to page HTML.
  838. - Fixed "dislikes" not being appended to like link class attribute.
  839. - Fixed form anchors with zero(s) in them not opening the forms.
  840. * hashover/scripts/writecomments.php
  841. - Non-existent metadata no longer manipulated.
  842. - Login cookies are now set even if they're empty.
  843. - Now attempts to `chmod()` comment directory if it's not writeable.
  844. - Only `strtolower()` and `preg_replace()` code tags once.
  845. * hashover/scripts/cookies.php
  846. - Added default values for optional function parameters.
  847. Changes by Jacob Barkdull 2015-03-16
  848. --------------------------------------------------------------------------------
  849. * hashover/scripts/javascript-mode.php
  850. - Added a couple code comments.
  851. - HTML for external images is no longer hard coded.
  852. - External images no longer have an "onClick" attribute. Instead,
  853. onclick is set using JavaScript.
  854. - External images now have "Click to view external image" as their
  855. title attribute, this title is set to "Loading..." while the image
  856. is loading and set to "Click to close" once the image is loaded.
  857. These changes will eventually allow a loading animation to be
  858. displayed, as well as allow for an animation to play when the image
  859. has finished loading, for example a fade or zoom effect.
  860. Changes by Jacob Barkdull 2015-03-04
  861. --------------------------------------------------------------------------------
  862. * hashover/scripts/settings.php
  863. - Code comments now reflect the fact that title-case is no longer
  864. required, but that both name and password are case-sensitive.
  865. - Added secure cookie option
  866. * hashover/scripts/javascript-mode.php
  867. - Removed unused title from RSS link.
  868. * hashover/scripts/cookies.php
  869. - Removed multiple HTTPS checks
  870. - Cookies respect new secure cookies setting.
  871. * hashover/hashover.php
  872. - New secure cookie setting is now passed to the Cookies class.
  873. * hashover/themes/default/style.css
  874. - Minor fix.
  875. Changes by Jacob Barkdull 2015-03-03
  876. --------------------------------------------------------------------------------
  877. * URLs are now encoded where necessary.
  878. * <a name/> style placemark anchors removed in favor of element IDs.
  879. * c#[r#]-form changed to hashover-[edit|reply]-c#[r#]
  880. * HTML tags now stripped from both URL and title.
  881. * HTML characters now encoded in both URL and title.
  882. * Fixed: "?hashover_[edit|reply]=c#[r#]" queries not being removed from URLs.
  883. Changes by Jacob Barkdull 2015-02-27
  884. --------------------------------------------------------------------------------
  885. * Added: Setting to disable separate counts for replies and primary comments.
  886. * Fixed: Unchecked "Notify me of replies", users no longer asked to confirm.
  887. * Fixed: "Showing" being displayed in count link.
  888. * Fixed: Disabled avatar icon styling.
  889. * Removed "_pop" from popular comments' permalink where its shown.
  890. * Changed: "cmtcount" to "hashover-cmtcount"
  891. Changes by Jacob Barkdull 2015-02-26
  892. --------------------------------------------------------------------------------
  893. * Make root directory an absolute path again.
  894. * Check if HTTPS server superglobal is non-empty not just set for cookies.
  895. * Fetch avatars through HTTPS if set.
  896. Changes by Jacob Barkdull 2015-02-19
  897. --------------------------------------------------------------------------------
  898. * NOTICE:
  899. Do not preserve your "settings.php" file.
  900. You will need the new version to take advantage of the new and changed
  901. features listed below. Not using the new version will cause potentially
  902. harmful behavior, errors, and PHP error/warning messages that will
  903. in-turn cause JavaScript syntax errors.
  904. It is completely safe to simply move the values from your old
  905. "settings.php" file into the new version. We no longer store settings
  906. in an array, so all that is needed is for the new variables to exist.
  907. * Structure of data storage has changed
  908. The structure of how comments are stored has changed a bit. Notably the
  909. "passwd" field is stored as proper "password" now. Unfortunately this
  910. means all old comments willn't be editable unless converted to the new
  911. structure. For which I have a script for anyone interested.
  912. Please note that the data format storage structure will most definitely
  913. change more, and do so a few more times in the future. However, the
  914. changes should be minimal from version 2.0 onward, and in the event
  915. that there are big changes, 2.x releases will have backward
  916. compatibility. As will 2.0 to 1.0.
  917. * Preliminary support for SQLite as a data storage format.
  918. It's very early support, it shouldn't be considered stable nor secure.
  919. It should be stable and secure by release, or be removed.
  920. As I expected, SQLite isn't showing any better performance than XML nor
  921. JSON. Indeed, to the contrary, SQLite performs worse than XML, and
  922. especially worse than JSON. SQLite causes the script to use more memory
  923. and it appears to be that as the number of comments for any given page
  924. grows, the load time for every page also increases.
  925. * Added ability to "Dislike" comments. Allowing Reddit-style comment voting.
  926. Before this change comments could only be liked, and then unliked, a
  927. comment's popularity was decided only by people who like the comment
  928. (as to agree with it), while people who dislike a comment (as to
  929. disagree with it) had no power in its popularity.
  930. The sort "By Likes" method remains in descending order, but is now
  931. implemented by the number of likes minus the number of dislikes.
  932. Using CSS, anyone should be able to choose how to present the
  933. Like/Dislike functionality to users, whether it's presented as
  934. "Voting", Thumbs Up/Down, or even heart/broken heart. In addition,
  935. disliking can be disabled to allow the old behavior of liking comments
  936. in a "Favorite"-esque manner, à la Tumblr and Twitter.
  937. * Added comment thread metadata files.
  938. Stored in `hashover/pages/.metadata` and
  939. `hashover/pages/<page>/.metadata` these files serve as a way to
  940. retrieve information about the page and comment thread, such as the
  941. original page title and URL, as well as the status of thread and a list
  942. of an adjustable number of the most recent comments.
  943. * Moved comment parsing regular expressions into JavaScript.
  944. The regular expressions for automatic URL links, embedded images, and
  945. comment clean-up, are now implemented in JavaScript via ".replace()"
  946. rather than in PHP via "preg_replace()" and "preg_replace_callback()"
  947. functions. This helps improve performance by delegating those tasks to
  948. the client-side (web browsers).
  949. * Added optional comment break point.
  950. By "break point" I mean only an adjustable number of comments will be
  951. displayed (default 3) and then a link reading "Show X Other Comments"
  952. will be displayed, which after clicked will show the other comments.
  953. It isn't implemented as efficiently as I'd like, as right now all it
  954. does is set the necessary HTML element class name that will hide the
  955. comments (or grey/blur them out, whatever you want to do to them via
  956. CSS), this means the comments are still being read and parsed by the
  957. server, and loaded by the browser just not being displayed.
  958. Some -- meaning me -- would say that's fine, as the idea of a break
  959. point is to restrict the number of comments being displayed when the
  960. thread is very long, and the enduser should be not be burdened by
  961. waiting for secondary resources to load as would be the case if the
  962. comments were loaded asynchronously via AJAX. However, I do understand
  963. the benefits of only reading, parsing and loading the rest of the
  964. comments once the user has actually requested them.
  965. This feature will be improved to include that kind of functionality.
  966. * Added threaded versions of each comment sorting method.
  967. The new sorting methods leave comments threaded, that is to say the
  968. comments are sorted but their replies are unaffected, this for example,
  969. allows people to sort "By Commenter" and read each commenter's
  970. conversations (the replies) in regular order.
  971. This change is not final, pending discussion as to whether any make
  972. sense to users, they will either be kept in the form of new sort
  973. options under the "Threaded" label in the dropdown menu, replace the
  974. some of the unthreaded sorting methods or all be removed.
  975. * "javascript-mode.php" sets HTTP header to disable/expire browser cache.
  976. In JavaScript mode, HashOver now tells the browser to disable/not set,
  977. or expire the cache of the JavaScript output so that the user actually
  978. receives the newest JavaScript content. It's very important for
  979. JavaScript that is dynamically generated not to be cached by web
  980. browsers, because depending on what the user is doing, the JavaScript
  981. output might not always be the same.
  982. For example:
  983. If the browser loads a cached version of the JavaScript after a
  984. user posts a comment, the user will not see their comment unless
  985. they force an uncached refresh on their browser. Although,
  986. sometimes that's not enough to actually get the new file.
  987. The same thing applies after a user clicks "Login". They will not
  988. appear to be logged in, since HashOver needs to generate one kind
  989. of JavaScript when the user is logged out and a different
  990. JavaScript when the user is logged in.
  991. Also, when editing or deleting a comment, if the cached JavaScript
  992. is loaded, after saving their edit the user will see the old
  993. comment, not the edited version of their comment.
  994. * Changes towards unifying JavaScript and PHP modes.
  995. `json_encode()` is now used to create the necessary JavaScript comment
  996. objects, this means the `$hashover` variable is no longer a string in
  997. JavaScript mode (it's an array in both modes), and there's now less
  998. differing work between the two modes.
  999. The "Edit" and "Reply" links now use PHP mode's href attributes in both
  1000. modes, that is to say they always point to "?hashover_edit=<permalink>"
  1001. and "?hashover_reply=<permalink>", respectively, instead of "#".
  1002. Necessary code has been added to run the respective functions when
  1003. these URL queries are set. This allows people to middle-click or
  1004. right click->Open Link in New Tab and actually get the desired form in
  1005. JavaScript mode, which wasn't possible before.
  1006. These are small changes, but they're necessary first steps towards
  1007. unifying the JavaScript and PHP modes once again. The two modes should
  1008. be unified before 2.0's released, or be further separated.
  1009. * "Login" fields no longer show after posting a comment or logging in.
  1010. Basically logging in means something now.
  1011. There is now a single cookie used for login specific functions such as
  1012. showing the "Edit" link and hiding the "Like"/"Dislike" links.
  1013. The "Name", "Password", "E-mail Address", and "Website" fields are now
  1014. hidden when the user is logged in, however, they still show when
  1015. editing a comment, since the information is useful there.
  1016. * Added optional animated loading GIFs.
  1017. When the JavaScript loading is deferred it can be useful to display a
  1018. loading GIF, however, deferred JavaScript loading is about their only
  1019. intended use. HashOver should never execute slowly enough to require or
  1020. allow a loading image or message of any kind to be displayed, as
  1021. HashOver's total execution time -- with one thousand comments -- should
  1022. be in the tenths of a second. These loading GIFs are just temporary,
  1023. improvements are welcomed and customization is encouraged, especially
  1024. to fit them into the theme of your website.
  1025. * Added files:
  1026. hashover.js,
  1027. hashover/hashover.php,
  1028. hashover/scripts/api,
  1029. hashover/api/count_link.php,
  1030. hashover/scripts/api/rss.php,
  1031. hashover/scripts/api/json.php,
  1032. hashover/scripts/api/latest.php,
  1033. hashover/scripts/readfiles.php,
  1034. hashover/scripts/readxml.php,
  1035. hashover/scripts/readjson.php,
  1036. hashover/scripts/readsql.php,
  1037. hashover/scripts/database.php,
  1038. hashover/scripts/widget-output.php,
  1039. hashover/scripts/locales/de.php,
  1040. hashover/scripts/locales/en.php,
  1041. hashover/scripts/locales/es.php,
  1042. hashover/scripts/locales/fr.php,
  1043. hashover/scripts/locales/jp.php,
  1044. hashover/themes,
  1045. hashover/themes/default,
  1046. hashover/themes/default/layout.html,
  1047. hashover/themes/default/style.css,
  1048. hashover/themes/default/widget-layout.html,
  1049. hashover/themes/default/widget-style.css,
  1050. hashover/themes/1.0-ported,
  1051. hashover/themes/1.0-ported/style.css,
  1052. hashover/themes/1.0-ported/layout.html,
  1053. hashover/themes/modern,
  1054. hashover/themes/modern/layout.html,
  1055. hashover/themes/modern/style.css,
  1056. hashover/themes/modern/fonts,
  1057. hashover/themes/modern/fonts/fontello.eot,
  1058. hashover/themes/modern/fonts/fontello.svg,
  1059. hashover/themes/modern/fonts/fontello.ttf,
  1060. hashover/themes/modern/fonts/fontello.woff,
  1061. hashover/images/pngs/loading-ctrl.gif,
  1062. hashover/images/pngs/loading-ltr.gif
  1063. * Deleted files:
  1064. hashover.php,
  1065. hashover/html-templates,
  1066. hashover/style-sheets,
  1067. hashover/template.xml,
  1068. hashover/scripts/readcomments.php,
  1069. hashover/scripts/rss-output.php,
  1070. hashover/images/svgs/bubble-tick.svg,
  1071. hashover/images/pngs/bubble-tick.png
  1072. * Added: "Latest Comments" functionality to API.
  1073. * Added: JSON output to API.
  1074. * Added: French translation by Adrien Fabre.
  1075. * Added: German translation by "q2apro".
  1076. * Added: Initial code for moderation support.
  1077. * Fixed: Failing Twitter avatars when an e-mail wasn't given.
  1078. * Fixed: "Like" link displaying when using blank password and e-mail.
  1079. * Fixed: Ignorable URL queries file functionality.
  1080. * Fixed: Dates in RSS output.
  1081. * Fixed: E-mail notification delivery.
  1082. * Fixed: Administrative login.
  1083. * Fixed: Names, including admin name, couldn't use mixed case characters.
  1084. * Improved: API.
  1085. * Improved: Locales now in separate files, added language specific plurals.
  1086. * Improved: URL parsing, leading, trailing, and multiple dashes now removed.
  1087. * Improved: Reduced memory usage slightly.
  1088. * Improved: Design input icons, notably the edit icon.
  1089. * Removed: Unnecessary calls to `escape_output()` function.
  1090. * Removed: "bubble tick" image, using CSS instead.
  1091. * Removed: "ChangeLog" and "Archives" links.
  1092. * Many changes to accommodate said and following changes.
  1093. * Reduced size of JavaScript output (by upwards of 4%, I think.)
  1094. * Using "Name" instead of "Nickname".
  1095. * Variable "$admin_nickname" renamed to "$admin_name".
  1096. * XML template no longer used for XML files, DOMDocument is used instead.
  1097. * Closing tags no longer used in XML files for elements with no contents.
  1098. * Comment thread directories are now created when the first comment is posted.
  1099. * Code for each supported data storage format now in separate classes and files.
  1100. * cURL now fetches avatar information by default, with fallback to get_headers.
  1101. * Each comment e-mail is now decrypted only once, decreasing execution time.
  1102. * Comment replies can now be displayed as either a typical thread or a stream.
  1103. * Comment replies are now nested within their parent comment's HTML element.
  1104. * The RSS feed link can now be disabled/hidden/not-displayed.
  1105. * Multiple preg_match calls for mobile device detection now single expression.
  1106. * RSS feed code has been moved into the new "api/rss.php" file.
  1107. * Comments in e-mails no longer exceed 80 characters.
  1108. * Comments in e-mails are now entirely indented, not just the first line.
  1109. * Echo statements now use commas instead of concatenation.
  1110. * The reply and edit forms are now separate forms.
  1111. * Some sorting methods have been renamed.
  1112. * "All that, and a toilet!"
  1113. Changes by Jacob Barkdull 2014-05-14
  1114. --------------------------------------------------------------------------------
  1115. * Custom encryption algorithm removed in favor of Blowfish and Mcrypt.
  1116. IMPORTANT NOTICE: Previous user e-mails and passwords no longer usable.
  1117. Users will NOT be able to edit any comments they posted before this
  1118. change. Also, users will NOT be notified of replies and your server
  1119. may complain of e-mail delivery failures for any replies to comments
  1120. posted before this change.
  1121. I've written a converter that will decrypt the old e-mail addresses
  1122. and convert them to the new mcrypt format so that user comments
  1123. posted before this change will still notify the poster of replies.
  1124. However, passwords are always stored as irreversible hashes, and
  1125. thus are LOST FOREVER.
  1126. The encryption method shouldn't change much after the official release
  1127. of version 2.0. Breaking user functionality like comment editing and
  1128. reply notifications should not happen again.
  1129. * Complete removal of Identi.ca support.
  1130. Rationale:
  1131. No one used it. I don't foresee anyone using it.
  1132. * Added files:
  1133. hashover/scripts/displaycomments.php,
  1134. hashover/scripts/spamcheck.php,
  1135. hashover/scripts/cookies.php,
  1136. hashover/scripts/statistics.php.
  1137. "spamcheck.php" contains new code for spam checking against a local
  1138. database, and improved code for spam checking against a remote
  1139. database. Both use databases provided by stopforumspam.com.
  1140. * Deleted files:
  1141. hashover/scripts/secrets.php,
  1142. hashover/scripts/global_variables.php,
  1143. hashover/scripts/parse_comments.php,
  1144. hashover/scripts/deletion_notice.php.
  1145. Rationale:
  1146. They contained little code, too little to warrant their own files. I
  1147. merged the code into "settings.php", "hashover.php" and
  1148. "displaycomments.php", respectively.
  1149. * Moved code towards an Object-Oriented Programming paradigm.
  1150. Rationale:
  1151. HashOver's codebase will continue to grow and become more complex over
  1152. time, an Object Oriented Programming paradigm allows for cleaner and
  1153. more readable code, less code redundancy, better performance,
  1154. deprecates use of global variables and doesn't pollute the namespace
  1155. of PHP applications implementing HashOver as much.
  1156. For anyone curious as to why the codebase is so ugly and procedural,
  1157. let me answer with two numbers and an acronym... "PHP 5.2, 2009", the
  1158. year and version of PHP I started HashOver on. PHP 5.2 didn't have true
  1159. anonymous functions nor decent Object Oriented Programming support, and
  1160. the following years didn't see PHP versions 5.3 and up become widely
  1161. adopted, unfortunately. At this point the code has merely been moved
  1162. into classes, there is probably still some redundant code and one or
  1163. two global variable statements. This will improve over time.
  1164. * Preliminary support for JSON as a data storage format.
  1165. It's very early support, it shouldn't be considered stable nor secure.
  1166. It should be stable and secure by release, or be removed. I've now ran
  1167. real speed tests of using JSON vs. XML, and the results were just as I
  1168. had calculated, see: https://github.com/jacobwb/hashover-next/issues/32
  1169. * In PHP mode when editing or replying to a comment users are now kicked down
  1170. to the respective forms instead of to the top of the comment.
  1171. * Many minor changes to accommodate said and following changes.
  1172. * Moved input and button background images into single file.
  1173. * Added SVG images, which are optional but used by default on mobile devices.
  1174. * Cookies set over HTTPS connections are now only sent over HTTPS connections.
  1175. * All settings are now in an array to reduce the number of variable definitions.
  1176. * Spam checking now only performed when writing a comment.
  1177. * Now using placeholder attribute instead of JavaScript onFocus and onBlur.
  1178. * Made order of form input attributes consistent (type->name->title->value).
  1179. * Changed default name, avoiding mention of GNU/Linux, FOSS and developer terms.
  1180. * Wrapped "Popular Comments" in a <div> tag to aid in styling.
  1181. * "cmtclass" no longer set unless the comment is a reply.
  1182. * Renamed "urlwork.php" to "setup.php".
  1183. * Improved "read_comments" function.
  1184. Changes by Jacob Barkdull 2014-04-15
  1185. --------------------------------------------------------------------------------
  1186. * Implemented JavaScript e-mail and message validation.
  1187. * Now invalid e-mails won't be stored.
  1188. Changes by Jacob Barkdull 2014-04-10
  1189. --------------------------------------------------------------------------------
  1190. * Added memory usage comment to JavaScript and HTML output.
  1191. Changes by Jacob Barkdull 2014-04-07
  1192. --------------------------------------------------------------------------------
  1193. * Fixed plurals in comment count for replies.
  1194. Changes by Jacob Barkdull 2014-04-05
  1195. --------------------------------------------------------------------------------
  1196. * Submit buttons now disable on submission, enable again after 20 seconds.
  1197. * Unified "hashover_noemail" and "hashover_noemailreply".
  1198. * Removed "<br>" tags in favor of CSS.
  1199. * Removed inline style.
  1200. Changes by Jacob Barkdull 2014-04-01
  1201. --------------------------------------------------------------------------------
  1202. * Added a new theme draft by Luka Kaspar
  1203. Changes by Jacob Barkdull 2014-03-29
  1204. --------------------------------------------------------------------------------
  1205. * Removed <table> element in favor of CSS column design.
  1206. * Many CSS changes to accommodate removal of <table> element.
  1207. * Cleaned up JavaScript for easier readability.
  1208. Changes by Jacob Barkdull 2014-03-28
  1209. --------------------------------------------------------------------------------
  1210. * "Like" links now change to "Liked" when clicked.
  1211. * Added language locales for like, edit, and reply links.
  1212. * Minor language locale improvement.
  1213. Changes by Jacob Barkdull 2014-03-27
  1214. --------------------------------------------------------------------------------
  1215. * When "$icons" variable is set to "no", avatar icons no longer show in reply
  1216. and edit forms. In the primary form a comment number is displayed instead.
  1217. * Many CSS changes to facilitate theming, like comment count and page title.
  1218. * Many JavaScript changes to accommodate CSS changes.
  1219. Changes by Jacob Barkdull 2014-03-25
  1220. --------------------------------------------------------------------------------
  1221. Official mark of version 1.0!
  1222. * All necessary files (source code and images) are now available via:
  1223. ZIP archive: http://tildehash.com/hashover.zip
  1224. GitHub: https://github.com/jacobwb/hashover
  1225. * Please commit your changes to GitHub and make sure to read the GitHub page
  1226. carefully for coding guidelines and copyright information.
  1227. * Added new comment sorting feature with five sorting methods:
  1228. In Order
  1229. In Reverse Order
  1230. By Commenter
  1231. By Date (newest first)
  1232. By Likes
  1233. * Locale support, only three languages supported right now: English, Spanish,
  1234. and Japanese. More languages will be added, those three are simply the ones
  1235. of which I have at least some knowledge. More, further, and better
  1236. translations are welcome and appreciated.
  1237. * Individual IP addresses can now be blocked by adding them one per line to a
  1238. file called "blocklist.txt" in the "hashover" directory. In addition to that,
  1239. if the variable "$spam_IP_check" is set to 'php', 'javascript', or 'both' a
  1240. visitor's IP address will be checked against stopforumspam.com's database.
  1241. * E-mail notifications per comment can now be disabled by unchecking the
  1242. "Subscribe" checkbox in the "Edit Comment" form.
  1243. * Added administration support for deletion and editing of all comments. Set
  1244. the "$admin_nickname" and "$admin_password" variables in the "secrets.php"
  1245. file to appropriate values. Read the "IMPORTANT" notice carefully.
  1246. * Many, many major changes to accommodate said and following changes.
  1247. * The script has been split into multiple files in "hashover/scripts" directory.
  1248. * Removed all JavaScript from PHP-mode (except code for liking a comment).
  1249. * "Reply" and "Edit" forms are now part of the dynamically generated HTML.
  1250. * Added "Login" button. It simply sets the necessary cookies that allow users
  1251. to edit, delete, and (un)subscribe to/from email notifications.
  1252. * Removed Jeremiah Stoddard as secondary copyright holder since his
  1253. contributions are no longer present in the current codebase, or rather, the
  1254. codebase has changed enough that he would have no legal precedent to claim
  1255. ownership any longer. Not that I expect any trouble.
  1256. * Fixed bug that caused a comment to become uneditable after you post another
  1257. comment with a different e-mail address as the last. Cause: conditions to
  1258. display the "Edit" link were based on a name+e-mail+password scheme.
  1259. * Renamed "comments.php" to "hashover.php".
  1260. * Renamed "comments" directory to "hashover".
  1261. * Moved code for automatic links and embedded images out of "write_comments.php"
  1262. * Avatar icons that fail to load now get same style as when icons are disabled.
  1263. * Temporarily disabled Identi.ca avatar support (see avatars.php) for why.
  1264. * Added "reply" to "cmtdiv" CSS class elements to control how replies look.
  1265. * Added "nickname" and "likes" to RSS feeds for use as API.
  1266. * Removed name and horizontal row from RSS descriptions.
  1267. * Now checks PHP version, fails if not 5.3.3 or higher.
  1268. * Improved how comment deletion notices are handled.
  1269. * Changed format of changelog.
  1270. * Minor CSS changes.
  1271. * Minor bug fixes.
  1272. Changes by Jacob Barkdull 2013-03-31
  1273. --------------------------------------------------------------------------------
  1274. RSS feed items now sorted by creation date in file, instead of filemtime.
  1275. Changes by Jacob Barkdull 2013-03-20
  1276. --------------------------------------------------------------------------------
  1277. External image URLs have to be wrapped in [img] and [/img] tags to appear.
  1278. Removed insecure "e" modifier from all preg_replace operations.
  1279. Improved how HTML tags are handled, including <code> escaping.
  1280. Bug fixed: URLs to image files automatically link again.
  1281. Bug fixed: User input of "\n" no longer phased in JavaScript.
  1282. Changes by Jacob Barkdull 2013-03-18
  1283. --------------------------------------------------------------------------------
  1284. Fixed bug causing "@username@identica" names to loss "@identica" when editing.
  1285. Fixed bug causing all "@" symbols to be removed from names.
  1286. Major changes to how HTML output is handled, most HTML has been moved
  1287. into "/comments/templates/default.html", allowing for multiple comment
  1288. styles and easy customization of HTML output and overall layout.
  1289. Changes by Jacob Barkdull 2013-02-08
  1290. --------------------------------------------------------------------------------
  1291. Added code to display external images.
  1292. "comments.css" link tag no longer added to head if one already exists.
  1293. Now escaping single quotes instead of double quotes in JavaScript output.
  1294. "avatars.php" no longer uses cURL.
  1295. Optimized JavaScript output.
  1296. Redesigned comment layout.
  1297. Many CSS changes.
  1298. Changes by Jacob Barkdull 2012-12-03
  1299. --------------------------------------------------------------------------------
  1300. Applied patch by Solomon Peachy
  1301. Changes by Jacob Barkdull 2012-10-29
  1302. --------------------------------------------------------------------------------
  1303. Changed script execution time into JavaScript comment.
  1304. Fixed bug allowing external script usage via "canon_url".
  1305. Changes by Jacob Barkdull 2012-10-07
  1306. --------------------------------------------------------------------------------
  1307. Many minor bug fixes.
  1308. Many major CSS changes.
  1309. Code clean-up, some variable name changes.
  1310. Avatar icon URLs added to RSS feed, allowing RSS feeds to act as an API.
  1311. Major "Edit" form redesign, editing "Name", "E-mail" and "Website" now allowed.
  1312. Comments only containing newlines and/or spaces are now treated as empty.
  1313. Now removing trailing newlines and spaces from comments before writing.
  1314. RSS feed "link" element now automatically added to page head element.
  1315. Fixed bug causing trailing newline when editing a comment.
  1316. Twitter/Identi.ca at-handles no longer part of name links.
  1317. Improved "<code>" tag method HTML character escaping.
  1318. CSS added to style "<pre>" and "<code>" tags.
  1319. Fixed bug causing "GET" requests to affect the file including "comments.php".
  1320. Explanation:
  1321. File "phphome.php" includes "comments.php", like this:
  1322. <?php $mode = 'php'; include("comments.php"); ?>
  1323. Someone visits "phphome.php?rss=http://website.com/", the
  1324. RSS feed XML would be output on "phphome.php". Similar was
  1325. true for "phphome.php?count_link=http://website.com/".
  1326. Added loop to remove unwanted URL queries from comment directory names.
  1327. Explanation:
  1328. Add unwanted URL queries, one per line, to a file called
  1329. "ignore_queries.txt" under the "comments" directory.
  1330. Adding just a query name without a value will remove the
  1331. query from comment directory names no matter what its value
  1332. is. Adding a query name with a value (name=value) will only
  1333. remove that specific query with that specific value from
  1334. comment directory names.
  1335. Content no longer written to document using JavaScript "document.write".
  1336. Explanation:
  1337. All content is now placed into the new "show_cmt" variable
  1338. and then written via "getElementById("hashover").innerHTML".
  1339. This allows the script to be deferrable (JavaScript 'defer'
  1340. tag), which means the script executes after the page is done
  1341. loading; a desirable behavior for some use cases.
  1342. Changes by Jacob Barkdull 2012-10-06
  1343. --------------------------------------------------------------------------------
  1344. Major redesign of reply form and "Like", "Edit", and "Reply" buttons.
  1345. XML files no longer double read in RSS feed function.
  1346. Many CSS changes and minor bug fixes.
  1347. Fixed cookie path problem.
  1348. Added "Unlike" feature.
  1349. Changes by Jacob Barkdull 2012-09-25
  1350. --------------------------------------------------------------------------------
  1351. Avatar icon in form no longer shown if "sites_on" variable set to "no".
  1352. Fixed bug where avatar icon in form remains when all optional fields disabled.
  1353. "Options" button no longer shown with all optional fields disabled.
  1354. Changed "&&" and "||" to "and" and "or", respectively.
  1355. "cmtform" element classes changes to "hashover".
  1356. Other minor bug fixes.
  1357. Many CSS changes.
  1358. Changes by Jacob Barkdull 2012-07-15
  1359. --------------------------------------------------------------------------------
  1360. Cleaned up code to get page URL.
  1361. Added error message to `mkdir()`.
  1362. Fixed comment deletion notice bug.
  1363. Improved error message of include of "secrets.php".
  1364. Added link relation to the "Source Code" link.
  1365. Added and changed some code comments.
  1366. Moved a few ifs and functions around.
  1367. Changed some error messages.
  1368. Changes by Jacob Barkdull 2012-07-12
  1369. --------------------------------------------------------------------------------
  1370. Applied patches by InaTux Computers. No changelog, so I'll do my best
  1371. to list what has been changed.
  1372. Comment replies no longer stored in sub-directories, now stored in
  1373. the same directory and named as <parent comment>-<reply number(s)>.
  1374. Rationale: Solves a permissions bug where sub-directories aren't
  1375. owned by a user who has permission to write to them.
  1376. Only a single directory is read. Making it faster.
  1377. Generating permalinks is as simple as:
  1378. #c<preg_replace('/-/', 'r', basename($file, '.xml'))>
  1379. Easier to read a comments tread via filenames.
  1380. Comment threads now stored in "/comments/pages/<page URL>".
  1381. Separated like functionality into "like.php" script.
  1382. Many, many minor changes to accommodate said and following changes.
  1383. Many "\n" newlines replaced with "PHP_EOL". This helps JavaScript
  1384. and HTML output look the same across different server platforms.
  1385. "like.php", "avatars.php" and "secrets.php" moved into new
  1386. "scripts" directory. All images moved into new "images" directory.
  1387. Fixed bug causing "Like" link to only be displayed when an
  1388. "E-mail Address" cookie is set. Anyone who hadn't commented yet
  1389. couldn't see the "Like" link.
  1390. Renamed a few variables.
  1391. Added a few code comments.
  1392. Replaced `$fsroot_dir` variable with `chdir()`.
  1393. All mentions of "comments.php" in actual code removed.
  1394. Separated "Default Settings" variables from URL cleaning code.
  1395. Moved "Default Settings" variables back to the top of the code.
  1396. Added more robust handling of "secrets.php" file inclusion.
  1397. Added error message upon failed "secrets.php" file inclusion.
  1398. Updated list of files to download in installation note.
  1399. Spaced out some code structure for better readability.
  1400. Separated deletion notice out into new "deletion_notice" function.
  1401. Reworked handling of deleted comments.
  1402. "All that, and a toilet!"
  1403. Changes by Jacob Barkdull 2012-07-04
  1404. --------------------------------------------------------------------------------
  1405. Fixed bug that made only alphanumeric comments possible (うぐぅ).
  1406. Fixed bug causing corrupt permalinks in RSS feeds.
  1407. Changed display of count link to "Post Comment" if there are no comments.
  1408. Removed full XML file server-side locations from "Like" links.
  1409. Removed unnecessary second `str_replace()` from "$clean_data" variable.
  1410. Changed reply button tooltips to better reflect status of e-mail subscription.
  1411. The "Edit" link is now shown for multiple users of the same computer.
  1412. Added Twitter/Identi.ca profile linking back in (doesn't check for profile)
  1413. Added tooltips to "Like" and "Edit" links.
  1414. Added CSS class attributes to "Like" and "Edit" links.
  1415. Added switch to turn off IP address storage.
  1416. Improved e-mail notifications.
  1417. Improved automatic links.
  1418. Fixed "Like" bugs.
  1419. Comment count no longer innerHTML'd into "cmtcount" identified HTML
  1420. element if there are no comments.
  1421. Improved how comment and reply fields get their default text,
  1422. and how the script ignores and JavaScript handles them.
  1423. CSS changes.
  1424. Changes by Jacob Barkdull 2012-07-01
  1425. --------------------------------------------------------------------------------
  1426. Changed "Like", "Edit", and "Reply" buttons into links, as well as
  1427. many code adjustments to accommodate said change.
  1428. Separated avatar functionality into "avatars.php" to decrease load time.
  1429. Checkmark icons beside "Reply" now handled by CSS (revert to element classes).
  1430. Added "Canonical URL" feature, the necessary form fields and code.
  1431. Added optional left-aligned comment indention via "$indention" variable.
  1432. Removed deprecated "edit" and "like" CSS element classes.
  1433. Removed unnecessary span tags and their IDs.
  1434. Page URLs no longer truncate at first ampersand.
  1435. Improved how the script gets the page URL.
  1436. Changed `$_GET["display"]` to `$_GET["count_link"]`.
  1437. Changed `$_SERVER["SERVER_NAME"]` to "$domain".
  1438. Changed how count link is handled (now uses full URL.)
  1439. Changed look of password field and delete button when editing a comment.
  1440. Changed many variable names (either spaced them out or renamed them.)
  1441. Moved and condensed a lot of code related to page URL and mode switch.
  1442. Added execution time to footer (it's temporary, helps me improve load time.)
  1443. Added various error messages.
  1444. Fixed referer checking.
  1445. CSS changes.
  1446. Changes by Jacob Barkdull 2012-06-29
  1447. --------------------------------------------------------------------------------
  1448. Added checkmark icon beside "Reply" to indicate presence of notification
  1449. email. Removed "Reply", "Edit", and "Like" CSS hoverover background colors.
  1450. Changed Twitter/Identi.ca @handles character limit to from 20 to 29
  1451. because the 20 limit is hit to easily with an optional @identica.
  1452. Nickname now links to Twitter/Identi.ca profile if an @username(@identica)
  1453. is used as Nickname and no Website is given.
  1454. Twitter and Identi.ca avatars now fallback on Gravatar
  1455. (Twitter's default egg graphic will no longer show up).
  1456. Fix spelling error, "avatar" misspelled as "avartar".
  1457. CSS changes.
  1458. Changes by Jacob Barkdull 2012-06-27
  1459. --------------------------------------------------------------------------------
  1460. Applied patch by Solomon Peachy.
  1461. Changed field JavaScript "onfocus" and "onblur" coloring to CSS ":focus".
  1462. Replaced background style on each form input field with class tag.
  1463. Removed checkmark beside names to deter implying Twitter account verification.
  1464. Added CSS colors and HTML tooltips to indicate presence of notification email.
  1465. Improved handling of reply and edit forms.
  1466. Added link to archives.
  1467. CSS changes.
  1468. Changes by Jacob Barkdull 2012-06-27
  1469. --------------------------------------------------------------------------------
  1470. Now removing "@identica" from names.
  1471. Changed Twitter/Identi.ca linking to avatar icon instead of Nickname.
  1472. Fixed bug causing URLs surrounded in spaces to fail to auto-link.
  1473. Changes by Jacob Barkdull 2012-06-22
  1474. --------------------------------------------------------------------------------
  1475. CSS changes that improves use on mobile devices.
  1476. Fixed bug causing "E-mail Address" to be written to comment file
  1477. when a blank e-mail address is given.
  1478. Fixed bug causing failed Twitter/Identi.ca at-handle profile
  1479. linking if Website field is blank.
  1480. Changes by Jacob Barkdull 2012-06-18
  1481. --------------------------------------------------------------------------------
  1482. Minor changes to PHP, CSS, and mobile handling.
  1483. Now using local image file as default avatar instead of Gravatar's.
  1484. Now Twitter/Identi.ca avatars will be used if a Twitter/Identi.ca
  1485. profile URL is used as Website.
  1486. Changes by Jacob Barkdull 2012-06-10
  1487. --------------------------------------------------------------------------------
  1488. Twitter avatars will now be displayed if an @username is used as Nickname,
  1489. Identi.ca avatars will be displayed if an @username@identica is used.
  1490. Names link to Twitter/Identi.ca profiles if @username(@identica) is used.
  1491. Fixed blank passwords being written to comment file as MD5'd "Password".
  1492. Other minor bug fixes & code changes.
  1493. Changes by Jacob Barkdull 2012-06-08
  1494. --------------------------------------------------------------------------------
  1495. Now on page load a "cmtcount" identified HTML element will receive the
  1496. comment count as content. Example: "<span id="cmtcount"></span> Comments".
  1497. Useful to make a comment "widget"/"badge"/"button" thing.
  1498. Changes by Jacob Barkdull 2012-06-04
  1499. --------------------------------------------------------------------------------
  1500. "comments.css" StyleSheet tag now automatically added to page head tag.
  1501. Updated installation instructions.
  1502. Added tooltips to form fields.
  1503. Changes by Jacob Barkdull 2012-05-29
  1504. --------------------------------------------------------------------------------
  1505. Added Gravatar icons to the main comment form and reply forms.
  1506. Major form redesign and layout, temporary values describe the various fields,
  1507. along with image icons to the left of each field.
  1508. Updated CSS.
  1509. Changes by Jacob Barkdull 2012-05-26
  1510. --------------------------------------------------------------------------------
  1511. Fixed bug causing escaped HTML tags to become part of automatic links,
  1512. which caused problems when the accepted tags were converted back.
  1513. Changes by Jacob Barkdull 2012-05-14
  1514. --------------------------------------------------------------------------------
  1515. Improved "Most Popular Comment(s)" feature.
  1516. Fixed "kickback" fragment identifiers when deleting comments.
  1517. Added "$popular" variable as popularity-via-likes threshold.
  1518. Fixed bug causing conflicts between innerHTML actions.
  1519. Now comment dates are removed when replying/editing.
  1520. Now the "Edit" button only shows if the e-mail cookie and
  1521. e-mail address in the comment file match.
  1522. Changes by Jacob Barkdull 2012-05-12
  1523. --------------------------------------------------------------------------------
  1524. Added "Like" feature.
  1525. Start of "Most Popular Comment(s)" feature.
  1526. Setting up for sorting.
  1527. Renamed HTML IDs for clarity.
  1528. Separated HTML tag output from "read_comments" function
  1529. into new "parse_comments" function.
  1530. Changes by Jacob Barkdull 2012-05-09
  1531. --------------------------------------------------------------------------------
  1532. Fixed comment count in RSS feeds.
  1533. --------------------------------------------------------------------------------
  1534. Changes by Jacob Barkdull 2012-05-05
  1535. Fixed HTML tag output in notification e-mails.
  1536. Removed ASCII carriage returns ("\r") in notification e-mails.
  1537. Fixed encryption bug causing mismatched passwords, corrupt email
  1538. addresses and false/failed notification deliveries.
  1539. Changes by Jacob Barkdull 2012-05-04
  1540. --------------------------------------------------------------------------------
  1541. Reworked handling of deleted comments.
  1542. Reply directories are now deleted when they're empty.
  1543. Changed how comments are counted.
  1544. Changed how comment files get their numbers.
  1545. Fixed bug causing escaped HTML in automatic links.
  1546. Changed comment file format to XML (ask if you want the converter).
  1547. Other minor bug fixes and changes.
  1548. Changes by Jacob Barkdull 2012-05-01
  1549. --------------------------------------------------------------------------------
  1550. Renamed 'key.php' file to 'secrets.php'.
  1551. Moved "enotify" variable into 'secrets.php' file.
  1552. Improved how PHP source code is handled.
  1553. Fixed display of JavaScript source code.
  1554. Other bug fixes.
  1555. Changes by Jacob Barkdull 2012-04-19
  1556. --------------------------------------------------------------------------------
  1557. Major rewrite of JavaScript and HTML output.
  1558. Improved JavaScript/PHP mode switch.
  1559. Changes by Jacob Barkdull 2012-04-16
  1560. --------------------------------------------------------------------------------
  1561. Start of switch functionality between mostly-PHP and JavaScript+PHP modes.
  1562. Changed appropriate HTML tag ID attributes to CLASS attributes.
  1563. Changes by Jacob Barkdull 2012-04-12
  1564. --------------------------------------------------------------------------------
  1565. Minor changes to the display count functionality.
  1566. Changes by Jacob Barkdull 2012-02-19
  1567. --------------------------------------------------------------------------------
  1568. Improved comment requirement indication.
  1569. Improved form top/bottom position HTML tag layout.
  1570. Added RSS feed image link to the right of the comment count.
  1571. Changed default comment form text to indicate which fields are required.
  1572. Changes by Jacob Barkdull 2012-02-02
  1573. --------------------------------------------------------------------------------
  1574. Improved comment sub-directory naming scheme.
  1575. Deleted message no longer written to deleted comments.
  1576. Removed function "make_directories".
  1577. Changed permalink naming scheme.
  1578. Cleaned code.
  1579. Changes by Jacob Barkdull 2012-01-30
  1580. --------------------------------------------------------------------------------
  1581. Added "Tread" links pointing to parent comments beside comment dates.
  1582. Improved HTML tag layout and CSS style for Webkit browsers.
  1583. Optimized JavaScript output for faster loading.
  1584. Changes by Jacob Barkdull 2012-01-28
  1585. --------------------------------------------------------------------------------
  1586. Added optional shorter comment date format.
  1587. Added subtle way to identify commenters whom will receive email notifications.
  1588. Improved HTML tag layout and CSS style for slightly better scalability.
  1589. Improved HTML cleanup and automatic tag closing ("cleantags" function).
  1590. Renamed "endtags" function to "cleantags".
  1591. Changes by Jacob Barkdull 2012-01-25
  1592. --------------------------------------------------------------------------------
  1593. Optional Gravatar avatar icon integration.
  1594. Improved HTML tag layout.
  1595. Improved CSS style.
  1596. Changes by Jacob Barkdull 2012-01-24
  1597. --------------------------------------------------------------------------------
  1598. Beginning of comment editing feature.
  1599. Changed "Reply To Comment" and "Delete" links into buttons.
  1600. Added confirmation popup to delete button.
  1601. Moved delete button to under "Edit".
  1602. Cleaned up JavaScript code.
  1603. Minor CSS changes.
  1604. Bug fixes.
  1605. Changes by Jacob Barkdull 2012-01-17
  1606. --------------------------------------------------------------------------------
  1607. Beginning of RSS feed feature.
  1608. Changes by Jacob Barkdull 2012-01-16
  1609. --------------------------------------------------------------------------------
  1610. Fixed bug that allowed anyone to delete any file with 0777 permissions.
  1611. Fixed bug that allowed anyone to delete any comment, using a single password.
  1612. Reply email notifications now include original comment under "In reply to:".
  1613. Removed encrypted emails and passwords from JavaScript output.
  1614. General code clean up and other minor bug fixes.
  1615. Changes by Jacob Barkdull 2011-10-24
  1616. --------------------------------------------------------------------------------
  1617. Fixed link to comment in notification emails.
  1618. Changes by Jacob Barkdull 2011-10-05
  1619. --------------------------------------------------------------------------------
  1620. Added step about the system's CSS to installation note.
  1621. Added basic style to the HTML output as fallback.
  1622. Fixed bug that disabled automatic hyperlinks.
  1623. Fixed "style" tags.
  1624. Changes by Jacob Barkdull 2011-09-29
  1625. --------------------------------------------------------------------------------
  1626. Changed how comment directories are named, filename now includes full path.
  1627. Made the links to "Source Code" and "JavaScript" point to local server.
  1628. Added "link" query to use with "display" query.
  1629. Changed how the "display" query is handled.
  1630. Changes by Jacob Barkdull 2011-09-26
  1631. --------------------------------------------------------------------------------
  1632. Added "pagetitle" variable as a toggle for whether page title is shown or not.
  1633. Added two steps about creating the "comments" directory to installation note.
  1634. Changed line 59 (now line 61) to run `$_SERVER["PHP_SELF"]` through basename.
  1635. Other minor changes.
  1636. Changes by Jacob Barkdull 2011-09-11
  1637. --------------------------------------------------------------------------------
  1638. Changed how the comment count's plurals are handled.
  1639. Changed how displaying source code is handled.
  1640. Added `header("Content-type: text/javascript");` at line 53.
  1641. Added a link to the JavaScript output at the end of the comments.
  1642. Changed Copyright and installation note(s).
  1643. Changed how referring URLs are handled.
  1644. PHP and JavaScript documentation.
  1645. Cleaned up code.
  1646. Changes by Jacob Barkdull 2011-08-25
  1647. --------------------------------------------------------------------------------
  1648. Replaced deprecated function `eregi_replace()` with `preg_replace()`.
  1649. Improved how accepted HTML tags are handled.
  1650. Added code to escape HTML tags inside <code> tags.
  1651. Added <code> tag to accepted HTML.
  1652. Fixed serious bugs.
  1653. Changes by Jacob Barkdull 2011-08-21
  1654. --------------------------------------------------------------------------------
  1655. Added the "endtags" function for counting the number of open and closing HTML
  1656. tags, if the number of open and closing HTML tags aren't the same it adds as
  1657. many closing tags as necessary for each to the end of the file. Ensuring that
  1658. tags left unclosed by a commenter won't affect the rest of the page. The
  1659. function only closes accepted HTML tags, as that's all that's necessary.
  1660. Fixed a bug that caused the "Options" link to be displayed even when
  1661. the options were displayed or were never hidden upon first time use
  1662. or due to disabled/unaccepted cookies.
  1663. Changes by Jacob Barkdull 2011-08-20
  1664. --------------------------------------------------------------------------------
  1665. Fixed a bug that allowed anyone to use a blank password to delete any comment
  1666. if a password wasn't given when the target comment was posted (thanks "Outis").
  1667. Added code to display a "Delete" link on comments only if a password was given
  1668. when the comment was posted. Subsequently added necessary JavaScript code.
  1669. Added ID tags to HTML elements for better control of style.
  1670. Renamed "comment_form2" as "reply_form".
  1671. Adjusted indention, x2 the padding.
  1672. Changes by Jacob Barkdull 2011-08-19
  1673. --------------------------------------------------------------------------------
  1674. Added AGPL notice to JavaScript output. The JavaScript is now Free Software.
  1675. Changed comments' flat text file format.
  1676. Removed all HTML elements from comment files.
  1677. Removed all code for writing HTML elements to comment files.
  1678. Added code to add HTML elements to JavaScript output.
  1679. Added "LOCK_EX" to "file_put_contents" functions.
  1680. Improved how Line Feeds and Carriage Returns are handled.
  1681. Passwords are now saved as a MD5 hash to prevent malicious use by webmasters.
  1682. Fixed JavaScript output indention.
  1683. Cleaned up code.
  1684. Added comments.
  1685. Changes by Jacob Barkdull 2011-03-15
  1686. --------------------------------------------------------------------------------
  1687. Shortened the names of some variables.
  1688. Changed HTML ID tags to more general names.
  1689. Added HTML ID tags to multiple HTML elements to allow more control over style.
  1690. Moved HTML elements around to complement the CSS changes.
  1691. Cleaned up code.
  1692. Changes by Jacob Barkdull 2010-21-10
  1693. --------------------------------------------------------------------------------
  1694. Changed "Post a Comment" to include page title, automatically by default or
  1695. by specifying the title in the <script> tag via the "pagetitle" URL query.
  1696. Fixed a bug that caused a blank name if the "Website" field was disabled.
  1697. Fixed a bug that caused a message "You will not receive notification of
  1698. replies to your comment without supplying an e-mail" to appear even if the
  1699. "Email" field is disabled.
  1700. Now if all fields are disabled the "Options" link displays a message reading:
  1701. "All Additional Options Disabled."
  1702. Changes by Jacob Barkdull 2010-12-10
  1703. --------------------------------------------------------------------------------
  1704. Fixed a bug that caused JavaScript syntax errors if an encrypted password
  1705. contained a quote.
  1706. Changes by Jacob Barkdull 2010-12-10
  1707. --------------------------------------------------------------------------------
  1708. Changed code indention from spaced to tabbed.
  1709. Changed "Name" field to "Nickname".
  1710. Changed "Password (?)" field to "Password (Optional)".
  1711. Moved password field so as to appear right after the "Nickname" field, this
  1712. way web browsers will store the "Name" field as username and the "Password"
  1713. field as password, as opposed to "Website" being stored as the username.
  1714. Delete field is now auto-filled.
  1715. Changes by Jacob Barkdull 2010-12-03
  1716. --------------------------------------------------------------------------------
  1717. Merged the two occurring RecursiveDirectoryIterator classes. This should
  1718. make the comment system slightly more efficient as it will no longer read
  1719. the "/comments" directory twice.
  1720. Renamed the password input fields' names stored in each comment file to fix
  1721. a bug where the decrypted password would be saved to the comment file.
  1722. Renamed the "count_comments" function to "read_comments".
  1723. Changes by Jacob Barkdull 2010-11-24
  1724. --------------------------------------------------------------------------------
  1725. Added functionality to display only the comment count by setting the
  1726. "display" URL query to the page filename.
  1727. Added information about said functionality to the installation note.
  1728. Changes by Jacob Barkdull 2010-11-06 to 2010-11-10
  1729. --------------------------------------------------------------------------------
  1730. Altered the "count_comments" function to use RecursiveDirectoryIterator and
  1731. merged Jeremiah Stoddard's modifications with the "count_comments" function.
  1732. Added functionality to show a "This file has been deleted" note on first
  1733. replies and all underlying replies. In other words the deleted comment
  1734. recreation with a notice of deletion is now recursive.
  1735. Altered design implementations, like "Delete" comes before "Reply to Comments",
  1736. "if($file->isFile())" is now "if(is_file($file))", individual padding on
  1737. comments, "Delete" link is now red, number of comments is displayed as:
  1738. "Showing 3 Comments (8 counting replies)" for example.
  1739. Fixed serious bugs.
  1740. Changes by Jeremiah Stoddard 2010-11-06
  1741. --------------------------------------------------------------------------------
  1742. Altered the unlink line to replace the file contents with the note
  1743. "This file has been deleted."
  1744. Altered the `readfile()` in line 334 to make a comparison to that note and
  1745. skip the reply/delete links if file contents match the note.
  1746. Modified the script to find missing files and recreate them.
  1747. Changes by Jacob Barkdull 2010-11-06
  1748. --------------------------------------------------------------------------------
  1749. Beginning of comment deletion functionality.
  1750. Added JavaScript function to display "Options" such as Name, Email,
  1751. Website, etc., when replying.
  1752. Added a Password field, used to shore an encrypted password in each
  1753. comment file for later use, such as deleting a comment.
  1754. Changes by Jacob Barkdull 2010-11-05
  1755. --------------------------------------------------------------------------------
  1756. Made referrer checking stricter to avoid obscure directories created under
  1757. "/comments" via external usage. This happened on Google search cache and
  1758. other external websites that could remotely use the comment system by simply
  1759. including "tildehash.com" in the page name or as a URL query.
  1760. Changes by Jacob Barkdull 2010-11-04
  1761. --------------------------------------------------------------------------------
  1762. Added "<s>", "<ul>", "<ol>", "<li>", and "<blockquote>" as supported HTML.
  1763. Now removing second queries from referring URLs.
  1764. Changes by Jacob Barkdull 2010-11-03
  1765. --------------------------------------------------------------------------------
  1766. Fixed a bug that caused pages with URLs that contain numbers to include the
  1767. numbers in the permalink.
  1768. Fixed a bug that caused the first comment's first reply to have the same
  1769. permalink number as the 11th comment (1/1.txt = 11 & 11.txt = 11).
  1770. Moved the reply link out of the "data" variable and into the "read_comments"
  1771. function, a reply link will no longer be written to each comment file.
  1772. Made some small layout changes.
  1773. Changes by Jacob Barkdull 2010-10-23
  1774. --------------------------------------------------------------------------------
  1775. Added a warning message when a comment is posted without an email address.
  1776. Added a <noscript> tag to the installation code.
  1777. Changes by Jacob Barkdull 2010-09-10
  1778. --------------------------------------------------------------------------------
  1779. I'm sort of confused about the comment counting method used for displaying a
  1780. message when a comment has been deleted. There was (is?) a bug that caused it
  1781. to display a "Comment Deleted" message after replies. I believe I've fixed
  1782. this by adding the "deletedcomment" variable back in.
  1783. Changes by Jacob Barkdull 2010-09-07
  1784. --------------------------------------------------------------------------------
  1785. Added encryption method for encrypting emails stored in comments; these emails
  1786. are used for notifying a commenter of replies to his/her comment(s).
  1787. Added necessary form fields and code for storing encrypted emails and sending
  1788. mail to commenter when another commenter replies to his/her comment(s).
  1789. Changes by Jacob Barkdull 2010-07-29
  1790. --------------------------------------------------------------------------------
  1791. Now we strip "../" from $_POST["reply_to"] thus "sanitizing" the value before
  1792. using it. This helps prevent malicious usage (thanks mysterious 89.248.91.145.)
  1793. Added additional JavaScript functions for disabling comments, displaying
  1794. comment form on bottom, setting "Comments" field height, disabling "Name"
  1795. field, disabling "E-mail" field, and disabling "Website" field.
  1796. $deletedcount removed, $commentcount now used for tracking deleted comments.
  1797. Changes by Jacob Barkdull 2010-07-28
  1798. --------------------------------------------------------------------------------
  1799. Added if statement to `mail()` so that if the email given is the same as the
  1800. email used for notification it won't send mail to the notification email.
  1801. Changes by Jacob Barkdull 2010-07-24
  1802. --------------------------------------------------------------------------------
  1803. Made the reply link trigger a JavaScript function that replaces it with a
  1804. form to post a reply. This form also only shows the "Name", "E-mail
  1805. Address", and "Website" fields if they don't have content from previous
  1806. usage of the comments in the last month.
  1807. Changed BBCode to normal HTML.
  1808. Changes by Jacob Barkdull 2010-07-22
  1809. --------------------------------------------------------------------------------
  1810. Added left padding to replies as indention, and added a closing div tag so
  1811. that each reply is in its own div. Permalinks are now based on file
  1812. basenames+subdirectory names.
  1813. Changes by Jeremiah Stoddard 2010-07-22
  1814. --------------------------------------------------------------------------------
  1815. Beginnings of a reply system. Need to indent replies. Also, the anchors now
  1816. need to take into account the directory structure: basename("$dir/$file",
  1817. ".txt") alone is not sufficient enough to remain unique.
  1818. Changes by Jeremiah Stoddard 2010-07-21
  1819. --------------------------------------------------------------------------------
  1820. Removed line: header("Content-type: text/javascript"); from near the end of
  1821. script (former line 172) as output already sent by former line 101:
  1822. document.write("\n<form action=\"<?php echo $_SERVER["PHP_SELF"]; ?>\" method=\"post\">\n");
  1823. Added brief installation note
  1824. Added additional comments throughout code