Chapter 48. Administering Messages


Messages are a way for you to get special announcements and information right in front of your users. Messages always appear at the top of the home page of your site and can be created to appear to all users, registered users, only anonymous users, and so forth. Figure 48.1 shows a message at the top of the home page at www.scriptinganswers.com/cms2.

Figure 48.1. Viewing messages on the home page.


Messages are administered through the Messages icon on the Administration menu. Figure 48.2 shows the Add a Message screen, where you provide a title and the content for your message. You can use HTML formatting in the message's content; here's a quick rundown of the HTML tags you're 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, but 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> creates two line breaks, leaving some whitespace in 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 message, 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 the image tag allows you to insert a picture into your text.

Figure 48.2. Creating a new message.


Keep in mind, however, that your messages appear before any other content on your home page, so you should strive to keep your message short.

You can configure messages to expire after 1, 2, 5, 15, or 30 days, or make a message unlimited, meaning it will display until you manually delete it or deactivate it. Messages can be configured to display to all users of your site, only to anonymous users, only to registered users, only to administrators, or only to subscribed users. An "only anonymous users" message, for example, might suggest that users register for your site and describe the wonderful benefits of doing so.

You con configure multiple messages; as shown in Figure 48.3, these appear stacked at the top of your home page. Only you, the administrator, see that last line of each message, which reads something like [ View: All Visitors - Unlimited - Edit ]. That's just a reminder to you about who can see the message, how long it has to go before it deactivates (in this example, it's unlimited), and a link to edit the message. You can also go right into the message-administration screen to edit messages, delete them, or deactivate them.

Figure 48.3. Stacking messages on the home page.




    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