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

Default (pre-defined) text in the new message area

Author Slavva
Registered
#1 | Posted: 18 Aug 2013 23:27 
Hi,
First off, thanks for the scripts, Paul and the gang, great job.
I am far from being a programmer, still could use some guidance in the matter of setting some pre-defined text in the new message area. Instead of being just blank I want the new post/reply field to contain a number of lines, something like:

1. Gist:
2. Symbols:

etc. Is it an easy thing to do, or does it require extensive modification? Thank you very much.
Спасибо!

Author tom322
Registered
#2 | Posted: 19 Aug 2013 05:17 
Not sure what exactly you want to achieve, but you may use placeholder to put some text in text area, like:

<textarea placeholder="Gist:" />

Author Slavva
Registered
#3 | Posted: 19 Aug 2013 10:41 
Thanks, Tom. I am making a kind of a message board with each message having the same layout, so to say. The messages are announcements. Placeholder sounds like a solution, but where exactly should I put it? I am after the very field I am using right now, the "Your Reply" field.

Author Paul
Lead Developer
#4 | Posted: 19 Aug 2013 11:35 
Here it is: How to find where to edit this and that.

Look up for 'textarea' in miniBB folder, most likely you will find the only one template holding message area, it is main_post_form.html.

Providing placeholder would be truly nice idea for your approach. There is a way to put straight "physical" text in the message area, but it should be handled on the coding level, because this template is also used in the other places - private messaging, editing message. Having some pre-defined text in it is impossible for these places.

Author Slavva
Registered
#5 | Posted: 19 Aug 2013 12:47 
Thanks, Paul. I am not going to allow private messaging or editing per se. Although "coding level" sounds too complicated to me, I could give it a try if you point out the files I need to work with.

Author Paul
Lead Developer
#6 | Posted: 19 Aug 2013 18:01 
In bb_plugins.php you just should pre-define some variable, holding your default text. For example:

$defaultMessageText='Default Message Text';

then paste {$defaultMessageText} in between <textarea> tag of the template mentioned above.

Author Slavva
Registered
#7 | Posted: 21 Aug 2013 19:55 
Worked like a charm! Thanks a lot, Paul!

Specific miniBB Support Forums / Specific / Default (pre-defined) text in the new message area Top

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

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


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
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB