Получилось конечно немного иначе чем задумывалось, но все же лучше того что было.
Вот код из файла default.php, если кто-то в курсе как можно выровнять фото в правом столбце объявления, подскажите, а то что-то всю голову уже сломал понять не могу как,
- не срабатывает а предшествующий код не срабатывает видимо что-то нарушил, место расположение выделено жирным.
<?php
// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();
$conf= $this->conf;
$document = JFactory::getDocument();
if ($conf->metadata_mode != 'nometadata') {
$document->setMetaData("description", $this->content->metadata_description);
$document->setMetaData("keywords", $this->content->metadata_keywords);
}
?>
<?php if ($conf->display_inner_pathway == 1) { ?>
<div class="adsmanager_pathway">
<?php
$pathway ="";
$nb = count($this->pathlist);
for ($i = $nb - 1 ; $i >0;$i--)
{
$pathway .= '<a href="'.$this->pathlist[$i]->link.'">'.$this->pathlist[$i]->text.'</a>';
$pathway .= ' <img src="'.$this->baseurl.'components/com_adsmanager/images/arrow.png" alt="arrow" /> ';
}
$pathway .= '<a href="'.$this->pathlist[0]->link.'">'.$this->pathlist[0]->text.'</a>';
echo $pathway;
if (function_exists('getContentClass'))
$classcontent = getContentClass($this->content,"details"
;
else
$classcontent = "";
?>
</div>
<?php } ?>
<?php echo $this->content->event->onContentBeforeDisplay; ?>
<table border = "2" width = "100%" height = "100%" bgcolor = #F5F5F5> <td>
<table border = "1" width = "100%" height = "10%">
<tr><td width = "70%" height = "10%">
<div class="<?php echo $classcontent;?> addetails">
<h2>
<?php
if (isset($this->fDisplay[1]))
{
foreach($this->fDisplay[1] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if ($c != ""
{
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if ($title != ""
echo htmlspecialchars($title).": ";
echo "$c ";
}
}
} ?>
</h2> </td>
<td>
<div class="addetails_topright">
<?php $strtitle = "";if (@$this->positions[3]->title) {$strtitle = JText::_($this->positions[3]->title); } ?>
<?php if (@$strtitle != ""
echo "<h2>".@$strtitle."</h2>";
if (isset($this->fDisplay[4]))
{
foreach($this->fDisplay[4] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if ($c != ""
{
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if ($title != ""
echo htmlspecialchars($title).": ";
echo "$c<br/>";
}
}
}?>
</div>
</td></tr>
<tr><td>
<div class="addetailsmain">
<?php $strtitle = "";if (@$this->positions[2]->title) {$strtitle = JText::_($this->positions[2]->title);} ?>
<?php
if (isset($this->fDisplay[3]))
{
foreach($this->fDisplay[3] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if ($c != ""
{
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if ($title != ""
echo htmlspecialchars($title).": ";
echo "$c<br/>";
}
}
} ?>
</div>
<div class="adsmanager_ads_desc">
<?php $strtitle = "";if (@$this->positions[5]->title) {$strtitle = JText::_($this->positions[5]->title);} ?>
<?php if (Контакты != ""
echo "<h4>".Контакты."</h4>";
if (isset($this->fDisplay[6]))
{
foreach($this->fDisplay[6] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if ($c != ""
{
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if ($title != ""
echo htmlspecialchars($title).": ";
echo "$c<br/>";
}
}
} ?>
</div>
</td>
<td>
<div class="adsmanager_ads_image">
<?php
$this->loadScriptImage($this->conf->image_display);
if (count($this->content->images) == 0)
$image_found = 0;
else
$image_found = 1;
foreach($this->content->images as $img)
{
$thumbnail = JURI::base()."images/com_adsmanager/ads/".$img->thumbnail;
$image = JURI::base()."images/com_adsmanager/ads/".$img->image;
switch($this->conf->image_display)
{
case 'popup':
echo "<a href=\"javascript:popup('$image');\"><img src='".$thumbnail."' alt='".htmlspecialchars($this->content->ad_headline)."' /></a>";
break;
case 'lightbox':
case 'lytebox':
echo "<a href='".$image."' rel='lytebox[roadtrip".$this->content->id."]'><img src='".$thumbnail."' alt='".htmlspecialchars($this->content->ad_headline)."' /></a>";
break;
case 'highslide':
echo "<a id='thumb".$this->content->id."' class='highslide' onclick='return hs.expand (this)' href='".$image."'><img src='".$thumbnail."' alt='".htmlspecialchars($this->content->ad_headline)."' /></a>";
break;
case 'default':
default:
echo "<a href='".$image."' target='_blank'><img src='".$thumbnail."' alt='".htmlspecialchars($this->content->ad_headline)."' /></a>";
break;
}
}
if (($image_found == 0)&&($conf->nb_images > 0))
{
echo '<img align="center" src="'.ADSMANAGER_NOPIC_IMG.'" alt="nopic" />';
}
?>
</div>
</td></tr></table>
<div class="adsmanager_spacer"></div>
</div>
</div>
</td> </table>
<?php echo $this->content->event->onContentAfterTitle; ?>
<div>
<?php
if ($this->content->userid != 0)
{
echo JText::_('ADSMANAGER_SHOW_OTHERS');
if ($conf->comprofiler == 3) {
$target = TRoute::_("index.php?option=com_community&view=profile&userid=".$this->content->userid);
}
else if (COMMUNITY_BUILDER_ADSTAB == 1)
{
$target = TRoute::_("index.php?option=com_comprofiler&task=userProfile&tab=AdsManagerTab&user=".$this->content->userid);
}
else
{
$target = TRoute::_("index.php?option=com_adsmanager&view=list&user=".$this->content->userid);
}
if ($conf->display_fullname == 1)
echo "<a href='$target'><b>".$this->content->fullname."</b></a>";
else
echo "<a href='$target'><b>".$this->content->user."</b></a>";
if ($this->userid == $this->content->userid) {
?>
<div>
<?php
$target = TRoute::_("index.php?option=com_adsmanager&task=write&catid=".$this->content->category."&id=".$this->content->id);
echo "<a href='".$target."'>".JText::_('ADSMANAGER_CONTENT_EDIT')."</a>";
echo " ";
$target = TRoute::_("index.php?option=com_adsmanager&task=delete&catid=".$this->content->category."&id=".$this->content->id);
echo "<a href='".$target."'>".JText::_('ADSMANAGER_CONTENT_DELETE')."</a>";
?>
</div>
<?php
}
}
?>
</div>
<?php echo $this->content->event->onContentAfterDisplay; ?>
<div class="back_button">
<a href='javascript:history.go(-1)'>
<?php echo JText::_('ADSMANAGER_BACK_TEXT'); ?>
</a>
</div>
Может кому-нибудь пригодится или может кто ошибку увидит, в общем пишите если чо.