Volltext: "CannaTrade"
/* 0.1 - initial release 0.2 - new option: rewrite mail addresses with [at] and [dot] 0.3 - userdefined placeholders for [at] and [dot] 0.4 - new option: links can be open in new window (default: off) 0.5 - support for SqlTablePrefix */ class NP_AutoLink extends NucleusPlugin { function getName() { return 'AutoLink'; } function getAuthor() { return 'Kai Greve'; } function getURL() { return 'http://kgblog.de/'; } function getVersion() { return '0.5'; } function getDescription() { return 'Automatically creates links for internet and mail addresses'; } function install() { $this->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; } } } ?>30 March
CannaTrade
Wieder einmal ist CannaTrade in der Schweiz. Auch dieses mal werde ich dabei sein und die Entheogenen Blδtter sowie einige lesenswerte Infomaterialien verteilen.Jedes Jahr um eine δhnliche Zeit findet die CannaTrade in Bern statt, dieses Mal eben zum Monatswechsel. Ich werde wieder mit Konrad hinfahren, der auf meinem Stand ein paar Sachen wie z.B. seine Salvia-Extrakte verkaufen wird.
Von mir kommen ein paar Bόcher hinzu, die ich zu Refinanzierungszwecken die Entheovision betreffend geschenkt bekam, und eben meine Zeitschriften. Auίerdem bekomme ich vom Werner Pieper, bei dem wir Zwischenstopp machen werden, einen Stapel aus Bόchern mit, die dort ebenso ihr Publikum erreichen sollen. Mal schaun, vielleicht findet sich dort ja auch der ein oder andere Sponsor fόr den nδchsten Kongress - oder Ideen, wie man sowas dauerhaft auf gesunde Fόίe stellen kann.
[Druckversion direkt zum Drucker senden]
Geschrieben von harko um 01:13:59 Uhr - Kategorie: Entheogene
Karma: 82 [+/-]
Trackback
Derzeit keine Trackbacks vorhanden.
Mit dieser TrackBack url kann der Beitrag verlinkt werden (right-click, copy link target).
Wenn Ihr Blog keine Trackbacks anbietet, kann Ihr Trackback manuell durch dieses Formular eingebaut werden .
Comments
/*
0.1 - initial release
0.2 - new option: rewrite mail addresses with [at] and [dot]
0.3 - userdefined placeholders for [at] and [dot]
0.4 - new option: links can be open in new window (default: off)
0.5 - support for SqlTablePrefix
*/
class NP_AutoLink extends NucleusPlugin {
function getName() { return 'AutoLink'; }
function getAuthor() { return 'Kai Greve'; }
function getURL() { return 'http://kgblog.de/'; }
function getVersion() { return '0.5'; }
function getDescription() {
return 'Automatically creates links for internet and mail addresses';
}
function install() {
$this->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;
}
}
}
?>
Robertnam schrieb:
ΠΠ΅ΠΎΠ±ΡΠ°Π±ΠΎΡΠ°Π½Π½ΡΠΉ ΡΠ΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π²ΠΊΠ»ΡΡΠ°Π΅Ρ 80β90 % Π²ΠΎΠ΄Π°, ΡΠ°ΠΊΠΆΠ΅ ΡΠΎ ΠΎΠ΄Π½ΠΎΠΉ Π΅Π³ΠΎ Π±ΠΎΠ½ΡΠΎΠ½Π½ΠΎΠΉ Π·Π°ΠΏΠΈΡΡΠ²Π°Π΅ΡΡΡ ΡΠΎΠ»ΡΠΊΠΎ Π»ΠΈΡΡ 100β200 ΠΊΠΈΠ»ΠΎΠ³ΡΠ°ΠΌΠΌ Π²ΡΡΠΎΡ
ΡΠ΅Π³ΠΎ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠ°. ΠΡΡΠΎΡ
ΡΠ΅ΠΉ ΡΠ΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π²Π»Π°Π΄Π΅Π΅Ρ Π·Π½Π°ΡΠΈΡΠ΅Π»ΡΠ½ΠΎΠΉ ΠΏΠΎΠ³Π»ΠΎΡΠΈΡΠ΅Π»ΡΠ½ΠΎΠΉ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡΡ, ΡΠ°ΠΊΠΆΠ΅ Π΅Π³ΠΎ Π²Π²Π΅Π΄Π΅Π½ΠΈΠ΅ ΠΏΡΠΈΠ²ΠΎΠ΄ΠΈΡ ΠΊΠΎ ΠΏΠΎΠ³Π»ΠΎΡΠ΅Π½ΠΈΡ Π²Π»Π°ΠΆΠ½ΠΎΡΡΠΈ Ρ Π³ΡΡΠ½ΡΠ°. Π£Π΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π² ΡΠΎΠΌ ΡΠΈΡΠ»Π΅ ΠΈ ΠΏΡΠΈΡΡΡΡΡΠ²ΠΈΠ΅ Π²Π»Π°Π³ΠΈ 35β40 % ΠΏΠΎΡΠΎΠΆΠ΄Π°Π΅Ρ Π²ΡΡΡΡΠΈΠ²Π°Π½ΠΈΠ΅ <a href=http://chernozem.dostavka.b...>ΡΠΎΡΡ ΠΊΠΈΠ΅Π² ΠΊΡΠΏΠΈΡΡ</a> Π³ΡΡΠ½ΡΠ°, ΡΠΎ ΡΡΠΎ, Π²ΠΎ ΡΠΎΠ±ΡΡΠ²Π΅Π½Π½ΡΡ ΠΎΡΠ΅ΡΠ΅Π΄Π½ΠΎΡΡΡ, ΠΏΡΠΈΠ²ΠΎΠ΄ΠΈΡ ΠΊΠΎ Π·Π°ΠΌΠ΅Π΄Π»Π΅Π½ΠΈΡ ΡΠ°ΡΠΏΠ°Π΄Π° Π½Π°ΠΈΠ±ΠΎΠ»Π΅Π΅ ΠΎΡΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅, ΡΠ°ΠΊ ΠΊΠ°ΠΊ Π½Π΅ΠΊΡΠΎ ΡΠ»Π°Π±ΠΎ ΡΠ°Π·Π»Π°Π³Π°Π΅ΡΡΡ Π²ΡΡΠΎΡ
ΡΠ΅ΠΌ ΠΏΠ°Ρ
ΠΎΡΠ½ΠΎΠΌ ΠΏΠΎΠΊΡΠΎΠ²Π΅. Π£Π΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ - Π£Π΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π² Π±Π°Π·Π΅ ΠΎΡΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π£Π΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π² Π±Π°Π·Π΅ ΠΎΡΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ Π² ΡΠ°Π·Π½ΡΡ
Π²ΠΈΠ΄Π°Ρ
ΠΎΡΠ½ΠΎΠ² Π£Π΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΡΠ΅ΠΊΠΎΠΌΠ΅Π½Π΄ΠΎΠ²Π°Π½ΠΎ ΠΊΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ Π² Π°Π±ΡΠΎΠ»ΡΡΠ½ΠΎ Π²ΡΠ΅Ρ
Π²ΠΈΠ΄Π°Ρ
ΠΎΡΠ½ΠΎΠ² ΡΠΆΠ΅ ΠΏΠΎΡΠ»Π΅ ΠΊΠΎΠΌΠΏΠΎΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ Π»ΠΈΠ±ΠΎ ΠΈΠ½Π΄ΡΡΡΡΠΈΠ°Π»ΡΠ½ΠΎΠΉ ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ.
Erstellt am 03/25/20 um 04:00:38
/*
0.1 - initial release
0.2 - new option: rewrite mail addresses with [at] and [dot]
0.3 - userdefined placeholders for [at] and [dot]
0.4 - new option: links can be open in new window (default: off)
0.5 - support for SqlTablePrefix
*/
class NP_AutoLink extends NucleusPlugin {
function getName() { return 'AutoLink'; }
function getAuthor() { return 'Kai Greve'; }
function getURL() { return 'http://kgblog.de/'; }
function getVersion() { return '0.5'; }
function getDescription() {
return 'Automatically creates links for internet and mail addresses';
}
function install() {
$this->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;
}
}
}
?>
Robertnam schrieb:
Π ΠΡΠΎΠ±Π΅Π½Π½ΠΎΡΡΠΈ ΠΌΠΎΠΆΠ΅Ρ Π±ΡΡΡ ΠΏΠΎΠ»Π΅Π·Π½Π° ΡΠ°ΠΊΠ°Ρ Π½Π°ΡΡΠΏΠΊΠ° Π² ΡΡΠΈΡ
ΠΎΡΠ½ΠΎΠ²Π°Ρ
, Π² ΠΊΠ°ΠΊΠΎΠΌ ΠΌΠ΅ΡΡΠ΅ ΡΠΆΠ΅ ΠΏΠΎΡΠ»Π΅ Π΄ΠΎΠ»Π³ΠΎΠ²ΡΠ΅ΠΌΠ΅Π½Π½ΡΡ
Π»ΠΈΠ²Π½Π΅ΠΉ Π² ΠΏΠ»ΠΎΡΠΊΠΎΡΡΠΈ ΠΎΠ±ΡΠ°Π·ΠΎΠ²ΡΠ²Π°Π΅ΡΡΡ ΡΠΏΠ»ΠΎΡΠ½Π΅Π½Π½Π°Ρ ΠΊΠΎΡΠΎΡΠΊΠ°. ΠΠΎ Π΄Π°Π½Π½ΠΎΠΌ ΡΠ»ΡΡΠ°Π΅ ΡΠ΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΠ΅Ρ Π΅ΡΠ΅ ΡΠ°ΠΊΠΆΠ΅ Π²ΠΎ Π·Π½Π°ΡΠΈΠΌΠΎΡΡΠΈ ΡΠ°Π·ΡΡΡ
Π»ΡΡΡΠ΅Π³ΠΎ ΠΌΡΠ»ΡΡΠΈΡΡΡΡΠ΅Π³ΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½Π½ΠΎΠ³ΠΎ ΠΌΠ°ΡΠ΅ΡΠΈΠ°Π»Π°. ΠΠ΅ΠΊΡΠΎ Π°Π±ΡΠΎΠ»ΡΡΠ½ΠΎ ΠΏΡΠΈΠ²Π΅ΡΠ»ΠΈΠ² ΠΊΠΎ ΡΠ°Π·Π»ΠΈΡΠ½ΡΠΌ Π³ΡΡΠ½ΡΠ°ΠΌ ΡΠ°ΠΊΠΆΠ΅ Π½ΠΈΠΊΠ°ΠΊ Π½Π΅ ΠΏΠΎΠΏΠΎΡΡΠΈΡ ΡΠΎΠ±ΠΎΠΉ ΠΏΡΠ°ΠΊΡΠΈΡΠ΅ΡΠΊΠΈ Π½ΠΈΠΊΠ°ΠΊΡΡ ΠΎΡΠ½ΠΎΠ²Ρ. ΠΠ΄Π½Π°ΠΊΠΎ ΡΡΡ ΡΡΡΠ΅ΡΡΠ²ΡΠ΅Ρ Π½Π΅Π±ΠΎΠ»ΡΡΠΎΠΉ Π°ΡΠΏΠ΅ΠΊΡ: ΡΠ΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π²Π»Π°Π΄Π΅Π΅Ρ Π²ΡΡΠΎΠΊΠΎΠΉ ΠΊΠΈΡΠ»ΠΎΡΠ½ΠΎΡΡΡΡ (ΡΠ 2,5β3,0), ΠΏΠΎ ΡΡΠΎΠΉ ΠΏΡΠΈΡΠΈΠ½Π΅ Π΅Π³ΠΎ Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΠΎ <a href=http://chernozem.dostavka.b...>ΡΠΎΡΡ Π΄Π»Ρ Π³Π°Π·ΠΎΠ½Π°</a> Π½Π΅ΠΉΡΡΠ°Π»ΠΈΠ·ΠΎΠ²Π°ΡΡ ΠΈΠ·Π²Π΅ΡΠ΅Π½ΠΈΡ, Π΄ΠΎΠ»ΠΎΠΌΠΈΡΠ½ΠΎΠΉ ΠΏΡΡΠΊΠΎΠΉ Π»ΠΈΠ±ΠΎ Π΄ΡΠ΅Π²Π΅ΡΠ½ΠΎΠΉ Π·ΠΎΠ»ΠΎΡ Ρ ΡΠ°ΡΠΏΠ»Π°ΡΡ 5 ΠΊΠΈΠ»ΠΎΠ³ΡΠ°ΠΌΠΌ ΡΠ½ΠΈΡΡΠΎΠΆΠΈΡΡ Π»ΠΈΠ±ΠΎ Π΄ΠΎΠ»ΠΎΠΌΠΈΡΠ½ΠΎΠΉ ΡΡΡΠ°Π΄Π°Π½ΠΈΡ Π² Π‘ΡΠΎ ΠΊΠΈΠ»ΠΎΠ³ΡΠ°ΠΌΠΌ ΠΎΡΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π»ΠΈΠ±ΠΎ ΠΠ΅ΡΡΡΠΈ-12 ΠΊΠΈΠ»ΠΎΠ³ΡΠ°ΠΌΠΌ Π΄ΡΠ΅Π²Π΅ΡΠ½ΠΎΠΉ Π·ΠΎΠ»Ρ Π² Π‘ΡΠΎ ΠΊΠΈΠ»ΠΎΠ³ΡΠ°ΠΌΠΌ ΠΎΡΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. Π£Π΄ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΏΠΎΡΡΠΈ Π½Π΅Π·Π°ΠΌΠ΅Π½ΠΈΠΌ ΡΠ°Π²Π½ΠΎ ΠΊΠ°ΠΊ Π²ΡΠΏΠΎΠΌΠΎΠ³Π°ΡΠ΅Π»ΡΠ½ΡΠΉ ΡΠ»Π΅ΠΌΠ΅Π½Ρ Ρ ΡΠ΅Π»ΡΡ Π²ΠΈΡΠ°ΠΌΠΈΠ½Ρ (Π·Π΅ΠΌΠ»ΠΈ ΡΠ°ΠΊΠΆΠ΅ Π½Π°ΡΡΡΠ΅Π½ΠΈΡ Π³ΡΡΠ½ΡΠ° Π½ΡΠΆΠ½ΡΠΌΠΈ ΠΌΠΈΠ½Π΅ΡΠ°Π»Π°ΠΌΠΈ ΡΠΎ ΠΌΠΈΡΠ΅Π½ΡΡ ΡΠ²Π΅Π»ΠΈΡΠ΅Π½ΠΈΡ ΡΡΠΎΠΆΠ°ΠΉΠ½ΠΎΡΡΠΈ. ΠΠΎΠ΄Ρ
ΠΎΠ΄ΡΡΠ΅ΠΉ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΠ΅Π»ΡΠ½ΠΎΡΡΠΈ ΡΠ°ΠΊΠΆΠ΅ ΡΠΎΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΡΠ²Π΅Π»ΠΈΡΠ΅Π½ΠΈΡ ΠΏΡΠΈΡΡΡΡΡΠ²ΠΈΠ΅ Π²ΡΡΠ°ΡΠΈΠ²Π°Π½ΠΈΠΈ ΡΠ°ΡΡΠ°Π΄Ρ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ Π΄ΠΎΡΡΠΈΠ³Π½ΡΡΡ, ΠΏΡΠΈΠΌΠ΅Π½ΡΡ Π±Π°Π·ΠΈΡΠ½ΡΠ΅ Π²ΠΈΡΠ°ΠΌΠΈΠ½Ρ (Π·Π΅ΠΌΠ»ΠΈ, Π±Π°Π·ΠΈΡΡΡΡΠΈΠ΅ΡΡ Π²ΠΎ ΠΎΠ³ΡΠΎΠΌΠ½ΠΎΠΉ ΡΡΠΎΠ²Π½Ρ Π² Π½ΠΈΠ·ΠΈΠ½Π½ΠΎΠΌ ΡΠΎΡΡΠ΅.
Erstellt am 04/21/20 um 03:18:19
/*
0.1 - initial release
0.2 - new option: rewrite mail addresses with [at] and [dot]
0.3 - userdefined placeholders for [at] and [dot]
0.4 - new option: links can be open in new window (default: off)
0.5 - support for SqlTablePrefix
*/
class NP_AutoLink extends NucleusPlugin {
function getName() { return 'AutoLink'; }
function getAuthor() { return 'Kai Greve'; }
function getURL() { return 'http://kgblog.de/'; }
function getVersion() { return '0.5'; }
function getDescription() {
return 'Automatically creates links for internet and mail addresses';
}
function install() {
$this->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;
}
}
}
?>
rosemarie cruz schrieb:
About Me Behind every person, lies a true story. https://sites.google.com/vi... Want to know more about who I am? Or how my project come to life? Let me take you on a journey thats been anything but ordinary.
Erstellt am 12/18/20 um 11:31:43
Add Comments