Hi all
I want to make a field that requires your contact information when you post a new threard. Can you help me? I tried with XThreards, but I could not make it work. Thanks
You can use textbox input field type:
Create a custom thread fields:
Admin CP -> Configuration -> Custom Thread Fields -> Add Thread Field, or see this post for screenshot:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=291&pid=31
Setting for the custom thread field:
Now, when a user create a new thread or edit their thread, they will see a contact information textbox:
[
attachment=200]
If user didn't fill their contact information, the error message will be displayed:
[
attachment=201]
Now, we need to put the contact information to our template. Depends on where we want to display it.
For example, if we want to put it in
postbit template, we need to edit our
postbit and
postbit_classic template.
The variable we need to put to display the Contact Information is:
Code:
{$GLOBALS['threadfields']['contact_info']}
|
Lets say that we want to display it above the post message.
Find this code in our postbit and postbit_classic template:
Then, add the {$GLOBALS['threadfields']['contact_info']} variable above the {$post['message']} vairiable. Something like this:
Code:
{$GLOBALS['threadfields']['contact_info']}
{$post['message']}
|
The result will be like this (horizontal and classic):
[attachment=202] [attachment=203]