Chapter 24. Using the Sections Module


The Sections module is kind of an extension of the News module. Sort of. It actually offers an alternative place to create content for your sitecontent that doesn't show up on the home page. You start by setting up one or more sections, using the Sections item on the Administrative menu. Figure 24.1 shows that you just need to enter a section name and a graphic filename; the graphic must be located in your site's /images/sections folder, and you're responsible for putting it there yourself (PHP-Nuke won't automatically upload it from your local computer).

Figure 24.1. Adding a section.


Once you've added a section, the administrative module expands so that you can also enter new articles. As shown in Figure 24.2, you just enter a title, select an appropriate section, and then enter the content. As with most PHP-Nuke content, you can use a variety of basic HTML tags to format your article:

  • <br> creates a line break. Use two in a row to create a new paragraph, separated from the previous one by a blank line.

  • <b> boldfaces text. Just pick whatever you want to be boldfaced, and surround it with <b> and </b>.

  • <i> works similar to boldfacing, except that it italicizes. Whatever you want to be in <i>italics</i> should be surrounded by these tags.

  • <u> handles underlining; just surround text with the tags to make that text <u>underlined</u>.

  • You can surround paragraphs with the special <p>paragraph</p> tags. Doing so eliminates the need to use the <br> tags because paragraphs are automatically separated by some whitespace.

  • You can add images like this: <img src="http://www.mywebsite.com/ images/mypicture.gif">. The src portion points to a graphic file that's living on a Web server someplace, which means the image tag enables you to insert a picture into your text.

  • The <!--pagebreak--> tag, which can be used only in certain areas of PHP-Nuke, breaks long content into multiple pages. PHP-Nuke automatically provides next and previous links, allowing users to navigate through your material very easily.

Figure 24.2. Writing a new article for the Sections module.


This administrative page also provides a place to edit past articles: The 20 most recent ones are listed for your convenience, along with Edit and Delete links. For anything beyond those 20, you'll need to know the article ID number to edit it. The easiest way to get the article ID number is to read the article itself and look at the URL in your Web browser's address line. It'll look something like http://www.scriptinganswers.com/cms2/modules.php?name=Sections&op=viewarticle&artid=1. The article ID is that last number, following artid=. Figure 24.3 shows a sections article as it appears to your users, who can access it through the Sections module.

Figure 24.3. Viewing a sections article.




    PHP-Nuke Garage
    PHP-Nuke Garage
    ISBN: 0131855166
    EAN: 2147483647
    Year: 2006
    Pages: 235
    Authors: Don Jones

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net