Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Rename option no template to template, add option on page
Browse files Browse the repository at this point in the history
  • Loading branch information
drublic committed Apr 15, 2012
1 parent ce1a548 commit f0ab7ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion handler.methods.php
Expand Up @@ -263,7 +263,7 @@ function filter_options() {
$array[$key . 'nocss'] = isset($_GET['nocss']); $array[$key . 'nocss'] = isset($_GET['nocss']);
$array[$key . 'noresult'] = isset($_GET['noresult']); $array[$key . 'noresult'] = isset($_GET['noresult']);
$array[$key . 'noresults'] = isset($_GET['noresults']); $array[$key . 'noresults'] = isset($_GET['noresults']);
$array[$key . 'notemplate'] = isset($_GET['notemplate']); $array[$key . 'template'] = isset($_GET['template']);
$array[$key . 'style'] = ( $array[$key . 'style'] = (
isset($_GET['texticon']) || (isset($_GET['text']) && isset($_GET['icon'])) ? 'texticon' : ( isset($_GET['texticon']) || (isset($_GET['text']) && isset($_GET['icon'])) ? 'texticon' : (
isset($_GET['icon']) ? 'icon' : ( isset($_GET['icon']) ? 'icon' : (
Expand Down
6 changes: 3 additions & 3 deletions handler.php
Expand Up @@ -72,7 +72,7 @@
} }


if ($option_format === 'html' || $option_html) { if ($option_format === 'html' || $option_html) {
$support_array['html'] = html_encode($support_array, $option_style, !$option_nocss, $option_notemplate); $support_array['html'] = html_encode($support_array, $option_style, !$option_nocss, $option_template);
} }




Expand All @@ -89,12 +89,12 @@
header('Content-Type: text/html;charset=UTF-8'); header('Content-Type: text/html;charset=UTF-8');


$string = file_get_contents('tpl/html.html'); $string = file_get_contents('tpl/html.html');
$string = preg_replace('/<%= content %>/', html_encode($support_array, $option_style, !$option_nocss, $option_notemplate), $string); $string = preg_replace('/<%= content %>/', html_encode($support_array, $option_style, !$option_nocss, $option_template), $string);
} else if ($option_format === 'xml') { } else if ($option_format === 'xml') {
header('Content-Type: text/xml;charset=UTF-8'); header('Content-Type: text/xml;charset=UTF-8');


if ($option_html) { if ($option_html) {
$support_array['html'] = html_encode($support_array, $option_style, !$option_nocss, $option_notemplate); $support_array['html'] = html_encode($support_array, $option_style, !$option_nocss, $option_template);
} }


$string = xml_encode($support_array); $string = xml_encode($support_array);
Expand Down
6 changes: 3 additions & 3 deletions index.html
Expand Up @@ -79,10 +79,10 @@ <h3>How do you want to show this?</h3>
<input type="checkbox" name="style" value="nocss" id="options-style"> <input type="checkbox" name="style" value="nocss" id="options-style">
<label for="options-style">without style</label> <label for="options-style">without style</label>
</b> </b>
<!-- <b title="Inserts template-variables to use with Mustache rather than fixed text."> <b title="Inserts template-variables to use with Mustache rather than fixed text.">
<input type="checkbox" name="template" value="notemplate" id="options-template"> <input type="checkbox" name="template" value="template" id="options-template">
<label for="options-template">as a template</label> <label for="options-template">as a template</label>
</b> --> </b>
</p> </p>
</div> </div>
</div> </div>
Expand Down

0 comments on commit f0ab7ac

Please sign in to comment.