你还未登陆请点这里 登陆
你还未注册请点这里 注册
成为会员你将享受更多丰富内容...

现在时间是:
 加入到收藏夹
 设为首页

高级搜索

Theme制作 : XOOPS 2.0x上区块复制
作者 ffxk 于 2007年02月06日 23:16:42 (5880 次阅读)

这是照dqflyer所说的教程写的。
来源:http://xoops.org.cn/modules/newbb/viewtopic.php?topic_id=1952

大家都知道,xoops 2.0X系列现在还可以设计区块复制功能,就是一个区块重复使用的效果,那让我们来看基本怎么hack:
我做了测试,是对NEWS模块的,那我们就以news模块事例来说:
打开NEWS模块目录下的xoops_version.php文件,
查找到,Blocks区域;可以看到这些:

$modversion['blocks'][1]['file'] = "news_topics.php";
$modversion['blocks'][1]['name'] = _MI_NEWS_BNAME1;
$modversion['blocks'][1]['description'] = "Shows news topics";
$modversion['blocks'][1]['show_func'] = "b_news_topics_show";
$modversion['blocks'][1]['template'] = 'news_block_topics.html';

$modversion['blocks'][2]['file'] = "news_bigstory.php";
$modversion['blocks'][2]['name'] = _MI_NEWS_BNAME3;
$modversion['blocks'][2]['description'] = "Shows most read story of the day";
$modversion['blocks'][2]['show_func'] = "b_news_bigstory_show";
$modversion['blocks'][2]['template'] = 'news_block_bigstory.html';

$modversion['blocks'][3]['file'] = "news_top.php";
$modversion['blocks'][3]['name'] = _MI_NEWS_BNAME4;
$modversion['blocks'][3]['description'] = "Shows top read news articles";
$modversion['blocks'][3]['show_func'] = "b_news_top_show";
$modversion['blocks'][3]['edit_func'] = "b_news_top_edit";
$modversion['blocks'][3]['options'] = "counter|10|25|0|0|0|0||1||||||";
$modversion['blocks'][3]['template'] = 'news_block_top.html';

$modversion['blocks'][4]['file'] = "news_top.php";
$modversion['blocks'][4]['name'] = _MI_NEWS_BNAME5;
$modversion['blocks'][4]['description'] = "Shows recent articles";
$modversion['blocks'][4]['show_func'] = "b_news_top_show";
$modversion['blocks'][4]['edit_func'] = "b_news_top_edit";
$modversion['blocks'][4]['options'] = "published|10|25|0|0|0|0||1||||||";
$modversion['blocks'][4]['template'] = 'news_block_top.html';

$modversion['blocks'][5]['file'] = "news_moderate.php";
$modversion['blocks'][5]['name'] = _MI_NEWS_BNAME6;
$modversion['blocks'][5]['description'] = "Shows a block to moderate articles";
$modversion['blocks'][5]['show_func'] = "b_news_topics_moderate";
$modversion['blocks'][5]['template'] = 'news_block_moderate.html';

$modversion['blocks'][6]['file'] = "news_topicsnav.php";
$modversion['blocks'][6]['name'] = _MI_NEWS_BNAME7;
$modversion['blocks'][6]['description'] = "Shows a block to navigate topics";
$modversion['blocks'][6]['show_func'] = "b_news_topicsnav_show";
$modversion['blocks'][6]['template'] = 'news_block_topicnav.html';
$modversion['blocks'][6]['options'] = "0";
$modversion['blocks'][6]['edit_func'] = "b_news_topicsnav_edit";

$modversion['blocks'][7]['file'] = "news_randomnews.php";
$modversion['blocks'][7]['name'] = _MI_NEWS_BNAME8;
$modversion['blocks'][7]['description'] = "Shows a block where news appears randomly";
$modversion['blocks'][7]['show_func'] = "b_news_randomnews_show";
$modversion['blocks'][7]['template'] = 'news_block_randomnews.html';
$modversion['blocks'][7]['options'] = "published|10|25|0|0";
$modversion['blocks'][7]['edit_func'] = "b_news_randomnews_edit";

我们可以看到编号为"4"的那几行代码,就是最新消息区块定义,如果你要实现多个"最新消息"那就复制这几行代码,添加到编号最大的代码后面。并修改编号:
比如最大的编号是"7"那么我们就在他下面加到码,修改编号为:
$modversion['blocks'][8]['file'] = "news_top.php";
$modversion['blocks'][8]['name'] = _MI_NEWS_BNAME5;
$modversion['blocks'][8]['description'] = "Shows recent articles";
$modversion['blocks'][8]['show_func'] = "b_news_top_show";
$modversion['blocks'][8]['edit_func'] = "b_news_top_edit";
$modversion['blocks'][8]['options'] = "published|10|25|0|0|0|0||1||||||";
$modversion['blocks'][8]['template'] = 'news_block_top.html';

就这样一个"最新消息"区块就复制成功,同理,你想复制其他比如"随机新闻""新闻分类"也是一样的;修改完后覆盖原来文件,去后台更新news模块.
这里是dqflyer举例的一个NEWBB区块复制例子:
http://xoops.org.cn/modules/newbb/viewtopic.php?topic_id=1952
——————————————————————————————
以上已经添加了一个"最新消息"区块,但是我们还要为新区块定义和"最新消息"名字不一样,已区分他归属:
打开,news/language/schinese/modinfo.php
找到:
define('_MI_NEWS_BNAME7','按分类列表');

在其下面增加代码:
define('_MI_NEWS_BNAME8','首页最新消息2');

这里注意那个编号"8"就是对应news/xoops_version.php里的编号"8".

评分: 4.00 (2 票) - 对此新闻评分 -
上一篇 - 下一篇 可打印模式 转发给朋友 创建PDF


其他新闻
2007年10月08日 08:50:00 - 新增xoops 风格8个,现在本站收集风格(theme)总数为469个
2007年09月13日 22:30:00 - XOOPS Theme设计宝典
2007年09月06日 19:46:44 - 新增xoops 风格6个,现在本站收集风格(theme)总数为461个
2007年08月14日 22:21:20 - 删除XOOPS靓站无效链接
2007年08月10日 20:11:47 - 新增xoops 风格2个,现在本站收集风格(theme)总数为455个

 
网友个人意见,不代表本站立场。对于发言内容,由发表者自负责任。

发表者 树状展开
游客
发表日期: 07月15日 10:26  更新: 07月15日 10:26
 Love thias website
I was watching your website and I can say it is perfect cd60de0f4fcad09bd5e582ec342fa947 is also good.
回复

发表者 树状展开
游客
发表日期: 08月02日 01:21  更新: 08月02日 01:21
 Love thias website
I was watching your website and I can say it is perfect 691f92da0bb29356866a346a5445b7a6 is also good.
回复

发表者 树状展开
游客
发表日期: 08月15日 15:39  更新: 08月15日 15:39
 fotos porno de goku
videos porno gratis para ver ahora , porno duro duro , imagenes porno antiguas , porno casero lesbianas , simpson porno hentai , ver videos pono gratis , titulos pelicula porno , porno online org , webs cam porno , festival cine porno , video porno sms , porno lesvianas , naruto en porno , sexo y porno , manga hentay porno , vidio porno grati , pelicula porno mas famosa , dvd porno frances , videos porno totalmente gratis sin sms ,
回复

发表者 树状展开
游客
发表日期: 08月15日 19:36  更新: 08月15日 19:36
 video chicas locas
chicas servicio a domicilio , juegos de chicas sexy , chicos follando chicas , videos de chicas cam , juegos infantiles de vestir chicas , chicas jovencitas videos gratis , videos de chicas en el messenger , chicas latinas para sexo , chicas follando gratis , videochat porno , las chicas gilmore 6潞 temporada , chicas jovenes tetas , sexo xxx , chicas interviu 2005 , chicas amateur playa , grupo de las chicas de diddy , chicas interviu 2004 , fotos gratis de chicas masturbandose , chicas de desnuda ,
回复

发表者 树状展开
游客
发表日期: 08月16日 00:52  更新: 08月16日 00:52
 porno sexo no consentido
busco sexo duro , anuncios sexo maduras , chicas sexo , fotos adulto sexo porno gratis , chicas sexo madrid , ver videos cortos de sexo , libro sexo en nueva york , buscar sexo real , paginas web de sexo gratis , sexo abuelas , mujeres sexo real , relatos sobre sexo , particular busca sexo , youtube escenas de sexo , sexo porno embarazadas , sexo fotos , sexo telef贸nico , sexo en playa , sexo duro con jovencitas ,
回复

本站声明

      本网站的xoops theme来源于网络,由本站整理,出于版权原因,仅提供作者信息或下载信息,概不提供本地下载。

    另本站采用xoops 2.0.16版本,一般而言,theme在2.0.x和2.2.x上可以通用,个别theme需要进行微调方可应用。

在线信息
7人在线 (2人在浏览新闻动态)

会员: 0
游客: 7

更多...