The tips function is a JSP page that displays text files on the index.jsp page. The program randomly selects a text file from the tips directory. The time between updates is determined bye the number of days in the tipsproperites.txt file. The range of days is limited to the number of days in a year. The program saves the last Julian day last updated and compares it the the current Julian day. If the difference is greater than the day in the properties file, the program will update the tip and save a new Julian day.
File /tipsproperties.txt is used to determine the period at which the tips program updates a selected file. For example: If the value is 0, then the tips program will update every refresh of the page. To update quartly, the value should be 91.
The program read and writes three files: first is the tips.properties file which determines periodicity of the randomly selection of files in the /tips directory. Second is the .tips.dat file. this file is used to record the current file selected. This allows the program to remember which file it last selected. The third file is the .date.dat. This file records the date, in julian format, when the last file was selected. This is used to allow the program to know when the file was changed.
With the three files, the program determines the amount of days the last file was selected. If the delta between the current day and saved day is more than the desired period, the program will select a new file and record it and the date it was saved. The program will also verify the newly selected file is not the same as the previously saved file. This will ensure a different file is selected when it displays a new file.
File selected performed by the program recording the names of the .txt files in the /tips directory. All referenced to the files are based on where the file is in a file table. If the files are added or delected, the program willl have to be restarted to know of the change. To restart the program is a simple as refreshing the index.jsp page. If you want to see the change, the period in the /tips.properties file will have to be set to 0. Do not forget to set the properties back to the desired settings after verification of the change is complete.
View /tips.properties.txt
This program takes data from a formated text file and displays the data in a html table. Each data point is placed in a specific field in the table. Each county has a specific file which are merged by the program. Simply edit the files and refre sh the page to verify changes. Mediation, Facilitation, and civic engagement each have an independent resource page.
Text files are named for the county they represent. They are located in /resources/mediation directory for mediation files. Facilidation files are located in /resources/facilitation and civic engagement files are located in /resources/civic directory. There is a file to represent California and Nation as well. In each text file every row in the web page is represented by a line in the file. The getlist.jsp file will read each line to create the link, name, address and phone number. Here is an example line from a text file. The first line is the type of data separated by "|". The second line is from a text file in the mediation directory:
link|name|alias|address1|address2|address3|phone http://www.ebcm.org/|East Bay Community Mediation|blnk|blnk|1968 San Pablo Ave.|Berkeley, CA 94702|510-548-2377
Content modifications is limited to adding or deleting county or adding or deleting a HTML table the each web page. This section does not cover modifying colomns in each of the pages tables. For example, to modify the content of the facilitation page, you need to modify the getlist.jsp file in the facilitation directory.
You are limited to only adding and deleting a county or catagory in the web page. The title of the county and reference to the text file must be entered by the user. The getlist.jsp must also know where it find the alameda.txt file. The following three lines are required to add Alameda County to the mediation resource page:
String alameda = "/home/orgpcrcw/public_html/resources/mediation/alameda.txt"; <tr><th align=left bgcolor="#CBCBCB" class="norm" colspan="3">Alameda County</th></tr> <% out.print(createTable(alameda));%>
view text file: /resources/mediation/sanmateo.txt
View getlist.jsp: /resources/mediation/getlist.jsp
Setup your PC or Mac to run the temporary web site, http://pcrctemp.org, until the domain can be transfered.
MAC
sudo vi /etc/hosts
# Added for pcrctemp.org
63.247.81.244 pcrctemp.org www.pcrctemp.org
This program gives the guest an opportunity to learn more about the Peninsula Conflict Resolution Center's services by asking a questions of one of the mediators. If the guest ahve a situation with the neighbor, landlord, or co-worker and wonder if the mediators can help. The guest can click on the subject title to read through other questions and responses. If the guest still have questions, click on the "Ask a Question" link. The administrator can answer those questions by clicking on the admin login link on the top right corner. It will ask the administrator for a password. The administrator then will be brought to a adminview page which is similar to userview. but it has an extra category called "unanswered". This is where all the unanswered questions go. The administrator can answer them by clicking on the title then answer it. Make sure to remember to place the answer to the right category. The administrator can also delete a question by simply clicking on the red delete button at the bottom of the page.
The name of the database is orpcrct_ask. There are total four tables. The answer table is where the mediator answers are stored. The category table is where the count of replies are stored. The message is where the user questions are stored. The password is where the password is stored. The password can be changed simply by changing the value of password.
Purpose:
This section explains how to modify where to send the Volunteer Survey form. The sendVol.jsp file uses JAVA classes to send the survey form to a designated email. It needs to know the STMP from which to send the email, the sender (Send From) address, and most importantly the Send To address.
Details
The survey file is located in the volunteers directory from the Document Root directory. The files names for the survey pages are /volunteers/survey.jsp and /volunteers/sendVol.jsp. This section only explains how to change the email sections of these two files. See the documentation to get the details on how the survey pages works. In the /volunteers/sendVol.jsp file, there are assigned variables for the STMP, FROM, and TO address. To change any email information, change the variable values in the sendVol.jsp file. Here is an example of the variables.
String smtphost = "mail.pcrcweb.org";
String sendTo = "jbullock@pcrcweb.org";
String sendFrom = "survey@pcrcweb.org";
To change the variables download /volunteers/sendVol.jsp. Open the file in a text editor. Change the variable. Put the file back on the server. Send or Resend the survey to verify the email has been sent.
If the smtp variable is incorrect an error will be printed on the page after you send the survey. If you do not get the email, then the sendTo is incorrect. The sendFrom email has to be checked via the email sent.