e-mail address obfuscation

xmurrix
Beiträge: 3143
Registriert: Do 21. Okt 2004, 11:08
Wohnort: Augsburg
Kontaktdaten:

Re: e-mail address obfuscation

Beitrag von xmurrix » Mi 23. Jan 2013, 15:56

derSteffen hat geschrieben:...Soll das global $cfg, $idart, $iscat; wirklich $iscat oder $idcat heißen?...
Sorry, es muss natürlich $idcat heißen, ist ein Vertipper. Ich korrigiere das gleich auch im Post...
CONTENIDO Downloads: CONTENIDO 4.10.1
CONTENIDO Links: Dokumentationsportal, FAQ, API-Dokumentation
CONTENIDO @ Github: CONTENIDO 4.10 - Mit einem Entwicklungszweig (develop-branch), das viele Verbesserungen/Optimierungen erhalten hat und auf Stabilität und Kompatibilität mit PHP 8.0 bis 8.2 getrimmt wurde.

derSteffen
Beiträge: 847
Registriert: Mi 14. Dez 2005, 16:15
Wohnort: Königs Wusterhausen bei Berlin
Kontaktdaten:

Re: e-mail address obfuscation

Beitrag von derSteffen » Fr 8. Mär 2013, 15:37

Hallo v-maverick,

hast Du denn eine Lösung für Dein Problem erarbeiten können?
Ich benötige nämlich eine Lösung, wie ich bestimmte Bereiche in der Webseite von von dem Plugin ausschließen kann. Da es teilweise zu Problemen mit dem DynFormular kommt, wenn man nämlich den Spamschutzcode falsch eingetragen hat, wird die Email im hidden-Field auch formatiert und somit kommt diese dann nicht an.

Vielen Dank

MfG Steffen

derSteffen
Beiträge: 847
Registriert: Mi 14. Dez 2005, 16:15
Wohnort: Königs Wusterhausen bei Berlin
Kontaktdaten:

Re: e-mail address obfuscation

Beitrag von derSteffen » Sa 9. Mär 2013, 15:45

Hallo,

bei dem Plugin der vpTransformtaion kann man mit Platzhaltern bestimmte Bereiche vom Plugin ausnehmen. Also Bereich die sich zwischen
<!-- VPTRANS_IGNORE START -->
und
<!-- VPTRANS_IGNORE ENDE -->
befinden.

Ich denke diese Funktion machts das möglich:

Code: Alles auswählen

	preg_match_all("=(.*)(<body[^>]*>)(.*)(</body>)(.*)=si", $text, $help);
	if ($help[3][0]) {
		$text = $help[3][0]; 	
		
		// Step -1 - remove all parts to ignore
		$ignorecount = preg_match_all("'<!-- VPTRANS_IGNORE START -->(.*?)<!-- VPTRANS_IGNORE ENDE -->'si", $text, $ignore);
		for ($i = 0; $i < $ignorecount; $i++) {
			$ignorearr[$i] = ' VPTIGNORE'.$i.' ';
		}
	$ignorecount = -1;

		$text = preg_replace("'<!-- VPTRANS_IGNORE START -->(.*?)<!-- VPTRANS_IGNORE ENDE -->'sie", "trans_counter('VPTIGNORE', \$ignorecount)", $text);
		
		CODE RAUSGENOMMEN
} else {}
Baut man da jetzt eine extra Funktion, ähnlich wie die function spamspan_skipProtection() oder setzt man diese Abfrage um die ganze SpamSpan drum? Oder sollte man die function spamspan_chainHTMLCodeOutput($code) manipulieren?


Ein DRITTER Ansatz hat leider auch noch kein Ergebniss gebracht. Mein Problem ist ja, dass Emails auch in Hidden-Filelds umgewandelt werden, also in meinem Kontaktformular, welches ich als Modul einbinde.
Also dachte ich mir ich mache das wie xmurrix aber anstatt Artikel und Kategorien mit Modul-IDs.

Code: Alles auswählen

function spamspan_skipProtectionIdmods()

    {
        global $cfg, $idmod;

        // check if email addresses in current Module
        $excludeidmods = getEffectiveSetting('pi_spamspan', 'excludeidmods', false);
        if ($excludeidmods && strlen($excludeidmods) > 0) {
            $excludeidmods = preg_replace("/[^0-9,]/", '', $excludeidmods);
            $excludeidmods = explode(',', $excludeidmods);
            if (in_array($idmod, $excludeidmods)) {
                return true;
            }
        }
       
        return false;
    }
und weiter oben im COde:

Code: Alles auswählen

if (spamspan_skipProtectionIdmods())
          return $code;   // Do not process value for current Module.
Aber leider auch nicht!


Vielen Dank

MfG Steffen

monnerat
Beiträge: 9
Registriert: Do 4. Feb 2010, 13:48
Kontaktdaten:

Re: e-mail address obfuscation

Beitrag von monnerat » Mi 24. Jul 2013, 11:41

Hi everyone,

I'm sorry to tell you we've left Contenido CMS, mainly for language reasons.
As a consequence, I won't maintain this plugin in the future and thus I "orphan" it.
If anybody wants to adopt/host/maintain/fix/upgrade/... it, feel free to do so.

Kind regards and a lots of success wishes for you with Contenido,
Patrick

derSteffen
Beiträge: 847
Registriert: Mi 14. Dez 2005, 16:15
Wohnort: Königs Wusterhausen bei Berlin
Kontaktdaten:

skipProtection bei Modulen

Beitrag von derSteffen » Do 14. Nov 2013, 10:11

Hallo ...

Dank xmurrix kann man mit folgender Anpassung, bestimmte Module seiner Wahl von der Verarbeitung des SpamSpan ausschließen. Dazu muss allerdings in dem Modul, was man "ausschließen" möchte zwei Zeilen im Modul-Output eingeben.

Output-Code für das "auszuschließende" Modul:

Code: Alles auswählen

global $spamspanSkipProtection;
$spamspanSkipProtection = true;
... und diesen, bereits angepassten Code von xmurrix, der dazu führt, das man bestimmte Idcats und Idarts ausschließt (siehe: http://forum.contenido.org/viewtopic.ph ... 29#p156741)

Code: Alles auswählen

function spamspan_skipProtection()

{
    global $cfg, $idart, $idcat;

    // check if email addresses in current article shouldn't be protected by spamspan
    $excludeIdarts = getEffectiveSetting('pi_spamspan', 'excludeidarts', false);
    if ($excludeIdarts && strlen($excludeIdarts) > 0) {
        $excludeIdarts = preg_replace("/[^0-9,]/", '', $excludeIdarts);
        $excludeIdarts = explode(',', $excludeIdarts);
        if (in_array($idart, $excludeIdarts)) {
            return true;
        }
    }

    // check if email addresses in current category shouldn't be protected by spamspan
    $excludeIdcats = getEffectiveSetting('pi_spamspan', 'excludeidcats', false);
    if ($excludeIdcats && strlen($excludeIdcats) > 0) {
        $excludeIdcats = preg_replace("/[^0-9,]/", '', $excludeIdcats);
        $excludeIdcats = explode(',', $excludeIdcats);
        if (in_array($idcat, $excludeIdcats)) {
            return true;
        }
    }
   
    return false;
}
ersetzen mit diesem:

Code: Alles auswählen

function spamspan_skipProtection()

    {
        global $cfg, $idart, $idcat, $spamspanSkipProtection;

        // check if email addresses in current article shouldn't be protected by spamspan
        $excludeIdarts = getEffectiveSetting('pi_spamspan', 'excludeidarts', false);
        if ($excludeIdarts && strlen($excludeIdarts) > 0) {
            $excludeIdarts = preg_replace("/[^0-9,]/", '', $excludeIdarts);
            $excludeIdarts = explode(',', $excludeIdarts);
            if (in_array($idart, $excludeIdarts)) {
                return true;
            }
        }

        // check if email addresses in current category shouldn't be protected by spamspan
        $excludeIdcats = getEffectiveSetting('pi_spamspan', 'excludeidcats', false);
        if ($excludeIdcats && strlen($excludeIdcats) > 0) {
            $excludeIdcats = preg_replace("/[^0-9,]/", '', $excludeIdcats);
            $excludeIdcats = explode(',', $excludeIdcats);
            if (in_array($idcat, $excludeIdcats)) {
                return true;
            }
        }
		
		// Ueberpruefe ob im Modul-Output folgendes hinterlegt ist (wenn ja, dann SKIP):
		/*
		global $spamspanSkipProtection;
		$spamspanSkipProtection = true;
		*/
		if (isset($spamspanSkipProtection) && true === $spamspanSkipProtection) {
            unset($spamspanSkipProtection);
            return true;
        }
       
        return false;
		
    }
MfG Steffen

Gesperrt