简体   繁体   English

如何使此Joomla模块正常工作?

[英]How to get this Joomla Module to work correctly?

I had to move/copy a site onto a different TLD. 我必须将站点移动/复制到其他TLD。 The only thing I did not manage to get it to work was a module used on the homepage to display the latest news. 我唯一无法使它正常工作的是首页上用于显示最新新闻的模块。

This is how the site should look: http://www.sednagroup.it/ ... and this is how it looks: http://www.sednagroup.ro/ 这是网站的外观: http : //www.sednagroup.it/ ...这是网站的外观: http : //www.sednagroup.ro/

That sidebar with the image and excerpt. 带有图像和摘录的侧边栏。 I can't get it to work. 我无法正常工作。 Here's the module if it helps: 如果有帮助,请参见以下模块:

<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<ul class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
<?php foreach ($list as $item) :  ?>
<li class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
    <a href="<?php echo $item->link; ?>" class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
        <?php echo $item->text; ?></a>
</li>
<?php endforeach; ?>
</ul>

How did you move or copy it? 您如何移动或复制它?

The new site ( .ro ) is showing the expected output from the code, ie the title of the article wrapped in a link to the article — in fact in looks like the standard module that ships with Joomla! 新站点( .ro )显示了代码的预期输出,即,包装在文章链接中的文章标题-实际上看起来像Joomla附带的标准模块! 1.5.x. 1.5.x (I'll assume 1.5 as you haven't specified your Joomla! version). (由于您尚未指定Joomla!版本,因此我假设为1.5)。

The original site ( .it ) is showing additional content, probably the content before the " Read More " (if one exists). 原始站点( .it )正在显示其他内容,可能是“ 更多内容”之前的内容(如果存在)。

Which probably means that a template module override for the module has been created or someone has changed the core module files ( bad idea by the way ). 这可能意味着已经为模块创建了模板模块替代 ,或者有人更改了核心模块文件( 顺便说一句好主意 )。 I would start by: 我将从以下内容开始:

  1. Looking for override files in the template/yourtemplate/ directory template/yourtemplate/目录中寻找替代文件
  2. If you can't find an override for mod_latestnews compare the .it modules/mod_latestnews/ with the same directory on .ro 如果找不到mod_latestnews的替代, mod_latestnews .it modules/mod_latestnews/.ro上的相同目录进行比较

Finally if you do find that core files have been hacked may I suggested that you actually duplicate the mod_latestnews and rename it to something like mod_latestnews_extended rather than hacking the core in your .ro site. 最后,如果您确实发现核心文件已被黑客入侵,那么我是否建议您实际上复制mod_latestnews并将其重命名为类似mod_latestnews_extended类的mod_latestnews_extended而不是在您的.ro网站中入侵内核。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM