<HTML ><HEAD ><TITLE >Creating blocks</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP-Nuke: Management and Programming" HREF="book1.htm"><LINK REL="PREVIOUS" TITLE="Theme construction: the rules to follow " HREF="x1728.htm"><LINK REL="NEXT" TITLE="How to create a new block" HREF="x1801.htm"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP-Nuke: Management and Programming</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x1728.htm" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x1801.htm" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="BLOCKS" ></A >Chapter 8. Creating blocks</H1 ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="c1745.htm#BLOCK-TYPES" >The characteristics of the various types of blocks</A ></DT ><DT ><A HREF="x1801.htm" >How to create a new block</A ></DT ></DL ></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="BLOCK-TYPES" ></A >The characteristics of the various types of blocks</H1 ><P >There are 3 different types of PHP-Nuke blocks<A NAME="AEN1750" ></A >:</P ><P ></P ><UL ><LI ><P >RSS/RDF: They capture news that's available from other sites in standard reading format, i.e. text (For example the site <A HREF="www.spaghettibrain.com" TARGET="_top" >spaghettibrain</A > has a lot of news that are at other sites' disposal).</P ></LI ><LI ><P >Blocks of contents: blocks in which we insert simple text or HTML text that will be then displayed inside the block (See following example)</P ></LI ><LI ><P >Blocks of files: They are PHP scripts that execute fixed commands (see <A HREF="x1801.htm" >the Section called <I >How to create a new block</I ></A >)</P ></LI ></UL ><P >In this paragraph we will see a simple example of how to insert the links and the text in a text block. If you already know a little HTML there is no point in following this example.</P ><P >We suppose you want to insert a block with text and a link to 3 different sites:</P ><P >The Webmaster who wrote this book manages the following sites:</P ><P ></P ><UL ><LI ><P ><A HREF="http://www.spaghettibrain.com" TARGET="_top" >spaghettibrain.com</A ></P ></LI ><LI ><P ><A HREF="http://www.spaghettiopen.com" TARGET="_top" >spaghettiopen.com</A ></P ></LI ><LI ><P ><A HREF="http://www.spaghettipython.com" TARGET="_top" >spaghettipython.com</A ></P ></LI ></UL ><P >The text will be formatted in this way in order to be inserted in the block (see <A HREF="c1745.htm#FIG-BLOCK-EXAMPLE" >Figure 8-1</A >):</P ><PRE CLASS="SCREEN" ><B> webmaster </b> who writes this book manages the following sites: <b ><br> <a href="http://www.spaghettibrain.com">spaghettibrain.com</a> <a href ="http://www.claudioerba.com">claudioerba.com</a></PRE ><P ><DIV CLASS="FIGURE" ><A NAME="FIG-BLOCK-EXAMPLE" ></A ><P ><B >Figure 8-1. Block example </B ></P ><DIV CLASS="MEDIAOBJECT" ><P ><IMG SRC="./images/snapshot15.png"><DIV CLASS="CAPTION" ><P >Block example</P ></DIV ></P ></DIV ></DIV ></P ><P >Some Small HTML lessons:</P ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><b></DT ><DD ><P >It is for bold text, it opens a tag. All words that we write after this tag will be bold until </B> (which closes the tag).</P ></DD ><DT ><br></DT ><DD ><P >It is for a page break, it does not need to be closed.</P ></DD ><DT ><ahref="http://siteyouwant.com">SiteName</a></DT ><DD ><P >is used to open the http://siteyouwant.com.</P ></DD ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="x1728.htm" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.htm" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x1801.htm" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Theme construction: the rules to follow</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >How to create a new block</TD ></TR ></TABLE ></DIV ></BODY ></HTML >