The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Massege Editor Issue

4 posters

Go down

Massege Editor Issue Empty Massege Editor Issue

Post by DeadlyX 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 - https://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
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Ape 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


Massege Editor Issue Left1212Massege Editor Issue Center11Massege Editor Issue Right112
Massege Editor Issue Ape_b110
Massege Editor Issue Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19358
Reputation : 2006
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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 https://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.
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

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

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



Massege Editor Issue Slgray10

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

Male Posts : 51517
Reputation : 3523
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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.
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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?
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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.
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Ape 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 ?


Massege Editor Issue Left1212Massege Editor Issue Center11Massege Editor Issue Right112
Massege Editor Issue Ape_b110
Massege Editor Issue Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19358
Reputation : 2006
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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 Massege Editor Issue 1_bmp10
Without SceditorMassege Editor Issue 2_bmp10

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
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Take Notes March 9th 2016, 7:51 pm

Do you have a test account we can use?
Take Notes
Take Notes
Helper
Helper

Male Posts : 2337
Reputation : 324
Language : English
Location : Forumountain

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

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

I will provide you with one in pm, thanks.
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

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

bump
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Take Notes 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.
Take Notes
Take Notes
Helper
Helper

Male Posts : 2337
Reputation : 324
Language : English
Location : Forumountain

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Take Notes March 16th 2016, 2:56 pm

Yes, I can check it out later.
Take Notes
Take Notes
Helper
Helper

Male Posts : 2337
Reputation : 324
Language : English
Location : Forumountain

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

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

Any news? Thanks.
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Take Notes 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.
Take Notes
Take Notes
Helper
Helper

Male Posts : 2337
Reputation : 324
Language : English
Location : Forumountain

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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?
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Take Notes 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.
Take Notes
Take Notes
Helper
Helper

Male Posts : 2337
Reputation : 324
Language : English
Location : Forumountain

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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");
            }
          });
      }
    })});
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by Take Notes 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.
Take Notes
Take Notes
Helper
Helper

Male Posts : 2337
Reputation : 324
Language : English
Location : Forumountain

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

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

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

click:
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

Post by DeadlyX 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.
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Massege Editor Issue Empty Re: Massege Editor Issue

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

Bump.
avatar
DeadlyX
Forumember

Posts : 75
Reputation : 4
Language : English

http://teenwolf-rp.nightforum.net

Back to top Go down

Back to top

- Similar topics

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