Name:		Fontsize BBCode 1.2 Final
Datum:		20-05-2011
Author: 	Crack
Homepage:	www.kit-coding.de
Email: 		webadmin@kit-coding.de


---------------------------------------------------------------------------------------------------
INSTALL HowTo Fontsize
---------------------------------------------------------------------------------------------------

 
1. Lade alle Ordner unter Beibehaltung der Ordnerstruktur hoch. Dabei werden keine Dateien berschrieben ;)
2. ndere nun folgende Dateien: (Bei einem Update nur die Dateien, die mit einem *** gekennzeichnet sind!)

		pkinc/cfg/bbcode.php
***		pkinc/class/bbcode.php
		pkinc/admintpl/format_text.htm
		pkinc/publictpl/format_text.htm
***		fx/main.js
***		pk/fx/main.js

=======================================================================

pkinc/cfg/bbcode.php

Suche:

array(
	'tag'	=> 'url',
	'html'	=> '<a href="{option}" target="_blank">{text}</a>',
	'type'	=> 'url',
	),

Fge darunter ein:

#Fontsize Modifikation www.kit-coding.de
array(
	'tag'	=> 'font',
	'html'	=> '<span style="font-size:{size}px;{color}">{text}</span>',
	'type'	=> 'font',
	),
#Fontsize Modifikation www.kit-coding.de

=======================================================================

pkinc/class/bbcode.php

Suche:

				case 'url' :
					$func = 'replace_url';

					$pattern = "#\[(".$code['tag'].")\](.*)\[/\\1\]#eisuSU"; #format: [url]link[/url]
					$text = preg_replace($pattern,"\$this->$func('$code[html]','\\2')",$text);

					$pattern = "#\[(".$code['tag'].")=(.*)\](.*)\[/\\1\]#eisuSU"; #format [url=link]text[/url]
					$text = preg_replace($pattern,"\$this->$func('$code[html]','\\2','\\3')",$text);					
					
					break; #END case url

Fge darunter ein:

				#Fontsize Modifikation www.kit-coding.de
				case 'font' :
					$func = 'fontrewrite';
				
					#Mit Farbe
					$pattern = "#\[(".$code['tag'].")=(.*)=(.*)\](.*)\[/\\1\]#eiU"; #format [url=link]text[/url]
					$text = preg_replace($pattern,"\$this->$func('$code[html]','\\2','\\4','\\3')",$text);					

					#Ohne Farbe
					$pattern = "#\[(".$code['tag'].")=(.*)\](.*)\[/\\1\]#eiU"; #format [url=link]text[/url]
					$text = preg_replace($pattern,"\$this->$func('$code[html]','\\2','\\3')",$text);					

					
					break;
				#Fontsize Modifikation www.kit-coding.de

Suche weiter:

	}
#@END Method: pkBbcode
?>

Fge DARBER ein:

		#Fontsize Modifikation www.kit-coding.de
		function fontrewrite($html='',$size='', $text='',$color='') {
			$size=($size>30 || $size<10)?12:$size;
			$FontColors=Array("white","gray","dimgray","navy","royalblue","red","orange","yellow","green");
			if(in_array($color,$FontColors)|| preg_match("/^[0-9A-F]{6}$/i", strtoupper($color),$Found)){
				$AddAnchor=(!empty($Found))?'#':'';
				$Changecolor='color:'.$AddAnchor.$color.';';
			}else{
				$Changecolor='';
			}
			$fontrewrite=str_replace("\\\"","\"",str_replace("{size}",trim($size),str_replace("{text}",trim($text),str_replace("{color}",trim($Changecolor),$html))));			
			return $fontrewrite;
		}
		#Fontsize Modifikation www.kit-coding.de

=======================================================================

pkinc/admintpl/format_text.htm

Suche:

<td><a href="javascript:pkBBSingle('&euro;')" onfocus="blur();"><img src="./../fx/default/bbcode/euro.gif" alt="Euro" /></a></td>

Fge darunter ein:
	  <!-- Fontsize Modifikation www.kit-coding.de -->
	  <td><a href="javascript:;" onclick="pkBBFont('FONT')" onfocus="blur();"><img src="./../fx/default/bbcode/font.gif" alt="Schriftgr&ouml;&szlig;e bestimmen" /></a></td>
	  <!-- Fontsize Modifikation www.kit-coding.de -->

=======================================================================

pkinc/publictpl/format_text.htm

Suche:

<td align="center"><a href="javascript:;" onclick="helpwindow(800,600,'bbcode');"><img src="images/help.gif" alt="Hilfe" /></a></td>
	 </tr>

Fge darunter ein:

	  <!-- Fontsize Modifikation www.kit-coding.de -->
         <tr>
	  <td><a href="javascript:;" onclick="pkBBFont('FONT')" onfocus="blur();"><img src="fx/default/bbcode/font.gif" alt="Schriftgr&ouml;&szlig;e bestimmen" /></a></td>
         </tr>
	  <!-- Fontsize Modifikation www.kit-coding.de -->

=======================================================================

fx/main.js

Suche:

linkadresse = "Geben Sie bitte die vollst\u00E4ndige Adresse des Links an.";

Fge darunter ein:

fontsize = "Geben Sie hier die Schriftgr\u00F6\u00DFe an.";
fontcolor = "Schreiben Sie die Farbe in das Textfeld!\nM\u00F6glich sind:\nwhite,gray,dimgray,navy,royalblue,red,orange,yellow,green oder HEX Angaben\n\nSie k\u00F6nnen das Feld auch leerlassen, damit die Webseiten Standardfarbe genommen wird.";

Suche weiter:

function pkBBSingle(text)
	{
	text=' '+text+' ';
	pkBBCodeAdd(text);
	}

Fge darunter ein:

/*Fontsize Modifikation www.kit-coding.de ANFANG*/
function pkBBFont(bbcode){
	text=(pkBBSelected) ? pkBBSelected : '';
	
	size="";
	color="";
	TTcolorAdd="";
	HextoUpper="";
	myCounter=0;
	fine=0;
	TTSize=prompt(fontsize,size);
	
	if(isNaN(TTSize) == false){
		if ((TTSize<30 && TTSize>10) || TTSize=='' || TTSize == null){
			if((TTSize!='') && (TTSize != null)){
				TTcolor=prompt(fontcolor,color);
				HextoUpper=TTcolor.toUpperCase();
				control=HextoUpper.match(/^([0-9A-F]{6})$/ig);
				Farbcode = new Array("white","gray","dimgray","navy","royalblue","red","orange","yellow","green");
				while(myCounter < Farbcode.length){
					if(Farbcode[myCounter]==TTcolor || control){
						fine=1;
					}
					myCounter++;
				}
				if((TTcolor!='') && (TTcolor != null) && fine==1){
					if(control){
						TTcolor=HextoUpper;
					}
					TTcolorAdd="="+TTcolor+"";
				}else{
					if(fine==0 && TTcolor != null && TTcolor != ''){
						alert("Ihre eingegebene Farbe("+TTcolor+") ist uns nicht bekannt!");
					}
					TTcolorAdd="";
				}				
				
				auswahltext = "["+bbcode+"="+TTSize+TTcolorAdd+"]"+text+"[/"+bbcode+"]";
				pkBBCodeAdd(auswahltext);
			}
		}else{
			alert(TTSize + " ist zu gro\u00DF oder zu klein!");
		}
	}else{
		alert(TTSize + " ist keine Zahl!");
	}
}
/*Fontsize Modifikation www.kit-coding.de ENDE*/


=======================================================================

pk/fx/main.js

Suche:

linkadresse = "Geben Sie bitte die vollst\u00E4ndige Adresse des Links an.";

Fge darunter ein:

fontsize = "Geben Sie hier die Schriftgr\u00F6\u00DFe an.";
fontcolor = "Schreiben Sie die Farbe in das Textfeld!\nM\u00F6glich sind:\nwhite,gray,dimgray,navy,royalblue,red,orange,yellow,green oder HEX Angaben\n\nSie k\u00F6nnen das Feld auch leerlassen, damit die Webseiten Standardfarbe genommen wird.";

Suche weiter:

function pkBBSingle(text)
	{
	text=' '+text+' ';
	pkBBCodeAdd(text);
	}

Fge darunter ein:

/*Fontsize Modifikation www.kit-coding.de ANFANG*/
function pkBBFont(bbcode){
	text=(pkBBSelected) ? pkBBSelected : '';
	
	size="";
	color="";
	TTcolorAdd="";
	HextoUpper="";
	myCounter=0;
	fine=0;
	TTSize=prompt(fontsize,size);
	
	if(isNaN(TTSize) == false){
		if ((TTSize<30 && TTSize>10) || TTSize=='' || TTSize == null){
			if((TTSize!='') && (TTSize != null)){
				TTcolor=prompt(fontcolor,color);
				HextoUpper=TTcolor.toUpperCase();
				control=HextoUpper.match(/^([0-9A-F]{6})$/ig);
				Farbcode = new Array("white","gray","dimgray","navy","royalblue","red","orange","yellow","green");
				while(myCounter < Farbcode.length){
					if(Farbcode[myCounter]==TTcolor || control){
						fine=1;
					}
					myCounter++;
				}
				if((TTcolor!='') && (TTcolor != null) && fine==1){
					if(control){
						TTcolor=HextoUpper;
					}
					TTcolorAdd="="+TTcolor+"";
				}else{
					if(fine==0 && TTcolor != null && TTcolor != ''){
						alert("Ihre eingegebene Farbe("+TTcolor+") ist uns nicht bekannt!");
					}
					TTcolorAdd="";
				}				
				
				auswahltext = "["+bbcode+"="+TTSize+TTcolorAdd+"]"+text+"[/"+bbcode+"]";
				pkBBCodeAdd(auswahltext);
			}
		}else{
			alert(TTSize + " ist zu gro\u00DF oder zu klein!");
		}
	}else{
		alert(TTSize + " ist keine Zahl!");
	}
}
/*Fontsize Modifikation www.kit-coding.de ENDE*/


=======================================================================

Das war es auch schon.

Juhu


Support:
============================

Support & Fragen: 

Support gebe ich gerne im FORUM unter www.kit-coding.de 
PNS oder ICQ werden gnadenlos ignoriert!!!
