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) {
14 $a->theme_events_in_profile = false;
16 set_template_engine($a, 'smarty3');
18 $baseurl = $a->get_baseurl();
20 $a->theme_info = array();
22 $a->page['htmlhead'] .= <<< EOT
23 <script type="text/javascript">
25 function insertFormatting(comment,BBcode,id) {
27 var tmpStr = $("#comment-edit-text-" + id).val();
28 if(tmpStr == comment) {
30 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
31 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
32 openMenu("comment-edit-submit-wrapper-" + id);
33 $("#comment-edit-text-" + id).val(tmpStr);
36 textarea = document.getElementById("comment-edit-text-" +id);
37 if (document.selection) {
39 selected = document.selection.createRange();
41 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
43 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
44 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
45 var start = textarea.selectionStart;
46 var end = textarea.selectionEnd;
48 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
50 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
56 function showThread(id) {
57 $("#collapsed-comments-" + id).show()
58 $("#collapsed-comments-" + id + " .collapsed-comments").show()
60 function hideThread(id) {
61 $("#collapsed-comments-" + id).hide()
62 $("#collapsed-comments-" + id + " .collapsed-comments").hide()
66 function cmtBbOpen(id) {
67 $("#comment-edit-bb-" + id).show();
69 function cmtBbClose(id) {
70 $("#comment-edit-bb-" + id).hide();