About the number of words to reply
5 posters
Page 1 of 1
About the number of words to reply
Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link : https://ekin-ek.666forum.com/
- - - - - - - -
I hope that the reply can be at least 10 words before posting.
But I don’t know why.
If you are using Chinese Pinyin, you can successfully pronounce it without 10 words.
This is what confuses me.
JS(In all the pages):
Thank you very much.
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link : https://ekin-ek.666forum.com/
- - - - - - - -
I hope that the reply can be at least 10 words before posting.
But I don’t know why.
If you are using Chinese Pinyin, you can successfully pronounce it without 10 words.
This is what confuses me.
JS(In all the pages):
- Code:
$(function(){$(function(){
var MinNumberOfWords = 10;
var LetterCountPerWord = 3;
var ico_compl = "https://i.servimg.com/u/f73/18/10/89/49/ok-gre10.png";
var ico_incompl = "https://i.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'> 回 帖 最 少 字 数: " + 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 = /[^\x00-\xff]/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");
}
});
}
})});
Thank you very much.
Re: About the number of words to reply
hello
try this instead JS(In the topics)
try this instead JS(In the topics)
- Code:
$(function() {
var x=document.forms['post'];
$(x.post).click(function(e) {
if (x.message.value.length < 10) {
e.preventDefault();
alert('Your post must contain at least 10 character');
}
});
});
Re: About the number of words to reply
Thanks,@skouliki
I found that it was changed to(In all the pages),and a warning will appear from above
After I tested it, there were more than the number of words (I set 10 words), but I could not successfully post a reply.
And the part of [Count the total number of words],how can I add it to the code?
Original code diagram:
PS:I'm not sure, how to see if there is a conflicting part in JS
I found that it was changed to(In all the pages),and a warning will appear from above
After I tested it, there were more than the number of words (I set 10 words), but I could not successfully post a reply.
And the part of [Count the total number of words],how can I add it to the code?
Original code diagram:
PS:I'm not sure, how to see if there is a conflicting part in JS
Re: About the number of words to reply
yes you are right it is an old code
so lets go to the first code everything it is working unless you write Chinese ?
so lets go to the first code everything it is working unless you write Chinese ?
Re: About the number of words to reply
yes,@skouliki
I found that when using Chinese Pinyin (not Taiwanese Pinyin), there is no way to successfully limit the [minimum number of characters] and publish directly.
This is not what i hope.
And I am not sure how to fix my JS.
Thanks your help!
I found that when using Chinese Pinyin (not Taiwanese Pinyin), there is no way to successfully limit the [minimum number of characters] and publish directly.
This is not what i hope.
And I am not sure how to fix my JS.
Thanks your help!
Re: About the number of words to reply
Thanks @skoulikiskouliki wrote:yes you are right it is an old code
so lets go to the first code everything it is working unless you write Chinese ?
I found that the part I need to change is,
In the mobile device, the [I want limit] will not be reached, but the computer version can successfully limit
So it is the mobile device code issue?
Re: About the number of words to reply
That code was created before the mobile version was released.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: About the number of words to reply
iam thinking that the issue is not the version but the language
i can not help any further iam sorry
maybe you can contact the creator of that code
i can not help any further iam sorry
maybe you can contact the creator of that code
cauquan1001- New Member
- Posts : 3
Reputation : 0
Language : Vietnamese
Re: About the number of words to reply
cauquan1001 wrote:It worked
Please don't hijack another member’s topic's. Please open your own thread if you having a problem with your forum.
|
Re: About the number of words to reply
Sorry, please check my Private message!skouliki wrote:cauquan1001 wrote:It worked
Please don't hijack another member’s topic's.
Please open your own thread if you having a problem with your forum.
Please read our forum rules:ESF General Rules
cauquan1001- New Member
- Posts : 3
Reputation : 0
Language : Vietnamese
Re: About the number of words to reply
Sorry, please check my Private message!skouliki wrote:cauquan1001 wrote:It worked
Please don't hijack another member’s topic's.
Please open your own thread if you having a problem with your forum.
Please read our forum rules:ESF General Rules
cauquan1001- New Member
- Posts : 3
Reputation : 0
Language : Vietnamese
Similar topics
» how do i change words like reply etc
» Where can i edit the Reply/Quick Reply posting helpers ?
» random number and number of post
» new topic and reply button above quick reply
» Spell checker for Topics, Reply, and Quick Reply
» Where can i edit the Reply/Quick Reply posting helpers ?
» random number and number of post
» new topic and reply button above quick reply
» Spell checker for Topics, Reply, and Quick Reply
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum