Проблема проблема с отображением материала в Joomla 2,5

Тема в разделе "Установка и обновление Joomla!", создана пользователем Андрей84, 11.05.2014.

  1. Offline

    Андрей84 Недавно здесь

    Регистрация:
    08.05.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    Здравствуйте, помогите пожалуйста разобраться с проблемой которая возникла после обновления шаблона с Joomla 1,5 на Joomla 2,5
    Меню и категории отображаются нормально но не отображается материал в категориях!

    вот index.php

    Код (CODE):
    1. <?php
    2. defined('_JEXEC') or die('Restricted access'); // no direct access
    3. /* The following line loads the MooTools JavaScript Library */
    4. JHtml::_('behavior.framework', true);
    5. require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions.php';
    6. $document = null;
    7. if (isset($this))
    8.   $document = & $this;
    9. $baseUrl = $this->baseurl;
    10. $templateUrl = $this->baseurl . '/templates/' . $this->template;
    11. artxComponentWrapper($document);
    12. ?>
    13. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    14. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
    15. <head>
    16.   <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    17. <jdoc:include type="head" />
    18.   <link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/system.css" type="text/css" />
    19.   <link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/general.css" type="text/css" />
    20.  
    21.   <link rel="stylesheet" type="text/css" href="<?php echo $templateUrl; ?>/css/template.css" />
    22.   <!--[if IE 6]><link rel="stylesheet" href="<?php echo $templateUrl; ?>/css/template.ie6.css" type="text/css" media="screen" /><![endif]-->
    23.   <!--[if IE 7]><link rel="stylesheet" href="<?php echo $templateUrl; ?>/css/template.ie7.css" type="text/css" media="screen" /><![endif]-->
    24.   <script type="text/javascript" src="<?php echo $templateUrl; ?>/script.js"></script>
    25. </head>
    26. <body>
    27.     <div id="art-page-background-gradient"></div>
    28. <div id="art-main">
    29. <div class="art-Sheet">
    30.     <div class="art-Sheet-tl"></div>
    31.     <div class="art-Sheet-tr"></div>
    32.     <div class="art-Sheet-bl"></div>
    33.     <div class="art-Sheet-br"></div>
    34.     <div class="art-Sheet-tc"></div>
    35.     <div class="art-Sheet-bc"></div>
    36.     <div class="art-Sheet-cl"></div>
    37.     <div class="art-Sheet-cr"></div>
    38.     <div class="art-Sheet-cc"></div>
    39.     <div class="art-Sheet-body">
    40. <jdoc:include type="modules" name="user3" />
    41. <div class="art-Header">
    42.     <div class="art-Header-jpeg"></div>
    43. <div class="art-Logo">
    44. <h1 id="name-text" class="art-Logo-name"><a href="<?php echo $baseUrl; ?>/">Шаблоны Joomla</a></h1>
    45. <div id="slogan-text" class="art-Logo-text">www.joomla.vasava.ru</div>
    46. </div>
    47.  
    48.  
    49. </div>
    50. <jdoc:include type="modules" name="banner1" style="artstyle" artstyle="art-nostyle" />
    51. <?php echo artxPositions($document, array('top1', 'top2', 'top3'), 'art-block'); ?>
    52. <div class="art-contentLayout">
    53. <?php if (artxCountModules($document, 'left')) : ?>
    54. <div class="art-sidebar1"><?php echo artxModules($document, 'left', 'art-block'); ?>
    55. </div>
    56. <?php endif; ?>
    57. <div class="art-<?php echo artxCountModules($document, 'left') ? 'content' : 'content-wide'; ?>">
    58.  
    59. <?php
    60.   echo artxModules($document, 'banner2', 'art-nostyle');
    61.   if (artxCountModules($document, 'breadcrumb'))
    62.     echo artxPost(null, artxModules($document, 'breadcrumb'));
    63.   echo artxPositions($document, array('user1', 'user2'), 'art-article');
    64.   echo artxModules($document, 'banner3', 'art-nostyle');
    65. ?>
    66. <?php if (artxHasMessages()) : ?><div class="art-Post">
    67.     <div class="art-Post-body">
    68. <div class="art-Post-inner">
    69. <div class="art-PostContent">
    70.  
    71. <jdoc:include type="message" />
    72.  
    73. </div>
    74. <div class="cleared"></div>
    75.  
    76. </div>
    77.  
    78.     </div>
    79. </div>
    80. <?php endif; ?>
    81. <jdoc:include type="component" />
    82.  
    83. <?php echo artxModules($document, 'banner4', 'art-nostyle'); ?>
    84. <?php echo artxPositions($document, array('user4', 'user5'), 'art-article'); ?>
    85. <?php echo artxModules($document, 'banner5', 'art-nostyle'); ?>
    86. </div>
    87.  
    88. </div>
    89. <div class="cleared"></div>
    90.  
    91. <?php echo artxPositions($document, array('bottom1', 'bottom2', 'bottom3'), 'art-block'); ?>
    92. <jdoc:include type="modules" name="banner6" style="artstyle" artstyle="art-nostyle" />
    93. <div class="art-Footer">
    94. <div class="art-Footer-inner">
    95.   <?php echo artxModules($document, 'syndicate'); ?>
    96.   <div class="art-Footer-text">
    97.   <?php if (artxCountModules($document, 'copyright') == 0): ?>
    98. <p>Copyright &copy; 2009 ---.<br/>
    99. All Rights Reserved.</p>
    100.  
    101.   <?php else: ?>
    102.   <?php echo artxModules($document, 'copyright', 'art-nostyle'); ?>
    103.   <?php endif; ?>
    104.   </div>
    105. </div>
    106. <div class="art-Footer-background"></div>
    107. </div>
    108.  
    109.     </div>
    110. </div>
    111. <div class="cleared"></div>
    112. <p class="art-page-footer"><a href="/?p=joomla_templates">Joomla template</a> created with Artisteer.</p>
    113. </div>
    114. </body>
    115. </html>


    и functions.php
    Код (CODE):
    1. <?php
    2. defined('_JEXEC') or die('Restricted access'); // no direct access
    3.  
    4. if (!defined('_ARTX_FUNCTIONS')) {
    5.  
    6.     define('_ARTX_FUNCTIONS', 1);
    7.  
    8.     function artxHasMessages()
    9.     {
    10.         global $mainframe;
    11.         //$messages = $mainframe->getMessageQueue();
    12.         JFactory::getApplication()->getMessageQueue();
    13.         if (is_array($messages) && count($messages))
    14.             foreach ($messages as $msg)
    15.                 if (isset($msg['type']) && isset($msg['message']))
    16.                     return true;
    17.         return false;
    18.     }
    19.  
    20.     function artxUrlToHref($url)
    21.     {
    22.         $result = '';
    23.         $p = parse_url($url);
    24.         if (isset($p['scheme']) && isset($p['host'])) {
    25.             $result = $p['scheme'] . '://';
    26.             if (isset($p['user'])) {
    27.                 $result .= $p['user'];
    28.                 if (isset($p['pass']))
    29.                     $result .= ':' . $p['pass'];
    30.                 $result .= '@';
    31.             }
    32.             $result .= $p['host'];
    33.             if (isset($p['port']))
    34.                 $result .= ':' . $p['port'];
    35.             if (!isset($p['path']))
    36.                 $result .= '/';
    37.         }
    38.         if (isset($p['path']))
    39.             $result .= $p['path'];
    40.         if (isset($p['query'])) {
    41.             $result .= '?' . str_replace('&', '&amp;', $p['query']);
    42.         }
    43.         if (isset($p['fragment']))
    44.             $result .= '#' . $p['fragment'];
    45.         return $result;
    46.     }
    47.  
    48.     function artxPost($caption, $content)
    49.     {
    50.         $hasCaption = (null !== $caption && strlen(trim($caption)) > 0);
    51.         $hasContent = (null !== $content && strlen(trim($content)) > 0);
    52.  
    53.         if (!$hasCaption && !$hasContent)
    54.             return '';
    55.  
    56.         ob_start();
    57. ?>
    58. <div class="art-Post">
    59.             <div class="art-Post-body">
    60.         <div class="art-Post-inner">
    61.        
    62.         <?php if ($hasCaption): ?>
    63. <div class="art-PostMetadataHeader">
    64.         <h1 class="art-PostHeaderIcon-wrapper"> <span class="art-PostHeader">
    65.         <?php echo $caption; ?>
    66. </span>
    67.         </h1>
    68.        
    69.         </div>
    70.        
    71.         <?php endif; ?>
    72.         <?php if ($hasContent): ?>
    73. <div class="art-PostContent">
    74.        
    75.         <?php echo $content; ?>
    76.  
    77.         </div>
    78.         <div class="cleared"></div>
    79.        
    80.         <?php endif; ?>
    81.  
    82.         </div>
    83.        
    84.             </div>
    85.         </div>
    86.        
    87. <?php
    88.         return ob_get_clean();
    89.     }
    90.  
    91.     function artxBlock($caption, $content)
    92.     {
    93.         $hasCaption = (null !== $caption && strlen(trim($caption)) > 0);
    94.         $hasContent = (null !== $content && strlen(trim($content)) > 0);
    95.  
    96.         if (!$hasCaption && !$hasContent)
    97.             return '';
    98.  
    99.         ob_start();
    100. ?>
    101. <div class="art-Block">
    102.             <div class="art-Block-body">
    103.        
    104.         <?php if ($hasCaption): ?>
    105. <div class="art-BlockHeader">
    106.             <div class="l"></div>
    107.             <div class="r"></div>
    108.             <div class="art-header-tag-icon">
    109.                 <div class="t">
    110.         <?php echo $caption; ?>
    111. </div>
    112.             </div>
    113.         </div>
    114.         <?php endif; ?>
    115.         <?php if ($hasContent): ?>
    116. <div class="art-BlockContent">
    117.             <div class="art-BlockContent-tl"></div>
    118.             <div class="art-BlockContent-tr"></div>
    119.             <div class="art-BlockContent-bl"></div>
    120.             <div class="art-BlockContent-br"></div>
    121.             <div class="art-BlockContent-tc"></div>
    122.             <div class="art-BlockContent-bc"></div>
    123.             <div class="art-BlockContent-cl"></div>
    124.             <div class="art-BlockContent-cr"></div>
    125.             <div class="art-BlockContent-cc"></div>
    126.             <div class="art-BlockContent-body">
    127.        
    128.         <?php echo $content; ?>
    129.  
    130.             </div>
    131.         </div>
    132.        
    133.         <?php endif; ?>
    134.  
    135.             </div>
    136.         </div>
    137.        
    138. <?php
    139.         return ob_get_clean();
    140.     }
    141.  
    142.     function artxPageTitle($page, $criteria = null, $key = null)
    143.     {
    144.         if ($criteria === null)
    145.             $criteria = $page->params->def('show_page_title', 1);
    146.         return $criteria
    147.             ? ('<span class="componentheading' . $page->params->get('pageclass_sfx') . '">'
    148.                 . $page->escape($page->params->get($key === null ? 'page_title' : $key)) . '</span>')
    149.             : '';
    150.     }
    151.    
    152.     function artxCountModules(&$document, $position)
    153.     {
    154.         if (null === $document)
    155.             // for Joomla 1.0
    156.             return mosCountModules($position);
    157.         // for Joomla 1.5
    158.         return $document->countModules($position);
    159.     }
    160.    
    161.     function artxPositions(&$document, $positions, $style)
    162.     {
    163.         ob_start();
    164.         if (count($positions) == 3) {
    165.             if (artxCountModules($document, $positions[0])
    166.                 && artxCountModules($document, $positions[1])
    167.                 && artxCountModules($document, $positions[2]))
    168.             {
    169.                 ?>
    170. <table class="position" cellpadding="0" cellspacing="0" border="0">
    171. <tr valign="top">
    172.   <td width="33%"><?php echo artxModules($document, $positions[0], $style); ?></td>
    173.   <td width="33%"><?php echo artxModules($document, $positions[1], $style); ?></td>
    174.   <td><?php echo artxModules($document, $positions[2], $style); ?></td>
    175. </tr>
    176. </table>
    177. <?php
    178.             } elseif (artxCountModules($document, $positions[0]) && artxCountModules($document, $positions[1])) {
    179. ?>
    180. <table class="position" cellpadding="0" cellspacing="0" border="0">
    181. <tr valign="top">
    182.   <td width="33%"><?php echo artxModules($document, $positions[0], $style); ?></td>
    183.   <td><?php echo artxModules($document, $positions[1], $style); ?></td>
    184. </tr>
    185. </table>
    186. <?php
    187.             } elseif (artxCountModules($document, $positions[1]) && artxCountModules($document, $positions[2])) {
    188. ?>
    189. <table class="position" cellpadding="0" cellspacing="0" border="0">
    190. <tr valign="top">
    191.   <td width="67%"><?php echo artxModules($document, $positions[1], $style); ?></td>
    192.   <td><?php echo artxModules($document, $positions[2], $style); ?></td>
    193. </tr>
    194. </table>
    195. <?php
    196.             } elseif (artxCountModules($document, $positions[0]) && artxCountModules($document, $positions[2])) {
    197. ?>
    198. <table class="position" cellpadding="0" cellspacing="0" border="0">
    199. <tr valign="top">
    200.   <td width="50%"><?php echo artxModules($document, $positions[0], $style); ?></td>
    201.   <td><?php echo artxModules($document, $positions[2], $style); ?></td>
    202. </tr>
    203. </table>
    204. <?php
    205.             } else {
    206.                 echo artxModules($document, $positions[0], $style);
    207.                 echo artxModules($document, $positions[1], $style);
    208.                 echo artxModules($document, $positions[2], $style);
    209.             }
    210.         } elseif (count($positions) == 2) {
    211.             if (artxCountModules($document, $positions[0]) && artxCountModules($document, $positions[1])) {
    212. ?>
    213. <table class="position" cellpadding="0" cellspacing="0" border="0">
    214. <tr valign="top">
    215. <td width="50%"><?php echo artxModules($document, $positions[0], $style); ?></td>
    216. <td><?php echo artxModules($document, $positions[1], $style); ?></td>
    217. </tr>
    218. </table>
    219. <?php
    220.             } else {
    221.                 echo artxModules($document, $positions[0], $style);
    222.                 echo artxModules($document, $positions[1], $style);
    223.             }
    224.         } // count($positions)
    225.         return ob_get_clean();
    226.     }
    227.    
    228.     function artxGetContentCellStyle(&$document)
    229.     {
    230.         $leftCnt = artxCountModules($document, 'left');
    231.         $rightCnt = artxCountModules($document, 'right');
    232.         if ($leftCnt > 0 && $rightCnt > 0)
    233.             return 'content';
    234.         if ($rightCnt > 0)
    235.             return 'content-sidebar1';
    236.         if ($leftCnt > 0)
    237.             return 'content-sidebar2';
    238.         return 'content-wide';
    239.     }
    240.    
    241.     function artxHtmlFixMoveScriptToHead($re, $content)
    242.     {
    243.         if (preg_match($re, $content, $matches, PREG_OFFSET_CAPTURE)) {
    244.             $content = substr($content, 0, $matches[0][1])
    245.                 . substr($content, $matches[0][1] + strlen($matches[0][0]));
    246.             $document =& JFactory::getDocument();
    247.             $document->addScriptDeclaration($matches[1][0]);
    248.         }
    249.         return $content;
    250.     }
    251.  
    252.     function artxHtmlFixFormAction($content)
    253.     {
    254.         if (preg_match('~ action="([^"]+)" ~', $content, $matches, PREG_OFFSET_CAPTURE)) {
    255.             $content = substr($content, 0, $matches[0][1])
    256.                 . ' action="' . artxUrlToHref($matches[1][0]) . '" '
    257.                 . substr($content, $matches[0][1] + strlen($matches[0][0]));
    258.         }
    259.         return $content;
    260.     }
    261.  
    262.     function artxHtmlFixRemove($re, $content)
    263.     {
    264.         if (preg_match($re, $content, $matches, PREG_OFFSET_CAPTURE)) {
    265.             $content = substr($content, 0, $matches[0][1])
    266.                 . substr($content, $matches[0][1] + strlen($matches[0][0]));
    267.         }
    268.         return $content;
    269.     }
    270.  
    271.     function artxComponentWrapper(&$document)
    272.     {
    273.         if (null === $document) {
    274.             // for Joomla 1.0
    275.             return;
    276.         }
    277.         // for Joomla 1.5
    278.         if ($document->getType() != 'html') return;
    279.         $option = JRequest::getCmd('option');
    280.         $view = JRequest::getCmd('view');
    281.         $layout = JRequest::getCmd('layout');
    282.         $content = $document->getBuffer('component');
    283.         // fixes for w3.org validation
    284.         if ('com_contact' == $option) {
    285.             if ('category' == $view) {
    286.                 $content = artxHtmlFixFormAction($content);
    287.             } elseif ('contact' == $view) {
    288.                 $content = artxHtmlFixMoveScriptToHead('~<script [^>]+>\s*(<!--[^>]*-->)\s*</script>~', $content);
    289.             }
    290.         } elseif ('com_content' == $option) {
    291.             if ('category' == $view) {
    292.                 if ('' == $layout) {
    293.                     $content = artxHtmlFixMoveScriptToHead('~<script [^>]+>([^<]*)</script>~', $content);
    294.                     $content = artxHtmlFixFormAction($content);
    295.                 }
    296.             } elseif ('archive' == $view) {
    297.                 $content = artxHtmlFixRemove('~<ul id="archive-list" style="list-style: none;">\s*</ul>~', $content);
    298.             }
    299.         } elseif ('com_user' == $option) {
    300.             if ('user' == $view) {
    301.                 if ('form' == $layout) {
    302.                     $content = artxHtmlFixRemove('~autocomplete="off"~', $content);
    303.                 }
    304.             }
    305.         }
    306.         if (false === strpos($content, '<div class="art-Post">')) {
    307.             $title = null;
    308.             if (preg_match('~<div\s+class="(componentheading[^"]*)"([^>]*)>([^<]+)</div>~', $content, $matches, PREG_OFFSET_CAPTURE)) {
    309.                 $content = substr($content, 0, $matches[0][1]) . substr($content, $matches[0][1] + strlen($matches[0][0]));
    310.                 $title = '<span class="' . $matches[1][0] . '"' . $matches[2][0] . '>' . $matches[3][0] . '</span>';
    311.             }
    312.             $document->setBuffer(artxPost($title, $content), 'component');
    313.         }
    314.     }
    315.    
    316.     function artxComponent()
    317.     {
    318.         // for Joomla 1.0
    319.         ob_start();
    320.         mosMainBody();
    321.         $content = ob_get_clean();
    322.         if (false === strpos($content, '<div class="art-Post">')) {
    323.             $title = null;
    324.             if (preg_match('~<div\s+class="(componentheading[^"]*)"([^>]*)>([^<]+)</div>~', $content, $matches, PREG_OFFSET_CAPTURE)) {
    325.                 $content = substr($content, 0, $matches[0][1]) . substr($content, $matches[0][1] + strlen($matches[0][0]));
    326.                 $title = '<span class="' . $matches[1][0] . '"' . $matches[2][0] . '>' . $matches[3][0] . '</span>';
    327.             }
    328.             return artxPost($title, $content);
    329.         }
    330.         return $content;
    331.     }
    332.    
    333.     function artxModules(&$document, $position, $style = null)
    334.     {
    335.         if (null === $document) {
    336.             // for Joomla 1.0
    337.             ob_start();
    338.             mosLoadModules($position, -2);
    339.             $content = ob_get_clean();
    340.             if (null == $style || 'xhtml' == $style)
    341.                 return $content;
    342.             $decorator = 'artblock' == $style ? 'artxBlock' : ('artpost' == $style ? 'artxPost' : null);
    343.             $result = '';
    344.             $modules = preg_split('~</div>\s*<div class="moduletable">~', $content);
    345.             $lastModule = count($modules) - 1;
    346.             if ($lastModule > -1) {
    347.                 $modules[0] = preg_replace('~^\s*<div class="moduletable">~', '', $modules[0]);
    348.                 $modules[$lastModule] = preg_replace('~</div>\s*$~', '', $modules[$lastModule]);
    349.                 foreach ($modules as $module) {
    350.                     if (preg_match('~^\s*<h3>([^<]*)</h3>~', $module, $matches, PREG_OFFSET_CAPTURE)) {
    351.                         $result .= $decorator($matches[1][0], substr($module, 0, $matches[0][1])
    352.                             . substr($module, $matches[0][1] + strlen($matches[0][0])));
    353.                     } else {
    354.                         $result .= $decorator(null, $module);
    355.                     }
    356.                 }
    357.             }
    358.             return $result;
    359.         }
    360.         // for Joomla 1.5
    361.         return '<jdoc:include type="modules" name="' . $position . '"' . (null != $style ? ' style="artstyle" artstyle="' . $style . '"' : '') . ' />';
    362.     }
    363.    
    364.     $artxFragments = array();
    365.  
    366.     function artxFragmentBegin($head = '')
    367.     {
    368.         global $artxFragments;
    369.         $artxFragments[] = array('head' => $head, 'content' => '', 'tail' => '');
    370.     }
    371.  
    372.     function artxFragmentContent($content = '')
    373.     {
    374.         global $artxFragments;
    375.         $artxFragments[count($artxFragments) - 1]['content'] = $content;
    376.     }
    377.  
    378.     function artxFragmentEnd($tail = '', $separator = '')
    379.     {
    380.         global $artxFragments;
    381.         $fragment = array_pop($artxFragments);
    382.         $fragment['tail'] = $tail;
    383.         $content = trim($fragment['content']);
    384.         if (count($artxFragments) == 0) {
    385.             echo (trim($content) == '') ? '' : ($fragment['head'] . $content . $fragment['tail']);
    386.         } else {
    387.             $result = (trim($content) == '') ? '' : ($fragment['head'] . $content . $fragment['tail']);
    388.             $fragment =& $artxFragments[count($artxFragments) - 1];
    389.             $fragment['content'] .= (trim($fragment['content']) == '' ? '' : $separator) . $result;
    390.         }
    391.     }
    392.  
    393.     function artxFragment($head = '', $content = '', $tail = '', $separator = '')
    394.     {
    395.         global $artxFragments;
    396.         if ($head != '' && $content == '' && $tail == '' && $separator == '') {
    397.             $content = $head;
    398.             $head = '';
    399.         } elseif ($head != '' && $content != '' && $tail == '' && $separator == '') {
    400.             $separator = $content;
    401.             $content = $head;
    402.             $head = '';
    403.         }
    404.         artxFragmentBegin($head);
    405.         artxFragmentContent($content);
    406.         artxFragmentEnd($tail, $separator);
    407.     }
    408.  
    409. }


    если кто разбирается подскажите что исправить нужно пожалуйста
     

    Вложения:

  2.  
  3. OlegM
    Offline

    OlegM Russian Joomla! Team Команда форума

    Регистрация:
    12.04.2007
    Сообщения:
    4 311
    Симпатии:
    375
    Пол:
    Мужской
    Почему не на Joomla 3.3? :)

    А что вместо них? Включи отображение ошибок, да посмотри, что выводит.
    А вообще, надо переписывать все файлы под использование API Joomla 2.5 (лучше 3.3).
     
  4. Offline

    Андрей84 Недавно здесь

    Регистрация:
    08.05.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской

    вместо материала не чего не отображается,

    Notice: Undefined variable: messages inThome\sevarenda.ru\www\templates\rhuk_milkyway25\functions.php on line13

    Notice
    : Undefined property: ContentViewCategory::$total inThome\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 44

    Notice: Undefined property: ContentViewCategory::$total inThome\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 29

    Notice: Undefined property: ContentViewCategory::$total inThome\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 94




    upload_2014-5-11_23-35-38.png
     
    Последнее редактирование: 11.05.2014
  5. OlegM
    Offline

    OlegM Russian Joomla! Team Команда форума

    Регистрация:
    12.04.2007
    Сообщения:
    4 311
    Симпатии:
    375
    Пол:
    Мужской
    Андрей84 нравится это.
  6. Offline

    Андрей84 Недавно здесь

    Регистрация:
    08.05.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    Notice: Undefined variable: messages inThome\sevarenda.ru\www\templates\rhuk_milkyway25\functions.php on line13

    Notice
    : Undefined property: ContentViewCategory::$total inThome\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 44

    Notice: Undefined property: ContentViewCategory::$total inThome\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 29

    Notice: Undefined property: ContentViewCategory::$total inThome\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 94
     
  7. OlegM
    Offline

    OlegM Russian Joomla! Team Команда форума

    Регистрация:
    12.04.2007
    Сообщения:
    4 311
    Симпатии:
    375
    Пол:
    Мужской
    Код (PHP):
    1. JFactory::getApplication()->getMessageQueue();

    замени на
    Код (PHP):
    1. $messages = JFactory::getApplication()->getMessageQueue();
     
  8. Offline

    Андрей84 Недавно здесь

    Регистрация:
    08.05.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской

    большое спасибо, остается

    Notice: Undefined property: ContentViewCategory::$total inT:\home\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 44

    Notice: Undefined property: ContentViewCategory::$total inT:\home\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 29

    Notice: Undefined property: ContentViewCategory::$total inT:\home\sevarenda.ru\www\templates\rhuk_milkyway25\html\com_content\category\blog.phpon line 94

    может сможете помочь
    --- добавлено: 12.05.2014 ---
    blog.php
    Код (CODE):
    1. <?php
    2. defined('_JEXEC') or die('Restricted access'); // no direct access
    3. require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
    4. ?>
    5. <?php $cparams =& JComponentHelper::getParams('com_media'); ?>
    6.  
    7. <?php ob_start(); ?>
    8. <?php if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) :?>
    9. <table class="blog<?php echo $this->params->get('pageclass_sfx');?>" cellpadding="0" cellspacing="0" width="100%">
    10. <tr>
    11.     <td valign="top">
    12.     <?php if ($this->params->get('show_description_image') && $this->category->image) : ?>
    13.         <img src="<?php echo $this->baseurl . '/' . $cparams->get('image_path') . '/'. $this->category->image;?>" align="<?php echo $this->category->image_position;?>" hspace="6" alt="" />
    14.     <?php endif; ?>
    15.     <?php if ($this->params->get('show_description') && $this->category->description) : ?>
    16.         <?php echo $this->category->description; ?>
    17.     <?php endif; ?>
    18.     </td>
    19. </tr>
    20. </table>
    21. <?php endif; ?>
    22. <?php echo artxPost(artxPageTitle($this), ob_get_clean()); ?>
    23.  
    24. <table class="blog<?php echo $this->params->get('pageclass_sfx');?>" cellpadding="0" cellspacing="0" width="100%">
    25. <?php if ($this->params->get('num_leading_articles')) : ?>
    26. <tr>
    27.     <td valign="top">
    28.     <?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
    29.         <?php if ($i >= $this->total) : break; endif; ?>
    30.         <div>
    31.         <?php
    32.             $this->item =& $this->getItem($i, $this->params);
    33.             echo $this->loadTemplate('item');
    34.         ?>
    35.         </div>
    36.     <?php endfor; ?>
    37.     </td>
    38. </tr>
    39. <?php else : $i = $this->pagination->limitstart; endif; ?>
    40.  
    41. <?php
    42. $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
    43. $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles');
    44. if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
    45. <tr>
    46.     <td valign="top">
    47.         <table width="100%" cellpadding="0" cellspacing="0">
    48.         <tr>
    49.         <?php
    50.             $divider = '';
    51.             if ($this->params->get('multi_column_order')) : // order across, like front page
    52.                 for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
    53.                     if ($z > 0) : $divider = " column_separator"; endif; ?>
    54.                     <?php
    55.                     $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
    56.                     $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
    57.                     ?>
    58.                     <td valign="top"
    59.                         width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%"
    60.                         class="article_column<?php echo $divider ?>">
    61.                         <?php
    62.                         $loop = (($z < $cols)?1:0) + $rows;
    63.  
    64.                         for ($y = 0; $y < $loop; $y ++) :
    65.                             $target = $i + ($y * $this->params->get('num_columns')) + $z;
    66.                             if ($target < $this->total && $target < ($numIntroArticles)) :
    67.                                 $this->item =& $this->getItem($target, $this->params);
    68.                                 echo $this->loadTemplate('item');
    69.                             endif;
    70.                         endfor;
    71.                         ?></td>
    72.                 <?php endfor;
    73.                         $i = $i + $this->params->get('num_intro_articles') ;
    74.             else : // otherwise, order down, same as before (default behaviour)
    75.                 for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
    76.                     if ($z > 0) : $divider = " column_separator"; endif; ?>
    77.                     <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
    78.                     <?php for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
    79.                     if ($i < $this->total && $i < ($numIntroArticles)) :
    80.                         $this->item =& $this->getItem($i, $this->params);
    81.                         echo $this->loadTemplate('item');
    82.                         $i ++;
    83.                     endif;
    84.                 endfor; ?>
    85.                 </td>
    86.         <?php endfor;
    87.         endif; ?>
    88.         </tr>
    89.         </table>
    90.     </td>
    91. </tr>
    92. <?php endif; ?>
    93. </table>
    94. <?php if ($this->params->get('num_links') && ($i < $this->total)) : ?>
    95. <?php ob_start(); ?>
    96. <?php
    97.     $this->links = array_splice($this->items, $i - $this->pagination->limitstart);
    98.     echo $this->loadTemplate('links');
    99. ?>
    100. <?php echo artxPost(null, ob_get_clean()); ?>
    101. <?php endif; ?>
    102. <?php
    103. $paginationPagesLinks = $this->params->get('show_pagination')
    104.     ? $this->pagination->getPagesLinks() : '';
    105. $paginationPagesCounter = $this->params->get('show_pagination_results')
    106.     ? $this->pagination->getPagesCounter() : '';
    107. ?>
    108. <?php if (strlen($paginationPagesLinks) > 0 && strlen($paginationPagesCounter) > 0) : ?>
    109. <?php ob_start(); ?>
    110. <div id="navigation">
    111. <?php if (strlen($paginationPagesLinks) > 0) : ?>
    112. <p><?php echo $paginationPagesLinks; ?></p>
    113. <?php endif; ?>
    114. <?php if (strlen($paginationPagesCounter) > 0) : ?>
    115. <p><?php echo $paginationPagesCounter; ?></p>
    116. <?php endif; ?>
    117. </div>
    118. <?php echo artxPost(null, ob_get_clean()); ?>
    119. <?php endif; ?>
     
  9. OlegM
    Offline

    OlegM Russian Joomla! Team Команда форума

    Регистрация:
    12.04.2007
    Сообщения:
    4 311
    Симпатии:
    375
    Пол:
    Мужской
    Теоретически могу конечно, а практически... надо переписывать весь шаблон blog.php.
    Проще взять стандартный шаблон из Joomla и сделать по образу и подобию.
     
    Андрей84 нравится это.
  10. Offline

    Андрей84 Недавно здесь

    Регистрация:
    08.05.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    А вы не подскажите не какого курса по переделу шаблона
    --- добавлено: 12.05.2014, первое сообщение размещено: 12.05.2014 ---
    или ответьте пожалуйста сколько будет стоить довести до ума этот шаблон
     
  11. AKopytenko
    Offline

    AKopytenko Russian Joomla! Team Команда форума

    Регистрация:
    01.09.2011
    Сообщения:
    1 963
    Симпатии:
    168
    Пол:
    Мужской
    Ну, бателька... Ты уж определись чего хочешь! Хочешь, чтобы тебе дали рыбу или хочешь научиться её ловить?
     
  12. Offline

    Андрей84 Недавно здесь

    Регистрация:
    08.05.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    Научиться ловить безусловно предпочттельней
     

Поделиться этой страницей

Загрузка...