5 * Author: Fabio <http://kirgroup.com/profile/fabrixxm>
6 * Author: Ike <http://pirati.ca/profile/heluecht>
7 * Author: Beanow <https://fc.oscp.info/profile/beanow>
8 * Maintainer: Ike <http://pirati.ca/profile/heluecht>
9 * Description: "Vier" is a very compact and modern theme. It uses the font awesome font library: http://fortawesome.github.com/Font-Awesome/
12 function vier_init(&$a) {
13 set_template_engine($a, 'smarty3');
15 $baseurl = $a->get_baseurl();
17 $a->theme_info = array();
19 $a->page['htmlhead'] .= <<< EOT
20 <script type="text/javascript">
22 function insertFormatting(comment,BBcode,id) {
24 var tmpStr = $("#comment-edit-text-" + id).val();
25 if(tmpStr == comment) {
27 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
28 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
29 openMenu("comment-edit-submit-wrapper-" + id);
30 $("#comment-edit-text-" + id).val(tmpStr);
33 textarea = document.getElementById("comment-edit-text-" +id);
34 if (document.selection) {
36 selected = document.selection.createRange();
38 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
40 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
41 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
42 var start = textarea.selectionStart;
43 var end = textarea.selectionEnd;
45 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
47 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
53 function showThread(id) {
54 $("#collapsed-comments-" + id).show()
55 $("#collapsed-comments-" + id + " .collapsed-comments").show()
57 function hideThread(id) {
58 $("#collapsed-comments-" + id).hide()
59 $("#collapsed-comments-" + id + " .collapsed-comments").hide()
63 function cmtBbOpen(id) {
64 $("#comment-edit-bb-" + id).show();
66 function cmtBbClose(id) {
67 $("#comment-edit-bb-" + id).hide();