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!
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
资源推荐
资源详情
资源评论
收起资源包目录
[整站程序]自由的Linux(LinuxOpe.com)全站程序_linuxope.com.rar (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
资源评论
CyMylive.
- 粉丝: 6768
- 资源: 3万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2023-04-06-项目笔记 - 第一百五十四阶段 - 4.4.2.152全局变量的作用域-152 -2024.06.04
- 松哥解协议松哥解协议松哥解协议松哥解协议松哥解协议
- 618节日618节日618节日
- tensorflow-gpu-2.9.1-cp37-cp37m-win-amd64.whl
- tensorflow-gpu-2.9.0-cp37-cp37m-win-amd64.whl
- tensorflow-gpu-2.9.0-cp39-cp39-win-amd64.whl
- lcd daimalcd daima
- 电影领域-推荐算法-个性化内容-观影决策-电影推荐小程序.zip
- 电气控制PLC考试题库
- 如何使用MATLAB简介
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功