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

Directions/Map

* meeting/upcoming/index.php Maps & Directions

* 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 "

" tag) is correct. Then 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.: * 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 "