<?php
/**
* @package AdsManager
* @copyright Copyright (C) 2010-2014 Juloa.com. All rights reserved.
* @license GNU/GPL
*/
// 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", strip_tags($this->content->metadata_description));
$document->setMetaData("keywords", strip_tags($this->content->metadata_keywords));
}
?>
<div class="juloawrapper">
<?php if ($conf->display_inner_pathway == 1) { ?>
<div class="breadcrumb row-fluid">
<?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="'.getImagePath('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 = "";
?>
<?php echo TText::_('ADSMANAGER_AD')?> : <?php echo $this->content->id ?>
</div>
<?php } ?>
<?php echo $this->content->event->onContentBeforeDisplay; ?>
<?php if (@$conf->print==1) {?>
<div class="text-right">
<?php if (JRequest::getInt('print',0) == 1) {
echo TTools::print_screen();
} else {
$url = "index.php?option=com_adsmanager&view=details&catid=".$this->content->catid."&id=".$this->content->id;
echo TTools::print_popup($url);
}?>
</div>
<?php } ?>
<div class="<?php echo $classcontent;?> adsmanager-details row-fluid">
<div class="span12 page-header">
<div class="span8">
<h1 class="no-margin-top">
<?php
if (isset($this->fDisplay[1]))
{
foreach($this->fDisplay[1] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if (($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if($field->name != 'ad_headline')
echo "<span class='f".$field->name."'>";
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b>: ";
echo "$c ";
if($field->name != 'ad_headline')
echo "</span>";
}
}
} ?>
</h1>
<?php echo $this->content->event->onContentAfterTitle; ?>
<div>
<?php
if ($this->content->userid != 0)
{
echo JText::_('ADSMANAGER_SHOW_OTHERS');
$target = TLink::getUserAdsLink($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>";
}
?>
</div>
</div>
<div class="span4">
<?php
echo '<div class="text-right">';
if ($this->content->userid != 0 && $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 onclick='return confirm(\"".htmlspecialchars(JText::_('ADSMANAGER_CONFIRM_DELETE'),ENT_QUOTES)."\")' href='".$target."'>".JText::_('ADSMANAGER_CONTENT_DELETE')."</a>";
?>
</div>
<?php
}
if(isset($this->conf->favorite_enabled) && $this->conf->favorite_enabled == 1 && ($this->conf->favorite_display == 'all' || $this->conf->favorite_display == 'details')){
echo '<div class="row-fluid adsmanager-favorite">
<div class="span12">';
$favoriteClass = '';
$favoriteLabel = JText::_('ADSMANAGER_CONTENT_FAVORITE');
if(array_search($this->content->id, $this->favorites) !== false){
$favoriteClass = ' like_active';
$favoriteLabel = JText::_('ADSMANAGER_CONTENT_FAVORITE_DELETEMSG');
}
echo '<button id="like_'.$this->content->id.'" class="btn favorite_ads like_ad'.$favoriteClass.'">'.$favoriteLabel.'</button>';
echo '</div></div>';
}
if (!empty($this->fDisplay[4])) {
echo '<div class="row-fluid">
<div class="span12">';
$strtitle = @JText::_($this->positions[3]->title);
if ($strtitle != "") echo "<h2 class='section-header'>".@$strtitle."</h2>";
foreach($this->fDisplay[4] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if (($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
echo "<span class='f".$field->name."'>";
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b>: ";
echo "$c<br/>";
echo "</span>";
}
}
echo '</div></div>';
}
echo '</div>';
?>
</div>
</div>
<div class="row-fluid">
<div class="span8 adsmanager-infos">
<div class="row-fluid">
<div class="span12">
<?php if (!empty($this->fDisplay[3])) {
$strtitle = @JText::_($this->positions[2]->title);
if ($strtitle != "") echo "<h2 class='section-header'>".@$strtitle."</h2>";
foreach($this->fDisplay[3] as $field) {
$c = $this->field->showFieldValue($this->content,$field);
if (($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
echo "<span class='f".$field->name."'>";
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b>: ";
echo "$c<br/>";
echo "</span>";
}
}
}?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php if (!empty($this->fDisplay[2])) {
$strtitle = @JText::_($this->positions[1]->title);
if ($strtitle != "") echo "<h2 class='section-header'>".@$strtitle."</h2>";
foreach($this->fDisplay[2] as $field) {
$c = $this->field->showFieldValue($this->content,$field);
if (($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
echo "<span class='f".$field->name."'>";
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b>: ";
echo "$c<br/>";
echo "</span>";
}
}
}
?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php if (!empty($this->fDisplay[6])) {
$strtitle = @JText::_($this->positions[5]->title);
if ($strtitle != "") echo "<h2 class='section-header'>".@$strtitle."</h2>";
foreach($this->fDisplay[6] as $field) {
$c = $this->field->showFieldValue($this->content,$field);
if (($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
echo "<span class='f".$field->name."'>";
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b>: ";
echo "$c<br/>";
echo "</span>";
}
}
} ?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php if (!empty($this->fDisplay[5])) {
$strtitle = @JText::_($this->positions[4]->title);
if ($strtitle != "") echo "<h2 class='section-header'>".@$strtitle."</h2>";
if ($this->showContact) {
if (isset($this->fDisplay[5]))
{
foreach($this->fDisplay[5] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if(($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
echo "<span class='f".$field->name."'>";
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b>: ";
echo "$c<br/>";
echo "</span>";
}
}
}
if (($this->content->userid != 0)&&($conf->allow_contact_by_pms == 1))
{
echo TLink::getPMSLink($this->content);
}
}
else
{
echo JText::_('ADSMANAGER_CONTACT_NO_RIGHT');
}
}
?>
</div>
</div>
</div>
<div class="span4 adsmanager-images text-center">
<?php
$this->loadScriptImage($this->conf->image_display);
if (count($this->content->images) == 0)
$image_found = 0;
else
$image_found = 1;
?>
<div class="adsmanager_ads_image">
<?php
foreach($this->content->images as $img)
{
$thumbnail = JURI_IMAGES_FOLDER."/".$img->thumbnail;
$image = JURI_IMAGES_FOLDER."/".$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 src="'.ADSMANAGER_NOPIC_IMG.'" alt="nopic" />';
}?>
</div>
</div>
</div>
</div>