Hi,
ich wollte die Kontakt Komponente um zwei Eingabefelder für Twitter und Facebook erweitern. Das habe ich über das Anpssen der com_contact Dateien im Administrator Ordner hinbekommen. Nun habe ich noch mit einem Override die eigentlichen Komponentendateien angepasst.
Wenn ich nun aber die Datei default_adress.php (com_contact/contact) erweitere zerschießt es mir die Kontaktanzeige der Webseite.
Ich hab leider nur eine rudimentäre Ahnung von PHP. Deshalb kann es gut sein das ich einen doofen Fehler gemacht habe.
PHP-Code:
<?php // @version $Id: default_address.php 9164 2007-10-05 15:58:58Z jinx $
defined('_JEXEC') or die('Restricted access');
?>
<?php if (($this->contact->params->get('address_check') > 0) && ($this->contact->address || $this->contact->suburb || $this->contact->state || $this->contact->country || $this->contact->postcode)) : ?>
<div class="contact_address">
<address>
<?php if ( $this->contact->params->get('address_check') > 0) : ?>
<span class="marker"><?php //echo $this->contact->params->get('marker_address'); ?></span>
<?php endif; ?>
<?php if ($this->contact->address && $this->contact->params->get('show_street_address')) : ?>
<?php echo nl2br($this->contact->address); ?><br/>
<?php endif; ?>
<?php if ($this->contact->postcode && $this->contact->params->get('show_postcode')) : ?>
<?php echo $this->contact->postcode; ?>
<?php endif; ?>
<?php if ($this->contact->suburb && $this->contact->params->get('show_suburb')) : ?>
<?php echo $this->contact->suburb; ?><br/>
<?php endif; ?>
<?php if ($this->contact->state && $this->contact->params->get('show_state')) : ?>
<?php echo $this->contact->state; ?><br/>
<?php endif; ?>
<?php if ($this->contact->country && $this->contact->params->get('show_country')) : ?>
<?php echo $this->contact->country; ?><br/>
<?php endif; ?>
</address>
</div>
<?php endif; ?>
<p>
<?php if (($this->contact->email_to && $this->contact->params->get('show_email')) || $this->contact->telephone || $this->contact->fax ) : ?>
</p>
<p>
<?php if ($this->contact->email_to && $this->contact->params->get('show_email')) : ?>
<span class="marker email"><?php //echo $this->contact->params->get('marker_email'); ?>
<?php echo $this->contact->email_to; ?></span>
<?php endif; ?><br />
<?php if ($this->contact->webpage && $this->contact->params->get('show_webpage')) : ?>
<?php //<a href="<?php echo $this->contact->webpage;" target="_blank"> ?>
<?php echo str_replace('http://','',$this->escape($this->contact->webpage)); ?></a>
<?php endif; ?><br />
</p>
<p>
<?php if ($this->contact->telephone && $this->contact->params->get('show_telephone')) : ?>
<span class="marker ruf"><?php echo $this->contact->params->get('marker_telephone'); ?></span>
<?php echo nl2br($this->contact->telephone); ?>
<?php endif; ?><br />
<?php if ($this->contact->fax && $this->contact->params->get('show_fax')) : ?>
<span class="marker fax"><?php echo $this->contact->params->get('marker_fax'); ?></span>
<?php echo nl2br($this->contact->fax); ?></span>
<?php endif; ?><br />
<?php if ( $this->contact->mobile && $this->contact->params->get( 'show_mobile' ) ) :?>
<span class="marker"><?php echo $this->contact->params->get( 'marker_mobile' ); ?></span>
<?php echo nl2br($this->contact->mobile); ?>
<?php endif; ?>
</p>
<?php if ( $this->contact->twitter && $this->contact->params->get( 'show_twitter' ) ) :?>
<?php <a href="<?php echo $this->contact->twitter;" target="_blank"> ?>
<?php echo str_replace('http://','',$this->escape($this->contact->twitter)); ?></a>
<?php endif; ?><br />
</p>
<?php if ( $this->contact->facebook && $this->contact->params->get( 'show_facebook' ) ) :?>
<?php <a href="<?php echo $this->contact->facebook;" target="_blank"> ?>
<?php echo str_replace('http://','',$this->escape($this->contact->facebook)); ?></a>
<?php endif; ?><br />
</p>
<?php endif; ?>
<?php if ($this->contact->misc && $this->contact->params->get('show_misc')) : ?>
<span class="marker"><?php echo $this->contact->params->get('marker_misc'); ?></span>
<?php echo $this->contact->misc; ?>
<?php endif; ?>
Viele Grüße
Lesezeichen