miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

How to change of alert message?

 
 
Page  Page 1 of 2:  1  2  Next »

Author cleargoal
Partaker
#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
Partaker
#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
Partaker
#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
Partaker
#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 
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
Partaker
#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 
cleargoal:
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
Active Member
#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
Partaker
#11 | Posted: 22 Aug 2013 08:53 
Paul:
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
Partaker
#13 | Posted: 22 Aug 2013 14:52 
Thanks! It's that I want. Thanks a lot!!!

Author felgall
Partaker
#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
Partaker
#15 | Posted: 26 Aug 2013 22:36 
felgall:
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?
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑