From: dbs Date: Sat, 9 Apr 2011 11:11:56 +0000 (+0000) Subject: And add the other new files from Anoop's patch, too X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ae114a157298770e25168a8be436503a4e82216f;p=Evergreen_Website.git And add the other new files from Anoop's patch, too git-svn-id: svn://svn.open-ils.org/ILS-Contrib/evergreen-ils.org@1321 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/css/cssmenu.css b/css/cssmenu.css new file mode 100644 index 0000000..ceef60a --- /dev/null +++ b/css/cssmenu.css @@ -0,0 +1,77 @@ +/*------------------------------------*\ + NAV +\*------------------------------------*/ +#nav{ + float:left; + width:100%; + list-style:none; + font-weight:bold; + margin-bottom:10px; +} +#nav li{ + float:left; + margin-right:10px; + position:relative; + display:block; +} +#nav li a{ + display:block; + padding:5px; + color:#fff; + background:#333; + text-decoration:none; + + text-shadow:1px 1px 1px rgba(0,0,0,0.75); /* Text shadow to lift it a little */ + -moz-border-radius:2px; + -webkit-border-radius:2px; + border-radius:2px; +} +#nav li a:hover{ + color:#fff; + background:#6b0c36; /* Solid colour fall-back */ + background:rgba(107,12,54,0.75); /* It'll look nice semi-transparent */ + + text-decoration:underline; +} + +/*--- DROPDOWN ---*/ +#nav ul{ + list-style:none; + position:absolute; + left:-9999px; /* Hide off-screen when not needed (this is more accessible than display:none;) */ + opacity:0; /* Set initial state to transparent */ + -webkit-transition:0.25s linear opacity; /* Make the dropdown fade-in in Webkit */ +} +#nav ul li{ + padding-top:1px; /* Introducing a padding between the li and the a give the illusion spaced items */ + + float:none; +} +#nav ul a{ + white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */ + display:block; +} +#nav li:hover ul{ /* Display the dropdown on hover */ + left:0; /* Bring back on-screen when needed */ + opacity:1; /* Fade to opaque */ + +} +#nav li:hover a{ /* Set styles for top level when dropdown is hovered */ + + background:#6b0c36; /* Solid colour fall-back */ + background:rgba(107,12,54,0.75); /* It'll look nice semi-transparent */ + text-decoration:underline; +} +#nav li:hover ul a{ /* Override some top level styles when dropdown is hovered */ + text-decoration:none; + -webkit-transition:-webkit-transform 0.075s linear; +} +#nav li:hover ul li a:hover{ /* Set styles for dropdown when items are hovered */ + + background:#333; /* Solid colour fall-back */ + + background:rgba(51,51,51,0.75); /* It'll look nice semi-transparent */ + text-decoration:underline; + -moz-transform:scale(1.05); + -webkit-transform:scale(1.05); +} diff --git a/css/news_box.css b/css/news_box.css new file mode 100644 index 0000000..8639965 --- /dev/null +++ b/css/news_box.css @@ -0,0 +1,61 @@ +/* http://spiffybox.com/ */ +/* set the image to use and establish the lower-right position */ +.cssbox, .cssbox_body, .cssbox_head, .cssbox_head h4 { +background: transparent url(/img/news_box.png) no-repeat bottom right} + +.cssbox{ +/* intended total box width - padding-right(next) */ +width:500px !important; /* IE Win = width - padding */ +width:500px; +/* the gap on the right edge of the image (not content padding) */ +padding-right:15px; /* use to position the box */ +margin:20px auto} + +/* set the top-right image */ +.cssbox_head{background-position:top right; +/* pull the right image over on top of border */ +margin-right:-15px; +/* right-image-gap + right-inside padding */ +padding-right:40px} + +/* set the top-left image */ +.cssbox_head h4 { +background-position:top left; +margin:0; /* reset main site styles*/ +border:0; /* ditto */ +/* padding-left = image gap + interior padding ... no padding-right */ +padding:25px 0 5px 30px; +height:auto !important; +height:1%} /* IE Holly Hack */ + +/* set the lower-left corner image */ +.cssbox_body { +font:90%/140% Verdana, Arial, Helvetica, sans-serif; +background-position:bottom left; +margin-right:25px; /* interior-padding right */ +padding:5px 0 15px 30px} /* mirror .cssbox_head right/left */} + +#news_box p { +/* +Flush left, ragged right +1.25em basic leading (line height), one lead boundary (vertical margins) +*/ +display:block; +width:75%; +font-size: 1em; +line-height: 1.25em; +margin: 1.25em 0; +text-align: justify; +background-color: #e9e9e9; +padding: 4px 4px 4px 8px; +} + +#news_box h3 { +font-size: 100%; +margin: 10px 0 7px 0; +padding: 4px; +color: #CE4F09; +font-weight: bold; +background: #FFD900; +} + diff --git a/css/purecssmenu.css b/css/purecssmenu.css new file mode 100644 index 0000000..8103a78 --- /dev/null +++ b/css/purecssmenu.css @@ -0,0 +1,134 @@ +/* +Based on PureCSSMenu + +*/ + +#pcm{ display:none;} +ul.pureCssMenu ul{ display:none} +ul.pureCssMenu li:hover>ul{ display:block} +ul.pureCssMenu ul{position: absolute;left:-1px;top:98%;} +ul.pureCssMenu ul ul{position: absolute;left:98%;top:-2px;} +ul.pureCssMenu,ul.pureCssMenu ul { + margin:0px; + list-style:none; + background-color:#F5AE61; + background-repeat:repeat; +} +ul.pureCssMenu table {border-collapse:collapse}ul.pureCssMenu { + display:block; + zoom:1; + float: left; +} +ul.pureCssMenu ul{ + width:150px; +} +ul.pureCssMenu li{ + display:block; + margin:2px 0px 0px 2px; + font-size:0px; +} +ul.pureCssMenu a:active, ul.pureCssMenu a:focus { + outline-style:none; +} +ul.pureCssMenu a, ul.pureCssMenu li.dis a:hover, ul.pureCssMenu li.sep a:hover { + display:block; + vertical-align:middle; + background-color:#F5AE61; + text-align:left; + text-decoration:none; + padding: 0px 14px; + _padding-left:0; + font:bold 12px Verdana; + color: #333; + text-decoration:none; + cursor:pointer; +} +ul.pureCssMenu span{ + overflow:hidden; +} +ul.pureCssMenu li { + float:left; + text-shadow: 0px 0px 1px #FFFFFF; + background: #F5AE61; + padding: 4px 2px; +} +ul.pureCssMenu ul li { + float:none; +} +ul.pureCssMenu ul a { + text-align:left; + white-space:pre-line; +} +ul.pureCssMenu li.sep{ + text-align:left; + padding:0px; + line-height:0; + height:100%; +} +ul.pureCssMenu li.sep span{ + float:none; padding-right:0; + width:3px; + height:100%; + display:inline-block; + background-color:#cccccc #111111 #111111 #cccccc; background-image:none;} +ul.pureCssMenu ul li.sep span{ + width:100%; + height:3px; +} +ul.pureCssMenu li:hover { + position:relative; +} +ul.pureCssMenu li:hover>a { + background-color:#E9E9E9; +} +ul.pureCssMenu li a:hover{ + background-color:#E9E9E9; +} +ul.pureCssMenu li.dis a { + color: #666 !important; +} +ul.pureCssMenu img { + border: none; + float:left;_float:none; + margin-right:2px; + width:16px; + height:16px; +} +ul.pureCssMenu ul img { + width:16px; + height:16px; +} +ul.pureCssMenu img.over{ display:none } +ul.pureCssMenu li.dis a:hover img.over{ display:none !important } +ul.pureCssMenu li.dis a:hover img.def { display:inline !important } +ul.pureCssMenu li:hover > a img.def { display:none } +ul.pureCssMenu li:hover > a img.over { display:inline } +ul.pureCssMenu a:hover img.over,ul.pureCssMenu a:hover ul img.def,ul.pureCssMenu a:hover a:hover ul img.def,ul.pureCssMenu a:hover a:hover img.over,ul.pureCssMenu a:hover a:hover a:hover img.over{ + display:inline +} +ul.pureCssMenu a:hover img.def,ul.pureCssMenu a:hover ul img.over,ul.pureCssMenu a:hover a:hover ul img.over,ul.pureCssMenu a:hover a:hover img.def,ul.pureCssMenu a:hover a:hover a:hover img.def{ + display:none +} +ul.pureCssMenu a:hover ul,ul.pureCssMenu a:hover a:hover ul{ display:block } +ul.pureCssMenu a:hover ul ul{ display:none } +ul.pureCssMenu span{ + display:block; + background-image:url(/img/arr_white.gif); + background-position:right center; + background-repeat: no-repeat; + padding-right:12px;} +ul.pureCssMenu li:hover>a>span{ + background-image:url(/img/arrv_white.gif); +} +ul.pureCssMenu a:hover span{ + _background-image:url(/img/arrv_white.gif) +} +ul.pureCssMenu ul span,ul.pureCssMenu a:hover table span{ + background-image:url(/img/arr_white.gif) +} + +/* + + + +*/ diff --git a/eg_changelog.php b/eg_changelog.php new file mode 100644 index 0000000..aef9309 --- /dev/null +++ b/eg_changelog.php @@ -0,0 +1,62 @@ + + + + + Documentation: Evergreen open source library system + + + +
+ + + + + +
+

ChangeLogs

+ +

2.0.0

+ +"; +foreach($globarray as $filename) { + $info = pathinfo($filename); + $target = htmlspecialchars($info['basename']); + printf( + "
  • %s
  • \n", + htmlspecialchars($filename), + $target + ); +} +echo ""; +?> + + +

    1.6.1

    + +"; +foreach($globarray as $filename) { + $info = pathinfo($filename); + $target = htmlspecialchars($info['basename']); + printf( + "
  • %s
  • \n", + htmlspecialchars($filename), + $target + ); +} +echo ""; +?> + +
    + + +
    + + diff --git a/incl/about_sidebar.php b/incl/about_sidebar.php new file mode 100644 index 0000000..61213ba --- /dev/null +++ b/incl/about_sidebar.php @@ -0,0 +1,29 @@ + + + +
    + + + +
    diff --git a/incl/com_sidebar.php b/incl/com_sidebar.php new file mode 100644 index 0000000..f55e43a --- /dev/null +++ b/incl/com_sidebar.php @@ -0,0 +1,31 @@ + + + +
    + + + +
    diff --git a/incl/doc_sidebar.php b/incl/doc_sidebar.php new file mode 100644 index 0000000..b710121 --- /dev/null +++ b/incl/doc_sidebar.php @@ -0,0 +1,29 @@ + + + +
    + + + +
    diff --git a/incl/downloads_sidebar.php b/incl/downloads_sidebar.php new file mode 100644 index 0000000..85eeb64 --- /dev/null +++ b/incl/downloads_sidebar.php @@ -0,0 +1,15 @@ + +
    + +
    diff --git a/incl/header.php.orig b/incl/header.php.orig new file mode 100644 index 0000000..93ed45b --- /dev/null +++ b/incl/header.php.orig @@ -0,0 +1,27 @@ + +
    +Open Source Integrated Library System +
    + + diff --git a/incl/news_box.php b/incl/news_box.php new file mode 100644 index 0000000..16469a1 --- /dev/null +++ b/incl/news_box.php @@ -0,0 +1,359 @@ +next()->title; // "Blog post 1" + * echo $feed->next()->title; // "Blog post 1" + * echo $feed->next()->title; // "Blog post 2" + * echo $feed->current()->title; // "Blog post 2" + * + * //Feed data returned + * echo $feed->current()->title; // "Blog post 2" + * echo $feed->current()->date; // int(1265569159) + * echo $feed->current()->description; // "Lorem ipsum dolar..." + * echo $feed->current()->link; // "http://www.example.com/blog/2" + * echo $feed->current()->image; // "http://www.example.com/blog/images/2.jpg" + * + * //Get multiple items in single call + * foreach ($feed->find(3) as $item) { + * echo $item->title; // "Blog post 3" "Blog post 4" "Blog post 5" + * } + * + * //Reset internal counter + * echo $feed->reset(); + * echo $feed->next()->title; // "Blog post 1" + * + * //Get random items, without repeating + * echo $feed->random()->title; // "Blog post 4" + * echo $feed->random()->title; // "Blog post 3" + * + * //Total number of items + * echo $feed->count(); // int(10) + * + * Changed 'url' => (string)$node->link to 'link' => (string)$node->link in function item. [Anoop Atre] + */ +class Feed { + private $url; + private $reader; + private $current; + private $remaining; + + public $cacheTime = 3600; + + /** + * Create Atom reader object. + * + * @param string $url + */ + public function __construct($url) { + $this->url = $url; + $this->reset(); + } + + /** + * Reset current item to first RSS item. + */ + public function reset() { + $this->current = -1; + $this->remaining = null; + } + + /** + * Get the next item in the feed. + * + * @return stdClass Object representing the item. Will return null when the list is exhausted. + */ + public function next() { + if ($this->current < $this->count()) { + $this->current++; + $next = $this->getReader()->item($this->current); + return $next; + } + } + + /** + * Get the current item in the feed. + * + * @return stdClass Object representing the item. Will return null when the list is exhausted. + */ + public function current() { + return $this->getReader()->item(max(0, $this->current)); + } + + /** + * Get random item from the feed. Will not return an item more than once. + * + * @return stdClass Object representing the item. Will return null when the list is exhausted. + */ + public function random() { + if ($this->remaining === null) { + $this->remaining = array(); + for ($i = 0; $i < $this->count(); $i++) { + $this->remaining[] = $i; + } + } + + if (count($this->remaining)) { + $picked = array_rand($this->remaining); + $index = $this->remaining[$picked]; + unset($this->remaining[$picked]); + return $this->getReader()->item($index); + } + } + + /** + * Get X items from feed. Will advance pointer. + * + * @param int $count + * @return array of stdClass + */ + public function find($count) { + $items = array(); + + while ($item = $this->next()) { + $items[] = $item; + if (count($items) >= $count) { + break; + } + } + + return $items; + } + + /** + * Get the number of items in the feed. + * + * @return int + */ + public function count() { + return $this->getReader()->count(); + } + + /** + * Get FeedReader object for the feed. + * + * @return FeedReader + */ + private function getReader() { + if (!$this->reader) { + $xml = $this->getXML(); + if (RSSReader::canRead($xml)) { + $this->reader = new RSSReader($xml); + } else if (AtomReader::canRead($xml)) { + $this->reader = new AtomReader($xml); + } else { + $this->reader = new NullReader($xml); + } + } + return $this->reader; + } + + /** + * Get XML element for the feed. + * + * @return SimpleXMLElement + */ + private function getXML() { + if ($xml = $this->getCacheXML()) { + return $xml; + } else if ($xml = $this->getURLXML()) { + return $xml; + } else { + return new SimpleXMLElement(""); + } + } + + /** + * Get XML element for the feed from cache. + * + * @return SimpleXMLElement or null if cache doesn't exist. + */ + private function getCacheXML() { + //Store URL data in local cache. + $cacheFilename = $this->getCacheFilename(); + if (file_exists($cacheFilename) && (time() - filemtime($cacheFilename)) < $this->cacheTime) { + if ($data = file_get_contents($cacheFilename)) { + return new SimpleXMLElement($data); + } + } + } + + /** + * Get XML element from the feed from the live URL. + * Will cache XML data to disk. + * + * @return SimpleXMLElement or null if URL is unreachable. + */ + private function getURLXML() { + if ($data = @file_get_contents($this->url)) { + try { + $xml = new SimpleXMLElement($data); + file_put_contents($this->getCacheFilename(), $data); + return $xml; + } catch (Exception $e) { + return null; + } + } + } + + /** + * Name of the cache file for current URL. + * + * @return string + */ + private function getCacheFilename() { + return sys_get_temp_dir() . '/' . md5($this->url) . '.feed.cache'; + } +} + +/** + * Interface for reading items from feed. + */ +interface FeedReader { + + /** + * Create reader from SimpleXMLElement. + * + * @param SimpleXMLElement $root + */ + public function __construct(SimpleXMLElement $root); + + /** + * Get single node. + * + * @return array or null. + */ + public function item($index); + + /** + * Get number of items. + * + * @return int. + */ + public function count(); + + /** + * Can this reader understand the XML file? + * + * @param SimpleXMLElement $root + * @return bool + */ + public static function canRead(SimpleXMLElement $root); + +} + +/** + * Concrete implementation of FeedReader that will never return an item. + */ +class NullReader implements FeedReader { + + public function __construct(SimpleXMLElement $root) { + //Nothing + } + + public function count() { + return null; + } + + public function item($index) { + return null; + } + + public static function canRead(SimpleXMLElement $root) { + return true; + } +} + +/** + * Concrete implementation of FeedReader that will read an Atom feed. + */ +class AtomReader implements FeedReader { + + private $root; + + public function __construct(SimpleXMLElement $root) { + $this->root = $root; + } + + public function count() { + return count($this->root->entry); + } + + public function item($index) { + $node = $this->root->entry[$index]; + + if (!$node) { + return null; + } + + $item = array( + 'title' => (string)$node->title, + 'description' => (string)$node->description, + 'image' => null, + 'link' => null, + 'date' => strtotime($node->published), + ); + + //Iterate through link nodes getting content URL and images. + foreach ($node->link as $link) { + if (strpos($link['type'], 'text') === 0 || $item['link'] === null) { + $item['link'] = (string)$link['href']; + } + if (strpos($link['type'], 'image') === 0) { + $item['image'] = (string)$link['href']; + } + } + + return (object)$item; + } + + public static function canRead(SimpleXMLElement $root) { + //Check for Atom namespace. + return in_array('http://www.w3.org/2005/Atom', $root->getNamespaces()); + } +} + +/** + * Concrete implementation of FeedReader that will read an RSS feed. + */ +class RSSReader implements FeedReader { + + private $root; + + public function __construct(SimpleXMLElement $root) { + $this->root = $root; + } + + public function count() { + return count($this->root->channel->item); + } + + public function item($index) { + $node = $this->root->channel->item[$index]; + + if (!$node) { + return null; + } + + return (object)array( + 'title' => (string)$node->title, + 'description' => (string)$node->description, + 'link' => (string)$node->link, + 'image' => null, + 'date' => strtotime($node->pubDate), + ); + } + + public static function canRead(SimpleXMLElement $root) { + //RSS feeds name their root node 'rss'. + return $root->getName() == 'rss'; + } +} +?> diff --git a/incl/opensrf_sidebar.php b/incl/opensrf_sidebar.php new file mode 100644 index 0000000..d321cf7 --- /dev/null +++ b/incl/opensrf_sidebar.php @@ -0,0 +1,12 @@ + +
    + +
    diff --git a/incl/right_sidebar.php b/incl/right_sidebar.php new file mode 100644 index 0000000..b20abb8 --- /dev/null +++ b/incl/right_sidebar.php @@ -0,0 +1,25 @@ + + + +
    + + + +
    diff --git a/incl/search_box.php b/incl/search_box.php new file mode 100644 index 0000000..ba91018 --- /dev/null +++ b/incl/search_box.php @@ -0,0 +1,26 @@ +

    Search

    +
    + diff --git a/incl/search_sidebar.php b/incl/search_sidebar.php new file mode 100644 index 0000000..a13f705 --- /dev/null +++ b/incl/search_sidebar.php @@ -0,0 +1,23 @@ + + + +
    + + + +
    diff --git a/opensrf.php b/opensrf.php new file mode 100644 index 0000000..fd497c2 --- /dev/null +++ b/opensrf.php @@ -0,0 +1,100 @@ + + + + + Downloads: Evergreen open source library system + + + +
    + + + + + +
    +

    OpenSRF

    +

    Open Scalable Request Framework (OpenSRF), pronounced “open surf” is a message routing network that offers scalability and failover support for individual services and entire servers with minimal development and deployment overhead. You can use OpenSRF to build loosely-coupled applications that can be deployed on a single server or on clusters of geographically distributed servers using the same code and minimal configuration changes.
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     1.6 Series2.0 Series
    +
    Statusstableunstable
    +
    Latest Release1.6.32.0.0 RC
    Release Date2010-03-18
    2011-03-02
    ChangeLog
    +
    ChangeLogChangeLog
    Release Notes
    +
    Release NotesRelease Notes
    Clean InstallInstructionsInstructions
    SVN repositorySVN locationSVN location
    DownloadSource [tar.gz] [md5]
    +
    Source [tar.gz] [md5]
    +
       
    +

    Developing on OpenSRF
    +

    +

    Dan Scott has written a two part article which is a detailed introduction to OpenSRF.  "This article introduces OpenSRF, how to build OpenSRF services through code examples, explains the technical foundations on which OpenSRF is built, and evaluates OpenSRF’s value in the context of Evergreen" - "Easing gently into OpenSRF, Part 1" and "Easing gently into OpenSRF, Part 2".

    +

    He also has an introductory workshop available along with some Perl/JavaScript examples - "Evergreen development".

    +

    OpenSRF Bug Reports

    +

    Please report any OpenSRF bugs on Launchpad.

    +

    To report a vulnerability please email your report to open-ils-security@esilibrary.com.

    +

    Source Code Repository

    +

    A Trac instance sits atop the Subversion repository for OpenSRF and is available at svn.open-ils.org/trac/OpenSRF. Here is the running change log for the OpenSRF code repository: watch us work.

    +

    Trac sends code commits to public OpenSRF commits mailing lists:

    + +
    + + +
    + + diff --git a/opensrf_changelog.php b/opensrf_changelog.php new file mode 100644 index 0000000..859cc5f --- /dev/null +++ b/opensrf_changelog.php @@ -0,0 +1,62 @@ + + + + + Documentation: Evergreen open source library system + + + +
    + + + + + +
    +

    OpenSRF ChangeLogs

    + +

    2.0.0

    + +"; +foreach($globarray as $filename) { + $info = pathinfo($filename); + $target = htmlspecialchars($info['basename']); + printf( + "
  • %s
  • \n", + htmlspecialchars($filename), + $target + ); +} +echo ""; +?> + + +

    1.6.3

    + +"; +foreach($globarray as $filename) { + $info = pathinfo($filename); + $target = htmlspecialchars($info['basename']); + printf( + "
  • %s
  • \n", + htmlspecialchars($filename), + $target + ); +} +echo ""; +?> + +
    + + +
    + + diff --git a/staff_clients.php b/staff_clients.php new file mode 100644 index 0000000..3b43324 --- /dev/null +++ b/staff_clients.php @@ -0,0 +1,53 @@ + + + + + Documentation: Evergreen open source library system + + + +
    + + + + + +
    +

    Staff Client Archive

    + +

    2.0.0

    + +"; +foreach($globarray as $filename) { + $info = pathinfo($filename); + $target = htmlspecialchars($info['basename']); + echo '
  • '.$target.' (md5)
  • '."\n"; + } +echo ""; +?> + + +

    1.6.1

    +"; +foreach($globarray as $filename) { + $info = pathinfo($filename); + $target = htmlspecialchars($info['basename']); + echo '
  • '.$target.' (md5)
  • '."\n"; + } +echo ""; +?> + +
    + + +
    + +