alt-tag bei DER ARTIKEL

Gesperrt
Knuds
Beiträge: 52
Registriert: Di 8. Okt 2002, 10:37
Kontaktdaten:

alt-tag bei DER ARTIKEL

Beitrag von Knuds » Do 8. Mai 2003, 06:57

hi björn und die anderen,

wie krieg ich in DER ARTIKEL nen alt-tag für pic1 usw. rein? woher krieg ich die bedeutung der %s im output? - welches %s steht für was? da könnte ich es ja konfigurieren, oder?!?

danke
grüsse
knuds

Knuds
Beiträge: 52
Registriert: Di 8. Okt 2002, 10:37
Kontaktdaten:

Beitrag von Knuds » Do 8. Mai 2003, 07:40

hi habs schon so halb hinbekommen.
im output ergänzt:
bei pic templates ein %s mehr für den alttag

Code: Alles auswählen

//'%s' wird durch url, align, width/ height ersetzt
$pic1['template'] = '<img src="%s" %s %s %s %s border=1>';
und dann in der funktion mop_format_image nen einschub:
//alt tag

Code: Alles auswählen

if($in['desc'] ==''){$alt = '';}else{$alt = 'alt="'. $in['desc'].'"';}
und die zeile:

Code: Alles auswählen

$to_return = sprintf($in['template'],$in['url'],$align,$size['3']);
ersetzt durch:

Code: Alles auswählen

$to_return = sprintf($in['template'],$in['url'],$align,$size['3'],$alt);
bleibt nur noch das problem, wie beim damaligen alt-tag, das bei der bildauswahl im backend das seitenlayout zerschossen wird?!? wo steht der code für die blaue kuller?

ausserdem hatte ich das problem, das css def. rund um mein bild irgendwie ignoriert wurden. also das <span> meiner headline davor und das meines textes danach?!?!?!

sonst gehts.
grüsse
knuds

mquadrat
Beiträge: 55
Registriert: Sa 22. Feb 2003, 01:30
Wohnort: Pinneberg
Kontaktdaten:

Beitrag von mquadrat » Di 18. Nov 2003, 14:41

Hallo Knuds,

hast Du das Problem schon gelöst?
ich stehe nämlich auch davor, dass ich einen ALT Text haben muss, den aber nicht aus dem Backend in das Frontend bringe.

Falls Du Tipps hast, würdeich mich über eine Info freuen.
Gruß,
Matthias

mquadrat
Beiträge: 55
Registriert: Sa 22. Feb 2003, 01:30
Wohnort: Pinneberg
Kontaktdaten:

Beitrag von mquadrat » Do 27. Nov 2003, 23:45

Hallo,

ich habe Björn direkt gefragt und er war so nett, das zu ergänzen. Also für alle, die auch gerne einen ALT Text hätte, anstelle der Bild-Beschreibung, ist hier der Quellcode für das OUTPUT. Funktioniert mit 4.2 einwandfrei.

Code: Alles auswählen

/**
 * DER ARTIKEL
 *
 * @Author: (c) Björn Brockmann 2002 - 2003
 * @Email: bjoern@project-gooseberry.de
 * @Homepage: www.project-gooseberry.de
 * @License: GPL
 * @Version: 1.0.3
 */

//-------------------------------
// KONFIGURATION
//-------------------------------

// CSS- STYLE SHEETS
// Welche styles sollen benutzt werden? Mögliche Werte sind
// 'id' oder 'class'
// WICHTIG:
// Wird 'id' gewählt, muß im Inputbereich 'id_only' gewählt werden
// Wird 'class' gewählt, muß im Inputbereich 'class_only' gewählt werden
$css_style = 'class';


// TEMPLATES
// Hier könnt ihr die spätere Ausgabe eurer Inhalte noch zusätzlich beinflussen.
// Dies ist sinnvoll, wenn ihr z.B. die Links noch zusätzlich mit einem
// mouseover austatten wollt. '%s' wird später durch die vorgegebenden Inhalte
// ersetzt. Hütet euch davor, hier angaben mit '%' - Zeichen zu machen, z.B.
// <table width= '100%'>. Dies wird zu einen Fehler führen

// HEAD TEMPLATES
// '%s' wird durch CMS_HEAD[x] ersetzt
$head1['template'] = "%s";
$head2['template'] = "%s";

// TEXT TEMPLATES
// '%s' wird durch CMS_TEXT[x] ersetzt
$text1['template'] = "%s";
$text2['template'] = "%s";

// WYSIWYG TEMPLATES
// '%s' wird durch CMS_HTML[x] ersetzt
$wysiwyg1['template'] = "%s";
$wysiwyg2['template'] = "%s";
$wysiwyg3['template'] = "%s";

// PIC TEMPLATES
//'%s' wird durch url, beschreibung, align, width/ height ersetzt
$pic1['template'] = '<img src="%s" alt="%s"  %s  %s border="0">';
$pic2['template'] = '<img src="%s" alt="%s"  %s  %s border="0">';
$pic3['template'] = '<img src="%s" alt="%s"  %s  %s border="0">';

// LINK TEMPLATES
// '%s' wird durch url, target, description ersetzt
$link1['template'] = '<a href="%s" %s>%s</a>';
$link2['template'] = '<a href="%s" %s>%s</a>';
$link3['template'] = '<a href="%s" %s>%s</a>';
$link4['template'] = '<a href="%s" %s>%s</a>';
$link5['template'] = '<a href="%s" %s>%s</a>';

// ZIP TEMPLATES
// '%s' wird durch url, description ersetzt
$zip1['template'] = '<a href="%s">%s</a>';
$zip2['template'] = '<a href="%s">%s</a>';

// PDF TEMPLATES
// '%s' wird durch url, description ersetzt
$pdf1['template'] = '<a href="%s">%s</a>';
$pdf2['template'] = '<a href="%s">%s</a>';

//-------------------------------
// ENDE DER KONFIGURATION
//-------------------------------

$mod_active = 'CMS_VALUE[1]';

$head1['visible'] = 'CMS_VALUE[47]';
$head1['style'] = 'CMS_VALUE[2]';
$head1['content'] = stripslashes("CMS_HEAD[CMS_VALUE[0]1]");

$head2['visible'] = 'CMS_VALUE[48]';
$head2['style'] = 'CMS_VALUE[3]';
$head2['content'] = stripslashes("CMS_HEAD[CMS_VALUE[0]2]");

$text1['visible'] = 'CMS_VALUE[49]';
$text1['style'] = 'CMS_VALUE[4]';
$text1['content'] = stripslashes("CMS_TEXT[CMS_VALUE[0]1]");

$text2['visible'] = 'CMS_VALUE[50]';
$text2['style'] = 'CMS_VALUE[5]';
$text2['content'] = stripslashes("CMS_TEXT[CMS_VALUE[0]2]");

$wysiwyg1['visible'] = 'CMS_VALUE[51]';
$wysiwyg1['style'] =  'CMS_VALUE[6]';
$wysiwyg1['content'] = stripslashes("CMS_HTML[CMS_VALUE[0]1]");

$wysiwyg2['visible'] = 'CMS_VALUE[52]';
$wysiwyg2['style'] =  'CMS_VALUE[7]';
$wysiwyg2['content'] = stripslashes("CMS_HTML[CMS_VALUE[0]2]");

$wysiwyg3['visible'] = 'CMS_VALUE[53]';
$wysiwyg3['style'] =  'CMS_VALUE[8]';
$wysiwyg3['content'] = stripslashes("CMS_HTML[CMS_VALUE[0]3]");

$pic1['visible'] = 'CMS_VALUE[59]';
$pic1['mode'] =  'CMS_VALUE[20]';
$pic1['align'] =  'CMS_VALUE[23]';
$pic1['url'] = stripslashes("CMS_IMG[CMS_VALUE[0]1]");
$pic1['desc'] = stripslashes("CMS_IMGDESCR[CMS_VALUE[0]1]");
$pic1['url_style'] = 'CMS_VALUE[14]';
$pic1['desc_style'] = 'CMS_VALUE[15]';
$pic1['pop_url'] = stripslashes("CMS_IMG[CMS_VALUE[0]2]");
$pic1['pop_desc'] = stripslashes("CMS_IMGDESCR[CMS_VALUE[0]2]");

$pic2['visible'] = 'CMS_VALUE[60]';
$pic2['mode'] = 'CMS_VALUE[21]';
$pic2['align'] =  'CMS_VALUE[24]';
$pic2['url'] = stripslashes("CMS_IMG[CMS_VALUE[0]3]");
$pic2['desc'] = stripslashes("CMS_IMGDESCR[CMS_VALUE[0]3]");
$pic2['url_style'] = 'CMS_VALUE[16]';
$pic2['desc_style'] = 'CMS_VALUE[17]';
$pic2['pop_url'] = stripslashes("CMS_IMG[CMS_VALUE[0]4]");
$pic2['pop_desc'] = stripslashes("CMS_IMGDESCR[CMS_VALUE[0]4]");

$pic3['visible'] = 'CMS_VALUE[61]';
$pic3['mode'] = 'CMS_VALUE[22]';
$pic3['align'] =  'CMS_VALUE[25]';
$pic3['url'] = stripslashes("CMS_IMG[CMS_VALUE[0]5]");
$pic3['desc'] = stripslashes("CMS_IMGDESCR[CMS_VALUE[0]5]");
$pic3['url_style'] = 'CMS_VALUE[18]';
$pic3['desc_style'] = 'CMS_VALUE[19]';
$pic3['pop_url'] = stripslashes("CMS_IMG[CMS_VALUE[0]6]");
$pic3['pop_desc'] = stripslashes("CMS_IMGDESCR[CMS_VALUE[0]6]");

$link1['visible'] = 'CMS_VALUE[54]';
$link1['desc_style'] = 'CMS_VALUE[26]';
$link1['style'] = 'CMS_VALUE[9]';
$link1['url'] = "CMS_LINK[CMS_VALUE[0]1]";
$link1['desc'] = stripslashes("CMS_LINKDESCR[CMS_VALUE[0]1]");
$link1['target'] = "CMS_LINKTARGET[CMS_VALUE[0]1]";

$link2['visible'] = 'CMS_VALUE[55]';
$link2['desc_style'] = 'CMS_VALUE[27]';
$link2['style'] = 'CMS_VALUE[10]';
$link2['url'] = "CMS_LINK[CMS_VALUE[0]2]";
$link2['desc'] = stripslashes("CMS_LINKDESCR[CMS_VALUE[0]2]");
$link2['target'] = "CMS_LINKTARGET[CMS_VALUE[0]2]";

$link3['visible'] = 'CMS_VALUE[56]';
$link3['desc_style'] = 'CMS_VALUE[28]';
$link3['style'] = 'CMS_VALUE[11]';
$link3['url'] = "CMS_LINK[CMS_VALUE[0]3]";
$link3['desc'] = stripslashes("CMS_LINKDESCR[CMS_VALUE[0]3]");
$link3['target'] = "CMS_LINKTARGET[CMS_VALUE[0]3]";

$link4['visible'] = 'CMS_VALUE[57]';
$link4['desc_style'] = 'CMS_VALUE[29]';
$link4['style'] = 'CMS_VALUE[12]';
$link4['url'] = "CMS_LINK[CMS_VALUE[0]4]";
$link4['desc'] = stripslashes("CMS_LINKDESCR[CMS_VALUE[0]4]");
$link4['target'] = "CMS_LINKTARGET[CMS_VALUE[0]4]";

$link5['visible'] = 'CMS_VALUE[58]';
$link5['desc_style'] = 'CMS_VALUE[30]';
$link5['style'] = 'CMS_VALUE[13]';
$link5['url'] = "CMS_LINK[CMS_VALUE[0]5]";
$link5['desc'] = stripslashes("CMS_LINKDESCR[CMS_VALUE[0]5]");
$link5['target'] = "CMS_LINKTARGET[CMS_VALUE[0]5]";

$swf1['visible'] = 'CMS_VALUE[62]';
$swf1['style'] = 'CMS_VALUE[37]';
$swf1['url'] =  "CMS_SWF[CMS_VALUE[0]1]";
$swf1['desc'] = "CMS_SWFDESCR[CMS_VALUE[0]1]";

$swf2['visible'] = 'CMS_VALUE[63]';
$swf2['style'] = 'CMS_VALUE[38]';
$swf2['url'] =  "CMS_SWF[CMS_VALUE[0]2]";
$swf2['desc'] = "CMS_SWFDESCR[CMS_VALUE[0]2]";

$zip1['visible'] = 'CMS_VALUE[64]';
$zip1['desc_style'] = 'CMS_VALUE[43]';
$zip1['style'] = 'CMS_VALUE[39]';
$zip1['url'] = "CMS_ZIP[CMS_VALUE[0]1]";
$zip1['desc'] = "CMS_ZIPDESCR[CMS_VALUE[0]1]";

$zip2['visible'] = 'CMS_VALUE[65]';
$zip2['desc_style'] = 'CMS_VALUE[44]';
$zip2['style'] = 'CMS_VALUE[40]';
$zip2['url'] = "CMS_ZIP[CMS_VALUE[0]2]";
$zip2['desc'] = "CMS_ZIPDESCR[CMS_VALUE[0]2]";

$pdf1['visible'] = 'CMS_VALUE[66]';
$pdf1['desc_style'] = 'CMS_VALUE[45]';
$pdf1['style'] = 'CMS_VALUE[41]';
$pdf1['url'] = "CMS_PDF[CMS_VALUE[0]1]";
$pdf1['desc'] = "CMS_PDFDESCR[CMS_VALUE[0]1]";

$pdf2['visible'] = 'CMS_VALUE[67]';
$pdf2['desc_style'] = 'CMS_VALUE[46]';
$pdf2['style'] = 'CMS_VALUE[42]';
$pdf2['url'] = "CMS_PDF[CMS_VALUE[0]2]";
$pdf2['desc'] = "CMS_PDFDESCR[CMS_VALUE[0]2]";

//templates
//local oder file
$template_frontend['mode'] = 'CMS_VALUE[31]';
$template_frontend['local'] = 'CMS_VALUE[32]';
$template_frontend['file_path'] = "CMS_VALUE[33]";

//local, file oder use_frontend
$template_backend['mode'] = 'CMS_VALUE[34]';
$template_backend['local'] = 'CMS_VALUE[35]';
$template_backend['file_path'] = "CMS_VALUE[36]";

/**
 * Formatiert Grafik
 *
 * @args $in['visible']
 *                                ['mode'] norm, pop, link1 ..5 , zip1,2, pdf1,2
 *                                ['align']
 *                                ['url']
 *                                ['desc']
 *                                ['url_style']
 *                                ['desc_style']
 *                                ['pop_url']
 *                                ['pop_desc']
 *       $auto_visible true, false (default true)
 *
 */
function mop_format_image($in, $auto_visible = true)
{
        global $css_style, $edit;

        if($auto_visible == true || $in['visible'] == '1'){

                if(trim($in['url'] != '') && trim($in['url'] != '0')){
                        //imagesize
                        $size = GetImageSize ($in['url']);

                        //align
                        if($in['align'] == 'default'){
                                $align = '';
                        }
                        else{
                                $align = 'align="'. $in['align'] .'" ';
                        }

                        if($edit) $to_return = sprintf($in['template'], $in['url'], '', $align, $size['3']);
                        else $to_return = sprintf($in['template'], $in['url'], $in['desc'], $align, $size['3']);

                        //style
                        if($css_style != '' && $in['url_style'] != ''){
                                $to_return = '<span '. $css_style .'="'. $in['url_style'] .'">' . $to_return . '</span>';
                        }

                        if($in['mode'] == 'popup'  && $in['pop_url'] != '0'){
                                if($throw_out_pop_five != true && $in['pop_url'] != '' && $in['pop_url'] != '0'){
                                        $throw_out_pop_five = true;
//throw out java script
?>
<script language="javascript">

function pop_five(b, h, url)
{

        var tpop_bildschirmx = screen.availWidth;
        var tpop_bildschirmy = screen.availHeight;

        var tpop_breite = b;
        var tpop_hoehe = h;

        var tpop_startx = Math.round(tpop_bildschirmx / 2) - (tpop_breite / 2);
        var tpop_starty = Math.round(tpop_bildschirmy / 2) - (tpop_hoehe / 2);


        pic_popup = window.open("", "", "width="+ tpop_breite + ", height=" + tpop_hoehe
                                                                        + ", status=no, toolbar=no, menubar=no, resizable=no, scrollbars=no, screenX=" + tpop_startx
                                                                        + ", left=" + tpop_startx + ", screenY=" + tpop_starty + ", top=" + tpop_starty + " ");
        pic_popup.focus();
        pic_popup.document.open();
        pic_popup.document.writeln('<a href="#" onclick="self.close()"><img src="'+ url +'" width="'+ b +'" height="'+ h +'" border="0" style="margin:0px;"></a>')
        pic_popup.document.close();

}
</script>
<?
                                }

                        //format popupurl
                                if($in['pop_url'] != ''  && $in['pop_url'] != '0'){
                                        $size_pop = GetImageSize ($in['pop_url']);
                                        $js_function = ' onclick=" pop_five(\''. $size_pop['0'] .'\', \''. $size_pop['1'] .'\', \''. $in['pop_url'] .'\');return false;" ';
                                        $to_return = '<a href ="'. $in['pop_url'] .'" '. $js_function .'" target="_blank">' . $to_return .'</a>';
                                }
                        }


                }
                else{
                        $to_return = '';
                }

                //editbutton for backend
                //popup
                if($edit && $in['mode'] == 'popup'){
                        $to_return .= $in['desc'] . $in['pop_desc'];
                }
                //normal
                if($edit && $in['mode'] != 'popup'){
                        $to_return .= $in['desc'];
                }


        }
        else{
                $to_return = '';
        }

        return $to_return;

}

/**
 * Formatiert einen Link. Mit $auto_visible kann angegeben werden, ob
 * der Link immer ausgegeben wird (entspricht der Defaulteinstellung
 * 'true', oder ob der Text einer Sichtbarkeitsprüfung unterzogen
 * wird. In diesem Fall muß $auto_visible = false sein. Wird
 * $in['visible'] = '1' übergeben, ist der Link sichtbar, ansonsten
 * unsichtbar, daher es wird ein leerer String zurückgegeben.
 *
 * @args $in['url']
 *                                ['desc']
 *                                ['target']
 *          ['template'] html- template
 *          ['style'] css- Formatierung (optional)
 *          ['visible'] '1' für sichtbar
 *       $auto_visible true, false (default true)
 * @return formatierter link
 */
function mop_format_link($in, $auto_visible = true)
{
        global $css_style, $edit;

        if($auto_visible == true || $in['visible'] == '1'){

                //make url target
                if($in['target'] != '' && $in['target'] != '0'){
                        $target = 'target="'. $in['target'] .'"';
                }
                else{
                        $target = '';
                }

                //make html-link
                $to_return = sprintf($in['template'], $in['url'], $target, $in['desc']);

                //format link with css
                if($css_style != '' && $in['style'] != ''){
                        $to_return = '<span '. $css_style .'="'. $in['style'] .'">' . $to_return . '</span>';
                }

                if(($in['url'] == '' || $in['url'] == 'http://') && $edit != true){
                        $to_return = '';
                }
        }
        else{
                $to_return = '';
        }

        return $to_return;
}


/**
 * Formatiert die Medientypen pdf, zip
 *
 * @args $in['url']
 *                                ['desc']
 *          ['template'] html- template
 *          ['style'] css- Formatierung (optional)
 *          ['visible'] '1' für sichtbar
 *       $auto_visible true, false (default true)
 * @return formatierter link
 */
function mop_format_media($in, $auto_visible = true)
{
        global $css_style, $edit;

        if($auto_visible == true || $in['visible'] == '1'){

                //make html-link
                $to_return = sprintf($in['template'], $in['url'], $in['desc']);

                //format link with css
                if($css_style != '' && $in['style'] != ''){
                        $to_return = '<span '. $css_style .'="'. $in['style'] .'">' . $to_return . '</span>';
                }

                if(($in['url'] == '' || $in['url'] == '0') && $edit != true){
                        $to_return = '';
                }
        }
        else{
                $to_return = '';
        }

        return $to_return;
}


/**
 * Formatiert Flash
 *
 * @args $in['url']
 *                                ['desc']
 *          ['style'] css- Formatierung (optional)
 *          ['visible'] '1' für sichtbar
 *       $auto_visible true, false (default true)
 * @return formatierter link
 */
function mop_format_flash($in, $auto_visible = true)
{
        global $css_style, $edit;

        if($auto_visible = true){
                $in['visible'] == '1';
        }

        if(strlen($in['url']) > 5 && $in['visible'] == '1'){
                $FlashSize = getimagesize($in['url']);

                $to_return ="<object  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
                        codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#4,0,2,0\" $FlashSize[3] align=\"middle\" id=\"4458\">
                        <param name=movie value=\"". $in['url'] ."\">
                        <embed src=\"". $in['url'] ."\" type=\"application/x-shockwave-flash\" $FlashSize[3] align=\"middle\" play=\"false\">
                        </embed></object>";

                //format link with css
                if($css_style != '' && $in['style'] != ''){
                        $to_return = '<span '. $css_style .'="'. $in['style'] .'">' . $to_return . '</span>';
                }
        }
        else{
                $to_return = '';
        }

        if($edit && $in['visible'] == '1'){
                $to_return .= $in['desc'];
        }

        return $to_return;
}


/**
 * Formatiert Text. Mit $auto_visible kann angegeben werden, ob
 * der Text immer ausgegeben wird (entspricht der Defaulteinstellung
 * 'true', oder ob der Text einer Sichtbarkeitsprüfung unterzogen
 * wird. In diesem Fall muß $auto_visible = false sein. Wird
 * $in['visible'] = '1' übergeben, ist der Text sichtbar, ansonsten
 * unsichtbar, daher es wird ein leerer String zurückgegeben.
 *
 * @args $in['content'] Text
 *          ['template'] html- template
 *          ['style'] css- Formatierung (optional)
 *          ['visible'] '1' für sichtbar
 *       $auto_visible true, false (default true)
 * @return formatierter text
 */
function mop_format_text($in, $auto_visible = true)
{
        global $css_style;
        if($auto_visible == true || $in['visible'] == '1'){

                $to_return = sprintf($in['template'], $in['content']);

                if($css_style != '' && $in['style'] != ''){
                        $to_return = '<span '. $css_style .'="'. $in['style'] .'">' . $to_return . '</span>';
                }
        }
        else{
                $to_return = '';
        }

        return $to_return;
}

if($mod_active == 'true'){

$final['head1'] = mop_format_text($head1, false);
$final['head2'] = mop_format_text($head2, false);
$final['text1'] = mop_format_text($text1, false);
$final['text2'] = mop_format_text($text2, false);
$final['wysiwyg1'] = mop_format_text($wysiwyg1, false);
$final['wysiwyg2'] = mop_format_text($wysiwyg2, false);
$final['wysiwyg3'] = mop_format_text($wysiwyg3, false);
$final['link1'] = mop_format_link($link1, false);
$final['link2'] = mop_format_link($link2, false);
$final['link3'] = mop_format_link($link3, false);
$final['link4'] = mop_format_link($link4, false);
$final['link5'] = mop_format_link($link5, false);
$final['pdf1'] = mop_format_media($pdf1, false);
$final['pdf2'] = mop_format_media($pdf2, false);
$final['zip1'] = mop_format_media($zip1, false);
$final['zip2'] = mop_format_media($zip2, false);
$final['flash1'] = mop_format_flash($swf1, false);
$final['flash2'] = mop_format_flash($swf2, false);
$final['pic_desc1'] = ($pic1['visible'] == '1') ? strip_tags($pic1['desc']) : '';
$final['pic_desc2'] = ($pic2['visible'] == '1') ? strip_tags($pic2['desc']) : '';
$final['pic_desc3'] = ($pic3['visible'] == '1') ? strip_tags($pic3['desc']) : '';
$final['pic1'] = mop_format_image($pic1, false);
$final['pic2'] = mop_format_image($pic2, false);
$final['pic3'] = mop_format_image($pic3, false);
$final['link_desc1'] = ($link1['visible'] == '1') ? strip_tags($link1['desc']) : '';
$final['link_desc2'] = ($link2['visible'] == '1') ? strip_tags($link2['desc']) : '';
$final['link_desc3'] = ($link3['visible'] == '1') ? strip_tags($link3['desc']) : '';
$final['link_desc4'] = ($link4['visible'] == '1') ? strip_tags($link4['desc']) : '';
$final['link_desc5'] = ($link5['visible'] == '1') ? strip_tags($link5['desc']) : '';
$final['zip_desc1'] = ($zip1['visible'] == '1') ? strip_tags($zip1['desc']) : '';
$final['zip_desc2'] = ($zip2['visible'] == '1') ? strip_tags($zip2['desc']) : '';
$final['pdf_desc1'] = ($pdf1['visible'] == '1') ? strip_tags($pdf1['desc']) : '';
$final['pdf_desc2'] = ($pdf2['visible'] == '1') ? strip_tags($pdf2['desc']) : '';


//link_desc_style
if($css_style != '' && $link1['desc_style'] != '' && $link1['visible'] == '1'){
        $final['link_desc1'] = '<span '. $css_style .'="'. $link1['desc_style'] .'">' . $final['link_desc1'] . '</span>';
}
if($css_style != '' && $link2['desc_style'] != '' && $link2['visible'] == '1'){
        $final['link_desc2'] = '<span '. $css_style .'="'. $link2['desc_style'] .'">' . $final['link_desc2'] . '</span>';
}
if($css_style != '' && $link3['desc_style'] != '' && $link3['visible'] == '1'){
        $final['link_desc3'] = '<span '. $css_style .'="'. $link3['desc_style'] .'">' . $final['link_desc3'] . '</span>';
}
if($css_style != '' && $link4['desc_style'] != '' && $link4['visible'] == '1'){
        $final['link_desc4'] = '<span '. $css_style .'="'. $link4['desc_style'] .'">' . $final['link_desc4'] . '</span>';
}
if($css_style != '' && $link5['desc_style'] != '' && $link5['visible'] == '1'){
        $final['link_desc5'] = '<span '. $css_style .'="'. $link5['desc_style'] .'">' . $final['link_desc5'] . '</span>';
}

//zip_desc_style
if($css_style != '' && $zip1['desc_style'] != '' && $zip1['visible'] == '1'){
        $final['zip_desc1'] = '<span '. $css_style .'="'. $zip1['desc_style'] .'">' . $final['zip_desc1'] . '</span>';
}
if($css_style != '' && $zip2['desc_style'] != '' && $zip2['visible'] == '1'){
        $final['zip_desc2'] = '<span '. $css_style .'="'. $zip2['desc_style'] .'">' . $final['zip_desc2'] . '</span>';
}

//pdf_desc_style
if($css_style != '' && $pdf1['desc_style'] != '' && $pdf1['visible'] == '1'){
        $final['pdf_desc1'] = '<span '. $css_style .'="'. $pdf1['desc_style'] .'">' . $final['pdf_desc1'] . '</span>';
}
if($css_style != '' && $pdf2['desc_style'] != '' && $pdf2['visible'] == '1'){
        $final['pdf_desc2'] = '<span '. $css_style .'="'. $pdf2['desc_style'] .'">' . $final['pdf_desc2'] . '</span>';
}

//pic_desc style
if($css_style != '' && $pic1['desc_style'] != '' && $pic1['visible'] == '1'){
        $final['pic_desc1'] = '<span '. $css_style .'="'. $pic1['desc_style'] .'">' . $final['pic_desc1'] . '</span>';
}
if($css_style != '' && $pic2['desc_style'] != '' && $pic2['visible'] == '1'){
        $final['pic_desc2'] = '<span '. $css_style .'="'. $pic2['desc_style'] .'">' . $final['pic_desc2'] . '</span>';
}
if($css_style != '' && $pic3['desc_style'] != '' && $pic3['visible'] == '1'){
        $final['pic_desc3'] = '<span '. $css_style .'="'. $pic3['desc_style'] .'">' . $final['pic_desc3'] . '</span>';
}








//Wenn pic1 als Link angezeigt werden soll
if($pic1['mode'] != 'norm' && $pic1['mode'] != 'pop'){

        //Link
        if(stristr ($pic1['mode'], 'link') != false){
                if(${$pic1['mode']}['url'] != '' && ${$pic1['mode']}['url'] != '0' && ${$pic1['mode']}['url'] != 'http://'){
                        $target = (${$pic1['mode']}['target'] != '' && ${$pic1['mode']}['target'] != '') ? 'target="' . ${$pic1['mode']}['target'] .'"' : '';
                        $final['pic1'] = '<a href="'. ${$pic1['mode']}['url'] .'" ' .$target .'>'. $final['pic1'] .'</a>';
                }
                if($edit){
                        $final['pic1'] .= ${$pic1['mode']}['desc'] . '</a>';
                }
        }
        //PDF, ZIP
        else{
                if(${$pic1['mode']}['url'] != '' && ${$pic1['mode']}['url'] != '0' && ${$pic1['mode']}['url'] != 'http://'){
                        $final['pic1'] = '<a href="'. ${$pic1['mode']}['url'] .'">'. $final['pic1'] .'</a>';
                }
                if($edit){
                        $final['pic1'] .= ${$pic1['mode']}['desc'] . '';
                }

        }
}

//Wenn pic2 als Link angezeigt werden soll
if($pic2['mode'] != 'norm' && $pic2['mode'] != 'pop'){

        if(stristr ($pic2['mode'], 'link') != false){
                if(${$pic2['mode']}['url'] != '' && ${$pic2['mode']}['url'] != '0' && ${$pic2['mode']}['url'] != 'http://'){
                        $target = (${$pic2['mode']}['target'] != '' && ${$pic2['mode']}['target'] != '') ? 'target="' . ${$pic2['mode']}['target'] .'"' : '';
                        $final['pic2'] = '<a href="'. ${$pic2['mode']}['url'] .'" ' .$target .'>'. $final['pic2'] .'</a>';
                }
                if($edit){
                        $final['pic2'] .= ${$pic2['mode']}['desc'] . '</a>';
                }
        }
        else{
                if(${$pic2['mode']}['url'] != '' && ${$pic2['mode']}['url'] != '0' && ${$pic2['mode']}['url'] != 'http://'){
                        $final['pic2'] = '<a href="'. ${$pic2['mode']}['url'] .'">'. $final['pic2'] .'</a>';
                }
                if($edit){
                        $final['pic2'] .= ${$pic2['mode']}['desc'] . '</a>';
                }

        }
}

//Wenn pic3 als Link angezeigt werden soll
if($pic3['mode'] != 'norm' && $pic3['mode'] != 'pop'){

        if(stristr ($pic3['mode'], 'link') != false){
                if(${$pic3['mode']}['url'] != '' && ${$pic3['mode']}['url'] != '0' && ${$pic3['mode']}['url'] != 'http://'){
                        $target = (${$pic3['mode']}['target'] != '' && ${$pic3['mode']}['target'] != '') ? 'target="' . ${$pic3['mode']}['target'] .'"' : '';
                        $final['pic3'] = '<a href="'. ${$pic3['mode']}['url'] .'" ' .$target .'>'. $final['pic3'] .'</a>';
                }
                if($edit){
                        $final['pic3'] .= ${$pic3['mode']}['desc'] . '</a>';
                }
        }
        else{
                if(${$pic3['mode']}['url'] != '' && ${$pic3['mode']}['url'] != '0' && ${$pic3['mode']}['url'] != 'http://'){
                        $final['pic3'] = '<a href="'. ${$pic3['mode']}['url'] .'">'. $final['pic3'] .'</a>';
                }
                if($edit){
                        $final['pic3'] .= ${$pic3['mode']}['desc'] . '</a>';
                }

        }
}

//echo ${link1}['desc'] . "-----------------";

//Figure out the templates
//Frontend
if($template_frontend['mode'] == 'local'){
        $final['frontend_template'] = $template_frontend['local'];
}
else{
        if(is_file($template_frontend['file_path'])){
                $final['frontend_template'] = implode("",(file($template_frontend['file_path'])));
        }
        else{
                echo "Fehler im Modul 'DER ARTIKEL' ! Die angegebende Templatedatei > ". $template_frontend['file_path'] ." konnte nicht gefunden werden.";
                exit;
        }
}

//Backend
if($template_backend['mode'] == 'local'){
        $final['backend_template'] = $template_backend['local'];
}
elseif($template_backend['mode'] == 'file'){
        if(is_file($template_backend['file_path'])){
                $final['backend_template'] = implode("",(file($template_backend['file_path'])));
        }
        else{
                echo "Fehler im Modul 'DER ARTIKEL' ! Die angegebende Templatedatei ". $template_backend['file_path'] ." konnte nicht gefunden werden.";
                exit;
        }
}
else{
        $final['backend_template'] = $final['frontend_template'];
}


if($edit == true){
        $final['template'] = $final['backend_template'];
}
else{
        $final['template'] = $final['frontend_template'];
}


//execute template

$final['template'] = str_replace('{head1}', $final['head1'], $final['template']);
$final['template'] = str_replace('{head2}', $final['head2'], $final['template']);
$final['template'] = str_replace('{text1}', $final['text1'], $final['template']);
$final['template'] = str_replace('{text2}', $final['text2'], $final['template']);
$final['template'] = str_replace('{wysiwyg1}', $final['wysiwyg1'], $final['template']);
$final['template'] = str_replace('{wysiwyg2}', $final['wysiwyg2'], $final['template']);
$final['template'] = str_replace('{wysiwyg3}', $final['wysiwyg3'], $final['template']);
$final['template'] = str_replace('{link1}', $final['link1'], $final['template']);
$final['template'] = str_replace('{link2}', $final['link2'], $final['template']);
$final['template'] = str_replace('{link3}', $final['link3'], $final['template']);
$final['template'] = str_replace('{link4}', $final['link4'], $final['template']);
$final['template'] = str_replace('{link5}', $final['link5'], $final['template']);
$final['template'] = str_replace('{link_desc1}', $final['link_desc1'], $final['template']);
$final['template'] = str_replace('{link_desc2}', $final['link_desc2'], $final['template']);
$final['template'] = str_replace('{link_desc3}', $final['link_desc3'], $final['template']);
$final['template'] = str_replace('{link_desc4}', $final['link_desc4'], $final['template']);
$final['template'] = str_replace('{link_desc5}', $final['link_desc5'], $final['template']);
$final['template'] = str_replace('{pic1}', $final['pic1'], $final['template']);
$final['template'] = str_replace('{pic_desc1}', $final['pic_desc1'], $final['template']);
$final['template'] = str_replace('{pic2}', $final['pic2'], $final['template']);
$final['template'] = str_replace('{pic_desc2}', $final['pic_desc2'], $final['template']);
$final['template'] = str_replace('{pic3}', $final['pic3'], $final['template']);
$final['template'] = str_replace('{pic_desc3}', $final['pic_desc3'], $final['template']);
$final['template'] = str_replace('{flash1}', $final['flash1'], $final['template']);
$final['template'] = str_replace('{flash2}', $final['flash2'], $final['template']);
$final['template'] = str_replace('{pdf1}', $final['pdf1'], $final['template']);
$final['template'] = str_replace('{pdf2}', $final['pdf2'], $final['template']);
$final['template'] = str_replace('{pdf_desc1}', $final['pdf_desc1'], $final['template']);
$final['template'] = str_replace('{pdf_desc2}', $final['pdf_desc2'], $final['template']);
$final['template'] = str_replace('{zip1}', $final['zip1'], $final['template']);
$final['template'] = str_replace('{zip2}', $final['zip2'], $final['template']);
$final['template'] = str_replace('{zip_desc1}', $final['zip_desc1'], $final['template']);
$final['template'] = str_replace('{zip_desc2}', $final['zip_desc2'], $final['template']);

eval('?>' . $final['template']);


unset($final);
}


unset($mod_active);
Gruß,
Matthias

Gesperrt