惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
博客园 - 司徒正美
美团技术团队
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Troy Hunt's Blog
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
B
Blog
NISL@THU
NISL@THU
月光博客
月光博客
博客园 - 【当耐特】
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
腾讯CDC
L
Lohrmann on Cybersecurity
The Cloudflare Blog
L
LINUX DO - 最新话题
S
Security @ Cisco Blogs
S
Secure Thoughts
Spread Privacy
Spread Privacy
有赞技术团队
有赞技术团队
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
H
Hacker News: Front Page
S
SegmentFault 最新的问题
Schneier on Security
Schneier on Security
aimingoo的专栏
aimingoo的专栏
P
Privacy & Cybersecurity Law Blog
博客园 - 三生石上(FineUI控件)
Forbes - Security
Forbes - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
InfoQ
T
Tailwind CSS Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
GRAHAM CLULEY
W
WeLiveSecurity
小众软件
小众软件
Recorded Future
Recorded Future
Cyberwarzone
Cyberwarzone
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

博客园 - xxp

翻译:Android程序开发入门 php,mysql下中文编码解决方案 asp.net中使用ajax中的三种方式 翻译:xoops搜索功能的使用 发布新软件:史上最轻量级的ORM--EasyDBOperation XOOPS模块开发快速入门中文翻译--索引 XOOPS模块开发快速入门中文翻译(十) XOOPS模块开发快速入门中文翻译(九) XOOPS模块开发快速入门中文翻译(八) XOOPS模块开发快速入门中文翻译(七) XOOPS模块开发快速入门中文翻译(六) XOOPS模块开发快速入门中文翻译(五) XOOPS模块开发快速入门中文翻译(四) XOOPS模块开发快速入门中文翻译(三) XOOPS模块开发快速入门中文翻译(二) 简单的网页内容采集器(C#) C#网络编程学习笔记1 100%男性倾向? 55 为什么? 学习XOOPS的记录
XOOPS模块开发快速入门中文翻译(一)
xxp · 2008-04-17 · via 博客园 - xxp

  由于这两天一直研究XOOPS的模块,所以找到了这篇很好的模块开发快速入门。
看了以后,就兴致勃勃的来开发模块了,可是开发的过程中遇到一些问题。
应该是我看的太快了,要学而时习之啊。因此翻译在这里。
==============
作者:Surance Yin
邮箱:Suranceyin@yahoo.com.cn
主页:http://www.fltek.com.cn
=================

建立一个简单的模块

索引

  1. 模块的基本内容
  2. 建立清单
  3. 建立Mysql表
  4. 使用表单和数据库
  5. 显示数据库数据

此快速入门教你如何建立一个简单的模块.

第一步:下载右边的空白模块。.


Tutorial module
tutorial

模块的基本内容.

打开空白的模块,你会看到2php文件,一个images文件夹,里面有一个图片――这就是一个模块的开始。用一个php编辑器打开 xoops_version.php. 可以使用象dreamweaver等所见即所得的编辑器,也可以用 php Designer Maguma Open Studio (全部是免费的).

<?php
// 快速启动模块
// kaotik 发表

$modversion['name'] = "Tutorial";
$modversion['version'] = 1.00;
$modversion['description'] = "This is a tutorial module to teach how to build a simple module";
$modversion['author'] = "KaotiK";
$modversion['credits'] = "KaotiK";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "images/tutorial.png";
$modversion['dirname'] = "tutorial";

// Admin
$modversion['hasAdmin'] = 0;

// Menu
$modversion['hasMain'] = 1;
?>

好,来一步一步的来看以上的代码.

<?php
// Tutorial Module
// Created by kaotik

此处讲解php的起点,略

$modversion['name'] = "Tutorial";
$modversion['version'] = 1.00;
$modversion['description'] = "This is a tutorial module to teach how to build a simple module";

这三行的意思是显而易见的。表示这个模块的名称、版本、描述。

$modversion['author'] = "KaotiK";
$modversion['credits'] = "KaotiK";
$modversion['help'] = "";

。Author 和 credits a也是很容易明白的.帮助 (如果用的话,当然这个模块里面不需要)要指向一个文件,比如说help.html help.php

$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "images/tutorial.png";
$modversion['dirname'] = "tutorial";

License 是这个模块遵守的许可.记住,GPL表示你的模块尊数GPL协议。点击here了解更多. Official表示这是否是一个官方的模块。大多数情况下,将它设置为0就可以了。Image表示后台管理页面中这个模块的标志 。

// Admin
$modversion['hasAdmin'] = 0;

// Menu
$modversion['hasMain'] = 1;
?>

hasAdmin=0表示这个模块没有后台管理部分。如果需要将模块在主菜单中显示,将hasMain设置为1,否则就不会在主菜单中显示。如果hasAdmin和hasMain都设置为0,它也会显示在系统管理的“模块”菜单中,从而可以卸载这个模块。