How to Update the LUGOD website:
--------------------------------
Bill Kendrick, bill@newbreedsoftware.com / nbs@sonic.net
Updated August 2, 2017
* Recent changes:
+ August 2, 2017 -
- Forgot to note another place ("layout/upcoming.php") where
a new meeting venue (location) should be added. -bjk
+ May 15, 2017 -
- No longer need IP addr. added to SSH.
- Editig homepage index.php is not typically necessary; noted.
- Explained use of fpe() wrapper for fp_events()/fp_levents()
- Explained club name macros (e.g., $SACLUG)
- No longer need to enter date in meeting-topic.php; derived from $ANCHOR
- Noted new $SUMMARY* variables found in meeting-topic.php
- No longer need to maintain a month in
tag on /meeting/upcoming/
- Noted availability of past_meeting_pending() function for missing minutes
- 12 years later: finally added instructions on maintaining Jobs page
- 12 years later: finally added instructions on maintaining Members list
+ November 20, 2014 - Corrected a bogus path in "Adding new meeting locations"
+ October 6, 2012 - Location & agenda on Next Meeting page are now include()s
+ December 20, 2011 - New info on website location; typo fixes.
+ March 3, 2006 - Added "Installfest" section, covering use of "next.txt"
+ February 26, 2006 - Updated "News" section to cover new RSS-enabled news
system.
+ July 11, 2005 - Initial release
* About this How-to
-----------------
This file briefly explains how to update common parts of the LUGOD
website (events, meetings, news). Other parts of the site need very
little maintenance, and there are few set rules. PHP includes and
function calls are used a lot, but should be pretty self-explanatory.
(I'm willing to expand on any of it, though! -bjk 2005.07.02)
* Where is the website?
---------------------
Login as "lugod" at "lugod.org" via SSH.
From there, "cd www/lugod/" will get you to the root of the website.
* Updating the home page
----------------------
This should not normally be necessary. The meeting info, news,
upcoming events, and job postings are all dynamically driven.
But if you have to edit the description of the club on the home page,
just edit "index.php" in the website's root directory.
* Updating news items:
--------------------
The 5 most recent news items appear on the home page, and
the 50 most recent news items appear on the news page ("news/index.php")
as well as in an XML RSS feed file ("news/rss.xml").
Single news items can be viewed, as well ("news/item.php?show=..."); these
links are used by RSS news readers for the 'Complete story'.
News is stored in a plain ASCII text file, "news/news.txt",
and is in the following format:
YYYY-MM-DD HH:MM
Title
Body [HTML is okay]
[More body...]
[blank line to separate news items]
[...repeat for additional news items...]
The "YYYY-MM-DD" format is converted into "Mon. Day" on the home page
and on the news page. The complete time/date stamp is used in the XML
feed to uniquely identify each news item, as well as tell RSS new readers
which news items are new.
The most recent news item should be at the top. Time/date-stamps should be
unique to each news item (so that "item.php" and the RSS XML files work).
After editing "news.txt", run 'make' while in the "news/" subdirectory.
This will call 'wget' to fetch an XML version of the news content
(by fetching "news/news_as_xml.php") and overwriting "news/rss.xml" with
the output. (It may be possible to simply call the "php" Linux binary,
but I didn't want to mess with that.)
* Updating the events calendar:
-----------------------------
The first 10 events are shown on the LUGOD front page. By default, all
types of events are shown, but visitors can choose to receive a cookie
which filters the front page listing to only LUGOD events.
All events (not just the first 10, and not just LUGOD events) are also
shown on a separate, comprehensive "Calendar" page: www.lugod.org/calendar/
Edit "events.php" in the website's root directory. Items should be in
date order, with the next event at the top, and the event furthest in the
future at the bottom of the file.
To add an item, call the function "fpe()". It's a wrapper, found in
"layout/fpe_wrapper.php".
Note: In the past, we directly called either the function "fp_levent()"
or "fp_event()". The former is for LUGOD events (our meetings, our
demos, our installfests, and at your discretion, events that we're
attending (like Whole Earth)). The latter ("fp_event()" with no "l")
is for other events. (Depending on which function is used, people who
filter the front page to show only LUGOD events might not see the event.
Make sense? :^) )
The arguments to both fp_event() and fp_levent() are identical:
(1) icon to use, (2) geek level, (3) date, (4) URL, (5) description.
The arguments to fpe() are slightly different:
(1) icon to use, (2) geek level, (3) starting date/time,
(4) ending time (date optional), (5) URL, (6) description.
(1) Icons are those found in the "newsicons/" subdirectory, and include
logos for various user groups, for the most part. For example, a SacLUG
meeting would probably want to have "saclug" for the icon. If there's no
icon, use "none". (For example, for "Joe Schmoe's One Time Computer
Festival", there's no point in us making an icon just to show it in the
calendar!)
What icons are available? Just look at "icon_*.gif" in the "newsicons/"
directory. Some examples: lugod, ucd, if, lwe, saclug, roselug, svlug.
(Note: don't include "icon_" or ".gif" in the argument to "fp_event()"!
It does that for you.)
(2) The geek level is how technical the event will be. 0 for conferences or
social gatherings. 1 for basic stuff. 4 for the most difficult. If we
don't know yet (i.e., there'll DEFINITELY be a LUGOD meeting, but we don't
know who the speaker will be), you can use the ? (question mark) icon,
by supplying "-" (dash, aka minus) as the second argument.
(Remember to put that in quotes, otherwise it's a PHP syntax error!)
fpe() - (3) Date/time of event start.
Entered as "YYYYMMDD-HHMM" (in 24hr format), e.g. "20170501-2345"
for May 1st, 2017 at 11:45pm.
fp_event() / fp_levent() - (3) Date of the event. It's plaintext, so
you can do stuff like: "November 14-19". Try to keep it short, though.
Some have asked that we include day-of-week in the date, so a format
like "Mon Smarch 33" is probably the friendliest.
fpe() - (4) Time (with optional date) of event end.
Entered as either "YYYYMMDD-HHMM", as with the start date/time,
or as simply "-HHMM", if the event doesn't span multiple days
(i.e., the typical situation). e.g., ..., "20170502-1700", "-1900", ...
would show an event that runs from 5pm to 7pm on May 2nd, 2017.
fpe() - (5) / fp_event() (4) For pages on the LUGOD website, you can
simply use URLs like: "/meeting/" and "/if/"; no need to include
"http://www.lugod.org".
For other websites, you obviously must include "http://...".
Typically, it's good enough to point to the website's main page.
(e.g., if it's a SacLUG meeting, just use "http://www.saclug.org/")
For LUGOD events, you'll want to link to the page describing the
particular event (e.g., "/projects/demo/")
For LUGOD meetings after the next one, it's best to link to the
"Upcoming Meetings" page (www.lugod.org/meeting/upcoming/), and use
the anchor link to that meeting's date.
e.g.: "/meeting/upcoming/#2004.12.07" That'll take them right to that
particular meeting's info; they won't need to scroll around to find it.
Try to convey as much as you can about the event, without using up too
much space. Also, for user groups, abbreviating "LUG" is okay, but
for things that people may not have heard of (like "BALUG" or "SVBUG"),
or where they are, write it out a little. (i.e., "Bay Area LUG meeting
in San Francisco" and "Silicon Valley BSD User Group meeting in San Jose"
for the examples above.) Finally, if they need to RSVP for the event,
mention that! (e.g., "Please RSVP!" at the end of the description.)
A number of "club name" macros are defined at the top of "events.php",
which you can concatenate with the event details. e.g.:
$SACLUG . "Linux on PowerPC"
Examples:
fpe("saclug", "-", "19990101-1900", "-2100", "http://www.saclug.org/",
$SACLUG . "Topic TBA.");
fpe("if", "0", "20011231-1000", "-1800", "/if/",
"Linux Installfest in Davis. Please RSVP.");
Included the "if" (installfest) icon, since we have one.
Using "0" geek-o-meter level, since it's not a presentation.
Brief date.
Short URL is sufficient, since it's a local page.
(Don't forget the "/" at the front!)
Brief description, mentioning location and RSVP requirement.
Other good things to mention... include whether LUG meetings events are
on different dates than usual, at different locations than usual,
at a location TBD, and/or are tentative (e.g., speaker /thinks/ they
can come that day, but will get back to us in a week to confirm).
Just include these things in parenthesis ("()") or brackets ("[]")
in the description, at the end.
* Updating the Next LUGOD Meeting
-------------------------------
Try to do this ASAP after a meeting. I (Bill K.) always tried to do it
the night of the meeting, so if someone visited the website the next
day, it would already be up-to-date. You don't have to be as insane
about it.
Edit "meeting-topic.php" in the website's root directory.
It contains some PHP variable definitions which are then include()'d and
used in a variety of other places -- the front page, the next meeting page,
the upcoming meetings page, and the automated flyer.
Variables:
ANCHOR - The date, which is used as an HTML anchor on the
'Upcoming Meetings' page. ("YYYY.MM.DD" format.)
(i.e., "http://www.lugod.org/meeting/upcoming/#2010.05.04")
DAY_OF_WEEK - The day of the week ("Monday", "Tuesday", etc.)
(No longer need to enter; derived from $ANCHOR)
DATE - Human-readable date. ("Month D, YYYY" format, e.g.
"May 4, 2010")
(No longer need to enter; derived from $ANCHOR)
TOPIC - Topic for the event. ("Linux as a Back Scratcher")
Or "Topic TBA" if we don't know yet (YIKES!)
SPEAKER - Speaker(s) name(s). Include title(s), if applicable.
("Joe Schmoe, CEO")
ORG - Organization speaker is from, if applicable.
(It can be blank, e.g. if it's just a member speaking
about a random topic not related to their work or business)
GEEK - Geek level of the meeting. (Same as on the front page.)
Use "0" for 'not-applicable' and "-" for 'unknown'.
Don't forget quotes!
IMG - Icon for the event. Icon should be stored in
"/meeting/icons/". Just include the file name
(e.g., "backscratch.png"), no need to include a path.
What I typically did was create some simple icon
(usually no larger than 150x150) that's fun to
look at and kind of conveys the topic. It could be the
company's logo, for example.
IMG_W / _H - Icon size. These are stuck in the "width"/"height"
attributes of the HTML "
" tags.
Tip: If you forgot the size/shape of the image, you can
use the command-line tool "file" or "identify" right on
the 'lugod' account's shell! Or, use a graphics tool
like The Gimp, or even just a web browser (look for the
size info. in the browser's window title bar) to determine
the size.
Summaries -- This is HTML, so you can add hyperlinks,
breaks, etc.
(but don't go crazy)
SUMMARY_TOP - Brief description of the speaker / presentation,
to be shown on the homepage ("Next LUGOD Meeting" box) and
on the meeting page itself (/meeting/).
SUMMARY_MIDDLE - (Optional) More text, which won't be shown on the home
page. Generally not used, but if you have lots of details
to include, prior to something else that's important to
show at the bottom, on both the homepage and meeting page
(e.g., details of the topic), use this.
SUMMARY_BOTTOM - (Optional) Text to show at the bottom, on both the
home page, and the meeting page. Useful for a brief bio.
SUMMARY_BOTTOM_EXTENDED - (Optional) Need even more text at the end,
only on the meeting page (not the home page)? Put it here.
To summarize (hah!), the homepage is the concatenation of
$SUMMARY_TOP . $SUMMARY_BOTTOM.
What's shown on the meeting page is everything (concatentation of
$SUMMARY_TOP . $SUMMARY_MIDDLE . $SUMMARY_BOTTOM . $SUMMARY_BOTTOM_EXTENDED)
USUALLY, by the time you want to post a meeting topic on the home page and
meeting page, you already know all the details; they're over on
/meeting/upcoming/. So you'll generally just be copy/pasting.
(See below!)
That's it!
* What if the meeting isn't at the Library [or wherever we normally meet]!?
-------------------------------------------------------------------------
Simply edit: "meeting-location.php" and change the "$MTG_LOCATION" variable
and all will be set!
Well, assuming the meeting is at one of the following locations:
"library" Davis Public Library, Blanchard Room
"euii" Kemper Hall, Room 1131
"coop" Davis Food Co-Op, Conference Room
"coop-kitchen" Davis Food Co-Op Teaching Kitchen
"dinghow" Ding How Restaurant
"sudwerk" Sudwerk Restaurant
"dov" Delta of Venus Cafe
"crepeville" Crepeville
"solisys" SoliSys
"giedthall" Giedt Hall, Room 1006
"wickson" Wickson, Room (DEPENDS)
"explorit" Explorit Nature Center (5th Street)
"dos" Dos Coyetes (south Davis)
"vetcenter" Veteran's Memorial Center
"location-tba" (To Be Determined)
The value set here causes links on various parts of the site to point
the next meeting's location to a various page (e.g., "/meeting/euii/"
if it's at EUII), _AND_ also causes the other pages (e.g.,
"/meeting/library/") to simply state: "The meeting is located elsewhere!"
Cool, huh? What if it's at some OTHER location? Well, see below.
* Adding new meeting locations
----------------------------
As described above, the "meeting-location.php" script includes a variable
("$MTG_LOCATION") which gets set to one of our regular meeting locations.
If we need to add some new location (say we find a different venue that
completely replaces the Library), follow these steps:
1. Make the new page. Make a new directory under "meeting" that briefly
describes the venue (e.g., "safeway") and create the actual page
(feel free to use one of the existing pages as a template; don't forget
to change the page title!)
2. Add the new venue as an example in "meeting-location.php", just as a
reference.
3. Add handlers for this new venue in the following pages:
* layout/std.php:
else if ($MTG_LOCATION == "safeway")
{
sidebar_subitem("/meeting/safeway/",
"Directions", $subsection,
"Directions to North Davis Safeway");
}
* layout/frontpage.php
else if ($MTG_LOCATION == "safeway")
{
echo "";
echo "Map/Directions";
}
* meeting/locations.inc.php
} else if ($MTG_LOCATION == "dinghow") { ?>
* meeting/upcoming/index.php
} else if ($MTG_LOCATION == "safeway") { ?>
Maps & Directions
* layout/upcoming.php
$location_names = array(
...
"safeway" => "Safeway",
...
$location_addresses = array(
...
"safeway" => "123 Main St., Davis CA 95616",
...
* Updating a meeting agenda
-------------------------
Simply edit the HTML/PHP of "meeting/agenda.inc.php".
Typically, not much to do here beside:
* Update date(s) of recent ongoing events (like Installfests & Demos)
* Update date(s) of upcoming events (like Installfests & Demos)
* Add/remove "Other Business" items (like "Raffle" and "Offc. Elections")
* Change coordinator and/or officer names for various project reports/etc.
* Adding/updating meetings on "Upcoming Meetings" page
----------------------------------------------------
The next meeting is listed at the top of the Upcoming Meetings page
automatically, since it includes "meeting-topic.php" and
"meeting-location.php" described above.
Once you migrate a meeting's details over to "meeting-topic.php" (so that
it appears on the homepage and /meeting/ page; see above), you'll already
have it here. So, be sure to REMOVE it from here, lest you end up with the
next meeting appearing twice on the /meeting/upcoming/ page!
Simply add the meeting in the appropriate spot on the page.
(The next immediate meeting should be at the top, and the meeting the
furthest in the future should be at the bottom.) I try not to leave gaps,
and if I need to, include known meeting dates to fill those gaps, and simply
list the meeting topic/speaker as "TBA".
There's an "upcoming()" PHP function you should call, which accepts the
following arguments: (1) date of the meeting (as an anchor tag),
(2) day-of-week of that date, (3) human-readable month/day/year,
(4) speaker, (5) organization, (6) topic, or talk title,
(7) geek level, (8) icon, (9) icon width, (10) icon height,
(11) talk description/summary.
Example:
upcoming("2010.05.04", "Tuesday", "May 4, 2010",
"Bill Kendrick", "LUGOD", "How to run a LUG",
"1", "lug.png", 75, 60,
"Blah blah blah"); ?>
"2010.05.04" will be the HTML "" anchor tag which can be
used on the front page (by using "/meeting/upcoming/#2010.05.04"
as the event's URL)
"Tuesday", "May 4, 2010" combine to form the date
The speaker is required, but the organization can be left blank ("")
The topic should be short and to the point
This is a geek-level 1 talk.
The icon for this event is "lug.png" which is 75x60 pixels.
If there's no icon specifically for this event, just
use "none.gif", "75" and "75".
If the topic is still "To Be Announced", use "tba.gif", "75" and "75".
Finally, the meat goes here. Feel free to use HTML, especially
hyperlinks to the speaker's company/organization/homepage, to the
home pages of companies/orgs whose products/projects will be discussed,
and even to Wikipedia.org pages describing technical terms!
Note: I like to keep track of speakers' email addresses so I can ping them
if I'm waiting to hear back for more information, or simply so I can email
them just before the meeting to double-check that they remember about it!
PUT THIS INSIDE PHP COMMENTS, so that the email address is not visible, even
upon doing a 'View Source' of the web page! e.g.:
/* somedude@place.org */ ?>
Note: Be sure the upcoming event is on the online calendar, too!
(See above)
* Adding meeting minutes to "Past Meetings" page
----------------------------------------------
Edit "meeting/past/index.php". The most recent meeting should be at the top.
The very first meeting we ever had remains at the bottom of the page.
A function called "past_meeting()" is available. Its arguments are:
(1) date of the meeting (in YYYY.MM.DD format), (2) meeting location,
(3) speaker and organization, (4) topic / title, (5) geek level,
(6) a '1' if there are photos available, a '0' if not, and finally
(7) the URL to the speaker's presentation notes or slides, if available.
Examples:
past_meeting("2010.05.04", "Davis Safeway",
"Bill Kendrick, LUGOD", "How to run a LUG",
1, 1, "/presentations/lughowto.pdf");
2010.05.04 is the date. This will be used to both link to the actual
meeting's minutes (www.lugod.org/meeting/past/YYYY.MM.DD.php),
as well as to photos of the meeting, if available
(www.lugod.org/photos/YYYY.MM.DD/)
The meeting was at Safeway.
Bill Kendrick from LUGOD spoke. If multiple speakers, just list 'em all!
The topic was "How to run a LUG"
The geek-o-meter level of this meeting was "1" out of 4.
There ARE photos! (That's the 2nd "1" in the 3rd line)
There ARE presentation slides, and they live at
www.lugod.org/presentations/lughowto.pdf
past_meeting("1999.12.31", "Somewhere Else",
"Bullwinkle J. Clubmember", "WiFi - Wave of the future",
3, 0, "");
This talk was level 3 geekiness, there were no photos of it,
and no slides are available.
Now, we of course need the meeting minutes themselves. Create a new file
in the form "YYYY.MM.DD.php" for the meeting date in question.
An easy way to do this is to copy an existing file into a new one, e.g.:
cp 1999.11.20.php 1999.12.31.php
...and then edit the new one.
The file should:
* " include("pastmtg.php"); ?>" at the top
* Call "pastmtg_start()" to start the page. Give it the meeting date,
in YYYY.MM.DD format, as an argument. e.g.:
pastmtg_start("1999.12.31"); ?>
* Then list the minutes! In the past we typically included sections for:
* News (then a "" bulleted list of news items)
* Project reports (then a "" bulleted list of reports for things like:
Demos, Installfests, LERT, Lending Library)
* Other business (e.g., raffles, give-aways, officer voting,
new projects)
* Presentation (we typically didn't take minutes of the entire talk!
That's what presentation slides are for! So link to them here, and
also link to photos of the meeting, if available!)
* Attendance (bulleted list of people who attended; first name only is
fine if that's all we have. If some names weren't taken, just end it
with "...and XYZ more")
Don't have meeting minutes yet, or no time to post them right now, use
"past_meeting_pending()" function. Please add a note to Trello that the
meeting minutes are still waiting to land on the website!
* Adding photos of meetings
-------------------------
Go into the "photos" directory and create a subdirectory for the photos,
typically based on the date in "YYYY.MM.DD" format,
e.g. www.lugod.org/photos/1999.12.31/
Begin the file by including a PHP helper file:
include("../photo.php"); ?>
Then start the page by calling either "photo_start_mtg()" or
"photo_start()", depending on whether the photos are of a meeting
or not. The argument to this function is the date of the event,
in "YYYY.MM.DD" format.
If the "_mtg" variation is called, a link will automatically be
included to the meeting minutes! (www.lugod.org/meeting/past/YYYY.MM.DD.php)
Example:
photo_start_mtg("YYYY.MM.DD"); ?>
Then describe the event, location, and credit the photographer(s), like so:
Bill Kendrick
How to Run a LUG
Safeway, Davis
Photos by Pete Salzman
And add the photos! I usually shoved them all inside a set of
"
"..."" tags, but do as you will. I usually
included a description beneath each photo, and separated them
using HTML paragraph ("") tags.
Finally, edit "photos/index.php" to add a link to this new page.
The most recent photos are at the top, the oldest photos are at the
bottom.
Regular meeting pages are grouped at the top, and photos from other
kinds of events (installfests, demos, exhibits) are grouped at the
bottom.
Examples:
- December 31, 1999 - Some Place, Davis
Some Person, Company Name - Topic of the talk
- May 12, 2010 - Sacramento Convention Center,
Sacramento
LUGOD at the 2010 Government Technology Conference
The former would be at the top, since it's a meeting. The latter would
be in the "other" section, towards the bottom of the page.
(And remember, if these are meeting photos, to link to these photos
from the meeting minutes page (e.g., "/meeting/past/YYYY.MM.DD.php")
as well as from the "Past Meetings" page, by setting the photos
argument to '1' or 'true' in the appropriate "past_meeting()" function call
in "/meeting/past/index.php". *WHEW!*)
* Adding presentation slides
--------------------------
Upload the speaker's presentation slides to the LUGOD website and
place them in the "presentations" directory. If there is more than one
file (e.g., slides, cheatsheet, and example source code), it makes
sense to pile all of the files into a subdirectory. In those cases,
I usually also created an EXTREMELY basic "index.html" file which
linked-to/described each file.
Then, just edit "presentations/index.php" and add a link in the
appropriate place. Slides from the most recent meeting should be at
the top. Slides from our very first meetings remain at the bototm of
the page.
Examples:
- December 31, 1999 - How to run a LUG
(Adobe PDF)
Bill Kendrick, LUGOD
- Smarch 33, 2929 - C Programming
Robo Mark Kim, Kim Industries
Note that in the first example, there's only one file, so we just link right
to it. Since it's not HTML, it's nice to warn the user what to expect, so
if applicable, include the file type in parenthesis (outside the link).
In the second example, we link to a subdirectory. Presumably, it contains
an "index.html" page that links to the actual files in question.
* Installfests
------------
The file "next.txt" in the "/if/" directory is PHP- include() ?>-ed by
the main /if/index.php page. (Currently, it's wrapped in an HTML ""
tag.)
The layout/std.php layout also reads the first line of this and
displays it (with a link to http://www.lugod.org/if/ ) at the top of every
page of the site, next to the phrase: "Next Installfest:".
(If the next Installfest date is unknown, simply put the acronym "TBA"
inside "next.txt").
* Jobs Page
---------
Edit jobs/jobs.php and add a function call (at the top; newest job should
be at the top, one posted longest ago at the bottom) to "job()".
It takes the following arguments:
(1) title of the job, (2) date it was posted (in YYYY.MM.DD format),
an ID, in case multiple jobs get posted in one day (for anchors);
usually I just leave it "0", but increment if more jobs are posted
on the same date, (3) location (e.g., "Davis", "Sacramento", "Telecommute"),
and summary of the job (HTML; useful to link to an online job post if it
exists elsewhere).
* Members List
------------
When members fill out a membership form at a meeting, or email the
webmaster to get added to the members page, add them to the file
"members/memberlist.txt". (Note: This file is protected from
being read directly, e.g. http://lugod.org/members/memberlist.txt
via an .htaccess file! Keep it that way!!!)
The file is tab-separated with the following columns:
* LastName
Begin with "-" to prevent the user from actually appearing on the page
(e.g., if they chose "no" for "May We List You?"; see the member sigup
form: http://lugod.org/members/join/lugod-signup-form.pdf)
* FirstName
* E-mail
Begin with "!" to prevent the email address from appearing.
* URL
If they have a website/blog
* Expertise
e.g., "Networking"
* Joined
When they joined LUGOD, in M/YYYY format
* Work
e.g., "Sysadmin", "Student", etc.
* Howheard?
(not displayed on the page) How they found out about LUGOD
(e.g., from a friend)
FIXME: Describe maintenance of Officers pages.
* The End
-------
That's all I can think of to explain for now! Enjoy! -bill!