ilosuna / phpsqlitecms

phpSQLiteCMS is a simple and lightweight web content management system based on PHP and SQLite.
phpsqlitecms.net
MIT License
138 stars 75 forks source link

Added reCAPTCHA && Google Analytics support #33

Open lyserbin opened 9 years ago

lyserbin commented 9 years ago

With these patches I added reCAPTCHA and Google Analytics support to phpsqlitecms.

You can edit the reCAPTCHA settings under 'Spam protection' section in the administration panel, for Google Analytics I added a section under the administration menu.

After adding your site and your secret reCAPTCHA keys, you can select where do you want to add the reCAPTCHA check, by now you can add it to:

In the same way you just have to add your Analytics Tracking ID, check the checkbox and you are right. Google Analytics script will be loaded in every page with the 'default.tpl' template (so administration pages won't be tracked).

It also prevents to randomly add Google's script in the page if you haven't enabled the feature that needs them, so it should be good also for the ones who don't want Google in their way ;)

In the end I edited the scripts and stylesheet position, so the page can be readden 'above the fold' and gets loaded even if cdns are having problems.

theAsgar commented 9 years ago

Captcha-inventor of the possibilities of modern text recognition are aware and already hindering therefore (even completely unnecessary) human visitors with barely clearly recognizable spelling - and they have the even factored in since they equally provide a link for another Captcha hoping that hidden string might therefrom be guessed correctly. Blind are hardest hit by the Captcha-delusion. Their access is therefore entirely denied, why captchas on barrier-free pages and may not be used. It should also be clear that there can be no barrier-free captcha. If the string in addition to the Captcha for disabled in other ways - for example, quite simply as an alternative text - would be presented, could be equal to waive the Captcha to the delight of all. Please no Captcha.

lyserbin commented 9 years ago

TL;DR: You are free to not enable it

theAsgar commented 9 years ago

I know there are so many beautiful barrier-free alternative without captcha. :)

lyserbin commented 9 years ago

You can still not enable it and implement your own way to block bots :sunglasses: