miniBB Support Forums | 16 years on The Web
miniBB ® 


 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /   

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

Author Slavva
#1 | Posted: 18 Aug 2013 23:27 
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
Active Member
#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
#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
#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
#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
 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 our forum posting rules. If not, it may be locked or deleted 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
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.