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 <link rel='stylesheet' media='screen and (max-width: 1100px)' href='view/theme/vier/narrow.css' />
24 <script type="text/javascript">
26 function insertFormatting(comment,BBcode,id) {
28 var tmpStr = $("#comment-edit-text-" + id).val();
29 if(tmpStr == comment) {
31 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
32 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
33 openMenu("comment-edit-submit-wrapper-" + id);
34 $("#comment-edit-text-" + id).val(tmpStr);
37 textarea = document.getElementById("comment-edit-text-" +id);
38 if (document.selection) {
40 selected = document.selection.createRange();
42 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
44 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
45 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
46 var start = textarea.selectionStart;
47 var end = textarea.selectionEnd;
49 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
51 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
57 function showThread(id) {
58 $("#collapsed-comments-" + id).show()
59 $("#collapsed-comments-" + id + " .collapsed-comments").show()
61 function hideThread(id) {
62 $("#collapsed-comments-" + id).hide()
63 $("#collapsed-comments-" + id + " .collapsed-comments").hide()
67 function cmtBbOpen(id) {
68 $("#comment-edit-bb-" + id).show();
70 function cmtBbClose(id) {
71 $("#comment-edit-bb-" + id).hide();