Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / Hits/visitors counter

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

Hits/visitors counter

More
10 years 9 months ago - 10 years 9 months ago #18433 by Twixo
Replied by Twixo on topic Hits/visitors counter
Hi
Here is the code.

thanks!
/Niklas

1st horizontal.php

<?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 sprintf(JText::_('ADSMANAGER_VIEWS'),$row->views);
}
}
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
}
?>
</div>

2nd vertical.php

<?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>";
echo sprintf(JText::_('ADSMANAGER_VIEWS'),$row->views);
}
}

?>
</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 "&nbsp;<span class=\"adsmanager-cat\">(".$row->parent." / ".$row->cat.")";
if ($displaydate == 1)
echo "&nbsp;".reorderDate($row->date_created)."</span>";
?>
</li>
<?php
}}
?>
</ul>
<?php
}
?>
</div>

3rd Default_grid.php

<?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>";
echo sprintf(JText::_('ADSMANAGER_VIEWS'),$row->views);
}?>
</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
}
?>
</div>
Last edit: 10 years 9 months ago by Twixo.
The following user(s) said Thank You: adarr
More
10 years 9 months ago #18446 by loic
Replied by loic on topic Hits/visitors counter
Hello,

You put this line in an 'if' for the default_grid view and in a foreach in the horizontal and vertical view.

Could you move the line just after the if and foreach ?

Best regards.
More
10 years 9 months ago - 10 years 9 months ago #18469 by Twixo
Replied by Twixo on topic Hits/visitors counter
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 "&nbsp;<span class=\"adsmanager-cat\">(".$row->parent." / ".$row->cat.")";
if ($displaydate == 1)
echo "&nbsp;".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
Last edit: 10 years 9 months ago by Twixo.
The following user(s) said Thank You: adarr
More
10 years 8 months ago #18499 by loic
Replied by loic on topic Hits/visitors counter
Hello,

I will make a modification in the composant and send you the solution on this forum.

You are right when you say that this feature must have been in the original file.

I come back to you today.

Best regards.
The following user(s) said Thank You: adarr, Twixo
More
10 years 8 months ago #18789 by Twixo
Replied by Twixo on topic Hits/visitors counter
I haven´t heard from you, how did it go?

/Niklas
The following user(s) said Thank You: adarr
More
10 years 8 months ago #18808 by tompap
Replied by tompap on topic Hits/visitors counter
Loic is in vacation, please recontact him next week about that.

Thanks
The following user(s) said Thank You: adarr
Moderators: perry
Time to create page: 0.403 seconds
Powered by Kunena Forum