Hi ich wollte mal fragen wie man ein Blink Text rein bekommt bei BBcode.
zb. [blink]HAllo[/blink]
mfg
whazza
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<?php // Blink Mycode Plugin // By Lose http://www.ptlink.org/ // Version 1.2 $plugins->add_hook("parse_message", "blink_run"); function blink_info() { return array( "name" => "Blink BBCode", "description" => "Blink BBCode", "website" => "http://www.ptlink.org", "author" => "Lose", "authorsite" => "http://www.ptlink.org", "version" => "1.0", ); } function blink_activate() { } function blink_deactivate() { } function blink_run($message) { return preg_replace('#\[blink\](.*?)\[/blink\]#i', "<blink>$1</blink>", $message); } ?>
blink(0.7); function blink(speed) { if (speed) { if (document.all) setInterval("blink()", speed*1000) return; } var blink = document.all.tags("BLINK") for (var i=0; i<blink.length; i++) blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" }
//> Darf BB Code [BLINK] dekodiert werden? if($this->permitted['b'] == true) { //> Format: [blink]xxx[/blink] $this->pattern[] = "%\[blink\](.+)\[\/blink\]%Uis"; $this->replace[] = "<blink>\$1</blink>"; }
//> Smilies Filtern. $string = $this->_smileys($string); //> Zum schluss die blöcke die verschlüsselt wurden wieder entschlüsseln und Parsen. if($this->permitted['php'] == true) { $string = preg_replace("%\[php\](.+)\[\/php\]%esiU","\$this->_phpblock('\$1')",$string); $string = preg_replace("%\[php=([^;]*);(\d+)\](.+)\[\/php\]%esiU","\$this->_phpblock('\$3','\$1','\$2')",$string); $string = preg_replace("%\[php=(.*)\](.+)\[\/php\]%esiU","\$this->_phpblock('\$2','\$1')",$string); } if($this->permitted['html'] == true) { $string = preg_replace("%\[html\](.+)\[\/html\]%esiU","\$this->_htmlblock('\$1')",$string); $string = preg_replace("%\[html=([^;]*);(\d+)\](.+)\[\/html\]%esiU","\$this->_htmlblock('\$3','\$1','\$2')",$string); $string = preg_replace("%\[html=(.*)\](.+)\[\/html\]%esiU","\$this->_htmlblock('\$2','\$1')",$string); } if($this->permitted['css'] == true) { $string = preg_replace("%\[css\](.+)\[\/css\]%esiU","\$this->_cssblock('\$1')",$string); $string = preg_replace("%\[css=([^;]*);(\d+)\](.+)\[\/css\]%esiU","\$this->_cssblock('\$3','\$1','\$2')",$string); $string = preg_replace("%\[css=(.*)\](.+)\[\/css\]%esiU","\$this->_cssblock('\$2','\$1')",$string); } if($this->permitted['code'] == true) { $string = preg_replace("%\[code\](.+)\[\/code\]%esiU","\$this->_codeblock('\$1')",$string); $string = preg_replace("%\[code=([^;]*);(\d+)\](.+)\[\/code\]%esiU","\$this->_codeblock('\$3','\$1','\$2')",$string); $string = preg_replace("%\[code=(.*)\](.+)\[\/code\]%esiU","\$this->_codeblock('\$2','\$1')",$string); } if($this->permitted['list'] == true) { $string = preg_replace("%\[list\](.+)\[\/list\]%esiU","\$this->_list('\$1')",$string); } //> Darf BB Code [BLINK] dekodiert werden? if($this->permitted['b'] == true) { //> Format: [blink]xxx[/blink] $this->pattern[] = "%\[blink\](.+)\[\/blink\]%Uis"; $this->replace[] = "<blink>\$1</blink>"; } //> Badwors Filtern. $string = $this->_badwords($string); unset($this->pattern); unset($this->replace); unset($this->ayCacheQuoteOpen); unset($this->ayCacheQuoteClose); unset($this->ayCacheKtextOpen); unset($this->ayCacheKtextClose); return $string; } } ?>
function addEvent(elm, evType, fn, useCapture) // addEvent and removeEvent // cross-browser event handling for IE5+, NS6 and Mozilla // By Scott Andrew { blink(0.7); function blink(speed) { if (speed) { if (document.all) setInterval("blink()", speed*1000) return; } var blink = document.all.tags("BLINK") for (var i=0; i<blink.length; i++) blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" } if (elm.addEventListener){ elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent){ var r = elm.attachEvent("on"+evType, fn); return r; } else { alert("Handler could not be removed"); } }
Geschlossen | ||
Zurück zu Allgemein |