How to Update the LUGOD website:
--------------------------------
Bill Kendrick, bill@newbreedsoftware.com
Updated March 3, 2006
* Recent changes:
+ 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 "livepenguin.com" via SSH.
You'll need to ask Rod Roark to allow your IP addr. (rod@sunsetsystems.com)
From there, "cd www/lugod/" will get you to the root of the website.
* Updating the home page
----------------------
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 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 functions are identical: (1) icon to use, (2) geek
level, (3) date, (4) URL, (5) 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!)
(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.
(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.)
Examples:
fp_event("saclug", "-", "Tue Smarch 32", "http://www.saclug.org/",
"Sacramento LUG meeting. Topic TBA.");
Using "fp_event()" since it's a SacLUG event, not LUGOD.
Including the "saclug" icon, since we have one.
Using "-" ("?"-shaped geek-o-meter), since the topic is unknown.
Included a brief date.
Included a fully qualified URL, since it's an external website.
Included a brief description.
fp_levent("if", "0", "Thu Febtober 0", "/if/",
"Linux Installfest in Davis. Please RSVP.");
Using "fp_levent()" since it's a LUGOD event.
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.)
DATE - Human-readable date. ("Month D, YYYY" format, e.g.
"May 4, 2010")
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 75x75 or 80x80) 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.
Note: Try not to make icons much bigger than 75 wide and
75 tall. If you're using a company's logo, and it's much
wider than it is tall, go ahead and make it up to 85 wide,
so it remains readable. :^)
SUMMARY - Summary of the speaker / presentation / etc. It's nice to
include a bio, if you can. (Feel free to use HTML "
" paragraph marks for spacing.) Be sure to mention other important things, like if the meeting is at a special location, on a different date, etc. If the project, company or person has a website, it's nice to include links. (e.g., "Joe Schmoe's Back Scratcher tool is an Open Source project meant for...") SUMMARY_BRIEF - If the main summary is too long to nicely fit on the automatically generated LUGOD meeting flyer (http://www.lugod.org/documents/flyers/autoflyer.php), you can _optionally_ include a shorter version here. If this is not set (e.g., '$SUMMARY_BRIEF = "";' in the PHP file), the normal summary will be used. 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: Davis Public Library ("library") Kemper Hall (Engr Unit II) ("euii") Davis Food Co-Op ("coop") Ding How chinese rest. ("dinghow") an unknown location ("location-tba") 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"); } * std/frontpage.php else if ($MTG_LOCATION == "safeway") { echo ""; echo "Map/Directions"; } * meeting/index.php } else if ($MTG_LOCATION == "dinghow") { ?>
|
Safeway 123 Main Street Davis, CA 95616 Directions/Map
|
![]()
|
* Updating a meeting agenda ------------------------- Simply edit the HTML/PHP of "meeting/index.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. Edit the HTML/PHP of "meeting/upcoming/index.php". First off, make sure the month listed at the very top (in an "
Photos by Pete Salzman
And add the photos! I usually shoved them all inside a set of "
") tags. Finally, for sake of download speed and disk space, I usually kept images no larger than 400 or 600 pixels wide (and 300 or 400 pixels tall). But, do as you will! 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:
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' 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:
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
---------
[ FIXME: to be written! 2005.07.02 ]
* Members List
------------
[ FIXME: to be written! 2005.07.11 ]
* The End
-------
That's all I can think of to explain for now! Enjoy! -bill!