Differences

This shows you the differences between two versions of the page.

deutsch:phpwcms-system:artikel:contentparts:dateiliste:copyright-infotext-tags [2010/03/11 16:13]
Knut Heermann (flip-flop)
deutsch:phpwcms-system:artikel:contentparts:dateiliste:copyright-infotext-tags [2018/06/03 18:08] (current)
Line 3: Line 3:
====== Copyright & Infotext mit Tags ====== ====== Copyright & Infotext mit Tags ======
-Eine recht einfache Version um die Einträge Copyright und Infotext aus der Dateizentrale darzustellen. \\+Eine recht einfache Version um die Einträge Copyright, Infotext und Kurztext aus der Dateizentrale darzustellen. \\
- Mit LightBox für die Bildvorschau //(Technik: cmsimage.php)// und Übergabe des Infotext //(einfache Formatierung möglich [BB-Code])//. - Mit LightBox für die Bildvorschau //(Technik: cmsimage.php)// und Übergabe des Infotext //(einfache Formatierung möglich [BB-Code])//.
**Tags im Template:** \\ **Tags im Template:** \\
-**{COPYRIGHT:{FILE_ID}}** und **{INFOTEXT:{FILE_ID}}**+- **{X_COPYRIGHT:{FILE_ID}}** \\ 
 +- **{X_INFOTEXT:{FILE_ID}}** \\ 
 +- **{X_KURZTEXT:{FILE_ID}}** \\
\\ \\
Line 71: Line 73:
[FILE_IMAGE] [FILE_IMAGE]
<div style="float: left; margin-right: 10px; height: 140px;"> <div style="float: left; margin-right: 10px; height: 140px;">
-<!-- <a href="img/cmsimage.php/{FILE_IMAGE_WIDTH}x{FILE_IMAGE_HEIGHT}/{FILE_ID}.{FILE_EXT}" rel="lightbox[XYZ{FILE_ID}]" title="{INFOTEXT:{FILE_ID}}" target="_blank"> //--> +<!-- <a href="img/cmsimage.php/{FILE_IMAGE_WIDTH}x{FILE_IMAGE_HEIGHT}/{FILE_ID}.{FILE_EXT}" rel="lightbox[XYZ{FILE_ID}]" title="{X_INFOTEXT:{FILE_ID}}" target="_blank"> //--> 
- <a href="img/cmsimage.php/800x600/{FILE_ID}.{FILE_EXT}" rel="lightbox[XYZ{FILE_ID}]" title="{INFOTEXT:{FILE_ID}}" target="_blank">+ <a href="img/cmsimage.php/800x600/{FILE_ID}.{FILE_EXT}" rel="lightbox[XYZ{FILE_ID}]" title="{X_INFOTEXT:{FILE_ID}}" target="_blank">
<img src="{FILE_IMAGE}" alt="{FILE_NAME}" title="[FILE_TITLE]{FILE_TITLE}[/FILE_TITLE][FILE_TITLE_ELSE]{FILE_NAME}[/FILE_TITLE_ELSE]" border="" /></a> <img src="{FILE_IMAGE}" alt="{FILE_NAME}" title="[FILE_TITLE]{FILE_TITLE}[/FILE_TITLE][FILE_TITLE_ELSE]{FILE_NAME}[/FILE_TITLE_ELSE]" border="" /></a>
</div> </div>
Line 91: Line 93:
<p> <p>
- CopyRight: {COPYRIGHT:{FILE_ID}}<br /> + CopyRight: {X_COPYRIGHT:{FILE_ID}}<br /> 
- Info-Text: &nbsp;{INFOTEXT:{FILE_ID}}<br />+ Info-Text: &nbsp;{X_INFOTEXT:{FILE_ID}}<br /> 
 + Kurztext: &nbsp;{X_KURZTEXT:{FILE_ID}}<br />
</p> </p>
Line 118: Line 121:
// 10.03.10 K.Heermann  http://planmatrix.de // 10.03.10 K.Heermann  http://planmatrix.de
// Holt CopyRight & Infotext aus der DB und stellt ueber die Tags // Holt CopyRight & Infotext aus der DB und stellt ueber die Tags
-// {COPYRIGHT:fileID}} und {INFOTEXT:fileID} den Inhalt bereit  +// {X_COPYRIGHT:fileID}}, {X_INFOTEXT:fileID} und {X_KURZTEXT:{FILE_ID}} den Inhalt bereit  
-// Im Template: {COPYRIGHT:{FILE_ID}}, {INFOTEXT:{FILE_ID}}+// 
 +// Im Template: {X_COPYRIGHT:{FILE_ID}}, {X_INFOTEXT:{FILE_ID}}, {X_KURZTEXT:{FILE_ID}}
// -------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------
Line 126: Line 130:
// Der richtige CP filelist (7) und Tag vorhanden? // Der richtige CP filelist (7) und Tag vorhanden?
if ( $data['acontent_type'] == 7  AND if ( $data['acontent_type'] == 7  AND
- ( strpos($text, '{COPYRIGHT:') OR strpos($text, '{INFOTEXT:') ) )  // TAGs vorhanden?+ ( strpos($text, '{X_COPYRIGHT:') OR strpos($text, '{X_INFOTEXT:') ) )  // TAGs vorhanden?
{ {
Line 140: Line 144:
// Daten  holen und ersetzen // Daten  holen und ersetzen
foreach($GLOBALS['content']['files_result'] as $key=>$value) { foreach($GLOBALS['content']['files_result'] as $key=>$value) {
-  + 
- $text = str_replace('{COPYRIGHT:'.$value['f_id'].'}', $value['f_copyright'], $text);+ // ----- CopyRight ersetzen 
 + $text = str_replace('{X_COPYRIGHT:'.$value['f_id'].'}', $value['f_copyright'], $text); 
 + 
 + // ----- Kurztext ersetzen 
 + $text = str_replace('{X_KURZTEXT:' .$value['f_id'].'}', $value['f_shortinfo'], $text);
- // Formatierung einbringen fuer Infotext+ // ------ Infotext formatieren
$t = plaintext_htmlencode($value['f_longinfo']); $t = plaintext_htmlencode($value['f_longinfo']);
$t = (preg_match('/\A\<p\>(.*?)\<\/p\>\Z/is',$t,$matches))? $matches[1]: $t; //Umschlieszer <p> ..</p> loeschen $t = (preg_match('/\A\<p\>(.*?)\<\/p\>\Z/is',$t,$matches))? $matches[1]: $t; //Umschlieszer <p> ..</p> loeschen
- $text = str_replace('{INFOTEXT:' .$value['f_id'].'}', $t, $text);+ $text = str_replace('{X_INFOTEXT:' .$value['f_id'].'}', $t, $text);
} }
} }
deutsch/phpwcms-system/artikel/contentparts/dateiliste/copyright-infotext-tags.1268320408.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0