Entries are what your weblog/journal is made of, and the "Add A New Entry" screen is where you'll post them. There are three distinct elements to an entry that you can create: the subject, the main text, and the extended (or "more") text.
You must always give your entries a subject, for at least reference purposes, since entries are listed by subject when you select them from the Edit An Entry menu. (However you want to use or display them in your weblog/journal, or whether you want them displayed anywhere on your site at all, is, of course, entirely up to you and how you configure your templates.)
The Main Entry Text is intended to be the main body of your entry, and the extended text is for additional or supplemental information; you must always enter a main text, but the extended text is optional. This is intended to help you make an entry's appearance on your main index, and on its entry page, distinct when you want them to be distinct; typically (as in the default templates included with Greymatter), you would use the main text for when entries appear in the body of your log, and if you have something more you want to say in an entry but don't want to dump it all on the main page, you'd enter it as extended text to appear in full on that entry's individual page. (Also note that you can, if you wish, give normal and extended entries different formatting via your templates, or handle them in any distinct way you choose.)
Finally, upon creating the entry, you're given the option whether or not you want to turn karma voting and comment posting on or off for this entry (the options won't appear if you've disabled karma and/or comments in Configuration, since disabling them overrides individual entry settings). You also have the option to mark that entry to stay at the top of your main log (which you could set apart with custom formatting via the templates, for announcements, special notices, and so forth)—when the main index is generated, then that entry will stay at the top indefinitely, until you edit it removing its stay-at-top status (or set another entry to take its place).
You can edit an entry anytime by selecting it from the "Edit An Entry" screen (entries are listed by subject in order from newest to oldest); this includes being able to edit or delete any comments from any entry, turning karma and/or comments on or off for that entry, and marking or removing it as the stay-at-top entry. When you edit an entry, you also have the option to leave it "open" or make it "closed"meaning, basically, whether or not you want to leave that entry on your site. Think of open as meaning "visible" and closed meaning "invisible"; all entries are, of course, open by default. To close an entry is to effectively "delete" itwhen the relevant files are rebuilt, Greymatter will treat that entry as if it no longer exists, removing all links to it or traces of itbut with the obvious advantage that Greymatter still has the entry data on file, and you could re-open it later if you wish. Be sure to rebuild the appropriate files after saving any changes to an entry, to make those changes take immediate effect on your site. (Greymatter automatically updates all relevant files whenever you add a new entry.)
An entry is considered "archived" when it becomes too old to be listed on your main index. You specify in Configuration how many days' worth of entries you want to keep on your main index. (This counts how many days you've posted entries for, *not* consecutive days; so for example, if you've posted entries only on four different days scattered throughout a month, Greymatter still counts that as four days.)
Indexes of your archived logs are automatically created by Greymatter in your entries/archives directory, in monthly or weekly installments. If you have the "Keep main index and archive log indexes concurrent with each other" option selected, then Greymatter will generate these files in your archives directory right away when you post entries and log your entries in both places simultaneously. Otherwise, entries won't appear here, and these files won't be generated, until entries have "scrolled off" the main index. Your archive master index is a good place to set up links to your archives; check the Template Variables section below for information about the {{log*list}} family of variables, which generate lists of these links automatically. (The "Miscellaneous Templates" allow you to customise these lists.)
Think of variables as placeholders for dynamic information (since that's exactly what they are)each variable represents some piece of info or code, and their placement in your templates tells Greymatter where you want that info to be included. Variables are usually context-dependent; for example, a date/time variable like {{month}} or {{hour}}, in the context of the Individual Entry Template, will display the numbers for the month and hour respectively in which that entry was posted, or in the context of the Comments Template, the month and hour in which that comment was posted. Some variables (for example, {{header}}, {{footer}} and {{sidebar}}) have their own templates; in those cases, Greymatter inserts the contents of those templates wherever those variables are and then goes on analyzing the rest of the variables. A few variables can only be used in a particular instance, but most are intended to be used as flexibly as you like.
The template variables are as follows:
{{ampm}}, {{ampmlower}}, {{ampmdot}}, {{ampmdotlower}}
The AM or PM status of the relevant time. The "lower" variations list it in lowercase ("am" or "pm"), and the dot variations list it with dots ("a.m." or "p.m.").
{{archivebody}}
Placeholder for use only in the Archive Log Index Template; when the log archives are generated, this tells Greymatter where to place the body of that month's or week's log. You can also use {{logbody}} (see below) to do the same thing.
{{author}}, {{authoremail}}, {{authorhomepage}}, {{authorentrycount}}
The name of that entry's author, their e-mail address (if given), their homepage address (if given), and the total number of entries they've posted so far, respectively. You can also include the name of an author to always give the relevant status for that particular author; for example, {{authoremail Alice}} will give Alice's e-mail address (if there is one), {{authorentrycount Mad Hatter}} will display how many entries Mad Hatter has posted, and so on.
{{authorsmartlink}}
Displays the name of that entry's author as a link either to that author's e-mail or homepage address, whichever has been given (if both are available, the link is to that author's homepage; if neither, the name is left unlinked). This is a self-contained link. As above, you can also names to generate smart dynamic links for specific authors.
{{calendar}}, {{calendar [mm]/[yy]}}, {{calendarweek}}
Creates calendar displays for the current month or week (or, in the case of {{calendar [mm]/[yy]}}, the month you specify) with each day in the calendar display as a link to the most recent entry posted that day, if any; you can specify in configuration whether calendars will link to any entry or only to extended entries. Use {{calendar [mm]/[yy]}} to create a calendar for a specific month; for example, {{calendar 11/00}} would make a calendar for the month of November 2000. (This requires that you've actually posted at least one entry during that month.)
{{cgiwebpath}}
Inserts the web path where your Greymatter CGI files are located, as specified in Configuration.
{{commentauthor}}, {{commentauthoremailabsolute}}, {{commentauthorhomepageabsolute}}
The name of that comment's author, their e-mail address (if given), and their homepage address (if given), respectively.
{{commentauthoremail}}, {{commentauthorhomepage}}
The contents of their respective templates; these will only appear if the author of that comment has given an e-mail or homepage address, respectively.
{{commentauthorip}}
Displays the IP address of that comment's author. You can always see the IP addresses for comments by editing the entries they appear in, so you may want to think twice about using this variable and thus having the IPs appear out in the open, since many will (with due reason) probably consider this an invasion of privacy.
{{commentauthorsmartlink}}
Displays the name of that comment's author as a link either to that author's e-mail or homepage address, whichever has been given (if both are available, the link is to that author's homepage; if neither, the name is left unlinked). This is a self-contained link.
{{commentbody}}
The text of the current comment.
{{commentdivider}}
The contents of the {{commentdivider}} template. This will only appear if the entry contains at least one comment (and, if so, will still appear in that entry whether or not comments are disabled later).
{{commentordernumber}}
The number of the comment. The first comment posted is always number 1, whether or not the comments are displayed in ascending or descending order.
{{commentslink}}
The contents of the {{commentslink}} template, intended for linking to the comments on individual entry pages. This will not appear on entries for which comments have been disabled (or, of course, if comments are disabled altogether).
{{commentsnumber}}
The number of comments that entry has received.
{{commentspostlink}}
Generates a link to the #comments marker in that entry's page (wherever you have the tag in your entry page templates; by default, the tag points to the comments in that particular entry, or the posting form if no comments have been posted yet). If used outside the {{commentslink}} template, this link will always appear whether or not comments are disabled for that entry.
{{commentstatussmart}}, {{commentstatussmartupper}}, {{commentstatussmartlower}}
By default, displays how many comments there are in the "x Comments" format (with upper- and lower-case variations) with a "smart" status of how many comments there are: zero comments are "No Comments" and one is "1 Comment" (note the singular). If used outside the {{commentslink}} template, this will always appear whether or not comments are disabled for that entry. You can customise the output of this variable via the templates.
{{customone}} through {{customten}}
Inserts whatever you have in the respective custom template.
{{day}}, {{dayday}}
Displays the number of the relevant day. {{dayday}} forces it to two digits (if it's not already), padding single-digit numbers with zeroes (for example, 2 becomes 02).
{{email [url]}}, {{email [url] [link text]}}, {{emailmo [url] [link text]|[mouseover]}}
Works the same way as the {{link}} variables; see the description of them below.
{{entrieswebpath}}
Inserts the web path of your entries/archives directory, as specified in Configuration.
{{entrycomments}}
All the comments for that individual entry; like {{logbody}} on the Main Index and Archive Log Index pages, this is a placeholder for the full body of the comment list. Each comment is patterned on the Comment Appearance template.
{{entrycommentsform}}
The contents of the {{entrycommentsform} templatethe form whereby your visitors can add their comments to an entry. This won't appear on entries for which comments are disabled, or if comment posting is disabled altogether.
{{entrykarmaform}}
The contents of the {{entrycommentsform} template, intended to be a distinct form by which people can vote on an entry's karma from that entry's individual page. This won't appear on entries for which karma is disabled, or if karma voting is disabled altogether.
{{entrymainbody}}
The main text of that entry.
{{entrymorebody}}
The extended (or "more") text of that entry, if there is any.
{{entrymainbodyfirstwords [x]}} and {{entrymorebodyfirstwords [x]}}
Displays only the first X words of that entry's main or extended text, respectively; for example, {{entrymainbodyfirstwords 20}} will display the first twenty words of the main text (or the entire main text if it's less than twenty words, of course). All words displayed this way will be shown without HTML codes.
{{entrynumber}}, {{entrynumberpadded}}
The number of that entry. The "padded" version displays it in Greymatter's 8-digit padded filenaming convention (for example, the number for entry 187 would display as 00000187).
{{entrysubject}}
The subject line for that entry. Although you're required to give a subject when adding a new entry for the sake of reference, you're certainly not required to display it anywhere in your log.
{{footer}}
Inserts whatever you have in the Footer template.
{{gmicon}}
Puts the gm-icon.gif graphic on your page, linked to the Greysoft site. Required on the main index template, although donators can request a copy of Greymatter with the requirement removed if desired.
{{gmversion}}
Greymatter's current version number.
{{header}}
Inserts whatever you have in the Header template.
{{hour}}, {{hourhour}}
Displays the number of the relevant hour. {{hourhour}} forces it to two digits (if it's not already), padding single-digit numbers with zeroes (for example, 4 becomes 04).
{{link [url]}}, {{link [url] [link text]}}, {{linkmo [url] [link text]|[mouseover]}}
For use when adding new entries, to facilitate adding links as a kind of shorthand. (You can always do them the old-fashioned way too, of course.) Links added this way are self-contained. The syntax works as follows:
- Typing "Check this site out: {{{link http://noahgrey.com/}}" produces "Check this site out: http://noahgrey.com/" with the URL as a plain link.
- Typing "Say, have you been to {{link http://noahgrey.com/ Noah's site}} lately?" produces "Say, have you been to Noah's site lately?" with the words "Noah's site" as a
link to noahgrey.com.
- Typing "Really, you MUST {{linkmo http://noahgrey.com/ go there|Click here!}} sometime!" produces "Really, you MUST go there sometime!" with the words "go there" as a link to noahgrey.com, and the words "Click here!" appearing as mouseover text for that link in the browser's status bar.
You can also use "email" and "emailmo", with the same syntax as above (replacing "link" or "linkmo" accordingly), for linking to e-mail addresses.
{{logarchivelist}}
Generates a list of links to all your monthly/weekly log archives. The appearance of these links is controlled by the Log Archives Link template (under Miscellaneous Templates) and the Log Archives Link Separator.
{{logbody}}
Placeholder for use only in the Main Index or Archive Log Index Templates; when the log is generated, this tells Greymatter where to place the body of the log (the current log for the main index, and the monthly/weekly log for the archive log index).
{{logentrylist}}, {{logshortentrylist}}, {{logmoreentrylist}} (plus optional variants: day, month, year, firsthalf, secondhalf, number, comments, commentsminimum, commentsnumber, and author name)
Generates a list of links to your individual entry pages (unless you have those disabled). The appearance of these links is controlled by the Entry List Link templates (under Miscellaneous Templates) and the Entry List Link Separator. {{logentrylist}} generates a list of links to all your entries; {{logshortentrylist}} generates a list for non-extended entries only, and {{logmoreentrylist}} for extended entries only. With each of those you can optionally specify that only a particular range of entries be listed:
- daylists the entries only for the most recent day that entries were posted
- monthlists the entries only for the most recent month
- yearlists the entries only for the most recent year
- firsthalflists the first (most recent) half of all entries
- secondhalflists the second (older) half of all entries
- numberlists the most recent number of however many entries you specify in Configuration
- commentslists entries sorted by the number of comments they've received
- commentsminimumsame as above, but lists entries only if they've received at least one comment
- commentsnumberlists the top X most-posted-to entries (X being whatever you specified in Configuration)
- (name of any author)lists all entries by that particular author
So, for example, {{logshortentrylist month}} would list all the non-extended entries for the current month; {{logentrylist firsthalf}} and {{logentrylist secondhalf}} would list all the entries in separate halves (useful if you want to list them in two columns); {{logmoreentrylist number}} would list the twenty most recent extended entries, if you have "Log entry list variable number" in Configuration set to 20; {{logentrylist commentsminimum}} lists all entries, sorted by number of comments, that have received at least one comment (you can specify in Configuration whether or not this only lists entries for which comments can still be posted to); {{logmoreentrylist commentsnumber}} would list the top five most-posted-to entries if you have "Log entry list variable number" in Configuration set to 5; {{logentrylist WhiteRabbit}} would list all entries written by WhiteRabbit; and so on.
{{logwebpath}}
Inserts the web directory where your main index is, as specified in Configuration.
{{karmalink}}
The contents of the {{karmalink}} template, for use in voting on an entry's karma. This won't appear with entries for which karma is disabled, or if karma voting is disabled altogether.
{{militaryhour}}
Displays the number of the relevant hour, in military time (always double-digit). The custom in military time is to add twelve to any hour after noon; so for example, 2 PM would be 14 in military time.
{{minute}}, {{minuteminute}}
Displays the number of the relevant minute. {{minuteminute}} forces it to two digits (if it's not already), padding single-digit numbers with zeroes (for example, 5 becomes 05).
{{month}}, {{monthmonth}}
Displays the number of the relevant month. {{monthmonth}} forces it to two digits (if it's not already), padding single-digit numbers with zeroes (for example, 3 becomes 03).
{{monthword}}, {{monthwordupper}}, {{monthwordlower}}, {{monthwordshort}}, {{monthworduppershort}}, {{monthwordlowershort}}
Displays the name of the month; {{monthwordshort}} displays it abbreviated to three letters. The "upper" and "lower" variations for both are for displaying it in upper- or lowercase respectively. So for example, the month of December would be displayed by the variables like so, in the order they're listed above: December, DECEMBER, december, Dec, DEC, dec.
{{morelink}}, {{morepreface}} (not recommended)
The contents of their respective templates; will only appear with entries that have an extended ("more") text. These are no longer recommended for use; it's simpler and more flexible now to distinguish standard and extended entries with their separate templates, so these are no longer necessary (but are kept for compatibility purposes).
{{next}} and {{nextmore}} as a prefix
When "next" or "nextmore" is used as a prefix to most variables, it will give the relevant variable output as it pertains to the next standard or extended entry; for example, {{nexthour}} gives the next entry's hour, {{nextmoreentrysubject}} the next extended entry's subject, and so on.
{{pagelink}}
Generates a link to the individual page for that entry. This is always generated, so you won't want to use this variable if you have individual entry page generation turned off, unless you want it to create links to pages that don't exist. =)
{{pageindexlink}}, {{pagearchiveindexlink}}, {{pagearchivelogindexlink}}
Generates links to the main index, the archive master index (if you have one), and the log archives for the current month or week, respectively.
{{pagesmartindexlink}}
Generates a "smart" link either to the main index page or, if the entry is an archived entry, to the log archives for that entry's month or week.
{{popup [filename] [title] [width]x[height]}}
Generates a popup window for images, as well as an HTML file for that popup window in the entries/archives directory (both according to the popup templates you specify). "Filename" is the name of the image file (the HTML file Greymatter creates for the window will be named based on this file as well), "title" is its title, and "width" and "height" are the image's width and height respectively. {{popup}} creates its link and HTML file according to your customisation of them in the templates. So, for example, {{popup me.jpg This is me 300x200}} would create a popup window for the me.jpg image in the entries/archives directory (creating a me.htm file there for the window as well) that is 300 pixels wide and 200 pixels high. Note that when you upload an image through Greymatter, you can have it automatically create a new entry with the correct {{popup}} variable already in place.
{{popupfile}}, {{popuphtmlfile}}, {{popuptitle}}, {{popupwidth}}, {{popupheight}}
Gives the image filename, HTML filename, title, width, and height respectively, from the popup variable above. These variables will, of course, only work in the popup templates.
{{positivekarma}}, {{negativekarma}}, {{totalkarma}}
The positive, negative and total karma ratings of that entry, respectively. If used outside the {{karmalink}} and {{entrykarmaform}} templates, these will just show up as permanent zeroes for entries on which karma is disabled or if karma voting is disabled altogether. Total karma is the positive minus the negative karma votes; 10 positive votes with 3 negative would give a 7 total karma rating, 4 positive with 7 negative would give -3 total.
{{positivekarmalink}}, {{negativekarmalink}}
Generates links for voting upon that entry's karma for the positive or the negative respectively. If used outside the {{entrykarmaform}} or {{karmalink}} templates, these links will always appear whether or not karma voting is enabled for that entry or if karma is disabled altogether (if karma's disabled, though, clicking the links will not alter that entry's karma).
{{previewcommentauthor}}, {{previewcommentemail}}, {{previewcommenthomepage}}, {{previewcommentbody}}
The name, e-mail, homepage of the author previewing the comment, and the text of the comment being previewed, respectively. These will only work in the Comment Previewing Confirmation Form.
{{previous}} and {{previousmore}} as a prefix
When "previous" or "previousmore" is used as a prefix to most variables, it will give the relevant variable output as it pertains to the previous standard or extended entry; for example, {{previoushour}} gives the previous entry's hour, {{previousmoreentrysubject}} the previous extended entry's subject, and so on.
{{previouslink}}, {{nextlink}}, {{previousmorelink}}, {{nextmorelink}}
Inserts the contents of their respective templates, intended for use in linking to previous or next entries (or, with the "more" variations, previous/next extended entries). These will only appear if there's a non-closed previous/next entry (or extended entry, respectively) to be linked to.
{{randomnumber [x]-[y]}}
Displays a random number within the range you specify; for example, {{randomnumber 1-10}} generates a random number from 1 to 10 (inclusive). These numbers will be different each time the page in question is rebuilt, of course.
{{searchform}}
Inserts the form for searching through your entries.
{{searchterm}}, {{searchmatches}}, {{searchresults}}
The term used in a search, the number of matches for that search, and the total formatted results of the search, respectively. These variables only apply to the Search Results Page template.
{{second}}, {{secondsecond}}
Displays the number of the relevant second. {{secondsecond}} forces it to two digits (if it's not already), padding single-digit numbers with zeroes (for example, 7 becomes 07).
{{sidebar}}
Inserts whatever you have in the Sidebar template.
{{timezone}}
Your time zone, as entered in Configuration.
{{weekbeginning[?]}}, {{weekending[?]}}
Pertains to the date at the beginning or ending of the current week, respectively; [?] can be any of the variables pertaining to days, months, years, or weekdays. For example, {{weekbeginningday}} would give the day at the beginning of the current week, and {{weekendingmonthword}} would give the name of the month for the day at the end of the week.
{{weekday}}, {{weekdayupper}}, {{weekdaylower}}, {{weekdayshort}}, {{weekdayuppershort}}, {{weekdaylowershort}}
Displays the name of the weekday; {{weekdayshort}} displays it abbreviated to three letters. The "upper" and "lower" variations for both are for displaying it in upper- or lowercase respectively. So for example, Thursday would be displayed by the variables like so, in the order they're listed above: Thursday, THURSDAY, thursday, Thu, THU, thu.
{{year}}, {{yearyear}}
Displays the number of the relevant year. {{year}} displays only the last two digits of the year, and {{yearyear}} the full year; so for example, 2001 would be displayed as "01" and "2001" respectively.
First, assuming you can run Greymatter at all, be sure to run "Diagnostics & Repair" on the Configuration screen if you're having problems; that should be able to tell you what most of the holdups are, if Greymatter hasn't done so already along the waywhenever Greymatter has trouble accessing a file, it should stop and tell you what the problem is. You might also want to contact your server operator or webhost to find out if your server has any special limitations when running Perl software. Also, don't forget to check the discussion board on the Greysoft site; someone (including me) may be able to answer your problem there, if it hasn't been answered already.
PROBLEM: I keep getting a 500 Internal Service Error when I attempt to run Greymatter, or at a particular spot while attempting to do something in Greymatter.
DIAGNOSIS: First, check to make sure that you've uploaded everything in ASCII mode via your FTP program; if you're unsure, reupload all the files making sure that each upload is in ASCII mode. Next, check to make sure that your Perl pointers are correctly set, as specified in the installation instructions; then, double-check that everything is CHMODed correctly, also as specified in the installation instructions. If it still won't run after all that, then your server might not have Perl 5 or its standard modules installed.
PROBLEM: I can't seem to configure my paths correctly.
DIAGNOSIS: If you're absolutely certain that your paths are as they should be, and "Diagnostics & Repair" still gives you error notices, then try using virtual instead of relative paths instead. For example, your local CGI path would simply be a "." period (that just means "this directory is right where I'm running from"), and if your entries directory is a subdirectory of that named "archives", then your local entries path would be "./archives". Use "../" for going back one directory relative to the current one (where gm.cgi is); for example, if you have gm.cgi in /cgi-bin/gmfiles/ and you want your log path to be in /www/weblog/, you'd use "../../www/weblog"—the "../../" going back two directories and into "/www/weblog" from there. (Without the quotes, in all instances.)
PROBLEM: I get "Forbidden" errors whenever I try to view my main index and/or any of my entries.
DIAGNOSIS: If you've got your main index in your account's cgi-bin directory, and/or your entries directory as a subdirectory of that, then your server is probably set to automatically disallow viewing of any files in your cgi-bin directory (or subdirectories thereof) as a security measure. You'll have to have your log directory and your entries/archives directory to be somewhere other than in the cgi-bin directory.
PROBLEM: My entries or other files are messed up, and/or Greymatter just stalls out and stops running whenever I attempt to do something.
DIAGNOSIS: You may have interrupted Greymatter in the middle of an operation, such as adding a new entry or rebuilding files. Never do this, since this is the surest way to corrupt your Greymatter files. Keep in mind that actions like rebuilding files will always take some time, depending on how much Greymatter has to rebuild; if you have large templates, and/or you're trying to rebuild a significant amount of entries (and/or if entries contain a significant amount of comments), then rebuilding will probably require an ample amount of time. If your files have indeed been definitely corrupted, there will probably be no choice but to reinstall from scratch. If you believe you've encountered a genuine bug that corrupted your files through no fault of your own, then please don't hesitate to report it to me.
PROBLEM: I try to run Greymatter and get a bunch of text, but can't get the program to run properly; or, whenever I try to access Greymatter I'm simply prompted to download gm.cgi instead.
DIAGNOSIS: Your server may not have Perl 5 installed, or it may not be properly configured to run CGI scripts (*or* it may not allow for running CGI at all).