Writing a New Story


There are two ways to get yourself into writing a new story: Click the Add Story icon on the Administration menu, or click the New Story link from the Administration block that appears in either the right or left columns (depending on where you put it). Either way, you'll start with the Add New Article screen, shown in Figure 19.5.

Figure 19.5. Adding a new story to the News module.


Start by providing a title, or headline, for your story. Next you'll select a topic, a category, and associated topics. I'm not going to cover those right now; PHP-Nuke is a little complex about topics and categories, so I'm going to get to that a bit later in this discussion. Bear with me, and for now just remember that this is where you'll select these things.

Next, you decide whether your story will appear on the home page by selecting the appropriate Publish in Home option. However, if you selected Articles as the category for your story, it will always appear on the home page, whether you like it or not. You'll then have to decide whether you want to allow users to post comments for your story. If you say "Yes," they'll be able to do so only if you've enabled comments as a part of your site-wide preferences.

Finally, you're into your story itself. The Story Text box is for your lead-in paragraph; as always, you can use basic HTML tags to format your story. The Extended Text box is for the rest of your story and can also use HTML. Don't repeat your lead-in paragraph in the Extended Text box; when someone selects the Read More link for your story, the resulting Web page displays both the story text and the extended text automatically. Here's a quick reminder of the HTML tags you're most likely to use:

  • <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>.

  • Wrap paragraphs in <p> and </p> tags, or use the <br> tag to create a single line break. Using <br><br> will create two line breaks, giving some whitespace between paragraphs. If you don't use one of these two techniques, the paragraphs in your story will run together and be difficult to read!

  • To create images in your story, use a tag 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 that the image tag enables you to insert a picture into your text.

Now you have an option to program the story. Be sure to select Yes if you want to! I forget to do that all the time. If you select No, your story goes live immediately and can be viewed by users on your site; if you select Yes, you choose the day, month, year, hour, and even minute on which your story will go live. Pay close attention to the date: PHP-Nuke wants the date in the day-month-year format commonly used in Europe, not the month-day-year format more often used in the USA. I can't tell you how many times I've scheduled something to appear on March 4, only to have it not show up until April 3. Oops.

Your last optionand this is only if you don't schedule the story to appear at a later timeis to attach a poll. Polls have a title and then up to 12 options that users can select. If you leave the poll information blank, your story won't get a poll; fill it in, and the poll will appear with your story. I cover polls in more detail in Topic 27, "Using the Surveys Module."

By the Way

Your users can submit their own stories for publication, through the Submit_News module (provided, of course, that you've enabled that module). I cover how to work with those submissions in Topic 50, "Working with Submissions," along with the other types of content your users can submit to you.


That's it! Scroll back up a bit and click OK to preview your story and see what it will look like on the site. At that time, you can make any edits that are necessary, select Post Story from the drop-down list box that previously contained Preview Story, and click OK again to post your story. The main administration page lists all programmed stories (articles), so you can easily see which ones are coming up on your site.



    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