summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php4
-rw-r--r--phpfspot.js7
-rw-r--r--themes/default/templates/export.tpl2
3 files changed, 10 insertions, 3 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 9a11069..60521ad 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -299,7 +299,9 @@ class PHPFSPOT {
}
break;
case 'export':
- $this->tmpl->show("export.tpl");
+ /* fetch export template */
+ print $this->tmpl->fetch("export.tpl");
+ /* no further execution necessary. */
return;
break;
case 'slideshow':
diff --git a/phpfspot.js b/phpfspot.js
index 1922448..ebe1242 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -337,8 +337,13 @@ function datesearch()
* called for photo-index export. will return the
* selected mode via AJAX from the server.
*/
-function setViewMode(mode)
+function setViewMode(srv_webpath, mode)
{
+ if(srv_webpath != undefined)
+ web_path = srv_webpath;
+ else
+ web_path = '';
+
var exprt = document.getElementById('output');
exprt.innerHTML = "Loading...";
exprt.innerHTML = HTML_AJAX.grab(encodeURI(web_path + '/rpc.php?action=get_export&mode=' + mode));
diff --git a/themes/default/templates/export.tpl b/themes/default/templates/export.tpl
index 7f6f2de..d7443de 100644
--- a/themes/default/templates/export.tpl
+++ b/themes/default/templates/export.tpl
@@ -1,7 +1,7 @@
{include file="header.tpl"}
<body>
<div id="frame">
- <form action="javascript:#" onsubmit="setViewMode(document.getElementsByName('format')[0].options[document.getElementsByName('format')[0].selectedIndex].value); return false;">
+ <form action="javascript:#" onsubmit="setViewMode('{$web_path}', document.getElementsByName('format')[0].options[document.getElementsByName('format')[0].selectedIndex].value); return false;">
<select name="format">
<option value="HTML">HTML</option>
<option value="MoinMoin">MoinMoin Wiki</option>