Name:		All Content Teaser V1.1 Final
Datum:		12-04-2009
Author: 	Crack
Homepage:	www.kit-coding.de
Email: 		Info@kit-coding.de

---------------------------------------------------------------------------------------------------
INSTALL HowTo All Content Teaser V1.1
---------------------------------------------------------------------------------------------------

1. Lade alle Ordner unter Beibehaltung der Ordnerstruktur hoch. Dabei werden keine Dateien berschrieben ;)
2. Geben sie nun dem Ordner /content/images/content_teaser/ CHMOD 777 Rechte.
3. Fhren Sie die install.php aus. Sie mssen Adminrechte besitzen!!! z.b. -> http://www.deineurl.de/include.php?path=install
4. ndere nun folgende 10 Dateien 

/pkinc/admin/contentcompose.php
/pkinc/admin/contentarchive.php
/pkinc/admintpl/content/compose_step3.htm
/pkinc/public/content.php
/pkinc/public/article.php
/pkinc/public/news.php
/pkinc/public/download.php
/pkinc/publictpl/content/content.htm
/pkinc/publictpl/content/articles.htm
/pkinc/publictpl/content/news.htm
/pkinc/publictpl/content/download.htm
/pkinc/func/default.php

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

/pkinc/admin/contentcompose.php

Suche:

eval("\$ext_option= \"".pkTpl("content/compose_step3_extoption")."\";");

Fge DARBER ein:

#All Content Teaser by www.kit-coding.de ANFANG
		
		#VARS
		$uploader_file='content_file';
		$PathToPics='content/images/content_teaser';
		$ID_Filter=$contentid;
		$Multi_pics=1;
		$Databasetable=pkSQLTAB_CONTENT;
		$Databasetable_field='content';
		$Information_table_field=$contentinfo['content_picteaser'];
		$RefreshPath='contentcompose';
		$RefreshPathContents='step=3&contentid='.$ID_Filter;
		#Pic Uploader
		include(pkDIRADMIN.'picture_uploader'.pkEXT);
		
#All Content Teaser by www.kit-coding.de ENDE

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

/pkinc/admin/contentarchive.php

Suche:
	
if($_POST['confirm']=='yes' && $contentinfo['content_id']){ 

Fge darunter ein:
	
#All Content Teaser by www.kit-coding.de ANFANG
				$teaser=$SQL->fetch_array($SQL->query("SELECT `content_id`, `content_picteaser` FROM `".pkSQLTAB_CONTENT."` WHERE `content_id`='".$SQL->i($contentinfo['content_id'])."'"));
				if($teaser['content_picteaser']!=''){
						$p=$teaser['content_picteaser'];
						$info=explode("\n",$p);
						
						if(is_array($info)){
							foreach($info as $id){
								$id=trim($id);
								if($id!=''){								
									@unlink('../content/images/content_teaser/'.$id);
								}
							}
						}
				}
#All Content Teaser by www.kit-coding.de ENDE

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

/pkinc/admintpl/content/compose_step3.htm

Suche:

<form name="myform"

Fge DAHINTER ein(Leerzeile dazwischen lassen!):

enctype="multipart/form-data"


Suche weiter:

$content_body

Fge Darber ein:

 <!-- All Content Teaser by www.kit-coding.de ANFANG -->
 $error
 $showpic
 $newpic
 <!-- All Content Vorschau Teaser by www.kit-coding.de ENDE -->

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

/pkinc/public/content.php

Suche:
	
if($path!='start')
			eval("\$content_footer=\"".pkTpl("content/content_footer")."\";");
	
Fge darunter ein:
	
#All Content Teaser by www.kit-coding.de ANFANG
		if($contentinfo['content_picteaser']!=''){
	
			$p=$contentinfo['content_picteaser'];
				
			$info=explode("\n",$p);
						
				if(is_array($info))
				{
					foreach($info as $id){
						$id=trim($id);
							if($id!=''){
								$getimagesize =@getimagesize('content/images/content_teaser/'.$id);
								$width=$getimagesize[0];
								$height=$getimagesize[1];
								
								while($width>=150){
									$width=$width/2;
									$height=$height/2;
								}
															
								if ($height>=100)
									$height=$height/1.1;
								elseif($height<100)
									$height=$height;
														
								$pics.='<a href="../content/images/content_teaser/'.$id.'" rel="lightbox[teaser'.$contentinfo['content_id'].']" target="_blank"><img src="../content/images/content_teaser/'.$id.'" width="'.$width.'" height="'.$height.'" alt="'.$id.'" title="'.$id.'" align="middle" /></a>&nbsp;';
							}
					}
				}
				
			$teaser='
			<tr>
             <td class="standard" width="100%">
 			  <table class="contentbody" border="0" cellspacing="1" cellpadding="2" width="100%">
			   <tr>
		        <td align="left" class="heads">
				 <b><font class="headssmall">Content Bilder</font></b>
			   </td>
               </tr>
               <tr><td class="left">
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
				 <tr>
                  <td align="center">'.$pics.'</td>
                 </tr>
                </table>
               </td>
              </tr>
			 </table>
			</td>
           </tr>';
		}
		#All Content Teaser by www.kit-coding.de ENDE

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

/pkinc/public/article.php

Suche:

$suggest_url=urlencode('path=article&contentid='.$contentinfo['content_id'].'&page='.$page);

Fge darunter ein:

#All Content Teaser by www.kit-coding.de ANFANG
		if($contentinfo['content_picteaser']!=''){
	
			$p=$contentinfo['content_picteaser'];
				
			$info=explode("\n",$p);
						
				if(is_array($info))
				{
					foreach($info as $id){
						$id=trim($id);
							if($id!=''){
								$getimagesize =@getimagesize('content/images/content_teaser/'.$id);
								$width=$getimagesize[0];
								$height=$getimagesize[1];
								
								while($width>=150){
									$width=$width/2;
									$height=$height/2;
								}
															
								if ($height>=100)
									$height=$height/1.1;
								elseif($height<100)
									$height=$height;
														
								$pics.='<a href="../content/images/content_teaser/'.$id.'" rel="lightbox[teaser'.$contentinfo['content_id'].']" target="_blank"><img src="../content/images/content_teaser/'.$id.'" width="'.$width.'" height="'.$height.'" alt="'.$id.'" title="'.$id.'" align="middle" /></a>&nbsp;';
							}
					}
				}
				
			$teaser='
			<tr>
             <td class="standard" width="100%" colspan="2">
 			  <table class="contentbody" border="0" cellspacing="1" cellpadding="2" width="100%">
			   <tr>
		        <td align="left" class="heads">
				 <b><font class="headssmall">Artikel Bilder</font></b>
			   </td>
               </tr>
               <tr><td class="left">
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
				 <tr>
                  <td align="center">'.$pics.'</td>
                 </tr>
                </table>
               </td>
              </tr>
			 </table>
			</td>
           </tr>';
		}
		#All Content Teaser by www.kit-coding.de ENDE

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

/pkinc/public/news.php

Suche:
	
$suggest_url=urlencode("path=news&contentid=".$contentinfo['content_id']);
	
Fge darunter ein:

#All Content Teaser by www.kit-coding.de ANFANG
		if($contentinfo['content_picteaser']!=''){
	
			$p=$contentinfo['content_picteaser'];
				
			$info=explode("\n",$p);
						
				if(is_array($info))
				{
					foreach($info as $id){
						$id=trim($id);
							if($id!=''){
								$getimagesize =@getimagesize('content/images/content_teaser/'.$id);
								$width=$getimagesize[0];
								$height=$getimagesize[1];
								
								while($width>=150){
									$width=$width/2;
									$height=$height/2;
								}
															
								if ($height>=100)
									$height=$height/1.1;
								elseif($height<100)
									$height=$height;
														
								$pics.='<a href="../content/images/content_teaser/'.$id.'" rel="lightbox[teaser'.$contentinfo['content_id'].']" target="_blank"><img src="../content/images/content_teaser/'.$id.'" width="'.$width.'" height="'.$height.'" alt="'.$id.'" title="'.$id.'" align="middle" /></a> ';
							}
					}
				}
				
			$teaser='
			<tr>
             <td class="standard" width="100%">
 			  <table class="contentbody" border="0" cellspacing="1" cellpadding="2" width="100%">
			   <tr>
		        <td align="left" class="heads">
				 <b><font class="headssmall">News Bilder</font></b>
			   </td>
               </tr>
               <tr><td class="left">
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
				 <tr>
                  <td align="center">'.$pics.'</td>
                 </tr>
                </table>
               </td>
              </tr>
			 </table>
			</td>
           </tr>';
		}
		#All Content Teaser by www.kit-coding.de ENDE
		
Suche weiter:
	
unset($news_source);

Fge darunter ein:
	
unset($teaser);
unset($pics);

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

/pkinc/public/download.php

Suche:
	
$suggest_url=urlencode('path=download&contentid='.$contentinfo['content_id']);
	
Fge darunter ein:
	
#All Content Teaser by www.kit-coding.de ANFANG
if($contentinfo['content_picteaser']!=''){
	
	$p=$contentinfo['content_picteaser'];
				
		$info=explode("\n",$p);
						
			if(is_array($info))
			{
				foreach($info as $id){
					$id=trim($id);
						if($id!=''){								
								$pics.='<p align="center"><a href="../content/images/content_teaser/'.$id.'" rel="lightbox[teaser'.$contentinfo['content_id'].']" target="_blank"><img src="../content/images/content_teaser/'.$id.'" width="120" alt="'.$id.'" title="'.$id.'" /></a></p><br />';
						}
					}
			}
}
else{
$pics='<font class="small">Momentan keine</font>';
}

$teaser='
<table class="standard" border="0" cellspacing="1" cellpadding="1" width="100%">
 <tr>
  <td align="right" class="heads">
   <b><font class="headssmall">Teaser zu diesem DL</font></b>
  </td>
  </tr>
  <tr><td class="standard">
   <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr>
     <td align="center">'.$pics.'</td>
    </tr>
   </table>
  </td>
 </tr>
</table>';
#All Content Teaser by www.kit-coding.de ENDE

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

/pkinc/publictpl/content/content.htm

Suche:
	
$content_footer
	
Fge darber ein:
	
$teaser


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

/pkinc/publictpl/content/articles.htm

Suche:
	
$related_boxes
  </td>
 </tr>
	
Fge darunter ein:
	
$teaser
	
=======================================================================

/pkinc/publictpl/content/news.htm

Suche:
	
$news_source
  </td>
 </tr>
	
Fge darunter ein:

$teaser

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

/pkinc/publictpl/content/download.htm

Suche:
	
$related_boxes
	
Fge darber ein:
	
$teaser
	
=======================================================================

/pkinc/func/default.php

Suche:
	
?>

Fge darber ein:
	
#All Content Teaser by www.kit-coding.de ANFANG
if(!function_exists('picture_teaser_contents')) {
	function picture_teaser_contents($extendedid='0',$PathToPics='content/images/content_teaser',$uploader='content_file') {
		if (!preg_match('/.php/',$_FILES[$uploader]['name'])){
				unset($skip);
				unset($teaserfile);
				
				if(is_uploaded_file($_FILES[$uploader]['tmp_name'])){
					
					$pic_size=getimagesize($_FILES[$uploader]['tmp_name']);
	
					
	
					if($pic_size[2]==1)
						$extension='gif';
					elseif($pic_size[2]==2)
						$extension='jpg';
					elseif($pic_size[2]==3)
						$extension='png';
					else{ 
						$skip='TRUE';
					}
						
					
					if($extendedid>0)
						$extendedid=$extendedid.'_';
					else
						$extendedid='';
						
  
					if($skip!='TRUE') 
					{
						$change=ereg_replace(' ','',$_FILES[$uploader]['name']);
						$filename=$extendedid.$change;
							
						if(file_exists('../'.$PathToPics.'/'.$filename)){
							$filename=ereg_replace(' ','',$extendedid.time().'_'.$_FILES[$uploader]['name']);
						}
				
						$UPLOAD=new UPLOAD();
						$uploadreturned=$UPLOAD->images($_FILES[$uploader],'../'.$PathToPics,$filename);
				
						if($uploadreturned[0]==TRUE) {
						@unlink($_FILES[$uploader]['tmp_name']);
						}
						
						$teaserfile=urlencode(basename($filename));
						return $teaserfile;
					}else{
						
						return FALSE;
					}
				}
				
		}else{
			die ('Bitte unterlassen Sie derartige Versuche die Seite zu manipulieren! Die Daten wurden geloggt.');
		}
	}
}

if(!function_exists('err_handler')) {
  function err_handler($err='0', $file='') {
	  
		if($err==1)
			$debug.='Die Datei "'.$file.'" konnte nicht vom Server gelscht werden. Existiert nicht mehr....!<br/>';
		elseif ($err==2)
			$debug='Sie haben kein Bild ausgewhlt!';
		elseif ($err==3)
			$debug='Bitte unterlassen Sie derartige Versuche die Seite zu manipulieren! Die Daten wurden geloggt.';
		elseif ($err==4)
			$debug='Keine g&uuml;ltige Bildgrafik!';
		else
			$debug='';
		
	return $debug;
	  
  }
}

#All Content Teaser by 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!!!
