2 <script language="javascript" type="text/javascript" src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
3 <script language="javascript" type="text/javascript">
9 mode : "specific_textareas",
10 editor_selector: /(profile-jot-text|prvmail-text)/,
11 plugins : "bbcode,paste",
12 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
13 theme_advanced_buttons2 : "",
14 theme_advanced_buttons3 : "",
15 theme_advanced_toolbar_location : "top",
16 theme_advanced_toolbar_align : "center",
17 theme_advanced_blockformats : "blockquote,code",
18 paste_text_sticky : true,
19 entity_encoding : "raw",
20 add_unload_trigger : false,
21 remove_linebreaks : false,
22 force_p_newlines : false,
23 force_br_newlines : true,
24 forced_root_block : '',
26 content_css: "$baseurl/view/custom_tinymce.css",
27 theme_advanced_path : false,
28 setup : function(ed) {
30 ed.onKeyUp.add(function(ed, e) {
31 var txt = tinyMCE.activeEditor.getContent();
32 var text = txt.length;
33 if(txt.length <= 140) {
34 $('#character-counter').removeClass('red');
35 $('#character-counter').removeClass('orange');
36 $('#character-counter').addClass('grey');
38 if((txt.length > 140) && (txt .length <= 420)) {
39 $('#character-counter').removeClass('grey');
40 $('#character-counter').removeClass('red');
41 $('#character-counter').addClass('orange');
43 if(txt.length > 420) {
44 $('#character-counter').removeClass('grey');
45 $('#character-counter').removeClass('orange');
46 $('#character-counter').addClass('red');
48 $('#character-counter').text(text);
51 ed.onInit.add(function(ed) {
52 ed.pasteAsPlainText = true;
59 <script type="text/javascript" src="include/ajaxupload.js" ></script>
61 $(document).ready(function() {
62 var uploader = new window.AjaxUpload(
64 { action: 'wall_upload/$nickname',
66 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
67 onComplete: function(file,response) {
68 tinyMCE.execCommand('mceInsertRawHTML',false,response);
69 $('#profile-rotator').hide();
73 $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
75 $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
76 selstr = $(this).text();
77 $('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
78 $('.profile-jot-net input').attr('disabled', 'disabled');
81 $('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
82 $('.profile-jot-net input').attr('disabled', false);
89 function jotGetLink() {
90 reply = prompt("$linkurl");
91 if(reply && reply.length) {
92 reply = bin2hex(reply);
93 $('#profile-rotator').show();
94 $.get('parse_url?url=' + reply, function(data) {
95 tinyMCE.execCommand('mceInsertRawHTML',false,data);
96 $('#profile-rotator').hide();
101 function jotGetVideo() {
102 reply = prompt("$utubeurl");
103 if(reply && reply.length) {
104 tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]');
108 function jotVideoURL() {
109 reply = prompt("$vidurl");
110 if(reply && reply.length) {
111 tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]');
115 function jotAudioURL() {
116 reply = prompt("$audurl");
117 if(reply && reply.length) {
118 tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]');
123 function jotGetLocation() {
124 reply = prompt("$whereareu", $('#jot-location').val());
125 if(reply && reply.length) {
126 $('#jot-location').val(reply);
130 function jotTitle() {
131 reply = prompt("$title", $('#jot-title').val());
132 if(reply && reply.length) {
133 $('#jot-title').val(reply);
137 function jotShare(id) {
138 $('#like-rotator-' + id).show();
139 $.get('share/' + id, function(data) {
140 tinyMCE.execCommand('mceInsertRawHTML',false,data);
141 $('#like-rotator-' + id).hide();
142 $(window).scrollTop(0);
146 function linkdropper(event) {
147 var linkFound = event.dataTransfer.types.contains("text/uri-list");
149 event.preventDefault();
152 function linkdrop(event) {
153 var reply = event.dataTransfer.getData("text/uri-list");
154 event.target.textContent = reply;
155 event.preventDefault();
156 if(reply && reply.length) {
157 $('#profile-rotator').show();
158 $.get('parse_url?url=' + reply, function(data) {
159 tinyMCE.execCommand('mceInsertRawHTML',false,data);
160 $('#profile-rotator').hide();
165 function jotClearLocation() {
166 $('#jot-coord').val('');
167 $('#profile-nolocation-wrapper').hide();