mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-21 20:43:41 +00:00
#8374: Adding missing settings template file; cleaning up addon code
This commit is contained in:
parent
ed45145415
commit
b46a23eab3
2 changed files with 12 additions and 9 deletions
|
@ -48,15 +48,6 @@ function showmore_dyn_settings_post(){
|
|||
if (isset($_POST['showmore_dyn-submit'])){
|
||||
$limitHeight = $_POST['showmore_dyn_height'];
|
||||
DI::pConfig()->set(local_user(), 'showmore_dyn', 'limitHeight', $limitHeight);
|
||||
|
||||
/*
|
||||
$str=file_get_contents('addon/showmore_dyn/showmore_dyn.css');
|
||||
$str=preg_replace("/(max-height: )\d+(px;)/i", "max-height: " . $limitHeight . "px;" ,$str);
|
||||
file_put_contents('addon/showmore_dyn/showmore_dyn.css', $str);
|
||||
|
||||
$str=file_get_contents('addon/showmore_dyn/showmore_dyn.js');
|
||||
$str=preg_replace('/if \(\$item.height\(\) \< \d+\) \{/i', 'if ($item.height() < ' . $limitHeight . ') {' ,$str);
|
||||
file_put_contents('addon/showmore_dyn/showmore_dyn2.js', $str);*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
12
showmore_dyn/templates/settings.tpl
Normal file
12
showmore_dyn/templates/settings.tpl
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="settings-block">
|
||||
<h3 class="settings-heading">{{$title}}</h3>
|
||||
<div class='field noedit'>
|
||||
<label>{{$label}}</label>
|
||||
<input id="showmore_dyn_height" name="showmore_dyn_height" value="{{$limitHeight}}" />
|
||||
</div>
|
||||
|
||||
<div class="settings-submit-wrapper">
|
||||
<input type="submit" value="{{$submit}}" class="settings-submit" name="showmore_dyn-submit" />
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in a new issue