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 / [RESOLVED] Remove publication date in Latest ads

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

[RESOLVED] Remove publication date in Latest ads

More
11 years 8 months ago - 11 years 8 months ago #9692 by zaidmk
How to remove Publication date in Latest ads, I tried to follow this thread www.joomprod.com/forum/adsmanager-suppor...-date-in-new-ad-form but there where no solution.
Last edit: 11 years 8 months ago by loic.
More
11 years 8 months ago #9708 by tompap
Replied by tompap on topic Remove publication date in Latest ads
Latest ads you mean "ads module", There is an option for that.

If you mean latest ads on the front page, you need to override the page.
views/front/tmpl/default.php
More
11 years 8 months ago - 11 years 8 months ago #9727 by zaidmk
Replied by zaidmk on topic Remove publication date in Latest ads
Here are the codes for the file you told me about but i can'yt see where to remove lines related to date




<?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">
<div class="span12">
<fieldset>
<?php if ($this->conf->display_last == 1)
{
$this->displayContents($this->contents,$this->nbimages);
}
?>
</fieldset>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<fieldset>
<legend><?php echo JText::_('ADSMANAGER_FRONT_TITLE'); ?></legend>
<div class="row-fluid">
<div class="span12">
<?php echo $this->conf->fronttext; ?>
</div>
</div>
<br />
<?php $this->general->showGeneralLink() ?>
<div id="adshome" class="row-fluid">
<?php
$nbcatsperrow = $this->conf->display_nb_categories_per_row;
$classtype = (int) (12 / $nbcatsperrow);

$num = 1;
$divopen = false;

foreach ($this->cats as $row) {
//remove the if if you want more than 1 sublevel
if ($row->level > 1) {
continue;
}


if ($row->level == 0) {
if ($divopen == true) {
$divopen = false;
?>
</h3>
</div>
</div>
</div>
<?php }
if ($num == $nbcatsperrow+1) {
$num = 1;
echo '</div>';
}
if ($num==1) {
echo '<div class="row-fluid">';
}
$num++;
}

if(isset($this->conf->display_nb_ads_per_categories) && $this->conf->display_nb_ads_per_categories)
$numAds = " (".$row->num_ads.")";
else
$numAds = '';

$link = TRoute::_("index.php?option=com_adsmanager&view=list&catid=".$row->id);


if ($row->level == 0) {
$imgsrc = TTools::getCatImageUrl($row->id);
?>
<div class="span<?php echo $classtype ?>">
<div class="span12">
<div class="span6">
<?php
echo '<a class="image" href="'.$link.'" title="'.htmlspecialchars($row->name).'"><img class="imgcat" src="'.$imgsrc.'" alt="'.htmlspecialchars($row->name).'" /></a>';
?>
</div>
<div class="span6">
<h2 class="no-margin-top"><a href="<?php echo $link; ?>" ><?php echo htmlspecialchars($row->name).$numAds; ?></a></h2>

<h3>
<?php
$divopen = true;
$firstsubcat = true;
} else {
if ($firstsubcat == false)
echo ' - ';
echo '<a href="'.$link.'">'.htmlspecialchars($row->name).$numAds.'</a>';
$firstsubcat = false;
}
}
if ($divopen == true) {
?>
</h3>
</div>
</div>
</div>
<?php
}
echo "</div>";
?>
</div>
<?php if ($this->conf->display_last == 2)
{
$this->displayContents($this->contents,$this->nbimages);
} $this->general->endTemplate();
?>
</fieldset>
</div>
</div>
Attachments:
Last edit: 11 years 8 months ago by zaidmk.
More
11 years 8 months ago #9757 by tompap
Replied by tompap on topic Remove publication date in Latest ads
you should replace

$this->displayContents($this->contents,$this->nbimages);

by a specific code

just copy paste the content of the displayContents (view.html.php)
replace the correct variable.

Copy page displayContents function here if you need some help
More
11 years 8 months ago #9782 by zaidmk
Replied by zaidmk on topic Remove publication date in Latest ads
Thank you for the response, here are the lines of code

<?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' );

jimport('joomla.application.component.view');
require_once(JPATH_BASE."/components/com_adsmanager/helpers/general.php");

/**
* @package Joomla
* @subpackage Contacts
*/
class AdsmanagerViewFront extends TView
{
function display($tpl = null)
{
jimport( 'joomla.session.session' );
$currentSession = JSession::getInstance('none',array());
$currentSession->set("search_fields","");
$currentSession->set("searchfieldscatid",0);
$currentSession->set("searchfieldssql"," 1 ");
$currentSession->set("tsearch","",'adsmanager');

$app = JFactory::getApplication();
$pathway = $app->getPathway();


$user = JFactory::getUser();

$document = JFactory::getDocument();

$contentmodel =$this->getModel( "content" );
$catmodel =$this->getModel( "category" );
$configurationmodel =$this->getModel( "configuration" );

// Get the parameters of the active menu item
$menus = $app->getMenu();
$menu = $menus->getActive();

$conf = $configurationmodel->getConfiguration();

$rootid = JRequest::getInt('rootid',0);

$cats = $catmodel->getFlatTree(true, true, $nbContents, 'read',$rootid);

$this->assignRef('cats',$cats);
$this->assignRef('conf',$conf);

/*$document->setTitle( JText::_('ADSMANAGER_PAGE_TITLE'));*/

$general = new JHTMLAdsmanagerGeneral(0,$conf,$user);
$this->assignRef('general',$general);

$conf = $configurationmodel->getConfiguration();
$nbimages = $conf->nb_images;
if (function_exists("getMaxPaidSystemImages"))
{
$nbimages += getMaxPaidSystemImages();
}
$this->assignRef('nbimages',$nbimages);



$nb_cols = $conf->nb_last_cols;
$nb_rows = $conf->nb_last_rows;
$contents = $contentmodel->getLatestContents($nb_cols*$nb_rows,0,"no",$rootid);
$this->assignRef('contents',$contents);

parent::display($tpl);
}

function displayContents($contents,$nbimages) {
$configurationmodel =$this->getModel( "configuration" );
$conf = $configurationmodel->getConfiguration();
?>
<h1 class="contentheading"><?php echo JText::_('ADSMANAGER_LAST_ADS');?></h1>
<div class='adsmanager_box_module' align="center">
<table class='adsmanager_inner_box' width="100%">
<?php
$nb_cols = $conf->nb_last_cols;
$col = 0;
foreach($contents as $row) {
if ($col == 0)
echo '<tr align="center">';
$col++;
?>
<td>
<?php
$linkTarget = TRoute::_("index.php?option=com_adsmanager&view=details&id=".$row->id."&catid=".$row->catid);
if (isset($row->images[0])) {
echo "<div align='center'><a href='".$linkTarget."'><img src='".$this->get('baseurl')."/images/com_adsmanager/ads/".$row->images[0]->thumbnail."' alt=\"".htmlspecialchars($row->ad_headline)."\" border='0' /></a>";
} else if ($conf->nb_images > 0) {
echo "<div align='center'><a href='".$linkTarget."'><img src='".ADSMANAGER_NOPIC_IMG."' alt='nopic' border='0' /></a>";
}

echo "<br /><a href='$linkTarget'>".$row->ad_headline."</a>";
echo "<br /><span class=\"adsmanager_cat\">(".htmlspecialchars($row->parent)." / ".htmlspecialchars($row->cat).")</span>";
echo "<br />".$this->reorderDate($row->date_created);
echo "</div>";
?>
</td>
<?php
if ($col == $nb_cols) {
echo "</tr>";
$col = 0;
}
}
if ($col != 0) {
echo "</tr>";
}
?>
</table>
</div>
<br />
<?php
}

function reorderDate( $date ){
$format = JText::_('ADSMANAGER_DATE_FORMAT_LC');

if ($date && (preg_match("/([0-9]{4})-([0-9]{2})-([0-9]{2})/",$date,$regs))) {
$date = mktime( 0, 0, 0, $regs[2], $regs[3], $regs[1] );
$date = $date > -1 ? strftime( $format, $date) : '-';
}
return $date;
}
}
More
11 years 8 months ago #9797 by loic
Replied by loic on topic Remove publication date in Latest ads
Hello,

In the last file (view.html.php) remove the line 103:
echo "<br />".$this->reorderDate($row->date_created);

Please be aware that any update or reinstallation of AdSManager will erase this modification.

Best regards.
The following user(s) said Thank You: zaidmk
Moderators: perry
Time to create page: 0.678 seconds
Powered by Kunena Forum