Subjects Administration

At first glance, Subjects module is very similar to Sections module. That is because Subjects is partly based on Sections but written from the ground up. There are also some important additional features and differences; Subjects has a Subjects block, supports sub-pages, provides article sort options, lets you search, and gives you storage options.

Let's get started! First you need to create at least one Subject. Once that is done, you can add pages for the Subject. Each page can contain a sub-page, plus, there is no limit to the nesting of sub-pages.

There is also a Subjects block which you can activate for your main page blocks -- add it like any block from your Admin Blocks administration. Again, you'll want to create at least one Subject before doing this. NEW graphic tags will appear in the Subjects block to quickly notify visitors to your page of new content in a specific Subject area.

Page content can be stored in the database like other kinds of articles and texts, or it can be stored in HTML files. If you are going to use files that you FTP to the site, it is best if you have access to CHMOD your files. You can use a combination of these storage methods, as well. Using files will significantly cut down the size of your database.

With the 1.2 release, Subjects search is supported in the usual PN Search page;

modules.php?op=modload&name=Search&file=index
It will search title, author, description, and content fields (including those saved as files.)

The initial Subjects Admin page is long, especially as you add content pages. Study its structure. It is laid out in logical segments. Most importantly, learn the definitions of the words used, and it'll all just fall into place.

Definition of terms

Each particular area of the site administration has its own peculiar lingo and terms. They're used to differentiate and keep things separate, but can sometimes be confusing. Here's the specific ones for the Subjects Module:


Subjects
These are the departments or classifications, the categories, if you will, that appear on the main Subjects page.

Pages
These are the individual entries (works) within each Subject. Pages can contain more pages, and if they do, there is an indentation in the presentation of the page names to denote that they belong to that 'parent' page. See Parent and sub-pages below.

Title
Every page needs a title. Even pages that belong to 'parent' pages need titles.

Description
This appears as a description of a specific page (work) and is usually used for attribution, explanation, origination, further clarification and titling; or an editorial notation. It is optional, and appears right under the Title of the page on the listing of all the pages in a particular Subject. Sub-pages, for instance, might not need this.

Content
This is the actual work, the article. There are two kinds:
  1. Type or paste in the large content text-entry area what you want to appear in the article. Remember to use a <P> paragraph markup tag for a paragraph break. Most any HTML tag I have tried in this, including images, works fine.

    This content is then stored in the database.

  2. A File can be referred to in place of typing in all that information. It would contain standard HTML markups; but no beginning or ending HTML, BODY, etc. tags are necessary as it will be wrapped into the existing site theme. The content of the file is not stored in the database. Even subsequent edits to the content for the page will edit the file, as long as you've set up the directory (and files where appropriate) with RW (read-write) access.

    These files live in the modules/Subjects/pages directory. There are two ways to get them there:
    • Enter the text and HTML markups you want into the content text-area input on the Admin page, and give it a filename in the box under. The file will be created and stored in that file. You can even specify directories in this filename area.

      - or -

    • FTP the file to the modules/Subjects/pages (or an optional sub-directory of that path) and then CHMOD 666 all the new files you add. Use the correct filename in the filename field. Remember that you only need the filename or path from the modules/Subjects/pages on. Subjects will remember the "modules/Subjects/pages" part.

The body of the content, whether in a file or entered into the box and the database, honors all the usual style markups of your main site.


UP and DOWN
These links are next to every page and every subject in the editing/deleting link options. They cause the item in question to appear one UP or one DOWN in the web page presentation to the users. This way you can manually control the order in which things appear. This is handy when you add something and want it near the top or near another entry.

The default is for things to be presented in the same order they were entered. FIFO


Notes on Subjects Administration


Active Subject: Active means it is viewable on your Subjects pages. If unchecked, it allows you to keep a subjects group off of the public web page. This can be handy for works in progress or to utilize the Subjects structure and admin; but you will have to link directly to it. If it is unchecked it will not appear in your regular web page that views everything else.

Usually, this is left checked (active.)


Subject Image: upload the small icon image that will appear in the main page. FTP to /modules/Subjects/pages/


Relative Image Path Substitution: If it is more convenient for your page content images, you can use !!pagesdir!! instead of hard coding the full path to your images. If you ever move your site, you'll really appreciate this.

For example you have a page with the picture image.gif in directory, /modules/Subjects/pages/. The <IMG> tag should look like this:

<IMG SRC="!!pagesdir!!/image.gif">
Otherwise, you'd have to code the entire path:
<IMG SRC="/modules/Subjects/pages/image.gif">
You would write the same thing into the content area if you are saving it into the database.

As in file paths for sub-pages, additional directories off the pages/ directory are supported, too;

<IMG SRC="!!pagesdir!!/MyGraphics/image.gif">


Edit Pages: lists out all the Subjects/Divisions and the pages that belong in each one (and any sub-pages, indented and under their parent page.) Editing any of them allows you to change virtually anything in the same manner that you did when you first created the Page. There's an Edit link next to each subject and page.


Parent Pages and Sub-Pages Notes: You can add a sub-page to any page. This is done after entering and saving the page. Then select EDIT and scroll down below it, you'll find another Add Page section of the Admin page. Adding a page here makes it a sub-page. Sub-pages can continue to be nested in this manner as much as you like. Any page which is a sub-page will automatically have a pull-down menu at the bottom of it with links to the parent page and other sub-pages. Arrows will appear on the left and right of it for the previous and next pages.

If you wish to create a text outline of the sub-pages in the article, the parent page must have the !!subpageslist!! on it. This can appear wherever you like it in the page and creates a hierarchical text menu with links to each page.

This special markup command does not create a directory of pages that you used !!pagebreak!! on. A !!pagebreak!! does nothing but create a pagebreak. The two commands are completely unrelated.

The !!subpageslist!! can also be used inside of html files, as can a !!pagebreak!! command.


Content File: Just enter the filename. It needs no path, it knows where to look for the file. (If uploading it, and not creating the file through the admin page, you do have to upload it via ftp to: /modules/Subjects/pages/) So, for the glossary, I entered only:

glossary.html

If you use a file, leave the big box for text entry input empty when creating the first entry. When you go to edit any page that has a file associated with it, the text of the file will appear in the content edit box AND there will be a filename. That's exactly the way it is supposed to be for edits. Edit what needs changing, leave the filename and save the changes. The Admin program literally writes out the modified file for ya.

You can also use the content text-area to SAVE a file out without FTP access. Enter the content for the page into the text-area box, then give it a filename. When the page is stored, it will create the file for you.


Author URL and Email: This will automatically create links (if it is included) to the Author's page and email in the heading of the page.


Publication Date: Hey, you can use this to 'schedule' release of an article. I suspect that it uses server time to schedule this. My server lives in MST time, for instance, but I don't, so if timing is critical, keep this in mind.


Active Page: Allows you to keep a specific article off of the public web page if it is unchecked. This can be handy for works in progress or to utilize the Subjects structure and admin; but you will have to link directly to it. If it is unchecked it will not appear in your regular web page that views everything else.

Usually, this is left checked (active.)


Active reviews: Adds the Review link at the top of a page content. This allows your members to submit review comments about the article.

This defaults to reviews allowed - checked (active.)

Scoring is enabled with the Review option.



Subjects, by YaGi

Find Subjects support at YaGi's forum