用户名 密码 记住我 还未注册?

技术论坛 - 查看所有帖子

XOOPS China 讨论区 > 查看所有帖子 (wyf.scott)

 到底部   前一个主题   下一个主题



回复: 关于内容管理模块的分类相关问题
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
我觉得把这个函数改一下就可以了。
首先不是直接取分类树,而是先判断该分类是否为主分类,如果是,则取该分类及其子类。如果是子类,则获取其父类并取其父类所有子类。
只是这个现在对我来说很有难度,不知道哪位朋友可以帮我实现一下。谢谢!


function [VAR_PREFIX]_category_show($options) { art_define_url_delimiter(); $block = array(); $category_handler =& xoops_getmodulehandler("category"$GLOBALS["artdirname"]); $categories $category_handler->getTree(); $cats_counts $category_handler->getArticleCounts(array_keys($categories)); foreach ($categories as $id => $cat) { $block["categories"][] = array( "cat_id" => $id"cat_title" => $cat["prefix"].$cat["cat_title"], "articles" => @$cats_counts[$id]); } $block["dirname"] = $GLOBALS["artdirname"]; unset($categories$cats_stats); return $block; }

5/26 17:05
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


回复: 关于内容管理模块的分类相关问题
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
会一点,不知道要改哪个文件?

5/26 14:07
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


关于内容管理模块的分类相关问题
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
问题:
我想使用xoops实现与www.shqhgs.com这个网站的分类相同的功能。
点击进入某主分类时,左边的分类区块只显示相应主分类及其子分类。中间则显示该主分类及子分类的所有文章列表。

目前我使用的是article模块,有一个分类区块,当显示该分类时,他总是会显示所有的主分类和子分类,这不是我期望的。

我现在想到一个解决办法就是,进行article模块克隆,每一个article模块我只建立一个主分类和相应子分类。克隆数个模块后则就可以满足我的需求了,但是这样感觉系统很臃肿,而且也很麻烦。不知道有没有xoopser知道是否有其他的模块可以实现我想要的功能?或者知道有相应的解决办法?
感激不尽!

附件:



jpg  1.jpg (105.73 KB)
23203_4ddcdb05f2ac6.jpg 773X414 px

5/25 18:34
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


回复: 焦点模块(spotlight) 1.0 beta 发布
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
如图所示,我安装完spotlight后,在区块管理需没有发现相应的区块,请指教!
环境:xammp1.7 + xoops2.5.0

附件:



jpg  1.jpg (97.48 KB)
23203_4da3c86d1b24b.jpg 943X628 px

4/12 11:35
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


回复: 在本机XP系统+XAMPP上安装出错
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
查看这个贴吧:
http://xoops.org.cn/modules/newbb/vie ... t_id=81814#forumpost81814
主要是因为zend的问题。

3/15 15:50
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


回复: xoops2.5安装异常情况
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
原来如此。谢谢!

3/15 15:48
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


xoops2.5安装异常情况
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
环境:windows xp + xampp1.7.4 + xoops2.50

但是访问的时候老是报下面的错误,在后面页面却又能正常显示。

Strict Standards
Non-static method XoopsLoad::load() should not be called statically in E:xampphtdocsxoopsincludecommon.php on line 49

Strict Standards
Non-static method XoopsLoad::loadCore() should not be called statically in E:xampphtdocsxoopsclassxoopsload.php on line 71

Strict Standards
Non-static method XoopsLoad::loadCoreConfig() should not be called statically in E:xampphtdocsxoopsclassxoopsload.php on line 91

Strict Standards
Non-static method XoopsLoad::load() should not be called statically in E:xampphtdocsxoopsclasspreload.php on line 28

Strict Standards
Non-static method XoopsLoad::loadCore() should not be called statically in E:xampphtdocsxoopsclassxoopsload.php on line 71

Strict Standards
Non-static method XoopsLoad::load() should not be called statically in E:xampphtdocsxoopsclasspreload.php on line 29

Strict Standards
Non-static method XoopsLoad::loadCore() should not be called statically in E:xampphtdocsxoopsclassxoopsload.php on line 71

Strict Standards
Non-static method XoopsPreload::getInstance() should not be called statically in E:xampphtdocsxoopsincludecommon.php on line 50

Strict Standards
Non-static method XoopsCache::read() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclasspreload.php on line 85

Strict Standards
Non-static method XoopsCache::getInstance() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclasscachexoopscache.php on line 263

Strict Standards
Declaration of XoopsCacheFile::write() should be compatible with that of XoopsCacheEngine::write() in E:xampphtdocsxoopsclasscachefile.php on line 308

Strict Standards
Non-static method XoopsLoad::load() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclasscachefile.php on line 110

Strict Standards
Non-static method XoopsLoad::loadCore() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclassxoopsload.php on line 71

Strict Standards
Non-static method XoopsFile::getHandler() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclasscachefile.php on line 111

Strict Standards
Non-static method XoopsFile::load() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclassfilexoopsfile.php on line 108

Strict Standards
Non-static method XoopsLoad::load() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclassfilefile.php on line 105

Strict Standards
Non-static method XoopsFile::getHandler() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclassfilefile.php on line 106

Strict Standards
Non-static method XoopsFile::load() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclassfilexoopsfile.php on line 108

Strict Standards
Non-static method XoopsLists::getFileListAsArray() should not be called staticallyassuming $this from incompatible context in E:xampphtdocsxoopsclasspreload.php on line 89

Strict Standards
Non-static method XoopsLoad::load() should not be called statically in E:xampphtdocsxoopsincludecommon.php on line 60

Strict Standards
Non-static method XoopsLoad::loadCore() should not be called statically in E:xampphtdocsxoopsclassxoopsload.php on line 71

Strict Standards
Non-static method XoopsLoad::load() should not be called statically in E:xampphtdocsxoopsincludecommon.php on line 68

Strict Standards
Non-static method XoopsLoad::loadCore() should not be called statically in E:xampphtdocsxoopsclassxoopsload.php on line 71

Strict Standards
Non-static method XoopsLoad::load() should not be called statically in E:xampphtdocsxoopsincludecommon.php on line 75

Strict Standards
Non-static method XoopsLoad::loadCore() should not be called statically in E:xampphtdocsxoopsclassxoopsload.php on line 71

Strict Standards
Non-static method XoopsLogger::getInstance() should not be called statically in E:xampphtdocsxoopsincludecommon.php on line 76


3/15 14:57
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


关于区块自由布局需要注意的问题[新手]
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
接触xoops时间不长,如果理解有误,欢迎指正。

这两天在摆弄xoops的区块管理,在自由布局区块的时候碰到了一个问题。我把区块显示的代码放在system_homepage.html文件中代码下:

<div class="xo-blockszone x2-secondary" id="xo-page-topcblocks">
    <{foreach 
from=$xoBlocks.page_topcenter item=block}>
      <{if 
$block.id eq 14}>
        <
div class="xo-block <{$block.module}>">
            <{if 
$block.title}><div class="xo-blocktitle"><{$block.title}></div><{/if}>
            <
div class="xo-blockcontent"><{$block.content}></div>
        </
div>
      <{/if}>
    <{/foreach}>
</
div>

代码是没问题的,可以正常的把区块ID为14的区块显示在首页上,但是有个前提:ID为14的区块在"区块管理"里面的"是否可见"必需设为"是",否则该代码是不起任何作用的。但是如果将区块设为可见,我们再次调用的话,那么该区块就输出了两次了,不是我们想要的结果。所以还有个地方需要修改。那就是你使用的当前主题对应的theme.html文件,将该区块所在位置屏蔽掉。我的修改如下:

<{if $xoBlocks.page_topleft or $xoBlocks.page_topcenter or $xoBlocks.page_topright}>
    <
div class="xo-blockszone xo-<{$theme_top_order}>pageblocks" id="xo-page-topblocks">
        <{*
includeq file="$theme_name/centerblocks.html" topbottom=top lcr=$theme_top_order|substr:0:1*}>
        <{
includeq file="$theme_name/centerblocks.html" topbottom=top lcr=$theme_top_order|substr:1:1}>
        <{
includeq file="$theme_name/centerblocks.html" topbottom=top lcr=$theme_top_order|substr:2:1}>
    </
div>
<{/if}>

如此改动之后,就能得到预期的输出了。

个人觉得如果可以直接读取数据库,然后去判断区块ID,将符合条件区块输出就好了,这样就不用管后台的区块设置了,而且也不用屏蔽掉theme.html里的区块相关位置(因为屏蔽后,那个位置所有的区块都不能显示了),这样就更加灵活了。方法肯定是有的,只是我还没撑握,希望知道的朋友不吝赐教。

参考资料:《XOOPS Theme设计宝典》

谢谢

12/23 18:53
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛


回复: XOOPSChina2010年“茶苑分享”主题投票
新进会员
注册日期:
2010/8/27 14:09
来自 深圳
所属群组:
注册会员
帖子: 9
等级: 1; EXP: 86
HP: 0 / 21
MP: 3 / 64
离线
只在北京举行,只能遗憾的错过了

2010/8/27 14:13
工具箱 短消息 Email PDF 书签 打印 举报 回顶部
主题 | 论坛



 回顶部



[高级搜索]