The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Massege Editor Issue

View previous topic View next topic Go down

Massege Editor Issue

Post by DeadlyX on February 26th 2016, 6:00 pm

I was trying to add a word counter to the editor, but it didn't work for my forum. The javascript I used for it was the one provided by @Ange Tuteur

This one - http://help.forumotion.com/t131191-add-a-word-counter-to-the-editor

It also created some sort of an issue with the massage editor itself. Suddenly i had to redesign to black, but that was easy. I had another javascript, which would not allow you to exit, meanwhile writing a post in the editor, which is essential for RP-ing forum, because accidents happen Very Happy ... but now this doesn't work. All of these happened after i placed the word counter javascript. I deleted it afterwards, but maybe it changed something? how is that possible thou?

I am searching for a way to fix all this and add the word counter. Thanks beforehand.

Ange if you could check it out when u have some free time id appreciate it :3

Edit: daredevil.nightforum.net

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by APE on February 26th 2016, 6:06 pm

when removing the code did you remove it or just turn it off by click all the tick boxes to show Blank and then saved.

Why do i ask this ?
Some times when you just turn off that one code it still works in the background even thou the tick boxes are empty.

make sure you remove the code from your forum completely.

Adding a code to your Java codes will not change any other code used on your forum before this code was added each code is made and will always be non changed until you edit it your self





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on February 26th 2016, 6:22 pm

Yes, I removed the code completely by deleting it from the forum. That's what makes this so strange! I am definitely sure that it all happened after i imported the http://help.forumotion.com/t131191-add-a-word-counter-to-the-editor word count thingy for the editor. Im doing my forum so slow that when i screw something is easy to notice what i did last.

but how is this even possible... I really don't know. As i said after that i only noticed that the editor had changed back to default, so i had to redesign the editor to darker colors again. The css tags changed? idk. but they did somehow.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by SLGray on February 26th 2016, 6:42 pm

Do you mean that after adding the code the editor turned black?



When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35666
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on February 26th 2016, 7:05 pm

No, after adding the code the editor went to default... bluish. After that i had to recolor it to black again, to match the forum theme.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on February 29th 2016, 5:13 pm

Bump and update. I think the whole sceditor is gone... and that might be the problem.

I searched similar problems and tried to clear chache, re-synchronize, change browser... and nothing worked. I don't remember modifying the overall_header prior the problem happening. Should i provide my templates?

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 9th 2016, 5:45 pm

Update and bump. OK somehow... magically... it fixed itself. The other night only the quick reply editor was fixed and i decided to wait until today, instead of replying here... and today check it out... both the quick reply editor and the other in the normal reply are totally fine. The sceditor is back, the javascripts are working... JUST srsly what the hell...

Anyway i placed the word counter jscript again... and it's working. Good. Now since in my forum we use cyrillic alphabet, how can i modify the script so it can work for the cyrillic words? Atm its only working for english.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by APE on March 9th 2016, 5:51 pm

Hello i have seen that some other forums have had the same problem with codes not working in there JavaScript's our tech team have been working on the problem so it looks like one of them forums was yours also We do not have any news on if the bugs was fixed fully but as your problem is now fixed i take it your would like to mark this as solved ?





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 9th 2016, 6:00 pm

I see. Alright then :3

But... can we not mark it as solved? When i made this topic i was looking for a fix to both the editor and the jscript for word counting... and i am still looking for a way to do that...

Now since in my forum we use cyrillic alphabet, how can i modify the script so it can work for the cyrillic words? Atm its only working for english.

EDIT: No seems like it's not entirely fixed... when i click on new topic, the old editor is there and the sceditor is gone.
EDIT2: OMG the sceditor is actually gone... i just wrongly found one topic in which its fine... on the others its gone. Can u please confirm this, so to see if the problem is not in me?

With Sceditor
Without Sceditor

Link to the only topic in which i see sceditor and all js work - http://daredevil.nightforum.net/t204-c-enemy-without
Link to some other random topic - http://daredevil.nightforum.net/t200-what-do-i-desire#332

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by Genesis on March 9th 2016, 7:51 pm

Do you have a test account we can use?

Genesis
Forum Reviewer
Forum Reviewer

Male Posts : 2331
Reputation : 322
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 9th 2016, 11:07 pm

I will provide you with one in pm, thanks.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 16th 2016, 10:57 am

bump

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by Genesis on March 16th 2016, 1:56 pm

Can you please send what JavaScripts you are using?

I have the same issue on one of my forums.

Genesis
Forum Reviewer
Forum Reviewer

Male Posts : 2331
Reputation : 322
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 16th 2016, 2:38 pm

i provided u with a test acc. im super busy at work and wont be able to send the scripta to here from my phone.. can u just use the test acc? thanks

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by Genesis on March 16th 2016, 2:56 pm

Yes, I can check it out later.

Genesis
Forum Reviewer
Forum Reviewer

Male Posts : 2331
Reputation : 322
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 18th 2016, 3:16 pm

Any news? Thanks.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by Genesis on March 18th 2016, 9:04 pm

Sorry, I completely forgot, checking your forum now.

I disabled your JavaScript and it worked again. When I enabled JavaScript the editor options disappeared again. It is a code in your JavaScript, testing now. Try deleting one JavaScript at a time, if nothing changes in the editor remake the code, I suggest you copy the code before deleting.

Genesis
Forum Reviewer
Forum Reviewer

Male Posts : 2331
Reputation : 322
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 19th 2016, 10:30 am

Alright i tried them one by one... deleted all and inserted them back. It seems like the one causing the problem and the one to make the sceditor disappear was the following.
Code:
$(function() {
  var avatars = $(_userdata.avatar).attr('src');
  document.getElementById('user_avatar').src = avatars;
});

which is strange since it was only adding a new variable??? Anyway this solved my editor problem, thanks bro.

Now to my other question with the sceditor... the word counter in the editor jscript... is there any way to make it count cyrilic words instead of english words?

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by Genesis on March 19th 2016, 5:50 pm

Glad you found the issue that was causing the Editor to not work. Smile

Please send your code here for the word counter when you can.

Genesis
Forum Reviewer
Forum Reviewer

Male Posts : 2331
Reputation : 322
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 19th 2016, 9:42 pm

This is the code. Now how can i make it count cyrilic alphabet?

Code:
$(function(){$(function(){
 
      var MinNumberOfWords = 5;
      var LetterCountPerWord = 3;
      var ico_compl = "http://i73.servimg.com/u/f73/18/10/89/49/ok-gre10.png";
      var ico_incompl = "http://i73.servimg.com/u/f73/18/10/89/49/exclam10.png"; 
 
    if($("#text_editor_textarea").length != 0){
          $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");     
          $(".sceditor-container").after("<br/><div id='div_minchars' align='center'><div id='div_minchars_header'> Minimum words to send a message: " + MinNumberOfWords + " (at least " + LetterCountPerWord + " letters)</div><div id='div_minchars_info'></div></div>");
         
          var sceditor = $("#text_editor_textarea").sceditor("instance");                 
          var str = sceditor.val();
          var regex = new RegExp('\\w{' + LetterCountPerWord + ',}\\b', 'g');
          var str_arr = str.match(regex);
          var str_len = str_arr == null ? 0 : str_arr.length;
         
          if(str_len >= MinNumberOfWords) $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
         
          sceditor.keyUp(function(e) {
            str = sceditor.val();
            str_arr = str.match(regex);
            str_len = str_arr == null ? 0 : str_arr.length;
            if(str_len >= MinNumberOfWords) {
                $("#div_minchars_info").html("You've written <span style='color:green'>" + str_len + "</span> word(s). You can now send the message <img src='" + ico_compl  + "' />"); 
            $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
            }else{
                $("#div_minchars_info").html("You've written <span style='color:red'>" + str_len + "</span> word(s). You need " + (MinNumberOfWords - str_len) + " word(s) to send this message <img src='" + ico_incompl  + "' />");
                $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");
            }
          });
      }
    })});

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by Genesis on March 19th 2016, 9:51 pm

So you would like the English words to be in Cyrilic? If so, post the translation so I can change the code.

Genesis
Forum Reviewer
Forum Reviewer

Male Posts : 2331
Reputation : 322
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 19th 2016, 9:56 pm

Ok here is a copy of a random cyrilic post. Thanks!

click:
Тъмната ми закачулена фигура бе точно тук до неговата, облегнала се на хладната рамка на тъмен прозорец, до стената, който ни отделяше един от друг. Бях в другата стая и може би това щеше да го стресне малко, ако знаеше че го наблюдавах, макар и от другата страна, аз го усещах. Още когато той прекрачи прага за да дойде тук, аз го усетих. Усещах всички тях. Такова беше значението на моето съществуване.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 21st 2016, 8:49 am

Bump.

I hope u understand what im asking for Very Happy the word counter as it is is only counting english words... if u type in cyrilic ones.. it wont count them. I want it to also count cyrilic.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Re: Massege Editor Issue

Post by DeadlyX on March 24th 2016, 2:17 pm

Bump.

DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum