remove duplicated word typos from PHP-Nuke-HOWTO.sgml

This commit is contained in:
Jason Leschnik 2016-10-24 20:51:14 +11:00
parent 1e87649746
commit 833ead0cd3
1 changed files with 14 additions and 14 deletions

View File

@ -648,7 +648,7 @@ to come back. In other browsers such as IE6, the access keys just give focus to
</para><para>PHP-Nuke utilizes as hinge of its own structure the duo <ulink url="http://www.php.net">PHP</ulink>+ <ulink url="http://www.mysql.org">MySQL</ulink>, very often being accompanied by the <ulink url="http://www.apache.org">Apache</ulink> web server.<indexterm><primary>server</primary></indexterm> Many modules have integrated many other languages, such as Javascript,<indexterm><primary>Javascript</primary></indexterm> Java,<indexterm><primary>Java</primary></indexterm> Flash and also even systems that serve, through the portal, sounds and films in streaming mode (Online Radio,<indexterm><primary>Radio</primary></indexterm> TV Online, Images, Files...). From version 6.x onwards, the compatibility has been extended to include other databases as well, in order to extend the user base even more vastly. </para><para>PHP-Nuke is developed with a particular eye to the suggestions of the <ulink url="http://www.w3c.org">W3C</ulink>, in its origin,<indexterm><primary>origin</primary></indexterm> the code is in fact W3C compliant and one has validated both the code and the style sheets.<indexterm><primary>style sheets</primary></indexterm> It is then up to the user who intends to create a portal to adhere to these standards during the modification of the graphics or the intrinsic characteristics of the system.<indexterm><primary>system</primary></indexterm></para><para>The personalisation either of the graphical, or of the programming part has only a single limit, the fantasy and capability of the programmer and web designer.<indexterm><primary>designer</primary></indexterm>The presence of many <application>PHP-Nuke</application> sites similar to each other is due mainly to the lack of time of those who created them or the fear that the phase of personalisation is too difficult on a technical level. In fact, it suffices to let oneself be inspired by the available themes,<indexterm><primary>themes</primary></indexterm> in order to realize how easy it is to sew a new dress to one's portal.<indexterm><primary>portal</primary></indexterm></para><para>Francisco Burzi,<indexterm><primary>Burzi</primary></indexterm> father and mother of PHP-Nuke, describes his creation as follows:</para><blockquote><para>PHP-Nuke is a Web Portal System, storytelling software, News system,<indexterm><primary>system</primary></indexterm> online community or whatever you want to call it. The goal of <application>PHP-Nuke</application> is to have an automated web site to distribute news<indexterm><primary>news</primary></indexterm> and articles with users system.<indexterm><primary>system</primary></indexterm> Each user can submit comments to discuss the articles, just similar to Slashdot and many others. </para><para>Main features include: web based admin,<indexterm><primary>admin</primary></indexterm> surveys, top page, access stats page with counter,<indexterm><primary>counter</primary></indexterm> user customizable box, themes manager for registered users, friendly administration <acronym>GUI</acronym> with graphic topic manager,<indexterm><primary>manager</primary></indexterm> option to edit or delete stories, option to delete comments, moderation system,<indexterm><primary>system</primary></indexterm> Referers page to know who link us, sections manager,<indexterm><primary>manager</primary></indexterm> customizable HTML blocks, user and authors edit, an integrated Banners Ads system,<indexterm><primary>system</primary></indexterm> search engine, backend/headlines generation (RSS/RDF format), and many, many more friendly functions.</para><para>PHP-Nuke is written 100% in <acronym>PHP</acronym> and requires Apache Web server,<indexterm><primary>server</primary></indexterm> <acronym>PHP</acronym> and a SQL (MySQL, mSQL, PostgreSQL, ODBC, ODBC_Adabas,<indexterm><primary>ODBC_Adabas</primary></indexterm> Sybase or Interbase). Support for 25 languages, Yahoo like search engine,<indexterm><primary>engine</primary></indexterm> Comments option in Polls, lot of themes, Ephemerids manager, File Manager, Headlines, download<indexterm><primary>download</primary></indexterm> manager, faq manager, advanced blocks systems, reviews system, newsletter,<indexterm><primary>newsletter</primary></indexterm> categorized articles, multilanguage content management and a lot more.</para></blockquote></sect1>
<sect1 id="history"><title>Short history of PHP-Nuke</title><para>Francisco Burzi,<indexterm><primary>Burzi</primary></indexterm> describes the history of <application>PHP-Nuke</application> as follows:</para><blockquote><para>PHP-Nuke is a free software, released under the <ulink url="http://www.gnu.org/licenses/licenses.html">GNU GPL License</ulink>, version 2.0. <application>PHP-Nuke</application> is the result of many years administrating a news site called <ulink url="http://linuxpreview.org">Linux Preview</ulink>. First, around August 1998, I wrote my own code in <application>Perl</application> called NUKE and used it for about 1 year, then my site grew big, so I needed a more powerfull system and decided to use Slash,<indexterm><primary>Slash</primary></indexterm> the same used in the <ulink url="http://www.slashdot.org">Slashdot</ulink> site. It's good, but you realy need to know <application>Perl</application> to modify it, need too many modules,<indexterm><primary>modules</primary></indexterm> need to load a damn daemon that sucks all your <acronym>CPU</acronym> power. My Pentium III just appeared to be a 386 each minute the daemon made its work.</para><para>Well, then I discovered Thatware,<indexterm><primary>Thatware</primary></indexterm> a good project to have a news site under <acronym>PHP</acronym>.<indexterm><primary>PHP</primary></indexterm> I learned <acronym>PHP</acronym> in less than a week and began modifying it. There are too many mods to mention, it was practicaly a rewrite.<indexterm><primary>rewrite</primary></indexterm> I added some cool stuff, deleted some others and after more than 380 hours<indexterm><primary>hours</primary></indexterm> of hard work in 3 weeks! <application>PHP-Nuke</application> was born.</para><para>On August 17, 2000 I sold LinuxPreview.<indexterm><primary>Preview</primary></indexterm>org to LinuxAlianza.com and now I have all the time to dedicate to the development of <application>PHP-Nuke</application>.</para><para>From January 2001 to January 2002, <application>PHP-Nuke</application> has been financially supported by MandrakeSoft, the folks that made <productname>Mandrake</productname> <productname>Linux</productname>.<indexterm><primary>Linux</primary></indexterm> This gave me and <application>PHP-Nuke</application> a lot of oxygen and made possible a lot of stuff.</para><para>Now, I'm alone with this killer project.<indexterm><primary>project</primary></indexterm> There is a lot of help from the people that use and develop modules and themes.<indexterm><primary>themes</primary></indexterm> Now, <ulink url="http://phpnuke.oeg">phpnuke.org</ulink> is a big site with a lot of users and helpful information for any user around the world. There are also strong users community sites in almost any language you can imagine. Just go to <ulink url="http://phpnuke.oeg">phpnuke.org</ulink> and enjoy this great community! </para></blockquote></sect1>
<sect1 id="communities"><title>The <application>PHP-Nuke</application> Communities</title><para>A careful look is due to the true value of PHP-Nuke, that is the communities<indexterm><primary>communities</primary></indexterm> that you will find all around. Thanks to the voluntary job of these persons, of these sites, <application>PHP-Nuke</application> has become a well-known system and it is always thanks to them that <application>PHP-Nuke</application> is a multilanguage system that supports more than 25 languages. </para><para>Even the modules have been created mostly from developers in external communities and have, in second round, been included in new distributions of <application>PHP-Nuke</application>. </para><para>There are communities out there who are solely devoted to the creation of new graphical themes of PHP-Nuke, to technical support, file mirroring as well as a real lot of multilingual communities that take care of their members informing them in their local language, thus creating new personal ties and more focused projects. </para><itemizedlist><listitem><para><ulink url="http://www.nukeforums.com">Nukeforums.com</ulink>: Technical support to <application>PHP-Nuke</application>.</para></listitem><listitem><para><ulink url="http://www.nukecops.com">Nukecops</ulink>: Official <application>PHP-Nuke</application> development team.</para></listitem><listitem><para><ulink url="http://www.karakas-online.de/forum/phpnuke.html">Karakas-Online <application>PHP-Nuke</application> Forum</ulink>: Chris' <application>PHP-Nuke</application> Forum.<indexterm><primary>Forum</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.nukedownloads.com">Nukedownloads.com</ulink>: File mirror for downloads.<indexterm><primary>ads</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.nukeresources.com">nukeresources.com</ulink>: Downloads<indexterm><primary>ads</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.nukefixes.com">nukefixes.com</ulink>: Fixes for <application>PHP-Nuke</application> bugs.<indexterm><primary>bugs</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.nukesecurity.com">nukesecurity.com</ulink>: <application>PHP-Nuke</application> security.<indexterm><primary>security</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.somara.com">Somara.com</ulink>: Themes and graphics.<indexterm><primary>graphics</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.nukethemes.com">Nukethemes.com</ulink>: Themes and graphics.<indexterm><primary>graphics</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.ecomjunk.com">Ecomjunk.com</ulink>: Addons and modules.<indexterm><primary>modules</primary></indexterm></para></listitem><listitem><para><ulink url="http://www.nukeaddn.com">Nukeaddn.com</ulink>: Addons and modules.<indexterm><primary>modules</primary></indexterm></para></listitem></itemizedlist><para>Communities in Italian language: </para><itemizedlist><listitem><para><ulink url="http://www.spaghettibrain.com">Spaghettibrain.com</ulink></para></listitem><listitem><para><ulink url="http://www.claudiodemarinis.it">Claudiodemarinis.it</ulink></para></listitem><listitem><para><ulink url="http://www.phpnuke.it">PHPnuke.it</ulink></para></listitem><listitem><para><ulink url="http://www.splatt.it">Splatt.it</ulink></para></listitem><listitem><para><ulink url="http://www.nukeitalia.com">Nukeitalia.com</ulink></para></listitem></itemizedlist><para>Thanks to the work of these portals and single persons we have more than 500 different modules and blocks that may be used to personalize our portal,<indexterm><primary>portal</primary></indexterm> in areas varying from the weather (<xref linkend="PHP-Nuke-Meteosat-block">) to e-commerce (<xref linkend="PHP-Nuke-eCommerce-module">), from gallery (<xref linkend="PHP-Nuke-Gallery-module">) to chat realized in flash and videogames in Java,<indexterm><primary>Java</primary></indexterm> all included in the layout of <application>PHP-Nuke</application>. </para></sect1>
<sect1 id="whyphpnuke"><title>Why use <application>PHP-Nuke</application> and not static HTML pages</title><itemizedlist><listitem><para>Because managing large sites with only static HTML pages is dangerous for your health.</para></listitem><listitem><para>Because through the dynamic pages, users can interact (Forum,<indexterm><primary>Forum</primary></indexterm> chat)</para></listitem><listitem><para>Because through the dynamic pages we can offer value added services (restricted areas, various services based on user classification.<indexterm><primary>classification</primary></indexterm>..) </para></listitem><listitem><para>Because the information is more easily catalogued.</para></listitem><listitem><para>Because with a few <acronym>PHP</acronym> pages we recall a lot of information.<indexterm><primary>information</primary></indexterm></para></listitem><listitem><para>Because keeping the contents up-to-date does not demand particular technical expertise and can be managed by anyone (by Davis Batistes).</para></listitem><listitem><para>It is the simplest way to to pull over a complete portal,<indexterm><primary>portal</primary></indexterm> thanks to its open source engine,<indexterm><primary>engine</primary></indexterm> it allows anyone to implement new modules or to modify and to personalize existing modules.<indexterm><primary>modules</primary></indexterm> (by Micione,<indexterm><primary>Micione</primary></indexterm> <ulink url="http://www.vizzani.net">www.vizzani.net</ulink>)</para></listitem><listitem><para>It is very intuitive and easy to learn (by Anonymous)</para></listitem><listitem><para>It is easy to modify by those who intend to personalize the program (By Arus)</para></listitem><listitem><para>It is easy to use by the lesser experts among us.</para></listitem></itemizedlist></sect1>
<sect1 id="whyphpnuke"><title>Why use <application>PHP-Nuke</application> and not static HTML pages</title><itemizedlist><listitem><para>Because managing large sites with only static HTML pages is dangerous for your health.</para></listitem><listitem><para>Because through the dynamic pages, users can interact (Forum,<indexterm><primary>Forum</primary></indexterm> chat)</para></listitem><listitem><para>Because through the dynamic pages we can offer value added services (restricted areas, various services based on user classification.<indexterm><primary>classification</primary></indexterm>..) </para></listitem><listitem><para>Because the information is more easily catalogued.</para></listitem><listitem><para>Because with a few <acronym>PHP</acronym> pages we recall a lot of information.<indexterm><primary>information</primary></indexterm></para></listitem><listitem><para>Because keeping the contents up-to-date does not demand particular technical expertise and can be managed by anyone (by Davis Batistes).</para></listitem><listitem><para>It is the simplest way to pull over a complete portal,<indexterm><primary>portal</primary></indexterm> thanks to its open source engine,<indexterm><primary>engine</primary></indexterm> it allows anyone to implement new modules or to modify and to personalize existing modules.<indexterm><primary>modules</primary></indexterm> (by Micione,<indexterm><primary>Micione</primary></indexterm> <ulink url="http://www.vizzani.net">www.vizzani.net</ulink>)</para></listitem><listitem><para>It is very intuitive and easy to learn (by Anonymous)</para></listitem><listitem><para>It is easy to modify by those who intend to personalize the program (By Arus)</para></listitem><listitem><para>It is easy to use by the lesser experts among us.</para></listitem></itemizedlist></sect1>
<sect1 id="PHP-Nuke-forks"><title>The <application>PHP-Nuke</application> forks</title><para>There are several CMS systems, which are PHPNuke forks;<indexterm><primary>forks</primary></indexterm> among the most famous, we can mention <ulink url="http://www.postnuke.com">Post-Nuke</ulink>, <ulink url="http://sourceforge.net/projects/envolution">Envolution</ulink>, <ulink url="http://sourceforge.net/projects/myphpnuke">MyPHPNuke</ulink> and <ulink url="http://www.xoops.org">Xoops</ulink>.</para><sect2 id="PHP-Nuke-vs-Post-Nuke"><title>PHP-Nuke vs. Post-Nuke</title><para>Post-Nuke is another Content Management System (CMS) similar to <application>PHP-Nuke</application>. Whilst PostNuke is a fork of PHP-Nuke, the entire core of the product has been replaced, with the aim of making it more secure and stable, and able to work in high-volume environments with ease.</para><para>Some of the highlights of PostNuke are, according to its developers (in <ulink url="http://developing.postnukemodules.com">Post-Nuke Modules</ulink>):</para><itemizedlist><listitem><para>Customisation of all aspects of the website's appearance through themes,<indexterm><primary>themes</primary></indexterm> including CSS support.</para></listitem><listitem><para>The ability to specify items as being suitable for either a single or all languages.</para></listitem><listitem><para>The best guarantee of displaying your webpages on all browsers due to HTML<indexterm><primary>HTML</primary></indexterm> 4.01 transitional compliance.<indexterm><primary>compliance</primary></indexterm></para></listitem><listitem><para>A standard API and extensive documentation to allow for easy creation of extended functionality through modules and blocks.</para></listitem></itemizedlist><para>The merits of Post-Nuke, as compared to those of PHP-Nuke, have been subject of controversial discussion among fans of both CMSs. We cannot give an objective opinion, since we are biased towards <application>PHP-Nuke</application>. <inlinemediaobject> <![ %output.print.png; [ <imageobject> <imagedata fileref="./images/icon_wink.png" format="PNG"> </imageobject> ]]> <![ %output.print.pdf; [ <imageobject> <imagedata fileref="icon_wink.pdf" format="PDF" scale="65"> </imageobject> ]]> <![ %output.print.eps; [ <imageobject> <imagedata fileref="./images/icon_wink.eps" format="EPS"> </imageobject> ]]> <![ %output.print.bmp; [ <imageobject> <imagedata fileref="icon_wink.bmp" format="BMP"> </imageobject> ]]> <textobject> <phrase>Inline graphic</phrase> </textobject> </inlinemediaobject> However, we will try to give you an idea:</para>
<para>Even its critics will agree that, for a portal whose purpose is to make information publicly accessible,<indexterm><primary>accessible</primary></indexterm> <application>PHP-Nuke</application> is a very good solution. In comparison to Post-Nuke,<indexterm><primary>Post-Nuke</primary></indexterm> most people will also find that <application>PHP-Nuke</application> has many more modules available. However, some will argue that most of them seem geared toward the average end user and not a business or corporate environment.</para><para>On the plus side, PostNuke has a very detailed strict user permissions system allowing you to limit access to every module and area of your site to a general group or a specific user. The permissions system allows you to create groups and users with special permissions. You can add a user to one or many of these groups to give a variety of complex permissions easily. This is handy if you need moderators, sub admins, and other people helping manage a commercial site and wish to limit admin access. This may make PostNuke more appealing to a professional site - but see the Your Account Tweak module (<xref linkend="NSN-Your-Account-Tweak-module">), the Approve Membership module ( <xref linkend="PHP-Nuke-Approve-Membership-module">), the eCommerce modules (<xref linkend="PHP-Nuke-eCommerce-module">) or the Project Management WorkBoard module (<xref linkend="PHP-Nuke-WorkBoard-module">) before you draw premature conclusions. <inlinemediaobject> <![ %output.print.png; [ <imageobject> <imagedata fileref="./images/icon_wink.png" format="PNG"> </imageobject> ]]> <![ %output.print.pdf; [ <imageobject> <imagedata fileref="icon_wink.pdf" format="PDF" scale="65"> </imageobject> ]]> <![ %output.print.eps; [ <imageobject> <imagedata fileref="./images/icon_wink.eps" format="EPS"> </imageobject> ]]> <![ %output.print.bmp; [ <imageobject> <imagedata fileref="icon_wink.bmp" format="BMP"> </imageobject> ]]> <textobject> <phrase>Inline graphic</phrase> </textobject> </inlinemediaobject> </para>
<para>Here are some PostNuke modules that are popular among business end users:</para><itemizedlist><listitem><para><ulink url="http://pnapi.com">Xanthia Theme Engine</ulink></para></listitem><listitem><para><ulink url="http://pn.arising.net/ce">ContentExpess Content management</ulink></para></listitem><listitem><para><ulink url="http://postnuke.wunderlin.net">Static Content Management</ulink></para></listitem><listitem><para><ulink url="http://postcalendar.tv">PostCalendar</ulink></para></listitem><listitem><para><ulink url="http://www.stutchbury.net">FormExpress Forms Generator</ulink></para></listitem><listitem><para><ulink url="http://smiatek.com">pnAddressBook (Palm Style)</ulink></para></listitem><listitem><para><ulink url="http://www.olos.nl">LDAP</ulink></para></listitem><listitem><para><ulink url="http://www.sitescandinavia.net">NukeOWL</ulink></para></listitem><listitem><para><ulink url="http://www.itsallbutstraw.com">PNphpBB2</ulink></para></listitem></itemizedlist><para>However, PostNuke seems to be caught prisoner of its own development impetus:<indexterm><primary>impetus</primary></indexterm> it changed so fast, so often, and made code break backward compatibility<indexterm><primary>compatibility</primary></indexterm> in newer versions so often, that it became difficult even for seasoned webmasters to follow it. Lack of compatibility even between adjacent versions and rumours on its development being suspended, has robbed the nerve of quite a few people, who then turned back to <application>PHP-Nuke</application> for its great community,<indexterm><primary>community</primary></indexterm> support, continuing, smooth development and vast collection of modules.<indexterm><primary>modules</primary></indexterm> The following quote,<indexterm><primary>quote</primary></indexterm> taken from <ulink url="http://www.nukecops.com/article65.html">History of <application>PHP-Nuke</application> and Post-Nuke</ulink>, reflects this situation:</para><blockquote><para>I spent a month trying to customize Post-Nuke for a client, and then I gave up. It was too hard and the support was non-existent. Although you'll find many people in the community who want to help you, you'll find no one who has experience with the particular version you've got.</para></blockquote><note>
@ -829,7 +829,7 @@ This process only really applies if your <application>PHP-Nuke</application> wil
</important>
<variablelist><varlistentry><term>Permissions:
</term><listitem><para>Each file or directory<footnote><para>directories are just special files in Linux</para></footnote> has 3 groups of permissions associated with it: one set of Read, Write or Execute permissions for the owner (also called &ldquo;user&rdquo; in this context), a group and &quot;others&quot; respectively. The owner in our case should be the user name of your web server.<indexterm><primary>server</primary></indexterm> The group is a user group the web server is a member of. And &ldquo;others&rdquo; are just &ldquo;the rest&rdquo;. </para></listitem></varlistentry></variablelist><para>File permissions are usually grouped together in groups of three, like this: (rwx)(rwx)(rwx). The first group are the user permissions, the second one the group permissions<indexterm><primary>permissions</primary></indexterm> and the third one the permissions for &ldquo;others&rdquo;. A good mnemonic for this grouping is UGO (User,<indexterm><primary>User</primary></indexterm> Group, Others). Inside each permissions group, a certain permission may or may not be present. Thus, the user (owner) of the file will usually have read and write permissions<indexterm><primary>permissions</primary></indexterm> (and execute permission too, if the file is executable), but the group permissions may only allow read access and &ldquo;others&rdquo; may not be allowed to access the file at all, neither for reading, nor for writing or execution.</para><para>If you imagine that the existence of a permission is denoted by a 1, while its absence by a 0, then you end up with a representation like (111)(111)(111), where all permissions are present for all, or (000)(000)(000), where they are absent for all. Of course, any other combination is possible, for example (111)(110)100), which denotes read, write and execute permissions for the user (all 1s are present in the first grouping: (111)), read and write permissions for the group (only the first and second 1s are there in the second grouping (110)) and read permission for others (since only the first 1 is there, while the rest are 0s in the third grouping (100)).</para><para>Writing down a sequence of nine 0s and 1s is not very practical, so one came with the idea to interprete each one of the three groupings as a binary number. A (111) would thus mean a 7, a (110) a 6, a (100) a 4. Taken together, the sequence (111)(110)100) of the example above would be represented by the number 764.<indexterm><primary>764</primary></indexterm> That's compact and widely used.</para><para>Unfortunately, it is also very cryptic,<indexterm><primary>cryptic</primary></indexterm> since most people didn't have much exposure to the binary number system at school, not to mention everyday life. How is one going to understand instructions like &ldquo;set file permissions to 644<indexterm><primary>644</primary></indexterm>&rdquo; then?</para><para>Luckily, there exists an easy mnemonic for this: &ldquo;4,2,1&rdquo;, that is the first 1 counts as a 4, the second as a 2 and the third one as 1 - a 0 is always a 0, by the way, even in the binary system. <inlinemediaobject> <![ %output.print.png; [ <imageobject> <imagedata fileref="./images/icon_wink.png" format="PNG"> </imageobject> ]]> <![ %output.print.pdf; [ <imageobject> <imagedata fileref="icon_wink.pdf" format="PDF" scale="65"> </imageobject> ]]> <![ %output.print.eps; [ <imageobject> <imagedata fileref="./images/icon_wink.eps" format="EPS"> </imageobject> ]]> <![ %output.print.bmp; [ <imageobject> <imagedata fileref="icon_wink.bmp" format="BMP"> </imageobject> ]]> <textobject> <phrase>Inline graphic</phrase> </textobject> </inlinemediaobject> </para>
<para>Whenever you see a 1 in the first position of a permissions triple, you add a 4, whenever you see one in the second, you add a 2 and if you see it in the third, you add 1. You do this for UGO, that is for User,<indexterm><primary>User</primary></indexterm> Group and Others and you end up with a three digit number that represents the permissions of the file.</para><para>Most of the time, however, you will be busy deciphering permissions,<indexterm><primary>permissions</primary></indexterm> rather than formulating them yourself in this cryptic manner. So how do you go about interpreting a permissions representation like 764<indexterm><primary>764</primary></indexterm> that was given to you in a document like the <ulink url="http://www.karakas-online.de/EN-Book/">PHP-Nuke HOWTO</ulink>? </para><para>For this, you will need to develop a &ldquo;feeling&rdquo; of how each of the three numbers (7, 6 and 4 in this example) can be written a a unique sum of 4s, 2s and 1s. For example 7 is 4+2+1, 6 is 4+2 and 4 is just 4. A 4 in the sum represents a 1 in the leftmost position. If a 4 is not present in the sum, the leftmost position is a 0. A 2 in the sum reperesents a 1 in the middle position - if there is no 2 in the sum, you just write a 0 there. Finally, a 1 in the sum represents a 1 in the rightmost position, while if there is no 1 in the sum, you write a 0 there.</para><para>Now if you remember that the leftmost 1 or 0 in a pattern like (111) denotes<indexterm><primary>notes</primary></indexterm> a read permission or the absence or it, a 1 or a 0 in the middle position denotes<indexterm><primary>notes</primary></indexterm> a write permission or its absence and a 1 or 0 in the leftmost position denotes<indexterm><primary>notes</primary></indexterm> an execute permission or its absence, then you can take a permissions represenation like 764 above, see that 7=4+2+1 and realize that it means (111), see that 6=4+2 (or 4+2+0, if you like) and realize that it means (110), finally see that 4=4 (or 4+0+0) and realize that it stands for (100), and you can see that 764 is equivalent to (111)(110)(100), meaning read, write and execute permissions for the user (owner), read and write permissions for the group and only read permissions for others.
<para>Whenever you see a 1 in the first position of a permissions triple, you add a 4, whenever you see one in the second, you add a 2 and if you see it in the third, you add 1. You do this for UGO, that is for User,<indexterm><primary>User</primary></indexterm> Group and Others and you end up with a three digit number that represents the permissions of the file.</para><para>Most of the time, however, you will be busy deciphering permissions,<indexterm><primary>permissions</primary></indexterm> rather than formulating them yourself in this cryptic manner. So how do you go about interpreting a permissions representation like 764<indexterm><primary>764</primary></indexterm> that was given to you in a document like the <ulink url="http://www.karakas-online.de/EN-Book/">PHP-Nuke HOWTO</ulink>? </para><para>For this, you will need to develop a &ldquo;feeling&rdquo; of how each of the three numbers (7, 6 and 4 in this example) can be written as a unique sum of 4s, 2s and 1s. For example 7 is 4+2+1, 6 is 4+2 and 4 is just 4. A 4 in the sum represents a 1 in the leftmost position. If a 4 is not present in the sum, the leftmost position is a 0. A 2 in the sum reperesents a 1 in the middle position - if there is no 2 in the sum, you just write a 0 there. Finally, a 1 in the sum represents a 1 in the rightmost position, while if there is no 1 in the sum, you write a 0 there.</para><para>Now if you remember that the leftmost 1 or 0 in a pattern like (111) denotes<indexterm><primary>notes</primary></indexterm> a read permission or the absence or it, a 1 or a 0 in the middle position denotes<indexterm><primary>notes</primary></indexterm> a write permission or its absence and a 1 or 0 in the leftmost position denotes<indexterm><primary>notes</primary></indexterm> an execute permission or its absence, then you can take a permissions represenation like 764 above, see that 7=4+2+1 and realize that it means (111), see that 6=4+2 (or 4+2+0, if you like) and realize that it means (110), finally see that 4=4 (or 4+0+0) and realize that it stands for (100), and you can see that 764 is equivalent to (111)(110)(100), meaning read, write and execute permissions for the user (owner), read and write permissions for the group and only read permissions for others.
</para><para>Easy after all, isn't it? <inlinemediaobject> <![ %output.print.png; [ <imageobject> <imagedata fileref="./images/icon_wink.png" format="PNG"> </imageobject> ]]> <![ %output.print.pdf; [ <imageobject> <imagedata fileref="icon_wink.pdf" format="PDF" scale="65"> </imageobject> ]]> <![ %output.print.eps; [ <imageobject> <imagedata fileref="./images/icon_wink.eps" format="EPS"> </imageobject> ]]> <![ %output.print.bmp; [ <imageobject> <imagedata fileref="icon_wink.bmp" format="BMP"> </imageobject> ]]> <textobject> <phrase>Inline graphic</phrase> </textobject> </inlinemediaobject> </para>
<para>For more information on permissions,<indexterm><primary>permissions</primary></indexterm> see:</para><itemizedlist><listitem><para><ulink url="http://www.washington.edu/computing/web/publishing/permissions.html">Setting Unix Permissions For Web Pages</ulink></para></listitem><listitem><para><ulink url="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">An Introduction to Unix Permissions</ulink></para></listitem><listitem><para><ulink url="http://www.perlfect.com/articles/chmod.shtml">Understanding <productname>UNIX</productname> permissions and chmod</ulink></para></listitem><listitem><para><ulink url="http://www.nyu.edu/webguide/permissions.html">Tutorial: <productname>UNIX</productname> Permissions</ulink></para></listitem></itemizedlist><para>Setting up permissions on files serves the purpose of having them execute only certain operations (write, execute etc.) when called. Setting them up correctly is important for <application>PHP-Nuke</application> to operate in its full functionality.<indexterm><primary>functionality</primary></indexterm> </para><para>The right permissions for <application>PHP-Nuke</application> are the following (for the base permissions,<indexterm><primary>permissions</primary></indexterm> see <xref linkend="permissions2"> in the context of security): </para><itemizedlist><listitem><para>Files: 644<indexterm><primary>644</primary></indexterm></para></listitem><listitem><para>Directories:<indexterm><primary>Directories</primary></indexterm> 755</para></listitem></itemizedlist><para>Only directories that require upload access (like the forum's avatar folder, if you allow avatar upload) should be set to 777 and files that get data<indexterm><primary>data</primary></indexterm> written to them by the program should be set to 666.<indexterm><primary>666</primary></indexterm> </para><para>With <ulink url="http://www.ftpplanet.com/ftpresources/ftpmain.htm">WS_FTP</ulink> you must select the files or folders on which you want to impose the permission<indexterm><primary>permission</primary></indexterm>s and, with the right mouse key,<indexterm><primary>key</primary></indexterm> to select the option &ldquo;chmod (UNIX)&rdquo; (see <xref linkend="fig-ws-ftp-chmod-1">).</para><para>
<figure id="fig-ws-ftp-chmod-1">
@ -1787,7 +1787,7 @@ A superuser is an administrator with all admin powers. One should call it supera
]]></screen><para>in config.<indexterm><primary>config</primary></indexterm>php for site 1 and </para><screen><![CDATA[$prefix = "nuke2";
]]><![CDATA[$user_prefix = "nuke2";
]]></screen><para>in config.<indexterm><primary>config</primary></indexterm>php for site 2. All other values should stay identical in the config.<indexterm><primary>config</primary></indexterm>php files of both sites.</para></listitem><listitem><para>Edit the nuke.sql file (located under the sql directory of the <application>PHP-Nuke</application> package) for each site. Change every occurence of &ldquo;nuke_&rdquo; to &ldquo;nuke1_&rdquo; for site 1 and to &ldquo;nuke2_&rdquo; for site 2, then proceed with the installation as described in <xref linkend="database-creation">. If you use nukesql.php (<xref linkend="install-PHP-Nuke-nukesql">) for the installation,<indexterm><primary>installation</primary></indexterm> see the tip at the end of this section.</para></listitem></itemizedlist></sect3>
<sect3 id="common-user-base"><title>Different <application>PHP-Nuke</application> sites with the same user base</title><para>There are situations that you might want to share users among your <application>PHP-Nuke</application> sites. For example, if you have a site about cars and another one about car insurance,<indexterm><primary>insurance</primary></indexterm> your users will probably be interested in both. But requiring them to enter two different logins and passwords is not going to make them happy - that's where $user_prefix comes into play.</para><para>The idea behind a separate prefix for the users table in <application>PHP-Nuke</application> is to enable you to keep all other tables separate, but use the same users table across different <application>PHP-Nuke</application> installations.<indexterm><primary>ations</primary></indexterm> By using a different $prefix for each site, but the same $user_prefix for both, your users will require only one login and password - and will be recognized by the second site, while logged in in the first one and vice versa.</para><para>To use the same user base in two separate <application>PHP-Nuke</application> sites, proceed as follows:</para><itemizedlist><listitem><para>Use the same database as descibed in <xref linkend="common-database">.</para></listitem><listitem><para>Use separate $prefix values, but the same $user_prefix for both config.php<indexterm><primary>config.php</primary></indexterm> files, e.g. </para><screen><![CDATA[$prefix = "nuke1";
<sect3 id="common-user-base"><title>Different <application>PHP-Nuke</application> sites with the same user base</title><para>There are situations that you might want to share users among your <application>PHP-Nuke</application> sites. For example, if you have a site about cars and another one about car insurance,<indexterm><primary>insurance</primary></indexterm> your users will probably be interested in both. But requiring them to enter two different logins and passwords is not going to make them happy - that's where $user_prefix comes into play.</para><para>The idea behind a separate prefix for the users table in <application>PHP-Nuke</application> is to enable you to keep all other tables separate, but use the same users table across different <application>PHP-Nuke</application> installations.<indexterm><primary>ations</primary></indexterm> By using a different $prefix for each site, but the same $user_prefix for both, your users will require only one login and password - and will be recognized by the second site, while logged into the first one and vice versa.</para><para>To use the same user base in two separate <application>PHP-Nuke</application> sites, proceed as follows:</para><itemizedlist><listitem><para>Use the same database as descibed in <xref linkend="common-database">.</para></listitem><listitem><para>Use separate $prefix values, but the same $user_prefix for both config.php<indexterm><primary>config.php</primary></indexterm> files, e.g. </para><screen><![CDATA[$prefix = "nuke1";
]]><![CDATA[$user_prefix = "nuke-common";
]]></screen><para>in config.<indexterm><primary>config</primary></indexterm>php for site 1 and </para><screen><![CDATA[$prefix = "nuke2";
]]><![CDATA[$user_prefix = "nuke-common";
@ -3037,7 +3037,7 @@ The counter is incremented only if the "Read more" link has been clicked. The co
</term><listitem><para>It lists the top 10 active elements of our portal:</para><itemizedlist><listitem><para>10 most read articles</para></listitem><listitem><para>10 most commented articles</para></listitem><listitem><para>10 most active categories</para></listitem><listitem><para>10 most read articles in the special sections</para></listitem><listitem><para>10 most voted surveys<indexterm><primary>surveys</primary></indexterm></para></listitem><listitem><para>10 most active authors</para></listitem><listitem><para>10 most read book reviews<indexterm><primary>reviews</primary></indexterm></para></listitem><listitem><para>10most downloaded files</para></listitem><listitem><para>10 most read pages</para></listitem></itemizedlist></listitem></varlistentry><varlistentry><term>Topics:<indexterm><primary>Topics</primary></indexterm>
</term><listitem><para>Lists the main categories of <application>PHP-Nuke</application>. Once we have entered this module,<indexterm><primary>module</primary></indexterm> we will be able, by clicking on the corresponding icon of the topic we are interested in, to carry out a selection of articles and in automatic mode, to see all the articles corresponding to this topic. We are also presented with a small search interface to finish our search<indexterm><primary>search</primary></indexterm> in the chosen context.<indexterm><primary>context</primary></indexterm></para></listitem></varlistentry><varlistentry><term>WebLinks:<indexterm><primary>WebLinks</primary></indexterm>
</term><listitem><para>It is a collection of web links. This module has the exact same functionality as the Download module so there is no need to explain it any more. </para><para>Read <xref linkend="enter-thousands-of-web-links"> if you are looking for a quick way to enter thousands of Web links. Further, in <xref linkend="modifying-php-nuke-module-web-links"> we show how to modify the <application>PHP-Nuke</application> Web Links module.<indexterm><primary>module</primary></indexterm></para></listitem></varlistentry><varlistentry><term>Your&nbsp;Account:
</term><listitem><para>It's the administration console for your &ldquo;User Profile&rdquo; (It only works for registered users), the implemented functions are (see <xref linkend="fig-your-account">):</para><itemizedlist><listitem><para>Change your info:<indexterm><primary>info</primary></indexterm> enables management of your profile by changing your E-mail, Where you're from, AIM, ICQ,<indexterm><primary>ICQ</primary></indexterm> Avatar &amp; Fake E-mail etc...</para></listitem><listitem><para>Change your Home: creates a personalized menu (as a block) for navigation,<indexterm><primary>navigation</primary></indexterm> the user can put in there whatever he wants (tests,<indexterm><primary>tests</primary></indexterm> links, images).</para></listitem><listitem><para>Setup comments:<indexterm><primary>comments</primary></indexterm> Configures the display of comments, assigning display criteria.</para></listitem><listitem><para>Theme selection: Changes the theme of the site, allowing you to choose between all available themes.<indexterm><primary>themes</primary></indexterm></para></listitem><listitem><para>Journal:<indexterm><primary>Journal</primary></indexterm> enables you to write your own diary to be published on the portal. Something like a Weblog in a Weblog,<indexterm><primary>Weblog</primary></indexterm> so to say. ;-)</para></listitem><listitem><para>Webmail:<indexterm><primary>Webmail</primary></indexterm> once configured correctly, this mail application allows you to read all your e-mails from all your e-mail accounts, without the need for any other mail client.</para></listitem><listitem><para>Logout/Exit: It lets us exit from our current user profile,<indexterm><primary>profile</primary></indexterm> cancelling the cookie.<indexterm><primary>cookie</primary></indexterm></para></listitem><listitem><para>My Headlines: Imports into the the user's private area those news in RDF/RSS<indexterm><primary>RSS</primary></indexterm> format that are published by preselected news sources.<indexterm><primary>sources</primary></indexterm> The user can thus set up together his own personalized newspaper.<indexterm><primary>newspaper</primary></indexterm> An even broader news functionality is offered by the My Headlines module<indexterm><primary>module</primary></indexterm> (<xref linkend="PHP-Nuke-My-Headlines-module">), whose functionality you can see in action at Chris' <ulink url="http://www.karakas-online.de/myHeadlines/">News-o-matic</ulink> page.</para></listitem><listitem><para>Broadcast Message: If the subject is aproppriate and the administrator has allowed it in the Preferences of the administration panel (<xref linkend="backend">), we can send messages that will be visible to all users on the home page of the site. It is also possible to disable the function,<indexterm><primary>function</primary></indexterm> so that we don't see messages broadcast by other users.</para></listitem><listitem><para>Your private messages: This box displays the user's private messages.</para></listitem><listitem><para>Last 10 articles: Offers a list of the last 10 articles posted by that user.
</term><listitem><para>It's the administration console for your &ldquo;User Profile&rdquo; (It only works for registered users), the implemented functions are (see <xref linkend="fig-your-account">):</para><itemizedlist><listitem><para>Change your info:<indexterm><primary>info</primary></indexterm> enables management of your profile by changing your E-mail, Where you're from, AIM, ICQ,<indexterm><primary>ICQ</primary></indexterm> Avatar &amp; Fake E-mail etc...</para></listitem><listitem><para>Change your Home: creates a personalized menu (as a block) for navigation,<indexterm><primary>navigation</primary></indexterm> the user can put in there whatever he wants (tests,<indexterm><primary>tests</primary></indexterm> links, images).</para></listitem><listitem><para>Setup comments:<indexterm><primary>comments</primary></indexterm> Configures the display of comments, assigning display criteria.</para></listitem><listitem><para>Theme selection: Changes the theme of the site, allowing you to choose between all available themes.<indexterm><primary>themes</primary></indexterm></para></listitem><listitem><para>Journal:<indexterm><primary>Journal</primary></indexterm> enables you to write your own diary to be published on the portal. Something like a Weblog in a Weblog,<indexterm><primary>Weblog</primary></indexterm> so to say. ;-)</para></listitem><listitem><para>Webmail:<indexterm><primary>Webmail</primary></indexterm> once configured correctly, this mail application allows you to read all your e-mails from all your e-mail accounts, without the need for any other mail client.</para></listitem><listitem><para>Logout/Exit: It lets us exit from our current user profile,<indexterm><primary>profile</primary></indexterm> cancelling the cookie.<indexterm><primary>cookie</primary></indexterm></para></listitem><listitem><para>My Headlines: Imports into the user's private area those news in RDF/RSS<indexterm><primary>RSS</primary></indexterm> format that are published by preselected news sources.<indexterm><primary>sources</primary></indexterm> The user can thus set up together his own personalized newspaper.<indexterm><primary>newspaper</primary></indexterm> An even broader news functionality is offered by the My Headlines module<indexterm><primary>module</primary></indexterm> (<xref linkend="PHP-Nuke-My-Headlines-module">), whose functionality you can see in action at Chris' <ulink url="http://www.karakas-online.de/myHeadlines/">News-o-matic</ulink> page.</para></listitem><listitem><para>Broadcast Message: If the subject is aproppriate and the administrator has allowed it in the Preferences of the administration panel (<xref linkend="backend">), we can send messages that will be visible to all users on the home page of the site. It is also possible to disable the function,<indexterm><primary>function</primary></indexterm> so that we don't see messages broadcast by other users.</para></listitem><listitem><para>Your private messages: This box displays the user's private messages.</para></listitem><listitem><para>Last 10 articles: Offers a list of the last 10 articles posted by that user.
</para></listitem></itemizedlist><para>
<figure id="fig-your-account">
<title>
@ -3152,7 +3152,7 @@ The counter is incremented only if the "Read more" link has been clicked. The co
</term><listitem><para>Starting from version 6.8 of PHP-Nuke, it is possible to acquire News from the <ulink url="http://xdmp.com">XDMP site</ulink>. The News are available in many categories and will be automatically published on your site, once you acquire the service. For this to take place, you will only need to edit the modules/News/xdmp.php file, inserting the login and password you were assigned on acquisition.<indexterm><primary>acquisition</primary></indexterm> You can set up the news categories and the refresh intervalls from the interface offered by modules/News/xdmp.php. An even broader news functionality is offered by the My Headlines module<indexterm><primary>module</primary></indexterm> (<xref linkend="PHP-Nuke-My-Headlines-module">), whose functionality you can see in action at Chris' <ulink url="http://www.karakas-online.de/myHeadlines/index.html">News-o-matic</ulink> page.</para></listitem></varlistentry></variablelist></sect1>
<sect1 id="non-installed-modules"><title>Non-installed modules</title><para>See <xref linkend="PHP-Nuke-add-on-modules"> for some interesting add-on modules for <application>PHP-Nuke</application>.</para></sect1>
<sect1 id="preinstalled-blocks"><title>The preinstalled blocks</title><variablelist><varlistentry><term>Modules:
</term><listitem><para>Lists all active modules.<indexterm><primary>modules</primary></indexterm> In case you are the Administrator, it displays also the inactive modules,<indexterm><primary>modules</primary></indexterm> as wel as those that are hidden. The Modules block is very often used for navigation purposes, see for example <xref linkend="PHP-Nuke-Menu-Builder">, <xref linkend="PHP-Nuke-Treemenu-with-PHP">, <xref linkend="PHP-Nuke-Treemenu-with-Javascript"> and <xref linkend="build-custom-module-blocks">. But is is also possible to use the Content block (see below) to obtain a similar result.</para><para>
</term><listitem><para>Lists all active modules.<indexterm><primary>modules</primary></indexterm> In case you are the Administrator, it displays also the inactive modules,<indexterm><primary>modules</primary></indexterm> as wel as those that are hidden. The Modules block is very often used for navigation purposes, see for example <xref linkend="PHP-Nuke-Menu-Builder">, <xref linkend="PHP-Nuke-Treemenu-with-PHP">, <xref linkend="PHP-Nuke-Treemenu-with-Javascript"> and <xref linkend="build-custom-module-blocks">. But it is also possible to use the Content block (see below) to obtain a similar result.</para><para>
<figure id="fig-modules-block-3">
<title>
The standard Modules block
@ -4495,7 +4495,7 @@ You can only insert terms in an encyclopedia after you have already entered the
</mediaobject>
</figure>
</para><para>Given the length of the administration interface of the phpBB Forum,<indexterm><primary>Forum</primary></indexterm> we will traverse its functions following the order of the menu in the left frame.<indexterm><primary>frame</primary></indexterm></para><variablelist><varlistentry><term>Admin&nbsp;Index:<indexterm><primary>Index</primary></indexterm>
</term><listitem><para>Leads back to the the administration panel of <application>PHP-Nuke</application> (<xref linkend="administration-functions">).</para></listitem></varlistentry><varlistentry><term>Forum&nbsp;Index:<indexterm><primary>Index</primary></indexterm>
</term><listitem><para>Leads back to the administration panel of <application>PHP-Nuke</application> (<xref linkend="administration-functions">).</para></listitem></varlistentry><varlistentry><term>Forum&nbsp;Index:<indexterm><primary>Index</primary></indexterm>
</term><listitem><para>Leads back to the main Forum page.</para></listitem></varlistentry><varlistentry><term>Preview&nbsp;Forum:<indexterm><primary>Forum</primary></indexterm>
</term><listitem><para>Offers a preview of the forum, keeping the left frame with the administration functions in place.</para></listitem></varlistentry><varlistentry><term>Management:
</term><listitem><para>Here you can create the categories that will form the criteria<indexterm><primary>criteria</primary></indexterm> for grouping the forums, old and new ones. It is also possible to change their order inside a category, lock and unlock<indexterm><primary>lock</primary></indexterm> a forum, and configure the pruning function for every forum.<indexterm><primary>forum</primary></indexterm> Pruning is the self-cleaning action that deletes all threads that did not receive a posting in the last N days, N being individually set by the administrator.</para></listitem></varlistentry><varlistentry><term>Pruning:<indexterm><primary>Pruning</primary></indexterm>
@ -8421,7 +8421,7 @@ Bear in mind that, depending on the versions of <application>PHP-Nuke</applicati
]]></screen><para>in the URL box of his browser by hand, thus triggering the &ldquo;operation new_user<indexterm><primary>new_user</primary></indexterm>&rdquo; in <application>PHP-Nuke</application>. By this, it becomes clear that a real solution must at least change the behaviour of <application>PHP-Nuke</application> for the value &ldquo;new_user<indexterm><primary>new_user</primary></indexterm>&rdquo; of the op URL parameter.<indexterm><primary>parameter</primary></indexterm></para><para>Again, instead of chasing links in the code, there is a more elegant solution:</para><para>In modules/Your_Account/index.<indexterm><primary>index</primary></indexterm>php find the lines:</para><screen><![CDATA[case "new_user":
]]><![CDATA[new_user();
]]><![CDATA[break;
]]></screen><para>and replace them with with:</para><screen><![CDATA[case "new_user":
]]></screen><para>and replace them with:</para><screen><![CDATA[case "new_user":
]]><![CDATA[Header("Refresh: 0; url=index.php");
]]><![CDATA[break;
]]></screen><para>This will only disable registration from the Your Account module (more accurately: it will redirect every registration attempt to the main index.<indexterm><primary>index</primary></indexterm>php page).</para><para>To disable it in the Forums too, edit modules/Forums/profile.<indexterm><primary>profile</primary></indexterm>php. Find</para><screen><![CDATA[else if ( $mode == 'editprofile' || $mode == 'register' )
@ -9488,7 +9488,7 @@ If you use a $DB_prefix, make sure it ends in an underscore (_), otherwise it wi
</row>
</tbody>
</tgroup></table></para><para>This happens if, for example, you are installing Help Center Live locally, and the host name for $URL_site is taken from a hosts file and not from DNS.<indexterm><primary>DNS</primary></indexterm> One way to get around this is to change all calls to setcookie() listed in <xref linkend="tab-Help-Center-Live-setcookie"> and take out the last two parameters, $URL_site and $URL_secure, as in the following example:</para><screen><![CDATA[setcookie("Help Center LiveUser", $INFO_username, $time, $URL_dir);
]]></screen><para>After the installation of Help Center Live, you can point your browser the the address you entered for $URL_maindir (http://midas/helpcenter, in our example) and, after a successful login,<indexterm><primary>login</primary></indexterm> you will be presented with the main screen (<xref linkend="fig-help-center-live-main">).</para><para>
]]></screen><para>After the installation of Help Center Live, you can point your browser to the address you entered for $URL_maindir (http://midas/helpcenter, in our example) and, after a successful login,<indexterm><primary>login</primary></indexterm> you will be presented with the main screen (<xref linkend="fig-help-center-live-main">).</para><para>
<figure id="fig-help-center-live-main">
<title>
Help Center Live: Main screen.
@ -10726,7 +10726,7 @@ Most of the work in the method we presented, will revolve around changing link
</para>
</tip>
</sect1>
<sect1 id="include-HTML-file-and-links-in-module-iframe"><title>How to include a HTML file and its links using an iframe in a <application>PHP-Nuke</application> module</title><para>You can also use an iframe to include an external HTML page in your module.<indexterm><primary>module</primary></indexterm> An inline frame (iframe) is a construct which embeds a document into an HTML document so that embedded data is displayed inside a subwindow of the browser's window. This does not mean full inclusion; the two documents are independent, and both them are treated as complete documents, instead of treating one as part of the other (see see <ulink url="http://www.cs.tut.fi/~jkorpela/html/iframe.html">Using inline frames (iframe elements) to embed documents into HTML documents</ulink>).</para><para>Iframes are not supported by all browsers, however they offer a much more comfortable alternative to the solution of <xref linkend="include-HTML-file-and-links-in-module">, since any links of the included HTML page will be shown in the iframe,<indexterm><primary>frame</primary></indexterm> if they are linked with a relative URL.<indexterm><primary>URL</primary></indexterm> To include a HTML file and its links in a <application>PHP-Nuke</application> module,<indexterm><primary>module</primary></indexterm> use the following as the index.<indexterm><primary>index</primary></indexterm>php file of the module (see <ulink url="http://www.nukeforums.com/forums/viewtopic.php?p=58549">Adding Links To The Main Page (Modules)</ulink> and <ulink url="http://www.karakas-online.de/forum/viewtopic.php?t=388">Make <application>PHP-Nuke</application> Use "Frame Like target"</ulink>):</para><screen><![CDATA[<?
<sect1 id="include-HTML-file-and-links-in-module-iframe"><title>How to include a HTML file and its links using an iframe in a <application>PHP-Nuke</application> module</title><para>You can also use an iframe to include an external HTML page in your module.<indexterm><primary>module</primary></indexterm> An inline frame (iframe) is a construct which embeds a document into an HTML document so that embedded data is displayed inside a subwindow of the browser's window. This does not mean full inclusion; the two documents are independent, and both them are treated as complete documents, instead of treating one as part of the other (see <ulink url="http://www.cs.tut.fi/~jkorpela/html/iframe.html">Using inline frames (iframe elements) to embed documents into HTML documents</ulink>).</para><para>Iframes are not supported by all browsers, however they offer a much more comfortable alternative to the solution of <xref linkend="include-HTML-file-and-links-in-module">, since any links of the included HTML page will be shown in the iframe,<indexterm><primary>frame</primary></indexterm> if they are linked with a relative URL.<indexterm><primary>URL</primary></indexterm> To include a HTML file and its links in a <application>PHP-Nuke</application> module,<indexterm><primary>module</primary></indexterm> use the following as the index.<indexterm><primary>index</primary></indexterm>php file of the module (see <ulink url="http://www.nukeforums.com/forums/viewtopic.php?p=58549">Adding Links To The Main Page (Modules)</ulink> and <ulink url="http://www.karakas-online.de/forum/viewtopic.php?t=388">Make <application>PHP-Nuke</application> Use "Frame Like target"</ulink>):</para><screen><![CDATA[<?
]]><![CDATA[
]]><![CDATA[if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
]]><![CDATA[ die ("You can't access this file directly...");
@ -11591,7 +11591,7 @@ It's a good choice to put your config.php file outside the Web Server path, then
]]><![CDATA[ }
]]><![CDATA[ }
]]><![CDATA[}
]]></screen><para>As you see we have modified the life duration of the second cookie from 2592000 (a month) to 7200 seconds (two hours). As you can easily see, we have reduced the action radius of the script kiddie down from one month to two hours.<indexterm><primary>hours</primary></indexterm></para></listitem><listitem><para>A much more effective tag filter is realized through the check_html and filter_text functions in mainfile.php (see <xref linkend="allow-special-HTML-tags">). The admissible tags are defined in in the file config.php in the $AllowableHTML<indexterm><primary>AllowableHTML</primary></indexterm> array, these are valid for the comments,<indexterm><primary>comments</primary></indexterm> the insertion of news and many other user inputs (see <xref linkend="tab-filter-text"> and <xref linkend="tab-check-html"> for all instances of a call to the filter_text and check_html functions respectively).</para></listitem></orderedlist><para>All these actions and a correct configuration of the permissions as illustrated<indexterm><primary>illustrated</primary></indexterm> in <xref linkend="permissions"> and <xref linkend="permissions2">, should guarantee us a good security for our site. It is also important to closely follow the security warnings for <application>PHP-Nuke</application> that are brought up on the various security advisories (see <xref linkend="security-fixes">).</para></sect3>
]]></screen><para>As you see we have modified the life duration of the second cookie from 2592000 (a month) to 7200 seconds (two hours). As you can easily see, we have reduced the action radius of the script kiddie down from one month to two hours.<indexterm><primary>hours</primary></indexterm></para></listitem><listitem><para>A much more effective tag filter is realized through the check_html and filter_text functions in mainfile.php (see <xref linkend="allow-special-HTML-tags">). The admissible tags are defined in the file config.php in the $AllowableHTML<indexterm><primary>AllowableHTML</primary></indexterm> array, these are valid for the comments,<indexterm><primary>comments</primary></indexterm> the insertion of news and many other user inputs (see <xref linkend="tab-filter-text"> and <xref linkend="tab-check-html"> for all instances of a call to the filter_text and check_html functions respectively).</para></listitem></orderedlist><para>All these actions and a correct configuration of the permissions as illustrated<indexterm><primary>illustrated</primary></indexterm> in <xref linkend="permissions"> and <xref linkend="permissions2">, should guarantee us a good security for our site. It is also important to closely follow the security warnings for <application>PHP-Nuke</application> that are brought up on the various security advisories (see <xref linkend="security-fixes">).</para></sect3>
<sect3 id="user-cookie-change-duration"><title>Changing the duration of the user cookie</title><para>If you want to redefine the duration of the <emphasis>user</emphasis> cookie (as opposed to the administrator cookie), you have to edit the file modules/Your_Account/index.php.<indexterm><primary>index.php</primary></indexterm> There, find the function docookie():</para><screen><![CDATA[function docookie($setuid, $setusername, $setpass, $setstorynum, $setumode,
]]><![CDATA[$setuorder, $setthold, $setnoscore, $setublockon, $settheme, $setcommentmax) {
]]><![CDATA[ $info = base64_encode("$setuid:$setusername:$setpass:$setstorynum:$setumode:
@ -11606,7 +11606,7 @@ It's a good choice to put your config.php file outside the Web Server path, then
]]><![CDATA[if ($ip != "66.666.66.6" AND $ip != "55.555.55.5") {
]]><![CDATA[return 0;
]]><![CDATA[}
]]></screen><para>in two places:</para><orderedlist><listitem><para>after after the global line of the is_amdin() function in mainfile.php and</para></listitem><listitem><para>at the begining of the admin.<indexterm><primary>admin</primary></indexterm>php file.</para></listitem></orderedlist><para>Change the &ldquo;66.666.<indexterm><primary>666</primary></indexterm>66.6&rdquo; and &ldquo;55.555.55.5<indexterm><primary>55.555.55.5</primary></indexterm>&rdquo; to the IP addresses you want to block and you are done! See <ulink url="http://www.nukeforums.com/forums/viewtopic.php?t=13987">How to block an IP address in PHP-Nuke</ulink>.</para><para>The more elaborate approach is to create a text file, call it banned.<indexterm><primary>banned</primary></indexterm>txt, containing all the IP addresses you want to ban,<indexterm><primary>ban</primary></indexterm> one address per line. Upload banned.<indexterm><primary>banned</primary></indexterm>txt in the <application>PHP-Nuke</application> root directory on your web server (this is the same directory where also config.<indexterm><primary>config</primary></indexterm>php is located). Then include the following code in the includes/my_header.<indexterm><primary>header</primary></indexterm>php file (the custom HTML header file of PHP-Nuke, see <xref linkend="modifying-php-nuke-html-header">):</para><screen><![CDATA[if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
]]></screen><para>in two places:</para><orderedlist><listitem><para>after the global line of the is_amdin() function in mainfile.php and</para></listitem><listitem><para>at the begining of the admin.<indexterm><primary>admin</primary></indexterm>php file.</para></listitem></orderedlist><para>Change the &ldquo;66.666.<indexterm><primary>666</primary></indexterm>66.6&rdquo; and &ldquo;55.555.55.5<indexterm><primary>55.555.55.5</primary></indexterm>&rdquo; to the IP addresses you want to block and you are done! See <ulink url="http://www.nukeforums.com/forums/viewtopic.php?t=13987">How to block an IP address in PHP-Nuke</ulink>.</para><para>The more elaborate approach is to create a text file, call it banned.<indexterm><primary>banned</primary></indexterm>txt, containing all the IP addresses you want to ban,<indexterm><primary>ban</primary></indexterm> one address per line. Upload banned.<indexterm><primary>banned</primary></indexterm>txt in the <application>PHP-Nuke</application> root directory on your web server (this is the same directory where also config.<indexterm><primary>config</primary></indexterm>php is located). Then include the following code in the includes/my_header.<indexterm><primary>header</primary></indexterm>php file (the custom HTML header file of PHP-Nuke, see <xref linkend="modifying-php-nuke-html-header">):</para><screen><![CDATA[if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
]]><![CDATA[ $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
]]><![CDATA[}
]]><![CDATA[elseif (isset($_SERVER['HTTP_VIA'])) {
@ -12781,7 +12781,7 @@ Thus, you'd better not rely on your ISP when it comes to backups. Do your homewo
]]><![CDATA[
]]><![CDATA[...many other user data follow here
]]><![CDATA[
]]></screen><para>In the above example, only a small part of the structure of the nuke_users<indexterm><primary>nuke_users</primary></indexterm> table is shown for brevity. You will also most probably have more than one user, so that the data part will also be much bigger (we only show the user data for user &ldquo;Anonymous<indexterm><primary>Anonymous</primary></indexterm>&rdquo;).</para><para>We can get a partial restore of the single nuke_users table in three ways:</para><orderedlist><listitem><para>We copy and paste the relevant structure and data parts from our backup<indexterm><primary>backup</primary></indexterm> file into a separate file that we will call partial_backup.<indexterm><primary>backup</primary></indexterm>sql. Then we use phpMyAdmin's &ldquo;SQL query<indexterm><primary>query</primary></indexterm>&rdquo; function (see <xref linkend="phpMyAdmin-navigation-bar-SQL">) to import the partial_backup.<indexterm><primary>backup</primary></indexterm>sql file, just as we do with any other file containing SQL queries.<indexterm><primary>queries</primary></indexterm> We enter the full path to partial_backup.<indexterm><primary>backup</primary></indexterm>sql in the &ldquo;textfile&rdquo; field of <xref linkend="fig-phpmyadmin-sql-query-2"> and click on &ldquo;Go&rdquo;.</para></listitem><listitem><para>We copy and paste the the relevant structure and data parts from our backup<indexterm><primary>backup</primary></indexterm> file into the text area field above the &ldquo;Browse<indexterm><primary>Browse</primary></indexterm>&rdquo; button, then click on &ldquo;Go&rdquo;.</para></listitem><listitem><para>We don't use phpMyAdmin but use the shell command line instead. From the shell promt, we type:</para><screen><![CDATA[mysql -h dbhost -u dbuname -p dbname < partial_backup.sql
]]></screen><para>In the above example, only a small part of the structure of the nuke_users<indexterm><primary>nuke_users</primary></indexterm> table is shown for brevity. You will also most probably have more than one user, so that the data part will also be much bigger (we only show the user data for user &ldquo;Anonymous<indexterm><primary>Anonymous</primary></indexterm>&rdquo;).</para><para>We can get a partial restore of the single nuke_users table in three ways:</para><orderedlist><listitem><para>We copy and paste the relevant structure and data parts from our backup<indexterm><primary>backup</primary></indexterm> file into a separate file that we will call partial_backup.<indexterm><primary>backup</primary></indexterm>sql. Then we use phpMyAdmin's &ldquo;SQL query<indexterm><primary>query</primary></indexterm>&rdquo; function (see <xref linkend="phpMyAdmin-navigation-bar-SQL">) to import the partial_backup.<indexterm><primary>backup</primary></indexterm>sql file, just as we do with any other file containing SQL queries.<indexterm><primary>queries</primary></indexterm> We enter the full path to partial_backup.<indexterm><primary>backup</primary></indexterm>sql in the &ldquo;textfile&rdquo; field of <xref linkend="fig-phpmyadmin-sql-query-2"> and click on &ldquo;Go&rdquo;.</para></listitem><listitem><para>We copy and paste the relevant structure and data parts from our backup<indexterm><primary>backup</primary></indexterm> file into the text area field above the &ldquo;Browse<indexterm><primary>Browse</primary></indexterm>&rdquo; button, then click on &ldquo;Go&rdquo;.</para></listitem><listitem><para>We don't use phpMyAdmin but use the shell command line instead. From the shell promt, we type:</para><screen><![CDATA[mysql -h dbhost -u dbuname -p dbname < partial_backup.sql
]]></screen><para>where dbhost,<indexterm><primary>dbhost</primary></indexterm> dbuname and dbname are exactly the same as in your config.php file(<xref linkend="config-php-file">).</para></listitem></orderedlist></sect2>
<sect2 id="restore-large-backup"><title>How to restore a large backup</title><para>If your backup file is really large (a few megabytes are enough), <acronym>PHP</acronym> will not be able to import it in the usual <acronym>CPU</acronym> time limit of 30 sec. that is set by most ISPs.<indexterm><primary>ISPs</primary></indexterm> The result will be an error and a corrupted or incomplete table. In this case you can proceed as follows:</para><itemizedlist><listitem><para>If you have access to the shell promt, login to your server with SSH and type the following on the shell prompt:</para><screen><![CDATA[mysql -h dbhost -u dbuname -p dbname < partial_backup.sql
]]></screen><para>where dbhost,<indexterm><primary>dbhost</primary></indexterm> dbuname and dbname are exactly the same as in your config.php file(<xref linkend="config-php-file">).</para></listitem><listitem><para>If you don't have shell access,<indexterm><primary>access</primary></indexterm> you can use an interface like MysqlFront (see <xref linkend="mysql-frontend">):</para></listitem></itemizedlist><warning>
@ -14074,7 +14074,7 @@ If your <acronym>PHP</acronym> has some timeout limit set (often 30 sec), you wi
</term><listitem><para>List of users.</para></listitem></varlistentry><varlistentry><term>nuke_words:<indexterm><primary>nuke_words</primary></indexterm>
</term><listitem><para>Words to censure.</para></listitem></varlistentry></variablelist></sect1>
<sect1 id="HTML-syntax"><title>The syntax of HTML code</title><para>HTML is the language that is used to construct web pages. It is somewhat obsolete, as it is going to be replaced by XHTML.<indexterm><primary>XHTML</primary></indexterm> In this section we will have a look at the HTML code we need in order to </para><itemizedlist><listitem><para>format text,</para></listitem><listitem><para>create links, </para></listitem><listitem><para>insert images,<indexterm><primary>images</primary></indexterm></para></listitem><listitem><para>create tables.<indexterm><primary>tables</primary></indexterm></para></listitem></itemizedlist><sect2 id="HTML-format-text"><title>How to format text in HTML</title><para>To format a text in bold, you can use the &lt;b&gt; tag (deprecated in XHTML,<indexterm><primary>XHTML</primary></indexterm> use CSS instead, see <xref linkend="change-font-size-php-nuke">, <xref linkend="CSS-syntax">!). We recall that in HTML in most cases you have to open and close the tag. Thus, the code</para><screen><![CDATA[<b>Hello</b> World
]]></screen><para>means that the word &ldquo;Hello&rdquo; shall be in bold face, while the rest of the sentence will be in normal face, since the &lt;b&gt; tag was closed with &lt;/b&gt; immediately after the word &ldquo;Hello&rdquo;. Other formatting tags are:</para><itemizedlist><listitem><para>&lt;u&gt;&lt;/u&gt; (for underlining a phrase)</para></listitem><listitem><para>&lt;i&gt;&lt;/i&gt; (for italicizing,<indexterm><primary>italicizing</primary></indexterm> i.e. render a phrase with cursive face)</para></listitem></itemizedlist><para>But how how can we change not only the face, but also the colour,<indexterm><primary>colour</primary></indexterm> the size and the font? For this, the &lt;font&gt; tag comes to our help (also deprecated<indexterm><primary>deprecated</primary></indexterm> in XHTML,<indexterm><primary>XHTML</primary></indexterm> use CSS instead, see <xref linkend="change-font-size-php-nuke">, <xref linkend="CSS-syntax">!). Let's take a concrete example and analyze it:</para><screen><![CDATA[<font color="#FF0000" size="2">Hello World</font>
]]></screen><para>means that the word &ldquo;Hello&rdquo; shall be in bold face, while the rest of the sentence will be in normal face, since the &lt;b&gt; tag was closed with &lt;/b&gt; immediately after the word &ldquo;Hello&rdquo;. Other formatting tags are:</para><itemizedlist><listitem><para>&lt;u&gt;&lt;/u&gt; (for underlining a phrase)</para></listitem><listitem><para>&lt;i&gt;&lt;/i&gt; (for italicizing,<indexterm><primary>italicizing</primary></indexterm> i.e. render a phrase with cursive face)</para></listitem></itemizedlist><para>But how can we change not only the face, but also the colour,<indexterm><primary>colour</primary></indexterm> the size and the font? For this, the &lt;font&gt; tag comes to our help (also deprecated<indexterm><primary>deprecated</primary></indexterm> in XHTML,<indexterm><primary>XHTML</primary></indexterm> use CSS instead, see <xref linkend="change-font-size-php-nuke">, <xref linkend="CSS-syntax">!). Let's take a concrete example and analyze it:</para><screen><![CDATA[<font color="#FF0000" size="2">Hello World</font>
]]></screen><para>The code assigns some values to attributes of the font tag, that will apply to the &ldquo;Hello World&rdquo; text:</para><itemizedlist><listitem><para>color=&quot;#FF0000&quot;: assigns the red colour to the text. Why red? Because only the first two hex numbers are set (to FF, which is the hexadecimal notation for 255), meaning that only the red component is active (there are three components, red, grren and blue, each one taking up two hex digits in the colur notation).</para><tip>
<title>
Colour wheels
@ -14243,7 +14243,7 @@ This HOWTO uses a <ulink url="ck-style.css">special CSS file</ulink> (well, at l
]]><![CDATA[
]]><![CDATA[}
]]></screen><para>It has the following structure,<indexterm><primary>structure</primary></indexterm> common to every <acronym>PHP</acronym> function:</para><itemizedlist><listitem><para>the function name, preceded by the keyword &quot;function&quot;<indexterm><primary>function</primary></indexterm>,</para></listitem><listitem><para>the function parameters in the parenthesis,<indexterm><primary>parenthesis</primary></indexterm></para></listitem><listitem><para>the global variables that we intend to use in this function, registered<indexterm><primary>registered</primary></indexterm> through the &quot;global&quot;<indexterm><primary>global</primary></indexterm> keyword (we cannot use any global variables, if we do not register them as such),</para></listitem><listitem><para>the curly brackets that include the function's content</para></listitem></itemizedlist><para>Functions may be called from anywhere in the <acronym>PHP</acronym> code. See also <ulink url="http://www.php.net/manual/en/functions.php">PHP functions</ulink>.</para></sect2>
<sect2 id="PHP-switches"><title>Switches</title><para>A switch in <acronym>PHP</acronym> allows us to to take certain actions depending on the value of a certain variable, as in the following example, where we check the value of the $pa variable:</para><screen><![CDATA[switch($pa) {
<sect2 id="PHP-switches"><title>Switches</title><para>A switch in <acronym>PHP</acronym> allows us to take certain actions depending on the value of a certain variable, as in the following example, where we check the value of the $pa variable:</para><screen><![CDATA[switch($pa) {
]]><![CDATA[ case "showpage":
]]><![CDATA[ showpage($pid, $page);
]]><![CDATA[ break;