MyBB Community Forums

Full Version: Custom Field Check box with Links
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

Very new to the community... I literally installed myBB yesterday and started to play around with it. Loving it so far.

Here's what I'm trying to do. I'm trying to create a custom profile field. Which is relatively easy for the most part. But there's something I'm trying to do with one field that I'm not having any success with. I've searched the forums, tried some plugins, and still no success. Maybe it's just not something that can be done. But my guess is that I'm probably just not doing it correctly. Keep in mind, I'm very new to myBB and just starting. So it's also possible that when I search for solutions, I'm not even searching with the correct terms or language. Any help would be appreciated.

Detailed description of your problem, including steps to reproduce if necessary
Created a custom profile field
Selected Check Boxes
On each Check Box, I'd like to be able to link the text to a page on my site.

Screen grab 1

When I save the field, I get this screen grab. The code shows as text instead of a link around the text

Screen grab 2



URL to your forum/URL to specific problematic page
Just starting the process, would rather not share my forum page yet.



New installation or upgrade
myBB 1.8 - fresh install
Hey,
maybe this plugin would help? It allows you to use MyCode in custom profile fields. Also, please keep in mind, it's dependent on PluginLibrary.
Thanks mTurtle_

Slight problem though. Plugin Library won't install. Every time I click "Install & Activate", I get the message on the top of the screen that reads "You have successfully installed PluginLibrary 13. "

But it still shows in my "Inactive Plugins" section. So kind of stuck here.

(2020-02-14, 05:00 PM)blamege Wrote: [ -> ]Thanks mTurtle_

Slight problem though. Plugin Library won't install. Every time I click "Install & Activate", I get the message on the top of the screen that reads "You have successfully installed PluginLibrary 13. "

But it still shows in my "Inactive Plugins" section. So kind of stuck here.

I've gotten a little further with this.

Screen grab of my profile before I add my custom field and plugins (PNG)

I'm able to get the fields to show on the edit profile page with linked text. Which is great.

Custom field screen grab with green link text (PNG)

But when I edit my profile and click save, the entire "Additional Information" section of the profile disappears.

Screen of profile after adding custom field and plugins (PNG)

It would be one thing if my single custom field wasn't showing. But I'm not sure why my custom field (or addition of plugins) makes an entire section of my profile page go away since all the other default Additional Information fields still exist.

Hope that makes sense
Plugin Library won't show as installed, it's supposed to be that way.
As for the second issue- could you check for any PHP related errors in your error log? I'm not quite sure what would cause that, though.
Make sure {$profilefields} is located within your member_profile template.

There are some issues with check boxes I'm trying to fix but the box should be visible as long as there are other fields to display.

Also make sure at least {VALUE} is within the "Display Format" field for all fields as I still need to make this by default.
(2020-02-15, 11:47 AM)Omar G. Wrote: [ -> ]Make sure {$profilefields} is located within your member_profile template.

There are some issues with check boxes I'm trying to fix but the box should be visible as long as there are other fields to display.

Also make sure at least {VALUE} is within the "Display Format" field for all fields as I still need to make this by default.

{$profilefields} is in my 'member_profile' template

{VALUE} is in the "Display Format" of all my custom fields.

Checkboxes don't sure, but adding {VALUE} added the other custom fields. Just not my custom checkbox field.

(2020-02-15, 11:14 AM)mTurtle_ Wrote: [ -> ]Plugin Library won't show as installed, it's supposed to be that way.
As for the second issue- could you check for any PHP related errors in your error log? I'm not quite sure what would cause that, though.

Thanks for the pluginlibrary info. It was driving me nuts that it said it was installed but still showed in my "Inactive Plugins" section

For the second part. no php related errors in my error log
This plugin adds some templates, please find them and check their contents for empty templates.
Also, for checkboxes you need to paste {VALUE$1}{VALUE$2}.. within the Display Format text area.

I have pushed a new commit to allow {VALUE} for checkboxes and a new setting Multiple Value Delimiter (Checkboxes) that defines the separation value between each value.

But as far as why it is not displaying altogether for you I won't be so sure. I installed in a fresh forum and simply typing {VALUE} for the display format for all fields worked. You can check that in the attached capture from a local installation.
(2020-02-16, 12:55 AM)Omar G. Wrote: [ -> ]Also, for checkboxes you need to paste {VALUE$1}{VALUE$2}.. within the Display Format text area.

I have pushed a new commit to allow {VALUE} for checkboxes and a new setting Multiple Value Delimiter (Checkboxes) that defines the separation value between each value.

But as far as why it is not displaying altogether for you I won't be so sure. I installed in a fresh forum and simply typing {VALUE} for the display format for all fields worked. You can check that in the attached capture from a local installation.
Thanks Omar.

Can't check this right now, but will take a look later today and let you know what the results are. Much appreciated.
(2020-02-16, 12:55 AM)Omar G. Wrote: [ -> ]Also, for checkboxes you need to paste {VALUE$1}{VALUE$2}.. within the Display Format text area.

I have pushed a new commit to allow {VALUE} for checkboxes and a new setting Multiple Value Delimiter (Checkboxes) that defines the separation value between each value.

But as far as why it is not displaying altogether for you I won't be so sure. I installed in a fresh forum and simply typing {VALUE} for the display format for all fields worked. You can check that in the attached capture from a local installation.
That works like a charm.

Thanks so much Omar Big Grin

I have another question about formatting these, Going to start another thread when I have a minute to explain what I'm trying to do.