SOM Web Server Environment: Apache/Unix, PHP, Oracle/mySQL* (latest versions)
* Please note that the use of PHP, Oracle, and mySQL on the main Perelman School of Medicine web server (http://www.med.upenn.edu) is restricted to the PMACS Development Team. For those within the Perelman School of Medicine who require advanced programming services, we have a separate "somapps" web server running PHP and mySQL. Users on this server are required to have a background in PHP and mySQL development. PMACS can provide information on the unique features to the server and how it fits into the University environment, but development in PHP and use of mySQL are self-guided.
Specifications shown here are for general internet sites; specifications for intranet sites vary based on the site's target audience.
Minimum Coding Standards: XHTML 1.0 Transitional and CSS 2/3 (HTML5 and CSS3 preferred where appropriate)
Internet Browser Specifications: We follow the current University recommendations.
Desktop Operating Systems: Windows7, XP, Mac OS X
The SOM web server has a number of options available for securing web pages. Before you pursue any of these options, however, please consult the PMACS Webmaster at somweb@mail.med.upenn.edu for guidance.
How to implement a GSA custom search
Search form
Include search form code in html according to where the search box is intended.
<form action="results.shtml" method="get">
<input type="text" name="query" />
<input type="submit" name="form_submit" value="Search" />
</form>
To add specific URL search options to the search form, you need to add to the html (directly below) and script (look at customization options under results page)
<form action="results.shtml" method="get">
<input type="text" name="query" />
<input type="submit" name="form_submit" value="Search" />
<input type="radio" name="searchUrls" value="http://www.med.upenn.edu" /> Perelman School of Medicine<br>
<input type="radio" name="searchUrls" value="http://www.med.upenn.edu/pysch" /> Dept. of Psych<br>
</form>
Results Page
Create a new html page and save as "results.shtml" (as it corresponds to search form code), which will show the results of the search. Plugins and script need to be added to this page for GSA results to generate properly.
Plugins must be included inside the <head> tags.
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://search.med.upenn.edu/jquery.gsaEmbed.js"></script>
</head>
Script to generate results need to be included after the </body> tag.
<script>
jQuery(document).ready(function($){
$('#gsa_search').gsaEmbed();
});
</script>
A div id is created from javascript ID given to search results on the page.
<div id="gsa_search"></div>
example
<!DOCTYPE html>
<!--[if lt IE 7]><html class=ie ie6" lang="en"><![endif]-->
<!--[if IE 7 ]><html class=ie ie7" lang="en"><![endif]-->
<!--[if IE 8 ]><html class=ie ie8" lang="en"><![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"><![endif]-->
<head>
<title>Search Results</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://search.med.upenn.edu/jquery.gsaEmbed.js"></script>
<meta charset="utf-8">
</head>
<body>
<div id="gsa_search"></div>
</body>
<script>
jQuery(document).ready(function($){
$('#gsa_search').gsaEmbed();
});
</script>
</html>
Customization Options
+ customize number of results per page
'resultsPerPage': #
example
<script>
jQuery(document).ready(function($){
$('#gsa_search').gsaEmbed({
'resultsPerPage': 1
});
});
</script>
+ limit search to one URL
'searchUrls': 'http://www.med.upenn.edu/department'
example
<script>
jQuery(document).ready(function($){
$('#gsa_search').gsaEmbed({
'searchUrls': 'http://www.med.upenn.edu/pmacswebteam'
});
});
</script>
+ define options to select which URL to search (need additional html markup, see above in search form page)
'searchUrlOptions': {
'Name/title of URL': 'http://www.med.upenn.edu/department',
'Name/title of URL': 'http://www.med.upenn.edu/department2'
}
example
<script>
jQuery(document).ready(function($){
$('#gsa_search').gsaEmbed({
'searchUrls': 'http://www.med.upenn.edu/cfar,http://www.med.upenn.edu/camb'
'searchUrlOptions': {
'Dept. of Psych':'http://www.med.upenn.edu/psych',
'Perelman School of Medicine': 'http://www.med.upenn.edu'
}
});
});
</script>
If you have any questions, please contact PMACS.
