Remove "site tag" feature
authorstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 14 Feb 2013 22:36:47 +0000 (22:36 +0000)
committerstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 14 Feb 2013 22:36:47 +0000 (22:36 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/sr_freecap/trunk@71210 735d13b6-9817-0410-8766-e36946ffe9aa

18 files changed:
ChangeLog
Classes/Utility/ImageContentUtility.php
Classes/View/ImageGenerator/ShowPng.php
Configuration/TypoScript/constants.txt
Configuration/TypoScript/setup.txt
Resources/Private/Language/br.locallang.xlf
Resources/Private/Language/de.locallang.xlf
Resources/Private/Language/dk.locallang.xlf
Resources/Private/Language/es.locallang.xlf
Resources/Private/Language/fi.locallang.xlf
Resources/Private/Language/fr.locallang.xlf
Resources/Private/Language/it.locallang.xlf
Resources/Private/Language/locallang.xlf
Resources/Private/Language/nl.locallang.xlf
Resources/Private/Language/pl.locallang.xlf
Resources/Private/Language/pt.locallang.xlf
Resources/Private/Language/ru.locallang.xlf
doc/manual.sxw

index 308cc70..96c74d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-14  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Remove "site tag" feature
+
 2013-02-13  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Add option to configure the encryption algorithm in Extension Manager
index 882ee90..4d4d18a 100644 (file)
@@ -3,7 +3,7 @@ namespace SJBR\SrFreecap\Utility;
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2012 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  (c) 2012-2013 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -182,51 +182,6 @@ class ImageContentUtility {
        }
 
        /**
-        * Write site tag
-        *
-        * @param int $width: width of the image in pixels
-        * @param int $height: width of the image in pixels
-        * @param array $siteTags: array of site tags    
-        * @param array $siteTagPosition: position of the site tags on the image (see constants)
-        *
-        * @return string GD image identifier of noisy background
-        */
-       public static function writeSiteTags ($width, $height, $siteTags, $siteTagPosition) {
-
-               $image = ImageCreate($width, $height);
-               // Set tag colour
-               $siteTagColor = ImageColorAllocate($image, 0, 0, 0);
-               // Set background colour
-               $background = ImageColorAllocate($image, 254, 254, 254);
-               // Set transparency
-               ImageColorTransparent($image, $background);
-               // Fill background
-               ImageFill($image, 0, 0, $background);
-
-               // Write site tags 'shining through' the morphed image
-               ImageFilledRectangle($image, 0, 0, $width, $height, $background);
-               if (is_array($siteTags)) {
-                       $font = 2;
-                       $siteTagFontWidth = 6;
-                       $siteTagFontHeight = 10;
-                       for ($i = 0; $i < sizeof($siteTags); $i++) {
-                               // Ensure tags are centered
-                               $tagWidth = strlen($siteTags[$i]) * $siteTagFontWidth + 8;
-                               // Write tag is chosen position
-                               if ($siteTagPosition == self::SITE_TAG_POSITION_TOP || $siteTagPosition == self::SITE_TAG_POSITION_BOTH) {
-                                       // Write at top
-                                       ImageString($image, $font, intval($width/2)-intval($tagWidth/2)+5, $siteTagFontHeight*$i, $siteTags[$i], $siteTagColor);
-                               }
-                               if ($siteTagPosition == self::SITE_TAG_POSITION_BOTTOM || $siteTagPosition == self::SITE_TAG_POSITION_BOTH) {
-                                       // Write at bottom
-                                       ImageString($image, $font, intval($width/2)-intval($tagWidth/2)+5, ($height-((sizeof($siteTags)*$siteTagFontHeight+4))+($i*$siteTagFontHeight)), $siteTags[$i], $siteTagColor);
-                               }
-                       }
-               }
-               return $image;
-       }
-
-       /**
         * Generate noisy background
         *
         * @param int $width: width of the image in pixels
index 5e408c9..1a5a60e 100644 (file)
@@ -3,7 +3,7 @@ namespace SJBR\SrFreecap\View\ImageGenerator;
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2005-2012 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  (c) 2005-2013 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -246,17 +246,6 @@ class ShowPng implements \TYPO3\CMS\Extbase\MVC\View\ViewInterface {
                        ImageColorTransparent($image, $background);
                }
 
-               // Try to avoid 'free p*rn' style CAPTCHA re-use
-               // ('*'ed to stop my site coming up for certain keyword searches on google)
-               // can obscure CAPTCHA word in some cases..
-               // Write site tags 'shining through' the morphed image
-               /*if (count($this->settings['siteTag'])) {
-                       $image2 = \SJBR\SrFreecap\Utility\ImageContentUtility::writeSiteTags($width, $height, $this->settings['siteTag'], $this->settings['siteTagPosition']);
-                       ImageCopyMerge($image2, $image, 0, 0, 0, 0, $width, $height, 80);
-                       ImageCopy($image, $image2, 0, 0, 0, 0, $width, $height);
-                       ImageDestroy($image2);
-               }*/
-
                if ($backgroundType != \SJBR\SrFreecap\Utility\ImageContentUtility::BACKGROUND_TYPE_TRANSPARENT) {
                        // Get noisy background
                        $image3 = \SJBR\SrFreecap\Utility\ImageContentUtility::generateNoisyBackground($width, $height, $word, $backgroundType, $this->settings['backgroundImages'], $this->settings['backgroundMorph'], $this->settings['backgroundBlur']);
index 88d6e14..1236e48 100644 (file)
@@ -66,15 +66,6 @@ plugin.tx_srfreecap {
     # cat=plugin.tx_srfreecap/file/03; type=string; label= Accessible output image: File name of the accessible output image. If null, a textual message is used.
        accessibleOutputImage = EXT:sr_freecap/Resources/Public/Images/audio.png
 
-    # cat=plugin.tx_srfreecap/enable/07; type=boolean; label= Use site tag: If set, a site tag is added in the background of the CAPTCHA image.
-       siteTag = 0
-
-    # cat=plugin.tx_srfreecap//06; type=string; label= Site tag domain name: Domain name to use in the default site tag.
-       siteTagDomain = example.org
-       
-    # cat=plugin.tx_srfreecap//07; type=int+; label= Position of the site tag: 0 = at the top of the CAPTCHA, 1 = at the bottom, 2 = both at the top and at the bottom
-       siteTagPosition = 1
-
     view {
         # cat=plugin.tx_srfreecap/file; type=string; label=Path to template root (FE)
        templateRootPath = EXT:sr_freecap/Resources/Private/Templates/
index ce9119c..8f07b79 100644 (file)
@@ -28,10 +28,6 @@ plugin.tx_srfreecap {
 
                accessibleOutput = {$plugin.tx_srfreecap.accessibleOutput}
                accessibleOutputImage = {$plugin.tx_srfreecap.accessibleOutputImage}
-
-               siteTag = {$plugin.tx_srfreecap.siteTag}
-               siteTagDomain = {$plugin.tx_srfreecap.siteTagDomain}
-               siteTagPosition = {$plugin.tx_srfreecap.siteTagPosition}
                
                salutation = {$plugin.tx_srfreecap.salutation}
        }
index 6a108f2..adc8969 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Desculpe, o serviço foi interrompido.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>Imagem CAPTCHA para prevenção de SPAM</target>
index 58b1b7e..04ef5b1 100644 (file)
                                <source>Sorry, service is interrupted.</source>
                                <target>Der Dienst ist leider unterbrochen.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target>Bitte geben Sie den Text NICHT ein|wenn diese Seite nicht %1$s ist</target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>CAPTCHA-Bild zum Spam-Schutz</target>
index 38298d5..88fbd37 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Beklager, tjenesten er ude af drift.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>CAPTCHA billede for SPAM beskyttelse</target>
index 85416f6..84a8c25 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Lo sentimos, el servicio está interrumpido.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>Imagen CAPTCHA para prevenir el uso abusivo</target>
index a7ba2eb..2a09120 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Pahoittelut, palvelu keskeytettiin.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>CAPTCHA kuva roskapostin välttämiseksi</target>
index 94c9627..b6c4653 100644 (file)
                                <source>Sorry, service is interrupted.</source>
                                <target>Le service est interrompu.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target>N'entrez pas le mot|si le site n'est pas %1$s!</target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>Image CAPTCHA pour prévenir l'utilisation abusive</target>
index e799680..86b0394 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Spiacente, servizio interrotto.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>Image CAPTCHA pour prévenir l'utilisation abusive</target>
index 5bb5d84..51954c4 100644 (file)
@@ -66,9 +66,6 @@
                        <trans-unit id="max_attempts" xml:space="preserve">
                                <source>Sorry, service is interrupted.</source>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve">
                                <source>CAPTCHA image for SPAM prevention</source>
                        </trans-unit>
index 802fc25..bec6f2d 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Service is onderbroken.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>CAPTCHA afbeelding om SPAM tegen te gaan</target>
index f4ba7fd..dc6eb19 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Desculpe, o serviço foi suspenso.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>Obrazek zabezpieczający przed spamem</target>
index ec5ed41..fbc44fd 100644 (file)
@@ -7,10 +7,6 @@
                                <source>Sorry, service is interrupted.</source>
                                <target>Desculpe, o serviço foi suspenso.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target></target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>Imagem CAPTCHA para prevenir &quot;spam&quot;</target>
index 4683b2b..11f8d27 100644 (file)
                                <source>Sorry, service is interrupted.</source>
                                <target>Извините, сервис недоступен.</target>
                        </trans-unit>
-                       <trans-unit id="site_tag" xml:space="preserve" approved="yes">
-                               <source>Please do NOT enter the text|if this site is not %1$s</source>
-                               <target>НЕ вводите текст|если это не %1$s сайт</target>
-                       </trans-unit>
                        <trans-unit id="altText" xml:space="preserve" approved="yes">
                                <source>CAPTCHA image for SPAM prevention</source>
                                <target>Изображение CAPTCHA для предотвращения спама</target>
index 290b795..8967d04 100644 (file)
Binary files a/doc/manual.sxw and b/doc/manual.sxw differ