anpera.net https://anpera.dyndns.org/phpbb3/ |
|
[DS3]Javascript zum einfügen von Chatfarben -alpha- https://anpera.dyndns.org/phpbb3/viewtopic.php?f=34&t=4915 |
Seite 1 von 1 |
Autor: | Victorinus [ Do 04 Jun, 2009 22:33 ] |
Betreff des Beitrags: | [DS3]Javascript zum einfügen von Chatfarben -alpha- |
$this->bbcode_second_pass_code('', '<script type="text/javascript"> function insert_village(aTag, eTag) { var input = document.getElementById('input_village'); input.focus(); /* für Internet Explorer */ if(typeof document.selection != 'undefined') { /* Einfügen des Formatierungscodes */ var range = document.selection.createRange(); var insText = range.text; range.text = aTag + insText + eTag; /* Anpassen der Cursorposition */ range = document.selection.createRange(); if (insText.length == 0) { range.move('character', -eTag.length); } else { range.moveStart('character', aTag.length + insText.length + eTag.length); } range.select(); } /* für neuere auf Gecko basierende Browser */ else if(typeof input.selectionStart != 'undefined') { /* Einfügen des Formatierungscodes */ var start = input.selectionStart; var end = input.selectionEnd; var insText = input.value.substring(start, end); input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end); /* Anpassen der Cursorposition */ var pos; if (insText.length == 0) { pos = start + aTag.length; } else { pos = start + aTag.length + insText.length + eTag.length; } input.selectionStart = pos; input.selectionEnd = pos; } /* für die übrigen Browser */ else { /* Abfrage der Einfügeposition */ var pos; var re = new RegExp('^[0-9]{0,3}$'); while(!re.test(pos)) { pos = prompt("Einfügen an Position (0.." + input.value.length + "):", "0"); } if(pos > input.value.length) { pos = input.value.length; } /* Einfügen des Formatierungscodes */ var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:"); input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos); } } </script> <br><br><input type='button' value='/me' onClick="insert_village('/me ','')" onmouseover="this.T_TITLE='Hilfe'; this.T_BORDERCOLOR='#038A00'; return escape('Setze einen Emote');" class='button'> <input type='button' value='/X' onClick="insert_village('/X ','')" onmouseover="this.T_TITLE='Hilfe'; this.T_BORDERCOLOR='#038A00'; return escape('Setze einen anonymen Post');" class='button'> <input type='button' value='/help' onClick="insert_village('/help ','')" onmouseover="this.T_TITLE='Hilfe'; this.T_BORDERCOLOR='#038A00'; return escape('Brauchst du Hilfe ?');" class='button'> <input type='button' value='/ms' onClick="insert_village('/ms ','')" onmouseover="this.T_TITLE='Hilfe'; this.T_BORDERCOLOR='#038A00'; return escape('Setzt ein s hinter deinem Namen');" class='button'><br><a href="javascript:insert_village('`_','')" style='color: #457A00; text-decoration: none'><b>`_</b></a> <a href="javascript:insert_village('`O','')" style='color: #669900; text-decoration: none'><b>`O</b></a> <a href="javascript:insert_village('`j','')" style='color: #87B800; text-decoration: none'><b>`j</b></a> <a href="javascript:insert_village('`d','')" style='color: #66CC00; text-decoration: none'><b>`d</b></a> <a href="javascript:insert_village('`°','')" style='color: #002D00; text-decoration: none'><b>`°</b></a> <a href="javascript:insert_village('`Z','')" style='color: #035900; text-decoration: none'><b>`Z</b></a> <a href="javascript:insert_village('`C','')" style='color: #038A00; text-decoration: none'><b>`C</b></a> <a href="javascript:insert_village('`2','')" style='color: #00B000; text-decoration: none'><b>`2</b></a> <a href="javascript:insert_village('`@','')" style='color: #00FF00; text-decoration: none'><b>`@</b></a> <a href="javascript:insert_village('`5','')" style='color: #81E967; text-decoration: none'><b>`5</b></a> <a href="javascript:insert_village('`õ','')" style='color: #90EE90; text-decoration: none'><b>`õ</b></a> <a href="javascript:insert_village('`î','')" style='color: #A0FF9A; text-decoration: none'><b>`î</b></a> <a href="javascript:insert_village('`ñ','')" style='color: #9AFF9A; text-decoration: none'><b>`ñ</b></a> <a href="javascript:insert_village('`g','')" style='color: #aaff99; text-decoration: none'><b>`g</b></a> <a href="javascript:insert_village('`g','')" style='color: #AAFF99; text-decoration: none'><b>`g</b></a> <a href="javascript:insert_village('`í','')" style='color: #BBFFA2; text-decoration: none'><b>`í</b></a> <a href="javascript:insert_village('`8','')" style='color: #DDFFBB; text-decoration: none'><b>`8</b></a> <a href="javascript:insert_village('`Ì','')" style='color: #80FF9F; text-decoration: none'><b>`Ì</b></a> <a href="javascript:insert_village('`Ï','')" style='color: #8EFF9B; text-decoration: none'><b>`Ï</b></a> <a href="javascript:insert_village('`Î','')" style='color: #9AFFD2; text-decoration: none'><b>`Î</b></a> <a href="javascript:insert_village('`Í','')" style='color: #8EFFBA; text-decoration: none'><b>`Í</b></a> <a href="javascript:insert_village('`ø','')" style='color: #7CCD7C; text-decoration: none'><b>`ø</b></a> <a href="javascript:insert_village('`ý','')" style='color: #548B54; text-decoration: none'><b>`ý</b></a> <a href="javascript:insert_village('`ÿ','')" style='color: #2E8B57; text-decoration: none'><b>`ÿ</b></a> <a href="javascript:insert_village('`u','')" style='color: #556F5B; text-decoration: none'><b>`u</b></a> <a href="javascript:insert_village('`I','')" style='color: #00E0FF; text-decoration: none'><b>`I</b></a> <a href="javascript:insert_village('`l','')" style='color: #327667; text-decoration: none'><b>`l</b></a> <a href="javascript:insert_village('`+','')" style='color: #009191; text-decoration: none'><b>`+</b></a> <a href="javascript:insert_village('`3','')" style='color: #00B0B0; text-decoration: none'><b>`3</b></a> <a href="javascript:insert_village('`s','')" style='color: #00D1D1; text-decoration: none'><b>`s</b></a> <a href="javascript:insert_village('`ó','')" style='color: #a2e9ff; text-decoration: none'><b>`ó</b></a> <a href="javascript:insert_village('`ó','')" style='color: #A2E9FF; text-decoration: none'><b>`ó</b></a> <a href="javascript:insert_village('`#','')" style='color: #00FFFF; text-decoration: none'><b>`#</b></a> <a href="javascript:insert_village('`ò','')" style='color: #A2FFE9; text-decoration: none'><b>`ò</b></a> <a href="javascript:insert_village('`m','')" style='color: #00C2FF; text-decoration: none'><b>`m</b></a> <a href="javascript:insert_village('`o','')" style='color: #0085FF; text-decoration: none'><b>`o</b></a> <a href="javascript:insert_village('`P','')" style='color: #0045FF; text-decoration: none'><b>`P</b></a> <a href="javascript:insert_village('`1','')" style='color: #0000B0; text-decoration: none'><b>`1</b></a> <a href="javascript:insert_village('`!','')" style='color: #0000FF; text-decoration: none'><b>`!</b></a> <a href="javascript:insert_village('`9','')" style='color: #0070FF; text-decoration: none'><b>`9</b></a> <a href="javascript:insert_village('`B','')" style='color: #4747FF; text-decoration: none'><b>`B</b></a> <a href="javascript:insert_village('`E','')" style='color: #7373FF; text-decoration: none'><b>`E</b></a> <a href="javascript:insert_village('`h','')" style='color: #A3A3FF; text-decoration: none'><b>`h</b></a> <a href="javascript:insert_village('`v','')" style='color: #AABBEE; text-decoration: none'><b>`v</b></a> <a href="javascript:insert_village('`R','')" style='color: #800099; text-decoration: none'><b>`R</b></a> <a href="javascript:insert_village('`V','')" style='color: #9A5BEE; text-decoration: none'><b>`V</b></a> <a href="javascript:insert_village('`Ô','')" style='color: #8E9BFF; text-decoration: none'><b>`Ô</b></a> <a href="javascript:insert_village('`ù','')" style='color: #A09AFF; text-decoration: none'><b>`ù</b></a> <a href="javascript:insert_village('`ú','')" style='color: #BBA2FF; text-decoration: none'><b>`ú</b></a> <a href="javascript:insert_village('`ô','')" style='color: #9AD2FF; text-decoration: none'><b>`ô</b></a> <a href="javascript:insert_village('`Ò','')" style='color: #8EBAFF; text-decoration: none'><b>`Ò</b></a> <a href="javascript:insert_village('`Û','')" style='color: #FF8EF2; text-decoration: none'><b>`Û</b></a> <a href="javascript:insert_village('`Ú','')" style='color: #F99AFF; text-decoration: none'><b>`Ú</b></a> <a href="javascript:insert_village('`û','')" style='color: #D2A5FF; text-decoration: none'><b>`û</b></a> <a href="javascript:insert_village('`Ù','')" style='color: #E6A2FF; text-decoration: none'><b>`Ù</b></a> <a href="javascript:insert_village('`r','')" style='color: #EEBBEE; text-decoration: none'><b>`r</b></a> <a href="javascript:insert_village('`r','')" style='color: #EEBBEE; text-decoration: none'><b>`r</b></a> <a href="javascript:insert_village('`%','')" style='color: #FF00FF; text-decoration: none'><b>`%</b></a> <a href="javascript:insert_village('`?','')" style='color: #D80655; text-decoration: none'><b>`?</b></a> <a href="javascript:insert_village('`:','')" style='color: #B9034C; text-decoration: none'><b>`:</b></a> <a href="javascript:insert_village('`|','')" style='color: #A00446; text-decoration: none'><b>`|</b></a> <a href="javascript:insert_village('`.','')" style='color: #8A023F; text-decoration: none'><b>`.</b></a> <a href="javascript:insert_village('`,','')" style='color: #660030; text-decoration: none'><b>`,</b></a> <a href="javascript:insert_village('`*','')" style='color: #440022; text-decoration: none'><b>`*</b></a> <a href="javascript:insert_village('`D','')" style='color: #470000; text-decoration: none'><b>`D</b></a> <a href="javascript:insert_village('`F','')" style='color: #660000; text-decoration: none'><b>`F</b></a> <a href="javascript:insert_village('`J','')" style='color: #850000; text-decoration: none'><b>`J</b></a> <a href="javascript:insert_village('`K','')" style='color: #940000; text-decoration: none'><b>`K</b></a> <a href="javascript:insert_village('`L','')" style='color: #A30000; text-decoration: none'><b>`L</b></a> <a href="javascript:insert_village('`4','')" style='color: #B30000; text-decoration: none'><b>`4</b></a> <a href="javascript:insert_village('`G','')" style='color: #C20000; text-decoration: none'><b>`G</b></a> <a href="javascript:insert_village('`;','')" style='color: #D10000; text-decoration: none'><b>`;</b></a> <a href="javascript:insert_village('`N','')" style='color: #E00000; text-decoration: none'><b>`N</b></a> <a href="javascript:insert_village('`$','')" style='color: #FF0000; text-decoration: none'><b>`$</b></a> <a href="javascript:insert_village('`e','')" style='color: #FF1F00; text-decoration: none'><b>`e</b></a> <a href="javascript:insert_village('`p','')" style='color: #FF4A00; text-decoration: none'><b>`p</b></a> <a href="javascript:insert_village('`Q','')" style='color: #FF6600; text-decoration: none'><b>`Q</b></a> <a href="javascript:insert_village('`Q','')" style='color: #FF6600; text-decoration: none'><b>`Q</b></a> <a href="javascript:insert_village('`w','')" style='color: #FF8000; text-decoration: none'><b>`w</b></a> <a href="javascript:insert_village('`q','')" style='color: #FF9900; text-decoration: none'><b>`q</b></a> <a href="javascript:insert_village('`q','')" style='color: #FF9900; text-decoration: none'><b>`q</b></a> <a href="javascript:insert_village('`Y','')" style='color: #C7990D; text-decoration: none'><b>`Y</b></a> <a href="javascript:insert_village('`U','')" style='color: #FFBF26; text-decoration: none'><b>`U</b></a> <a href="javascript:insert_village('`6','')" style='color: #B0B000; text-decoration: none'><b>`6</b></a> <a href="javascript:insert_village('`M','')" style='color: #FFD700; text-decoration: none'><b>`M</b></a> <a href="javascript:insert_village('`^','')" style='color: #FFFF00; text-decoration: none'><b>`^</b></a> <a href="javascript:insert_village('`Ê','')" style='color: #F9FF9A; text-decoration: none'><b>`Ê</b></a> <a href="javascript:insert_village('`ì','')" style='color: #D2FFA5; text-decoration: none'><b>`ì</b></a> <a href="javascript:insert_village('`ï','')" style='color: #E6FFA2; text-decoration: none'><b>`ï</b></a> <a href="javascript:insert_village('`x','')" style='color: #FFFF99; text-decoration: none'><b>`x</b></a> <a href="javascript:insert_village('`t','')" style='color: #F8DB83; text-decoration: none'><b>`t</b></a> <a href="javascript:insert_village('`ê','')" style='color: #FFD48E; text-decoration: none'><b>`ê</b></a> <a href="javascript:insert_village('`È','')" style='color: #FFDF80; text-decoration: none'><b>`È</b></a> <a href="javascript:insert_village('`X','')" style='color: #FFFFCC; text-decoration: none'><b>`X</b></a> <a href="javascript:insert_village('`é','')" style='color: #FFC79A; text-decoration: none'><b>`é</b></a> <a href="javascript:insert_village('`è','')" style='color: #ffb8a2; text-decoration: none'><b>`è</b></a> <a href="javascript:insert_village('`W','')" style='color: #FFC49E; text-decoration: none'><b>`W</b></a> <a href="javascript:insert_village('`f','')" style='color: #D48561; text-decoration: none'><b>`f</b></a> <a href="javascript:insert_village('`S','')" style='color: #B56642; text-decoration: none'><b>`S</b></a> <a href="javascript:insert_village('`a','')" style='color: #A0522D; text-decoration: none'><b>`a</b></a> <a href="javascript:insert_village('`k','')" style='color: #815E39; text-decoration: none'><b>`k</b></a> <a href="javascript:insert_village('`T','')" style='color: #6b563f; text-decoration: none'><b>`T</b></a> <a href="javascript:insert_village('`A','')" style='color: #6B6745; text-decoration: none'><b>`A</b></a> <a href="javascript:insert_village('`y','')" style='color: #AB8F70; text-decoration: none'><b>`y</b></a> <a href="javascript:insert_village('`0','')" style='color: #8E236B; text-decoration: none'><b>`0</b></a> <a href="javascript:insert_village('`&','')" style='color: #FFFFFF; text-decoration: none'><b>`&</b></a> <a href="javascript:insert_village('`{','')" style='color: #E0E0E0; text-decoration: none'><b>`{</b></a> <a href="javascript:insert_village('`(','')" style='color: #CCCCCC; text-decoration: none'><b>`(</b></a> <a href="javascript:insert_village('`)','')" style='color: #999999; text-decoration: none'><b>`)</b></a> <a href="javascript:insert_village('`7','')" style='color: #B0B0B0; text-decoration: none'><b>`7</b></a> <a href="javascript:insert_village('`]','')" style='color: #575757; text-decoration: none'><b>`]</b></a> <a href="javascript:insert_village('`[','')" style='color: #3B3B3B; text-decoration: none'><b>`[</b></a> <a href="javascript:insert_village('`~','')" style='color: #252525; text-decoration: none'><b>`~</b></a> </color><script language="JavaScript" type="text/javascript" src="./templates/wz_tooltip.js"></script>') Ist wie 'findet den fehler' - Habs nun erstmal so reingesetzt,bastel selbst noch rum...vlt. ist ja jemand schneller als ich |
Autor: | Kevz [ So 07 Jun, 2009 09:55 ] |
Betreff des Beitrags: | Re: [DS3]Javascript zum einfügen von Chatfarben -alpha- |
Was darf ich nun darunter verstehen? ;-) Das, wenn ich nun einen Text in das Input-Feld eingebe dieser sofort in der dazugehörigen Farbe erscheint? (sofern der Codetag gegeben ist) Denn eine wirkliche Beschreibung ist nicht gegeben. :-( |
Autor: | Victorinus [ So 07 Jun, 2009 16:54 ] |
Betreff des Beitrags: | Re: [DS3]Javascript zum einfügen von Chatfarben -alpha- |
Soll nen Javascript werden,der per klick auf die Farbe den entsprechenden Code direkt in den 'Text-Editor' (RP Plätze halt) einfügt,so muss man dies nicht mehr selber machen. Funktioniert nur nicht ganz ![]() |
Autor: | Rikkarda [ So 07 Jun, 2009 16:58 ] |
Betreff des Beitrags: | Re: [DS3]Javascript zum einfügen von Chatfarben -alpha- |
hast auch ne änderung in der commentary? oder nur das doinsert? |
Autor: | Victorinus [ So 07 Jun, 2009 17:14 ] |
Betreff des Beitrags: | Re: [DS3]Javascript zum einfügen von Chatfarben -alpha- |
doinsert Aber es geht aktuell ja nicht ;/ |
Autor: | Rikkarda [ So 07 Jun, 2009 17:52 ] |
Betreff des Beitrags: | Re: [DS3]Javascript zum einfügen von Chatfarben -alpha- |
ich hab das bei meinem Dorf auch, und habe halt auch ne Änderung in der commentary gemacht. Daher schau mal in die Fehlerkonsole von mozilla da wird dir geholfen |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |