Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Tech-xml Friend
    #205054

    Just when Joomla 3.4 came out I did a upgrade to joomla 3.4. Broke the frontend of the site.

    Yesterday I returned to the forum asking if could migrate to Joomla 3.4. A user said he was running Joomla 3.4 very well. In this post
    http://www.joomlart.com/forums/topic/problem-with-joomla-3-4/

    After following some update plg_system_t3.v2.4.7. I decided to try the upgrade again and to my bad luck the problem continues.

    Can not redeclare modChrome_xhtml () (previously declared in /xxxx/templates/system/html/modules.php:89) in /xxxx/templates/uber/html/modules.php on line 108

    Please look at the access given site and see if it is not another problem that is affecting.

    phong nam Friend
    #564769

    Hi there,

    I just removed function mod_Chrome_xhtml in module.php

    <?php
    /**
    *------------------------------------------------------------------------------
    * @package T3 Framework for Joomla!
    *------------------------------------------------------------------------------
    * @copyright Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
    * @license GNU General Public License version 2 or later; see LICENSE.txt
    * @authors JoomlArt, JoomlaBamboo, (contribute to this project at github
    * & Google group to become co-author)
    * @google group: https://groups.google.com/forum/#!forum/t3fw
    * @link: http://t3-framework.org
    *------------------------------------------------------------------------------
    */

    defined('_JEXEC') or die('Restricted access');

    /**
    * This is a file to add template specific chrome to module rendering. To use it you would
    * set the style attribute for the given module(s) include in your template to use the style
    * for each given modChrome function.
    *
    * eg. To render a module mod_test in the sliders style, you would use the following include:
    * <jdoc:include type="module" name="test" style="slider" />
    *
    * This gives template designers ultimate control over how modules are rendered.
    *
    * NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
    * three arguments.
    */

    /*
    * Default Module Chrome that has semantic markup and has best SEO support
    */
    function modChrome_T3Xhtml($module, &$params, &$attribs)
    {
    $badge = preg_match ('/badge/', $params->get('moduleclass_sfx'))? '<span class="badge"> </span>' : '';
    $moduleTag = htmlspecialchars($params->get('module_tag', 'div'));
    $headerTag = htmlspecialchars($params->get('header_tag', 'h3'));
    $headerClass = $params->get('header_class');
    $bootstrapSize = $params->get('bootstrap_size');
    $moduleClass = !empty($bootstrapSize) ? ' col-sm-' . (int) $bootstrapSize . '' : '';
    $moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));

    if (!empty ($module->content)) {
    $html = "<{$moduleTag} class="t3-module module{$moduleClassSfx} {$moduleClass}" id="Mod{$module->id}">" .
    "<div class="module-inner">" . $badge;

    if ($module->showtitle != 0) {
    $html .= "<{$headerTag} class="module-title {$headerClass}"><span>{$module->title}</span></{$headerTag}>";
    }

    $html .= "<div class="module-ct">{$module->content}</div></div></{$moduleTag}>";

    echo $html;
    }
    }

    function modChrome_T3section($module, &$params, &$attribs)
    {
    $badge = preg_match ('/badge/', $params->get('moduleclass_sfx'))? '<span class="badge"> </span>' : '';
    $moduleTag = htmlspecialchars($params->get('module_tag', 'div'));
    $headerTag = htmlspecialchars($params->get('header_tag', 'h3'));
    $headerClass = $params->get('header_class');
    $bootstrapSize = $params->get('bootstrap_size');
    $moduleClass = !empty($bootstrapSize) ? ' col-sm-' . (int) $bootstrapSize . '' : '';
    $moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));
    $moduleIntro = $params->get('module-intro');
    $bgImage = $params->get('module-background');
    $bgImageSize = $params->get('module-background-size');
    $bgImagePo = $params->get('module-background-position','center center');
    $moduleBg = $bgImage ? 'style="background-image: url(' . JUri::base(true) . '/' . $bgImage . '); background-repeat: no-repeat; background-position: '.$bgImagePo.'; background-size: '.$bgImageSize.'"' : '';

    if (!empty ($module->content)) {
    $html = "<{$moduleTag} class="section{$moduleClassSfx} {$moduleClass}" id="section-{$module->id}" " . $moduleBg . ">" .
    "" . $badge;

    $html .= "<div class="section-ct">{$module->content}</div></{$moduleTag}>";

    echo $html;
    }
    }

    // function modChrome_xhtml($module, &$params, &$attribs)
    // {
    // $badge = preg_match ('/badge/', $params->get('moduleclass_sfx'))? '<span class="badge"> </span>' : '';
    // $moduleTag = htmlspecialchars($params->get('module_tag', 'div'));
    // $headerTag = htmlspecialchars($params->get('header_tag', 'h3'));
    // $headerClass = $params->get('header_class');
    // $bootstrapSize = $params->get('bootstrap_size');
    // $moduleClass = !empty($bootstrapSize) ? ' col-sm-' . (int) $bootstrapSize . '' : '';
    // $moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));
    // $moduleIntro = $params->get('module-intro');
    // $bgImage = $params->get('module-background');
    // $bgImageSize = $params->get('module-background-size');
    // $bgImagePo = $params->get('module-background-position','center center');
    // $moduleBg = $bgImage ? 'style="background-image: url(' . JUri::base(true) . '/' . $bgImage . '); background-repeat: no-repeat; background-position: '.$bgImagePo.'; background-size: '.$bgImageSize.'"' : '';

    // if (!empty ($module->content)) {
    // $html = "<{$moduleTag} class="section{$moduleClassSfx} {$moduleClass}" id="section-{$module->id}" " . $moduleBg . ">" .
    // "" . $badge;

    // $html .= "<div class="section-ct">{$module->content}</div></{$moduleTag}>";

    // echo $html;
    // }
    // }

    function modChrome_t3tabs($module, $params, $attribs)
    {
    $area = isset($attribs['id']) ? (int) $attribs['id'] :'1';
    $area = 'area-'.$area;

    static $modulecount;
    static $modules;

    if ($modulecount < 1) {
    $modulecount = count(JModuleHelper::getModules($attribs['name']));
    $modules = array();
    }

    if ($modulecount == 1) {
    $temp = new stdClass;
    $temp->content = $module->content;
    $temp->title = $module->title;
    $temp->params = $module->params;
    $temp->id = $module->id;
    $modules[] = $temp;

    // list of moduletitles
    echo '<ul class="nav nav-tabs" id="tab'.$temp->id .'">';

    foreach($modules as $rendermodule) {
    echo '<li><a data-toggle="tab" href="#module-'.$rendermodule->id.'" >'.$rendermodule->title.'</a></li>';
    }
    echo '</ul>';
    echo '<div class="tab-content">';
    $counter = 0;
    // modulecontent
    foreach($modules as $rendermodule) {
    $counter ++;

    echo '<div class="tab-pane fade in" id="module-'.$rendermodule->id.'">';
    echo $rendermodule->content;

    echo '</div>';
    }
    echo '</div>';
    echo '<script type="text/javascript">';
    echo 'jQuery(document).ready(function(){';
    echo 'jQuery("#tab'.$temp->id.' a:first").tab("show")';
    echo '});';
    echo '</script>';
    $modulecount--;

    } else {
    $temp = new stdClass;
    $temp->content = $module->content;
    $temp->params = $module->params;
    $temp->title = $module->title;
    $temp->id = $module->id;
    $modules[] = $temp;
    $modulecount--;
    }
    }

    function modChrome_t3slider($module, &$params, &$attribs)
    {
    $badge = preg_match ('/badge/', $params->get('moduleclass_sfx'))?"<span class="badge"> </span>n":"";
    $headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
    ?>

    <div class="moduleslide-<?php echo $module->id ?> collapse-trigger collapsed" data-toggle="collapse" data-target="#slidecontent-<?php echo $module->id ?>">
    <h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
    </div>

    <div id="slidecontent-<?php echo $module->id ?>" class="collapse-<?php echo $module->id ?> in"><?php echo $module->content; ?></div>

    <script type="text/javascript">;
    jQuery(document).ready(function(){;
    jQuery(".collapse-<?php echo $module->id ?>").collapse({toggle: 1});
    });
    </script>

    <?php
    }

    function modChrome_t3modal($module, &$params, &$attribs)
    {

    $headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;

    if (!empty ($module->content)) : ?>

    <div class="moduletable <?php echo $params->get('moduleclass_sfx'); ?> modalmodule">
    <div class="t3-module-title">
    <a href="#module<?php echo $module->id ?>" role="button" class="btn" data-toggle="modal">
    <h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
    </a>
    </div>
    <div id="module<?php echo $module->id ?>" class="modal hide fade" aria-hidden="true">
    <div class="modal-header">
    <h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

    </div>
    <div class="t3-module-body">
    <?php echo $module->content; ?>
    </div>
    </div>
    </div>

    <?php endif;
    }

    function modChrome_popover($module, &$params, &$attribs)
    {
    $position = preg_match ('/left/', $params->get('moduleclass_sfx'))?"":"";
    $headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;

    if (!empty ($module->content)) : ?>
    <div class="moduletable <?php echo $params->get('moduleclass_sfx'); ?> popovermodule">
    <a id="popover<?php echo $module->id ?>" href="#" rel="popover" data-placement="right" class="btn">
    <h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
    </a>
    <div id="popover_content_wrapper-<?php echo $module->id ?>" style="display: none">
    <div><?php echo $module->content; ?></div>
    </div>

    <script type="text/javascript">;
    jQuery(document).ready(function(){

    jQuery("#popover<?php echo $module->id ?>").popover({
    html: true,
    content: function() {
    return jQuery('#popover_content_wrapper-<?php echo $module->id ?>').html();
    }
    }).click(function(e) {
    e.preventDefault();
    });
    });
    </script>
    </div>
    <?php endif;
    }

    Now you can access your tpl via admin and front-end now. Please help me recheck this case.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  phong nam 9 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum