4 * Description: Bootstrap V3 theme. The theme is currently under construction, so it is far from finished. For further information have a look at the <a href="https://github.com/rabuzarus/frio/blob/master/README.md">ReadMe</a> and <a href="https://github.com/rabuzarus/frio">GitHub</a>.
6 * Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus>
10 $frio = "view/theme/frio";
14 function frio_init(&$a) {
15 set_template_engine($a, 'smarty3');
17 $baseurl = $a->get_baseurl();
19 $style = get_pconfig(local_user(), 'frio', 'style');
21 $frio = "view/theme/frio";
29 $style = get_config('frio', 'style');
31 $a->page['htmlhead'] .= <<< EOT
32 <script type="text/javascript">
34 function insertFormatting(comment,BBcode,id) {
36 var tmpStr = $("#comment-edit-text-" + id).val();
37 if(tmpStr == comment) {
39 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
40 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
41 openMenu("comment-edit-submit-wrapper-" + id);
42 $("#comment-edit-text-" + id).val(tmpStr);
45 textarea = document.getElementById("comment-edit-text-" +id);
46 if (document.selection) {
48 selected = document.selection.createRange();
50 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
52 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
53 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
54 var start = textarea.selectionStart;
55 var end = textarea.selectionEnd;
57 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
59 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
65 function showThread(id) {
66 $("#collapsed-comments-" + id).show()
67 $("#collapsed-comments-" + id + " .collapsed-comments").show()
69 function hideThread(id) {
70 $("#collapsed-comments-" + id).hide()
71 $("#collapsed-comments-" + id + " .collapsed-comments").hide()
75 function cmtBbOpen(id) {
76 $("#comment-edit-bb-" + id).show();
78 function cmtBbClose(id) {
79 $("#comment-edit-bb-" + id).hide();
85 function frio_install() {
87 logger("installed theme frio");
90 function frio_uninstall() {
92 logger("uninstalled theme frio");