// EntheoBlog

Archive for March 2006

26 March

createOption('InternetAddress','Automatically create links for internet addresses ?','yesno','yes'); $this->createOption('NewWindow','Open links in a new window?','yesno','no'); $this->createOption('MailAddress','Automatically create links for mail addresses ?','yesno','yes'); $this->createOption('RewriteMailAddress','Rewrite mail addresses with [at] and [dot]?','yesno','yes'); $this->createOption('at','Placeholder for @','text','[at]'); $this->createOption('dot','Placeholder for .','text','[dot]'); } function getEventList() { return array('PreItem', 'PreComment'); } function Treatment($_text) { global $CONF, $blog; if ($this->getOption('NewWindow') == 'yes') { $nw="onclick=\"javascript:window.open(this.href, '_blank'); return false;\""; } if ($this->getOption('InternetAddress') == 'yes') { $_text = preg_replace('/(\s)([http|https|ftp|file]+:\/\/[a-zA-Z0-9_?=&%;+-.\/]*)/si','\1\2',$_text); $_text = preg_replace('/(\s)(www\.[a-zA-Z0-9_?=&%;+-.\/]*)/si','\1\2',$_text); } $at = $this->getOption('at'); $dot = $this->getOption('dot'); if ($this->getOption('MailAddress') == 'yes') { if ($this->getOption('RewriteMailAddress') == 'no') { $_text = preg_replace('/(\s)([a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,5})/s','\1\2',$_text); } else { $_text = preg_replace('/(\s)([a-zA-Z0-9\._-]+)@([a-zA-Z0-9\._-]+)\.([a-zA-Z]{2,5})/s','\1\2'.$at.'\3'.$dot.'\4',$_text); } } if ($this->getOption('MailAddress') == 'no' && $this->getOption('RewriteMailAddress') == 'yes'){ $_text = preg_replace('/(\s)([a-zA-Z0-9\._-]+)@([a-zA-Z0-9\._-]+)\.([a-zA-Z]{2,5})/s','\1\2'.$at.'\3'.$dot.'\4',$_text); } return $_text; } function event_PreItem($_data) { $_data[item]->body = $this->Treatment($_data[item]->body); $_data[item]->more = $this->Treatment($_data[item]->more); } function event_PreComment($_data) { $_data['comment']['body'] = $this->Treatment($_data['comment']['body']); } function supportsFeature ($what) { switch ($what) { case 'SqlTablePrefix': return 1; default: return 0; } } } ?>

Weil ich es immer mal brauche: MED - Programmers' Text Editor

Oft - eigentlich sehr oft - sitze ich vor nem Rechner und da ist kein gescheiter Editor installiert. OK ... es kann nicht überall ein Q vorhanden sein, aber damit ich nicht jedes Mal nach dieser Blöden URL suchen muss, pack ich das mal in meinen Blog.

"MED eignet sich zur Bearbeitung beliebiger Textdateien, unterstützt aber insbesondere das Erstellen von Quelltexten (C/C , PHP, HTML, Java, REXX, Ada, Modula2, Pascal, Fortran, X86/MC68k Assembler, Perl, Clipper, TeX, Tcl/Tk, VRML, Matlab, etc.).

Die Fähigkeiten von MED gehen jedoch weit über die eines herkömmlichen Texteditors hinaus: Die Plugin-Schnittstelle macht MED nahezu unbeschränkt erweiterbar. Das einfach konfigurierbare Syntax-Highlighting, die flexible Projektverwaltung und die Integrationsmöglichkeit externer Programme machen MED zu einer universellen Entwicklungsumgebung für beliebige Programmiersprachen."

MED - Programmers' Text Editor

Ich mag den auch, weil er ein wenig meine OS/2 - Vergangenheit in die Zukunft mit nimmt.

[Den ganzen Text lesen] -  Karma: 4 [+/-]
Geschrieben von harko um 01:18:18 Uhr - 19 Kommentare - Keine Trackbacks
Abgelegt unter Technik
Einfach Flattrn wenn es gefällt - Danke.

14 March

createOption('InternetAddress','Automatically create links for internet addresses ?','yesno','yes'); $this->createOption('NewWindow','Open links in a new window?','yesno','no'); $this->createOption('MailAddress','Automatically create links for mail addresses ?','yesno','yes'); $this->createOption('RewriteMailAddress','Rewrite mail addresses with [at] and [dot]?','yesno','yes'); $this->createOption('at','Placeholder for @','text','[at]'); $this->createOption('dot','Placeholder for .','text','[dot]'); } function getEventList() { return array('PreItem', 'PreComment'); } function Treatment($_text) { global $CONF, $blog; if ($this->getOption('NewWindow') == 'yes') { $nw="onclick=\"javascript:window.open(this.href, '_blank'); return false;\""; } if ($this->getOption('InternetAddress') == 'yes') { $_text = preg_replace('/(\s)([http|https|ftp|file]+:\/\/[a-zA-Z0-9_?=&%;+-.\/]*)/si','\1\2',$_text); $_text = preg_replace('/(\s)(www\.[a-zA-Z0-9_?=&%;+-.\/]*)/si','\1\2',$_text); } $at = $this->getOption('at'); $dot = $this->getOption('dot'); if ($this->getOption('MailAddress') == 'yes') { if ($this->getOption('RewriteMailAddress') == 'no') { $_text = preg_replace('/(\s)([a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,5})/s','\1\2',$_text); } else { $_text = preg_replace('/(\s)([a-zA-Z0-9\._-]+)@([a-zA-Z0-9\._-]+)\.([a-zA-Z]{2,5})/s','\1\2'.$at.'\3'.$dot.'\4',$_text); } } if ($this->getOption('MailAddress') == 'no' && $this->getOption('RewriteMailAddress') == 'yes'){ $_text = preg_replace('/(\s)([a-zA-Z0-9\._-]+)@([a-zA-Z0-9\._-]+)\.([a-zA-Z]{2,5})/s','\1\2'.$at.'\3'.$dot.'\4',$_text); } return $_text; } function event_PreItem($_data) { $_data[item]->body = $this->Treatment($_data[item]->body); $_data[item]->more = $this->Treatment($_data[item]->more); } function event_PreComment($_data) { $_data['comment']['body'] = $this->Treatment($_data['comment']['body']); } function supportsFeature ($what) { switch ($what) { case 'SqlTablePrefix': return 1; default: return 0; } } } ?>

Return-Path Probleme in PHP-Mails

Hier der korrekte Aufruf von mail.

"mail("email@domain.com", "Test PHP Mail", "Mail From PHP", "From: myemail@domain.com", "-fmyemail@domain.com");"


Warum das nötig ist? PHP setzt sonst Standardwerte, wie sie in der php.ini zu finden sind und dann wird es in der Mehrzahl aller Faelle nicht so einfach, auf eine solche Mail zu antworten. Ausserdem lassen manche Provider Mails ohne korrekt gesetzte Absenderadressen gar nicht erst duch den MTA bearbeiten.

[Den ganzen Text lesen] -  Karma: 3 [+/-]
Geschrieben von harko um 13:01:12 Uhr - Keine Kommentare vorhanden - Keine Trackbacks
Abgelegt unter Technik
Einfach Flattrn wenn es gefällt - Danke.