Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 5 Ответов
  • 1665 Просмотров
*

Gemini

  • Осваиваюсь на форуме
  • 42
  • 0 / 0
Ребята, извините, что снова поднимаю этот вопрос, знаю есть темы с подобными вопросами, но у меня почему-то нету соответственного кода в файле:
/components/com_adsmanager/views/front/view.html.php
Я уже удалял подкатегории на главной, но после обновления они снова появились и я не могу от них сейчас избавится.
Вот сайт: buis.com.ua

Вот код из данного файла:
Код
<?php
/**
 * @package AdsManager
 * @copyright Copyright (C) 2010-2012 JoomPROD.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();

$cats = $catmodel->getFlatTree(true, true, $nbContents, 'read');
        
$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);
$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;
}
}
« Последнее редактирование: 05.05.2014, 15:41:48 от Gemini »
*

Gemini

  • Осваиваюсь на форуме
  • 42
  • 0 / 0
Re: Убрать подкатегории на главной
« Ответ #1 : 01.05.2014, 21:55:08 »
Кто-то знает в чем проблема?
*

Gemini

  • Осваиваюсь на форуме
  • 42
  • 0 / 0
Re: Убрать подкатегории на главной
« Ответ #2 : 05.05.2014, 11:49:04 »
Ответов тьма)
*

Gemini

  • Осваиваюсь на форуме
  • 42
  • 0 / 0
Re: Убрать подкатегории на главной
« Ответ #3 : 05.05.2014, 12:39:22 »
Ребята, ну кто сможет помочь, А?
*

zvi

  • Захожу иногда
  • 392
  • 4 / 0
Re: Убрать подкатегории на главной
« Ответ #4 : 05.05.2014, 14:18:34 »
я вырезал код что не нужно в components\com_adsmanager\views\front\tmpl\default.php если под категория то это h3  попробуй
Спойлер
[свернуть]
на форуме редко кто поможет почти все методом проб и ошибок, я в php не силен попробуй вырезать, если все остальное работать
*

Gemini

  • Осваиваюсь на форуме
  • 42
  • 0 / 0
Re: Убрать подкатегории на главной
« Ответ #5 : 05.05.2014, 15:41:20 »
Спасибо.
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Убрать запятую в конце php AdsManager Joomla

Автор MakGrouman

Ответов: 31
Просмотров: 14067
Последний ответ 27.11.2018, 16:47:20
от khan-alex
AdsManager - форма добавления - как убрать перенос строки

Автор designerandrey

Ответов: 4
Просмотров: 9676
Последний ответ 25.09.2018, 14:40:11
от designerandrey
Как убрать из URL /component/adsmanager/?

Автор Усач911

Ответов: 5
Просмотров: 13992
Последний ответ 09.09.2018, 22:14:23
от zoxma
[Решено] Похожие объявления в AdsManager 2.9.13

Автор Ishti39

Ответов: 17
Просмотров: 4800
Последний ответ 06.06.2017, 22:08:18
от gremeru777
AdsManager убрать слова "Классифицированные объявления"

Автор Уровень

Ответов: 11
Просмотров: 3872
Последний ответ 17.03.2017, 09:51:53
от khan-alex