Hi again
Nothing happens, this is how the code looks like now:
Horizontal:
<?php
/**
* @package AdsManager
* @copyright Copyright (C) 2010-2014 Juloa.com. All rights reserved.
* @license GNU/GPL
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );
?>
<div class="juloawrapper">
<?php
if ($image == 1) {
?>
<div class='row-fluid adsmanager_box_module_2<?php echo $moduleclass_sfx; ?>'>
<table class='table table-striped' width="100%">
<tr align="center">
<?php
//$ads_by_row = 4;
$num_ads = 0;
if (isset($contents[0])) {
foreach($contents as $row) {
if ($num_ads >= $ads_by_row) {
echo "</tr><tr>";
$num_ads = 0;
}
?>
<td>
<?php
$linkTarget = TRoute::_("index.php?option=com_adsmanager&view=details$urlparamroot&id=".$row->id."&catid=".$row->catid);
echo "<h4 class='text-center no-margin-top'><a href='$linkTarget'>".$row->ad_headline."</a>";
if ($displaycategory == 1)
{
echo "<div class='adsmanager-cat'>(".$row->parent." / ".$row->cat.")</div>";
}
echo "</h4>";
if (isset($row->images[0])) {
echo "<div class='text-center'><a href='".$linkTarget."'><img src='".JURI_IMAGES_FOLDER."/".$row->images[0]->$imagetype."' alt=\"".htmlspecialchars($row->ad_headline)."\" border='0' /></a></div>";
}
else
{
echo "<div class='text-center'><a href='".$linkTarget."'><img src='".ADSMANAGER_NOPIC_IMG."' alt='noimage' border='0' /></a></div>";
}
$iconflag = false;
if (($conf->show_new == true)&&(isNewContent($row->date_created,$conf->nbdays_new))) {
echo "<div class='text-center'><img align='center' src='".getImagePath('new.gif')."' /> ";
$iconflag = true;
}
if (($conf->show_hot == true)&&($row->views >= $conf->nbhits)) {
if ($iconflag == false)
echo "<div class='text-center'>";
echo "<img align='center' src='".getImagePath('hot.gif')."' />";
$iconflag = true;
}
if ($iconflag == true)
echo "</div>";
if ($displaydate == 1)
{
echo "<div class='text-center'>".reorderDate($row->date_created)."</div>";
$iconflag = true;
}
foreach($adfields as $f) {
$fieldname = $f->name;
if ($row->$fieldname != null) {
$value = $field->showFieldValue($row,$f);
echo "<div class='text-center'>$value</div>";
}
}
echo "</div>";
?>
</td>
<?php
$num_ads ++;
} }
for(;$num_ads < $ads_by_row;$num_ads++)
{
echo "<td></td>";
}
?>
</tr>
</table>
</div>
<?php
} else {
?>
<ul class="mostread<?php echo $moduleclass_sfx; ?>">
<?php
if (isset($contents[0])) {
foreach($contents as $row) {
?>
<li class="mostread">
<?php
$linkTarget = TRoute::_("index.php?option=com_adsmanager&view=details$urlparamroot&id=".$row->id."&catid=".$row->catid);
echo "<div class='text-center'><a href='$linkTarget'>".$row->ad_headline."</a></div>";
if ($displaycategory == 1)
echo "<div class='text-center'><span class=\"adsmanager-cat\">(".$row->parent." / ".$row->cat.")</span></div>";
if ($displaydate == 1)
echo "<div class='text-center'>".reorderDate($row->date_created)."</div>";
?>
</li>
<?php
} }
?>
</ul>
<?php
}
?>
<?php
echo sprintf(JText::_('ADSMANAGER_VIEWS'),$row->views);
?>
</div>
Vertical
<?php
/**
* @package AdsManager
* @copyright Copyright (C) 2010-2014 Juloa.com. All rights reserved.
* @license GNU/GPL
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );
?>
<div class="juloawrapper">
<?php
if ($image == 1)
{
?>
<ul class="adsmanager_ver_list adsmanager_ver_list<?php echo $moduleclass_sfx; ?>">
<?php
if(isset($contents[0])) {
foreach($contents as $row) {
?>
<li>
<?php
$linkTarget = TRoute::_("index.php?option=com_adsmanager&view=details$urlparamroot&id=".$row->id."&catid=".$row->catid);
echo "<h4 class='text-center no-margin-top'><a href='$linkTarget'>".$row->ad_headline."</a></h4>";
if (isset($row->images[0])) {
echo "<div class='text-center'><a href='".$linkTarget."'><img src='".JURI_IMAGES_FOLDER."/".$row->images[0]->$imagetype."' alt=\"".htmlspecialchars($row->ad_headline)."\" border='0' /></a></div>";
}
else
{
echo "<div class='text-center'><a href='".$linkTarget."'><img src='".ADSMANAGER_NOPIC_IMG."' alt='noimage' border='0' /></a></div>";
}
$iconflag = false;
if (($conf->show_new == true)&&(isNewContent($row->date_created,$conf->nbdays_new))) {
echo "<div class='text-center'><img align='center' src='".getImagePath('new.gif')."' /> ";
$iconflag = true;
}
if (($conf->show_hot == true)&&($row->views >= $conf->nbhits)) {
if ($iconflag == false)
echo "<div class='text-center'>";
echo "<img align='center' src='".getImagePath('hot.gif')."' />";
$iconflag = true;
}
if ($iconflag == true)
echo "</div>";
if ($displaycategory == 1)
{
echo "<div class='text-center '><span class=\"adsmanager-cat\">(".$row->parent." / ".$row->cat.")</span></div>";
}
if ($displaydate == 1)
{
echo "<div class='text-center'>".reorderDate($row->date_created)."</div>";
$iconflag = true;
}
foreach($adfields as $f) {
$fieldname = $f->name;
if ($row->$fieldname != null) {
$value = $field->showFieldValue($row,$f);
echo "<div class='text-center'>$value</div>";
}
}
?>
</li>
<?php
} }
?>
</ul>
<?php
}
else
{
?>
<ul class="mostread<?php echo $moduleclass_sfx; ?>">
<?php
if (isset($contents[0])){
foreach($contents as $row) {
?>
<li class="mostread">
<?php
$linkTarget = TRoute::_("index.php?option=com_adsmanager&view=details$urlparamroot&id=".$row->id."&catid=".$row->catid);
echo "<a href='$linkTarget'>".$row->ad_headline."</a>";
if ($displaycategory == 1)
echo " <span class=\"adsmanager-cat\">(".$row->parent." / ".$row->cat.")";
if ($displaydate == 1)
echo " ".reorderDate($row->date_created)."</span>";
?>
</li>
<?php
}}
?>
</ul>
<?php
}
?>
<?php
echo sprintf(JText::_('ADSMANAGER_VIEWS'),$row->views);
?>
</div>
Grid
<?php
/**
* @package AdsManager
* @copyright Copyright (C) 2010-2014 Juloa.com. All rights reserved.
* @license GNU/GPL
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );
?>
<div class="row-fluid">
<?php
foreach($this->contents as $content){
$linkTarget = TRoute::_( "index.php?option=com_adsmanager&view=details&id=".$content->id."&catid=".$content->catid);
if (function_exists('getContentClass'))
$classcontent = " ".getContentClass($content,"grid");
else
$classcontent = "";
//icon flag
$iconflag = false;
$iconText = '';
if (($this->conf->show_new == true)&&($this->isNewcontent($content->date_created,$this->conf->nbdays_new))) {
$iconText .= "<span class='iconflag'><img alt='new' src='".getImagePath('new.gif')."' /> ";
$iconflag = true;
}
if (($this->conf->show_hot == true)&&($content->views >= $this->conf->nbhits)) {
if ($iconflag == false)
$iconText .= "<span class='iconflag'>";
$iconText .= "<img alt='hot' src='".getImagePath('hot.gif')."' />";
$iconflag = true;
}
if ($iconflag == true)
$iconText .= "</span>";
?>
<!-- <div class="row image_container container">-->
<div class="adsmanager-grid<?php echo $classcontent; ?>">
<h4 class="no-margin-top">
<?php
echo "<a href='".$linkTarget."'>".$content->ad_headline."</a>";
?>
</h4>
<?php echo $iconText; ?>
<div class="text-center fad-image">
<!--<img src="templates/ouacheteroutrouver/css/images/gold-ad-1.png"/>-->
<?php
if (isset($content->images[0])) {
echo "<a href='".$linkTarget."'><img name='adimage".$content->id."' src='".JURI_IMAGES_FOLDER."/".$content->images[0]->image."' alt=\"".htmlspecialchars($content->ad_headline)."\" /></a>";
} else if ($this->conf->nb_images > 0) {
echo "<a href='".$linkTarget."'><img src='".ADSMANAGER_NOPIC_IMG."' alt='nopic' /></a>";
}?>
</div>
<div class="desc">
<?php
$content->ad_text = strip_tags(str_replace ('<br />'," ",$content->ad_text));
$af_text = JString::substr($content->ad_text, 0, 85);
if (strlen($content->ad_text)>85) {
$af_text .= "[...]";
}
echo htmlspecialchars($af_text);
?>
</div>
</div>
<?php
}
?>
<?php
echo sprintf(JText::_('ADSMANAGER_VIEWS'),$content->views);
?>
</div>
I can´t understand why there isen´t a hit counter in the component in backend like the built in ads component thats original in Joomla