So in the "Regular Expression" option when you're creating a new custom profile field, is it possible to have it where it puts whatever the user answers with into a link?
So basically can this happen:
User input: Example
Results displayed: @Example
I think you will need to edit templates and add your custom field manually with all the html link stuff.
(2014-11-29, 12:50 AM)Adriano Wrote: [ -> ]I think you will need to edit templates and add your custom field manually with all the html link stuff.
Any idea on where I could start with this?
It would depend on where you wanted the link to go and if that link was represented with the custom ID
As example of your text @example which would link to a twitter account:
custom field input: twitter name
Wherever you want it to display in your template put the following:
<a href="http://twitter.com/{$post['fid"custom_id_number']}">@{$post['fid"custom_id_number']}</a>
(you can find the field number by going to the ACP---->Configuration---->Custom Fields, then hover over the field name. The last number in the url is the field id number.)
(2014-11-29, 01:43 AM)user25 Wrote: [ -> ]It would depend on where you wanted the link to go and if that link was represented with the custom ID
As example of your text @example which would link to a twitter account:
custom field input: twitter name
Wherever you want it to display in your template put the following:
<a href="http://twitter.com/{$post['fid"custom_id_number']}">@{$post['fid"custom_id_number']}</a>
(you can find the field number by going to the ACP---->Configuration---->Custom Fields, then hover over the field name. The last number in the url is the field id number.)
I got this when I tried to put that in the template:
"The following errors were encountered:
A potential security issue was found in the template. Please review your changes or contact the MyBB Group for support."
^ {$post['fidX']} works in postbit templates where X is the custom profile field ID
This is related to this, what is the default setting for the 'member_profile_customfields_field' template?
you mean original code of the template ?
MyBB 1.8.x
<tr>
<td class="{$bgcolor}"><strong>{$customfield['name']}:</strong></td>
<td class="{$bgcolor} scaleimages">{$customfieldval}</td>
</tr>
MyBB 1.6.x
<tr>
<td class="{$bgcolor}" width="40%"><strong>{$customfield['name']}:</strong></td>
<td class="{$bgcolor}" width="60%">{$customfieldval}</td>
</tr>