aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-05-25 07:39:47 -0400
committerCash Costello <cash.costello@gmail.com>2010-05-25 07:39:47 -0400
commitbfcd3e087980e48b5b908fd30cf2e9b1aa3726e4 (patch)
tree9dc3d2424902da2863c69bd6fe175c5ceb7a8003
parenta19ccb50eed9be0aab45cb72ee367fb3cbd47ab2 (diff)
downloadelgg-bfcd3e087980e48b5b908fd30cf2e9b1aa3726e4.tar.gz
elgg-bfcd3e087980e48b5b908fd30cf2e9b1aa3726e4.tar.bz2
Updated the RSS for language file and added files missing from previous commits
-rw-r--r--manifest.xml4
-rw-r--r--start.php9
-rw-r--r--views/opensearch_rss/page_shells/default.php8
-rw-r--r--views/opensearch_rss/search/listing.php1
-rw-r--r--views/xml/opensearch/description.php6
5 files changed, 8 insertions, 20 deletions
diff --git a/manifest.xml b/manifest.xml
index 0038dc168..a8733595b 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -3,8 +3,8 @@
<field key="author" value="Cash Costello" />
<field key="version" value="1.0" />
<field key="description" value="OpenSearch plugin" />
- <field key="website" value="" />
- <field key="copyright" value="" />
+ <field key="website" value="http://cashcostello.com/blog/" />
+ <field key="copyright" value="Cash Costello 2010" />
<field key="licence" value="GNU Public License version 2" />
<field key="elgg_version" value="2010030101" />
</plugin_manifest>
diff --git a/start.php b/start.php
index 015fd3b1e..7adc0f733 100644
--- a/start.php
+++ b/start.php
@@ -27,15 +27,6 @@ function opensearch_init() {
function opensearch_handler($page) {
global $CONFIG;
- // file path to the page scripts
- $base_path = $CONFIG->pluginspath . 'opensearch';
-
- if (!isset($page[0])) {
- require "$base_path/search.php";
- return TRUE;
- }
-
- // select page based on first URL element after /pg/hello/
switch ($page[0]) {
case 'osd.xml':
elgg_set_viewtype('xml');
diff --git a/views/opensearch_rss/page_shells/default.php b/views/opensearch_rss/page_shells/default.php
index 52aa8854c..e9510e9da 100644
--- a/views/opensearch_rss/page_shells/default.php
+++ b/views/opensearch_rss/page_shells/default.php
@@ -12,9 +12,9 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
// Set title
$search_terms = get_input('q');
$title = $vars['config']->sitename;
-$title .= " Search: $search_terms";
+$title .= ' ' . sprintf(elgg_echo('opensearch:title'), $search_terms);
-$description = "Search results for \"$search_terms\"";
+$description = sprintf(elgg_echo('opensearch:description'), $search_terms);
// Remove viewtype from URL
$search_url = str_replace('&view=opensearch_rss','', full_url());
@@ -29,10 +29,8 @@ $os_url = "{$vars['url']}pg/opensearch/osd.xml";
<link><?php echo $search_url; ?></link>
<description><?php echo $description; ?></description>
<opensearch:totalResults><?php echo $OPEN_SEARCH_COUNT; ?></opensearch:totalResults>
- <opensearch:startIndex>1</opensearch:startIndex>
- <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
<atom:link rel="search" type="application/opensearchdescription+xml" href="<?php echo $os_url; ?>"/>
- <opensearch:Query role="request" searchTerms="<?php echo $search_terms; ?>" startPage="1" />
+ <opensearch:Query role="request" searchTerms="<?php echo addslashes($search_terms); ?>" startPage="1" />
<?php
echo $vars['body'];
diff --git a/views/opensearch_rss/search/listing.php b/views/opensearch_rss/search/listing.php
index 367bf332f..219462976 100644
--- a/views/opensearch_rss/search/listing.php
+++ b/views/opensearch_rss/search/listing.php
@@ -7,7 +7,6 @@ if (!isset($OPEN_SEARCH_COUNT)) {
$OPEN_SEARCH_COUNT += $vars['results']['count'];
-//var_dump($vars['results']);
elgg_set_viewtype('rss');
$entities = $vars['results']['entities'];
diff --git a/views/xml/opensearch/description.php b/views/xml/opensearch/description.php
index f8eb0b040..a77701d46 100644
--- a/views/xml/opensearch/description.php
+++ b/views/xml/opensearch/description.php
@@ -16,7 +16,7 @@ extract($config);
$site = get_entity($CONFIG->site_guid);
$email = $site->email;
-$rss_url = "{$vars['url']}pg/opensearch/?q={searchTerms}&amp;pw={startPage?}&amp;format=rss";
+$rss_url = "{$vars['url']}pg/search/?q={searchTerms}&amp;view=opensearch_rss";
$html_url = "{$vars['url']}pg/search/?q={searchTerms}";
?>
@@ -27,8 +27,8 @@ $html_url = "{$vars['url']}pg/search/?q={searchTerms}";
<LongName><?php echo $longname; ?></LongName>
<?php endif; ?>
<Contact><?php echo $site->email; ?></Contact>
- <Url type="text/html" indexOffset="0" template="<?php echo $html_url; ?>"/>
- <Url type="application/rss+xml" indexOffset="0" template="<?php echo $rss_url; ?>"/>
+ <Url type="text/html" template="<?php echo $html_url; ?>"/>
+ <Url type="application/rss+xml" template="<?php echo $rss_url; ?>"/>
<?php if (isset($ico)): ?>
<Image height="16" width="16" type="image/vnd.microsoft.icon"><?php echo "{$vars['url']}$ico"; ?></Image>
<?php endif; ?>