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
Safeway
123 Main Street
Davis, CA 95616

Directions/Map

* meeting/upcoming/index.php 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: "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.: 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: * "" 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.: * Then list the minutes! In the past we typically included sections for: * News (then a "