找到文件:source\module\portal\portal_view.php
找到如下代码
- $article['related'] = array();
- if(($relateds = C::t('portal_article_related')->fetch_all_by_aid($aid))) {
- foreach(C::t('portal_article_title')->fetch_all(array_keys($relateds)) as $raid => $value) {
- $value['uri'] = fetch_article_url($value);
- $article['related'][$raid] = $value;
- }
- }
复制代码
修改成
- $article['related'] = array();
- if(($relateds = C::t('portal_article_related')->fetch_all_by_aid($aid))) {
- foreach(C::t('portal_article_title')->fetch_all(array_keys($relateds)) as $raid => $value) {
- $value['uri'] = fetch_article_url($value);
- $article['related'][$raid] = $value;
- }
- shuffle($article['related']);
- }
复制代码
修改完成后,覆盖原文件,即可;
记得修改php文件要用代码编辑器,不要用记事本,如果电脑上没有代码编辑器,推荐下载notepad++ 只有几M大小,功能齐全; |