This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/themes/default/setup.theme.php

39 lines
858 B
PHP
Raw Normal View History

2009-07-07 12:42:34 +00:00
<?php
/**
* A customised version of the Setup theme
*/
2009-07-07 12:42:34 +00:00
class CustomSetupTheme extends SetupTheme {
protected function sb_to_html(SetupBlock $block) {
2009-11-10 03:43:37 +00:00
$h = $block->header;
$b = $block->body;
$i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup";
$html = "
<script><!--
$(document).ready(function() {
$(\"#$i-toggle\").click(function() {
$(\"#$i\").slideToggle(\"slow\", function() {
if($(\"#$i\").is(\":hidden\")) {
$.cookie(\"$i-hidden\", 'true', {path: '/'});
}
else {
$.cookie(\"$i-hidden\", 'false', {path: '/'});
}
});
});
if($.cookie(\"$i-hidden\") == 'true') {
$(\"#$i\").hide();
}
});
//--></script>
2010-04-20 01:24:36 +00:00
<div class='setupblock brr'>
2009-11-10 03:43:37 +00:00
<b id='$i-toggle'>$h</b>
<br><div id='$i'>$b</div>
</div>
2010-04-20 01:24:36 +00:00
<!-- cancel border -->
2009-11-10 03:43:37 +00:00
";
2010-04-20 01:24:36 +00:00
return $html;
2009-07-07 12:42:34 +00:00
}
}
?>