miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

How to change of alert message?

Page  Page 1 of 2:  1  2  Next »  
Author cleargoal
#1 | Posted: 17 Aug 2013 12:59 
Hello, friends!

I made a length of theme with limit no less 25 characters. When user makes less he gets a message "Sorry! You are not granted to do this."
It's a common and I want to inform him just about length of theme. I did to try find an appropriate variable by myself but failed :(
Help me please.

Author Paul
Lead Developer
#2 | Posted: 17 Aug 2013 16:46 
I think topic length alert message was introduced in minibb 3. You may take a look at the recent sources and update your version, which is probably below.

Author cleargoal
#3 | Posted: 17 Aug 2013 17:44 
I have 'minibb' 3. The problem is, a described message is one unique but, I want to have the variants, let a standart message leave for all other situations and have a specific message to inform to user about length of topic.
I found variable '$l_forbidden' in language pack but, no found a root for 'alert' using this var.

Author cleargoal
#4 | Posted: 17 Aug 2013 17:46 
P.S. I already made some changes in the code and now I'm afraid to take your renewal :(

Author Paul
Lead Developer
#5 | Posted: 19 Aug 2013 11:21 
It's up to you how you customize the codes. For doing it properly, you should document your changes. It's quite a lame approach to apply custom changes to the open source program, which has to be updated in the future.

As about the alert message, I'm not sure what you are about. If you leave the topic title empty, the script will alert "Please, enter Subject". If you do not fill the message fill, it will alert "Please, enter Message". If you do not fill in both fields, both messages will be displayed. It works and could be tested even here on our board.

If you want to change the language wording itself, here is How to find where to edit this and that. Look up for a phrase which you want to change, and you will find the script where to change it.

Author cleargoal
#6 | Posted: 19 Aug 2013 22:49 
Hi, Paul!
thanks for long reply. I made a part of your recommended actions:

1) In the language pack I found a phrase I want to change.
2) I found a variable that contains phrase I need. It's <$l_forbidden>.
3) I found a variable <$l_forbidden> in all files and analyzed its value there.
4) I found all places in the code that calls <$l_forbidden>... and then is difficult for me to know: what is an appropriate call that drives to situation I want to change. Because I want to change only one partial case.

About documenting changes, yes I did it but at all afraid :)

Can we communicate in Russian even in another place?

Author Paul
Lead Developer
#7 | Posted: 20 Aug 2013 13:07 | Edited by: Paul 
This forum is for English community, where I could provide free replies. You are welcome here to post in English.

I am providing support in Russian only within Premium Support rates. You're welcome, too, but it's not about this forum.

Author cleargoal
#8 | Posted: 21 Aug 2013 21:59 
OK. Let's in English... So, can you help me to precise locate into code a place that about I told?

Author Paul
Lead Developer
#9 | Posted: 21 Aug 2013 22:53 
a specific message to inform to user about length of topic

Ok - are you about that, at final?..

What kind of message do you mean? JavaScript alert message, appearing if you leave the topic's title field empty?..

Author tom322
#10 | Posted: 22 Aug 2013 05:50 
cleargoal, it's hard to understand what you mean.

Maybe in eng.php file you can find this text: $l_enterSubject ('Please, enter Subject!') and change it to: 'Please, enter Subject that has at least 25 characters!'

Author cleargoal
#11 | Posted: 22 Aug 2013 08:53 
JavaScript alert message, appearing if you leave the topic's title field empty?

JavaScript alert message, appearing if user enters into the topic's title number of characters less than setup in variable '$post_text_minlength' in the file 'setup_options.php'.

Author Paul
Lead Developer
#12 | Posted: 22 Aug 2013 11:33 
templates/form.js - submitForm() function

this is the line holding the message you mention:

if(ftitle && topicTitle.length<tlength) warn=warn+'\n'+enterSubject;

enterSubject is formed in templates/main_post_form.html and is equal to $l_enterSubject.

Author cleargoal
#13 | Posted: 22 Aug 2013 14:52 
Thanks! It's that I want. Thanks a lot!!!

Author felgall
#14 | Posted: 26 Aug 2013 22:02 
Just remember that alert() is a JavaScript debugging tool. The authors of this script have been really slack in not removing those calls before allowing their script to go live. In some browsers it offers the person viewing the page the opportunity to turn JavaScript off.

Author cleargoal
#15 | Posted: 26 Aug 2013 22:36 
In some browsers it offers the person viewing the page the opportunity to turn JavaScript off

Oh! I have seen something like it but never read about it up to the end of the notification :(
But, I can't to change a big part of code to avoid this effect. So, only I can as all here to wait while forum's author decide to change this behavior of forum.
I have seen an alert() used so many times that I can't even imagine another method to notify :(

Page  Page 1 of 2:  1  2  Next » 
Specific miniBB Support Forums / Specific / How to change of alert message? Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB