PHP-Nuke Blocks System
======================
Since PHP-Nuke 5.1 you can add new blocks by simply copying the blocks
files into its directory /blocks/.
Please read this doc carefully and remember that this system, as the whole
PHP-Nuke comes without any warranty and all you do from here is under
your own responsability and risk. Always remember to backup your
database and all your files before doing anything.
====================================
1.- Introduction to Use Block Files
====================================
We start on the "blocks" directory where you can add or delete all the
blocks' files you want.
The filenames under /blocks/ dir have two rules to work properly:
a) All spaces are filled with "_", so if you have a block called for example
Quote of the Day, your filename need to be: block-Quote_of_the_Day.php
Note the "block-" at the begining of the filename and the ".php" extension,
both are needed in order to properly add a block from the administration.
b) All blocks needs to return a variable with the content called $content,
you can see the Sample Block included.
All files in this directory that start with "block-" and have the .php extension
will be included in the selection form in the administration interfase, otherwise
you will not see anything.
To add the new block, go to administration interfase and select your new block
from the "Filename" field in the Blocks section.
If you don't write a Title for your block, by default the system will get the
title from the filename stripping the "_" characters and converting it into spaces.
If you created a block and then you delete the file, the system automaticaly will
show an error message on your block, also if there isn't any content in the $content
variable from your file.
When install a new block please be sure that the blank spaces on the filename
are replaced with "_", for Example: The_Weather. The filename is case sensitive,
this mean that isn't the same the_weather and The_Weather. The "_" character is
replaced automaticaly by a blank space when the block appears in your site. So
"The_Weather" block filename name will be changed to "Web Links". All this is
valid only if you don't set a title for your block when you add it.
Also, please read the block instructions that will be included by the block author
for installation purpouses.
=====================================
2.- Information for Blocks Developers
=====================================
Making a new block with this system is very easy. Developer just need to know
a few rules:
a) On each addon file please remember to add the following code as the first
lines:
if (eregi("block-Sample_Block.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
This is to avoid direct access to the block file, so users only see it in a
block on your site.
b) You can make whatever you want into a block like database queries, include
another file from the block, use HTML code, Forms, PHP code, Java, Javascript,
Perl, Flash, etc.
c) You have limited width space to show the block content. This limit is set by
the blocks width defined in your site's theme, note that if you include a big
image your site will look like something horrible :-P
d) On the Blocks filename do not use blank spaces, instead use the character
"_". For example if you want to create a block called "The Web Ring", the
filename will be "The_Web_Ring".
e) Anything you do in the block you need to return a value. This value will be
stored in a variable named: $content
You can see the Sample Block to have the idea.
Hope that you enjoy this new feature of PHP-Nuke.
=============================================================================
NOTE: To stay under HTML 4.01 Transitional standard is very important that
you substitute all "&" characters in the URLs with "&" tag. So, for
example, the URL:
<a href="modules.php?op=modload&name=FAQ&file=index">
need to be written:
<a href="modules.php?op=modload&name=FAQ&file=index">
and do not use FONT or LI tags (for example) let the CSS do this for you,
without this, your pages will not validate as HTML 4.01 compatible.
=============================================================================
Have fun now!
没有合适的资源?快使用搜索试试~ 我知道了~
整站程序自由的Linux(LinuxOpe.com)全站程序-linuxope.com.zip
共704个文件
gif:437个
php:174个
html:34个
需积分: 1 0 下载量 118 浏览量
2023-07-30
23:42:23
上传
评论
收藏 1.56MB ZIP 举报
温馨提示
整站程序自由的Linux(LinuxOpe.com)全站程序-linuxope.com.zip
资源推荐
资源详情
资源评论
收起资源包目录
整站程序自由的Linux(LinuxOpe.com)全站程序-linuxope.com.zip (704个子文件)
index.php.bak 3KB
style3.css 3KB
style.css 3KB
style2.css 3KB
style.css 641B
zs.css 598B
zs.css 598B
img.css 0B
Thailand.gif 141KB
09.gif 11KB
36.gif 10KB
33.gif 10KB
35.gif 10KB
34.gif 10KB
03.gif 9KB
17.gif 9KB
19.gif 9KB
38.gif 9KB
22.gif 9KB
12.gif 9KB
15.gif 9KB
05.gif 9KB
37.gif 8KB
41.gif 8KB
07.gif 7KB
29.gif 7KB
39.gif 7KB
13.gif 7KB
44.gif 7KB
43.gif 7KB
42.gif 7KB
40.gif 7KB
usephp.gif 7KB
06.gif 6KB
01.gif 6KB
31.gif 6KB
25.gif 6KB
27.gif 6KB
16.gif 6KB
30.gif 6KB
11.gif 6KB
08.gif 6KB
02.gif 6KB
45.gif 6KB
20.gif 5KB
23.gif 5KB
28.gif 5KB
21.gif 5KB
14.gif 5KB
26.gif 5KB
10.gif 5KB
24.gif 5KB
32.gif 5KB
04.gif 5KB
down-logo.gif 5KB
18.gif 5KB
money.gif 5KB
cnphpBB.gif 5KB
blank.gif 5KB
6.gif 4KB
7.gif 3KB
ephem.gif 3KB
wherebisdu.gif 3KB
newpoll.gif 3KB
8.gif 3KB
newsletter.gif 3KB
logo.gif 3KB
4.gif 3KB
2.gif 3KB
referer.gif 3KB
links.gif 3KB
faq.gif 3KB
topicsman.gif 3KB
submissions.gif 3KB
forum.gif 3KB
9.gif 3KB
ephem.gif 2KB
employer.gif 2KB
content.gif 2KB
encyclopedia.gif 2KB
users.gif 2KB
messages.gif 2KB
topics.gif 2KB
banners.gif 2KB
optimize.gif 2KB
authors.gif 2KB
search.gif 2KB
modules.gif 2KB
blocks.gif 2KB
stories.gif 2KB
jobseeker.gif 2KB
5.gif 2KB
postnew.gif 2KB
doinf.gif 2KB
reviews.gif 2KB
unionwit_logo.gif 2KB
download.gif 2KB
exit.gif 2KB
friendslist.gif 2KB
backup.gif 2KB
共 704 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
scjrw
- 粉丝: 12
- 资源: 155
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功