diff --git a/LDP/howto/docbook/PHP-Nuke-HOWTO/PHP-Nuke-HOWTO.sgml b/LDP/howto/docbook/PHP-Nuke-HOWTO/PHP-Nuke-HOWTO.sgml index fb078411..3e846c5a 100644 --- a/LDP/howto/docbook/PHP-Nuke-HOWTO/PHP-Nuke-HOWTO.sgml +++ b/LDP/howto/docbook/PHP-Nuke-HOWTO/PHP-Nuke-HOWTO.sgml @@ -648,7 +648,7 @@ to come back. In other browsers such as IE6, the access keys just give focus to PHP-Nuke utilizes as hinge of its own structure the duo PHP+ MySQL, very often being accompanied by the Apache web server.server Many modules have integrated many other languages, such as Javascript,Javascript Java,Java Flash and also even systems that serve, through the portal, sounds and films in streaming mode (Online Radio,Radio 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. PHP-Nuke is developed with a particular eye to the suggestions of the W3C, in its origin,origin the code is in fact W3C compliant and one has validated both the code and the style sheets.style sheets 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.systemThe 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.designerThe presence of many PHP-Nuke 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,themes in order to realize how easy it is to sew a new dress to one's portal.portalFrancisco Burzi,Burzi father and mother of PHP-Nuke, describes his creation as follows:
PHP-Nuke is a Web Portal System, storytelling software, News system,system online community or whatever you want to call it. The goal of PHP-Nuke is to have an automated web site to distribute newsnews and articles with users system.system Each user can submit comments to discuss the articles, just similar to Slashdot and many others. Main features include: web based admin,admin surveys, top page, access stats page with counter,counter user customizable box, themes manager for registered users, friendly administration GUI with graphic topic manager,manager option to edit or delete stories, option to delete comments, moderation system,system Referers page to know who link us, sections manager,manager customizable HTML blocks, user and authors edit, an integrated Banners Ads system,system search engine, backend/headlines generation (RSS/RDF format), and many, many more friendly functions.PHP-Nuke is written 100% in PHP and requires Apache Web server,server PHP and a SQL (MySQL, mSQL, PostgreSQL, ODBC, ODBC_Adabas,ODBC_Adabas Sybase or Interbase). Support for 25 languages, Yahoo like search engine,engine Comments option in Polls, lot of themes, Ephemerids manager, File Manager, Headlines, downloaddownload manager, faq manager, advanced blocks systems, reviews system, newsletter,newsletter categorized articles, multilanguage content management and a lot more.
Short history of PHP-NukeFrancisco Burzi,Burzi describes the history of PHP-Nuke as follows:
PHP-Nuke is a free software, released under the GNU GPL License, version 2.0. PHP-Nuke is the result of many years administrating a news site called Linux Preview. First, around August 1998, I wrote my own code in Perl 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,Slash the same used in the Slashdot site. It's good, but you realy need to know Perl to modify it, need too many modules,modules need to load a damn daemon that sucks all your CPU power. My Pentium III just appeared to be a 386 each minute the daemon made its work.Well, then I discovered Thatware,Thatware a good project to have a news site under PHP.PHP I learned PHP in less than a week and began modifying it. There are too many mods to mention, it was practicaly a rewrite.rewrite I added some cool stuff, deleted some others and after more than 380 hourshours of hard work in 3 weeks! PHP-Nuke was born.On August 17, 2000 I sold LinuxPreview.Previeworg to LinuxAlianza.com and now I have all the time to dedicate to the development of PHP-Nuke.From January 2001 to January 2002, PHP-Nuke has been financially supported by MandrakeSoft, the folks that made Mandrake Linux.Linux This gave me and PHP-Nuke a lot of oxygen and made possible a lot of stuff.Now, I'm alone with this killer project.project There is a lot of help from the people that use and develop modules and themes.themes Now, phpnuke.org 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 phpnuke.org and enjoy this great community!
The <application>PHP-Nuke</application> CommunitiesA careful look is due to the true value of PHP-Nuke, that is the communitiescommunities that you will find all around. Thanks to the voluntary job of these persons, of these sites, PHP-Nuke has become a well-known system and it is always thanks to them that PHP-Nuke is a multilanguage system that supports more than 25 languages. Even the modules have been created mostly from developers in external communities and have, in second round, been included in new distributions of PHP-Nuke. 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. Nukeforums.com: Technical support to PHP-Nuke.Nukecops: Official PHP-Nuke development team.Karakas-Online PHP-Nuke Forum: Chris' PHP-Nuke Forum.ForumNukedownloads.com: File mirror for downloads.adsnukeresources.com: Downloadsadsnukefixes.com: Fixes for PHP-Nuke bugs.bugsnukesecurity.com: PHP-Nuke security.securitySomara.com: Themes and graphics.graphicsNukethemes.com: Themes and graphics.graphicsEcomjunk.com: Addons and modules.modulesNukeaddn.com: Addons and modules.modulesCommunities in Italian language: Spaghettibrain.comClaudiodemarinis.itPHPnuke.itSplatt.itNukeitalia.comThanks 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,portal in areas varying from the weather () to e-commerce (), from gallery () to chat realized in flash and videogames in Java,Java all included in the layout of PHP-Nuke. -Why use <application>PHP-Nuke</application> and not static HTML pagesBecause managing large sites with only static HTML pages is dangerous for your health.Because through the dynamic pages, users can interact (Forum,Forum chat)Because through the dynamic pages we can offer value added services (restricted areas, various services based on user classification.classification..) Because the information is more easily catalogued.Because with a few PHP pages we recall a lot of information.informationBecause keeping the contents up-to-date does not demand particular technical expertise and can be managed by anyone (by Davis Batistes).It is the simplest way to to pull over a complete portal,portal thanks to its open source engine,engine it allows anyone to implement new modules or to modify and to personalize existing modules.modules (by Micione,Micione www.vizzani.net)It is very intuitive and easy to learn (by Anonymous)It is easy to modify by those who intend to personalize the program (By Arus)It is easy to use by the lesser experts among us. +Why use <application>PHP-Nuke</application> and not static HTML pagesBecause managing large sites with only static HTML pages is dangerous for your health.Because through the dynamic pages, users can interact (Forum,Forum chat)Because through the dynamic pages we can offer value added services (restricted areas, various services based on user classification.classification..) Because the information is more easily catalogued.Because with a few PHP pages we recall a lot of information.informationBecause keeping the contents up-to-date does not demand particular technical expertise and can be managed by anyone (by Davis Batistes).It is the simplest way to pull over a complete portal,portal thanks to its open source engine,engine it allows anyone to implement new modules or to modify and to personalize existing modules.modules (by Micione,Micione www.vizzani.net)It is very intuitive and easy to learn (by Anonymous)It is easy to modify by those who intend to personalize the program (By Arus)It is easy to use by the lesser experts among us. The <application>PHP-Nuke</application> forksThere are several CMS systems, which are PHPNuke forks;forks among the most famous, we can mention Post-Nuke, Envolution, MyPHPNuke and Xoops.PHP-Nuke vs. Post-NukePost-Nuke is another Content Management System (CMS) similar to PHP-Nuke. 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.Some of the highlights of PostNuke are, according to its developers (in Post-Nuke Modules):Customisation of all aspects of the website's appearance through themes,themes including CSS support.The ability to specify items as being suitable for either a single or all languages.The best guarantee of displaying your webpages on all browsers due to HTMLHTML 4.01 transitional compliance.complianceA standard API and extensive documentation to allow for easy creation of extended functionality through modules and blocks.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 PHP-Nuke. ]]> ]]> ]]> ]]> Inline graphic However, we will try to give you an idea: Even its critics will agree that, for a portal whose purpose is to make information publicly accessible,accessible PHP-Nuke is a very good solution. In comparison to Post-Nuke,Post-Nuke most people will also find that PHP-Nuke 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.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 (), the Approve Membership module ( ), the eCommerce modules () or the Project Management WorkBoard module () before you draw premature conclusions. ]]> ]]> ]]> ]]> Inline graphic Here are some PostNuke modules that are popular among business end users:Xanthia Theme EngineContentExpess Content managementStatic Content ManagementPostCalendarFormExpress Forms GeneratorpnAddressBook (Palm Style)LDAPNukeOWLPNphpBB2However, PostNuke seems to be caught prisoner of its own development impetus:impetus it changed so fast, so often, and made code break backward compatibilitycompatibility 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 PHP-Nuke for its great community,community support, continuing, smooth development and vast collection of modules.modules The following quote,quote taken from History of PHP-Nuke and Post-Nuke, reflects this situation:
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.
@@ -829,7 +829,7 @@ This process only really applies if your PHP-Nuke wil Permissions: Each file or directorydirectories are just special files in Linux has 3 groups of permissions associated with it: one set of Read, Write or Execute permissions for the owner (also called “user” in this context), a group and "others" respectively. The owner in our case should be the user name of your web server.server The group is a user group the web server is a member of. And “others” are just “the rest”. 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 permissionspermissions and the third one the permissions for “others”. A good mnemonic for this grouping is UGO (User,User 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 permissionspermissions (and execute permission too, if the file is executable), but the group permissions may only allow read access and “others” may not be allowed to access the file at all, neither for reading, nor for writing or execution.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)).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.764 That's compact and widely used.Unfortunately, it is also very cryptic,cryptic 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 “set file permissions to 644644” then?Luckily, there exists an easy mnemonic for this: “4,2,1”, 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. ]]> ]]> ]]> ]]> Inline graphic -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,User Group and Others and you end up with a three digit number that represents the permissions of the file.Most of the time, however, you will be busy deciphering permissions,permissions rather than formulating them yourself in this cryptic manner. So how do you go about interpreting a permissions representation like 764764 that was given to you in a document like the PHP-Nuke HOWTO? For this, you will need to develop a “feeling” 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.Now if you remember that the leftmost 1 or 0 in a pattern like (111) denotesnotes a read permission or the absence or it, a 1 or a 0 in the middle position denotesnotes a write permission or its absence and a 1 or 0 in the leftmost position denotesnotes 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. +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,User Group and Others and you end up with a three digit number that represents the permissions of the file.Most of the time, however, you will be busy deciphering permissions,permissions rather than formulating them yourself in this cryptic manner. So how do you go about interpreting a permissions representation like 764764 that was given to you in a document like the PHP-Nuke HOWTO? For this, you will need to develop a “feeling” 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.Now if you remember that the leftmost 1 or 0 in a pattern like (111) denotesnotes a read permission or the absence or it, a 1 or a 0 in the middle position denotesnotes a write permission or its absence and a 1 or 0 in the leftmost position denotesnotes 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. Easy after all, isn't it? ]]> ]]> ]]> ]]> Inline graphic For more information on permissions,permissions see:Setting Unix Permissions For Web PagesAn Introduction to Unix PermissionsUnderstanding UNIX permissions and chmodTutorial: UNIX PermissionsSetting 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 PHP-Nuke to operate in its full functionality.functionality The right permissions for PHP-Nuke are the following (for the base permissions,permissions see in the context of security): Files: 644644Directories:Directories 755Only 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 datadata written to them by the program should be set to 666.666 With WS_FTP you must select the files or folders on which you want to impose the permissionpermissions and, with the right mouse key,key to select the option “chmod (UNIX)” (see ).
@@ -1787,7 +1787,7 @@ A superuser is an administrator with all admin powers. One should call it supera ]]>in config.configphp for site 1 and in config.configphp for site 2. All other values should stay identical in the config.configphp files of both sites.Edit the nuke.sql file (located under the sql directory of the PHP-Nuke package) for each site. Change every occurence of “nuke_” to “nuke1_” for site 1 and to “nuke2_” for site 2, then proceed with the installation as described in . If you use nukesql.php () for the installation,installation see the tip at the end of this section. -Different <application>PHP-Nuke</application> sites with the same user baseThere are situations that you might want to share users among your PHP-Nuke sites. For example, if you have a site about cars and another one about car insurance,insurance 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.The idea behind a separate prefix for the users table in PHP-Nuke is to enable you to keep all other tables separate, but use the same users table across different PHP-Nuke installations.ations 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.To use the same user base in two separate PHP-Nuke sites, proceed as follows:Use the same database as descibed in .Use separate $prefix values, but the same $user_prefix for both config.phpconfig.php files, e.g. Different <application>PHP-Nuke</application> sites with the same user baseThere are situations that you might want to share users among your PHP-Nuke sites. For example, if you have a site about cars and another one about car insurance,insurance 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.The idea behind a separate prefix for the users table in PHP-Nuke is to enable you to keep all other tables separate, but use the same users table across different PHP-Nuke installations.ations 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.To use the same user base in two separate PHP-Nuke sites, proceed as follows:Use the same database as descibed in .Use separate $prefix values, but the same $user_prefix for both config.phpconfig.php files, e.g. in config.configphp for site 1 and It lists the top 10 active elements of our portal:10 most read articles10 most commented articles10 most active categories10 most read articles in the special sections10 most voted surveyssurveys10 most active authors10 most read book reviewsreviews10most downloaded files10 most read pagesTopics:Topics Lists the main categories of PHP-Nuke. Once we have entered this module,module 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 searchsearch in the chosen context.contextWebLinks:WebLinks 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. Read if you are looking for a quick way to enter thousands of Web links. Further, in we show how to modify the PHP-Nuke Web Links module.moduleYour Account: -It's the administration console for your “User Profile” (It only works for registered users), the implemented functions are (see ):Change your info:info enables management of your profile by changing your E-mail, Where you're from, AIM, ICQ,ICQ Avatar & Fake E-mail etc...Change your Home: creates a personalized menu (as a block) for navigation,navigation the user can put in there whatever he wants (tests,tests links, images).Setup comments:comments Configures the display of comments, assigning display criteria.Theme selection: Changes the theme of the site, allowing you to choose between all available themes.themesJournal:Journal enables you to write your own diary to be published on the portal. Something like a Weblog in a Weblog,Weblog so to say. ;-)Webmail:Webmail 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.Logout/Exit: It lets us exit from our current user profile,profile cancelling the cookie.cookieMy Headlines: Imports into the the user's private area those news in RDF/RSSRSS format that are published by preselected news sources.sources The user can thus set up together his own personalized newspaper.newspaper An even broader news functionality is offered by the My Headlines modulemodule (), whose functionality you can see in action at Chris' News-o-matic page.Broadcast Message: If the subject is aproppriate and the administrator has allowed it in the Preferences of the administration panel (), 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,function so that we don't see messages broadcast by other users.Your private messages: This box displays the user's private messages.Last 10 articles: Offers a list of the last 10 articles posted by that user. +It's the administration console for your “User Profile” (It only works for registered users), the implemented functions are (see ):Change your info:info enables management of your profile by changing your E-mail, Where you're from, AIM, ICQ,ICQ Avatar & Fake E-mail etc...Change your Home: creates a personalized menu (as a block) for navigation,navigation the user can put in there whatever he wants (tests,tests links, images).Setup comments:comments Configures the display of comments, assigning display criteria.Theme selection: Changes the theme of the site, allowing you to choose between all available themes.themesJournal:Journal enables you to write your own diary to be published on the portal. Something like a Weblog in a Weblog,Weblog so to say. ;-)Webmail:Webmail 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.Logout/Exit: It lets us exit from our current user profile,profile cancelling the cookie.cookieMy Headlines: Imports into the user's private area those news in RDF/RSSRSS format that are published by preselected news sources.sources The user can thus set up together his own personalized newspaper.newspaper An even broader news functionality is offered by the My Headlines modulemodule (), whose functionality you can see in action at Chris' News-o-matic page.Broadcast Message: If the subject is aproppriate and the administrator has allowed it in the Preferences of the administration panel (), 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,function so that we don't see messages broadcast by other users.Your private messages: This box displays the user's private messages.Last 10 articles: Offers a list of the last 10 articles posted by that user.
@@ -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 modulesSee for some interesting add-on modules for PHP-Nuke. The preinstalled blocksModules: -Lists all active modules.modules In case you are the Administrator, it displays also the inactive modules,modules as wel as those that are hidden. The Modules block is very often used for navigation purposes, see for example , , and . But is is also possible to use the Content block (see below) to obtain a similar result. +Lists all active modules.modules In case you are the Administrator, it displays also the inactive modules,modules as wel as those that are hidden. The Modules block is very often used for navigation purposes, see for example , , and . But it is also possible to use the Content block (see below) to obtain a similar result.
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 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 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 Index:<indexterm><primary>Index</primary></indexterm> </term><listitem><para>Leads back to the main Forum page.</para></listitem></varlistentry><varlistentry><term>Preview 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 “operation new_user<indexterm><primary>new_user</primary></indexterm>” 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 “new_user<indexterm><primary>new_user</primary></indexterm>” 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> moduleYou can also use an iframe to include an external HTML page in your module.module 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 Using inline frames (iframe elements) to embed documents into HTML documents).Iframes are not supported by all browsers, however they offer a much more comfortable alternative to the solution of , since any links of the included HTML page will be shown in the iframe,frame if they are linked with a relative URL.URL To include a HTML file and its links in a PHP-Nuke module,module use the following as the index.indexphp file of the module (see Adding Links To The Main Page (Modules) and Make PHP-Nuke Use "Frame Like target"):How to include a HTML file and its links using an iframe in a <application>PHP-Nuke</application> moduleYou can also use an iframe to include an external HTML page in your module.module 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 Using inline frames (iframe elements) to embed documents into HTML documents).Iframes are not supported by all browsers, however they offer a much more comfortable alternative to the solution of , since any links of the included HTML page will be shown in the iframe,frame if they are linked with a relative URL.URL To include a HTML file and its links in a PHP-Nuke module,module use the following as the index.indexphp file of the module (see Adding Links To The Main Page (Modules) and Make PHP-Nuke Use "Frame Like target"):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.hoursA much more effective tag filter is realized through the check_html and filter_text functions in mainfile.php (see ). The admissible tags are defined in in the file config.php in the $AllowableHTMLAllowableHTML array, these are valid for the comments,comments the insertion of news and many other user inputs (see and for all instances of a call to the filter_text and check_html functions respectively).All these actions and a correct configuration of the permissions as illustratedillustrated in and , should guarantee us a good security for our site. It is also important to closely follow the security warnings for PHP-Nuke that are brought up on the various security advisories (see ). +]]>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.hoursA much more effective tag filter is realized through the check_html and filter_text functions in mainfile.php (see ). The admissible tags are defined in the file config.php in the $AllowableHTMLAllowableHTML array, these are valid for the comments,comments the insertion of news and many other user inputs (see and for all instances of a call to the filter_text and check_html functions respectively).All these actions and a correct configuration of the permissions as illustratedillustrated in and , should guarantee us a good security for our site. It is also important to closely follow the security warnings for PHP-Nuke that are brought up on the various security advisories (see ). Changing the duration of the user cookieIf you want to redefine the duration of the user cookie (as opposed to the administrator cookie), you have to edit the file modules/Your_Account/index.php.index.php There, find the function docookie():in two places:after after the global line of the is_amdin() function in mainfile.php andat the begining of the admin.adminphp file.Change the “66.666.66666.6” and “55.555.55.555.555.55.5” to the IP addresses you want to block and you are done! See How to block an IP address in PHP-Nuke.The more elaborate approach is to create a text file, call it banned.bannedtxt, containing all the IP addresses you want to ban,ban one address per line. Upload banned.bannedtxt in the PHP-Nuke root directory on your web server (this is the same directory where also config.configphp is located). Then include the following code in the includes/my_header.headerphp file (the custom HTML header file of PHP-Nuke, see ):in two places:after the global line of the is_amdin() function in mainfile.php andat the begining of the admin.adminphp file.Change the “66.666.66666.6” and “55.555.55.555.555.55.5” to the IP addresses you want to block and you are done! See How to block an IP address in PHP-Nuke.The more elaborate approach is to create a text file, call it banned.bannedtxt, containing all the IP addresses you want to ban,ban one address per line. Upload banned.bannedtxt in the PHP-Nuke root directory on your web server (this is the same directory where also config.configphp is located). Then include the following code in the includes/my_header.headerphp file (the custom HTML header file of PHP-Nuke, see ):In the above example, only a small part of the structure of the nuke_usersnuke_users 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 “AnonymousAnonymous”).We can get a partial restore of the single nuke_users table in three ways:We copy and paste the relevant structure and data parts from our backupbackup file into a separate file that we will call partial_backup.backupsql. Then we use phpMyAdmin's “SQL queryquery” function (see ) to import the partial_backup.backupsql file, just as we do with any other file containing SQL queries.queries We enter the full path to partial_backup.backupsql in the “textfile” field of and click on “Go”.We copy and paste the the relevant structure and data parts from our backupbackup file into the text area field above the “BrowseBrowse” button, then click on “Go”.We don't use phpMyAdmin but use the shell command line instead. From the shell promt, we type:In the above example, only a small part of the structure of the nuke_usersnuke_users 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 “AnonymousAnonymous”).We can get a partial restore of the single nuke_users table in three ways:We copy and paste the relevant structure and data parts from our backupbackup file into a separate file that we will call partial_backup.backupsql. Then we use phpMyAdmin's “SQL queryquery” function (see ) to import the partial_backup.backupsql file, just as we do with any other file containing SQL queries.queries We enter the full path to partial_backup.backupsql in the “textfile” field of and click on “Go”.We copy and paste the relevant structure and data parts from our backupbackup file into the text area field above the “BrowseBrowse” button, then click on “Go”.We don't use phpMyAdmin but use the shell command line instead. From the shell promt, we type:where dbhost,dbhost dbuname and dbname are exactly the same as in your config.php file(). How to restore a large backupIf your backup file is really large (a few megabytes are enough), PHP will not be able to import it in the usual CPU time limit of 30 sec. that is set by most ISPs.ISPs The result will be an error and a corrupted or incomplete table. In this case you can proceed as follows:If you have access to the shell promt, login to your server with SSH and type the following on the shell prompt:where dbhost,dbhost dbuname and dbname are exactly the same as in your config.php file().If you don't have shell access,access you can use an interface like MysqlFront (see ): @@ -14074,7 +14074,7 @@ If your PHP has some timeout limit set (often 30 sec), you wi List of users.nuke_words:nuke_words Words to censure. The syntax of HTML codeHTML is the language that is used to construct web pages. It is somewhat obsolete, as it is going to be replaced by XHTML.XHTML In this section we will have a look at the HTML code we need in order to format text,create links, insert images,imagescreate tables.tablesHow to format text in HTMLTo format a text in bold, you can use the <b> tag (deprecated in XHTML,XHTML use CSS instead, see , !). We recall that in HTML in most cases you have to open and close the tag. Thus, the codeHello World -]]>means that the word “Hello” shall be in bold face, while the rest of the sentence will be in normal face, since the <b> tag was closed with </b> immediately after the word “Hello”. Other formatting tags are:<u></u> (for underlining a phrase)<i></i> (for italicizing,italicizing i.e. render a phrase with cursive face)But how how can we change not only the face, but also the colour,colour the size and the font? For this, the <font> tag comes to our help (also deprecateddeprecated in XHTML,XHTML use CSS instead, see , !). Let's take a concrete example and analyze it:Hello World +]]>means that the word “Hello” shall be in bold face, while the rest of the sentence will be in normal face, since the <b> tag was closed with </b> immediately after the word “Hello”. Other formatting tags are:<u></u> (for underlining a phrase)<i></i> (for italicizing,italicizing i.e. render a phrase with cursive face)But how can we change not only the face, but also the colour,colour the size and the font? For this, the <font> tag comes to our help (also deprecateddeprecated in XHTML,XHTML use CSS instead, see , !). Let's take a concrete example and analyze it:Hello World ]]>The code assigns some values to attributes of the font tag, that will apply to the “Hello World” text:color="#FF0000": 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). 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 "function"<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 "global"<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>SwitchesA switch in PHP 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:SwitchesA switch in PHP 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: