[Beta] Parse BBCode in Custom Profile Fields

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
cuteKitty
Registered User
Posts: 8
Joined: Sun Aug 30, 2009 11:10 am

Re: [Beta] Parse BBCode in Custom Profile Fields

Post by cuteKitty »

Great mod, but I have one more question. Does this mod work only when you have: Field validation: any character?
because I don't want people to be able to use IMG in every profile.
moonlightkisu
Registered User
Posts: 150
Joined: Wed Dec 31, 2008 9:14 pm
Location: Connecticut, USA
Name: Miss Moonlight

Re: [Beta] Parse BBCode in Custom Profile Fields

Post by moonlightkisu »

I installed this, it works perfectly.

How can I get the BBcode to show up in the memberlist and PM view? custom profile fields already display there, but the bbcode isn't formatted.

Also, is there a way to fix the way it looks when you go to edit your profile? right now, this doesn't look very good, although it works:

Image

Thanks!
User avatar
JTKnight85
Registered User
Posts: 8
Joined: Thu Nov 19, 2009 3:28 am

Re: [Beta] Parse BBCode in Custom Profile Fields

Post by JTKnight85 »

Is there a way to limit the maximum image size in the custom profile fields with this? I'd like users to be able to link to a picture, but there could definitely be some problems if the size can't be controlled somehow.
Forumation
Registered User
Posts: 30
Joined: Tue Jun 08, 2010 8:05 am
Name: Brad

Re: [Beta] Parse BBCode in Custom Profile Fields

Post by Forumation »

what is your forums link?
Cerapter
Registered User
Posts: 1
Joined: Sat Jul 07, 2012 1:24 pm

Re: [Beta] Parse BBCode in Custom Profile Fields

Post by Cerapter »

I tried to do this on an updated phpBB3, and realized it must now be done in includes/functions_profile_fields.php:

Code: Select all

Open:
includes/functions_profile_fields.php
Find:
				if ($value === NULL)
				{
					continue;
				}
Add after:
				$uid = $bitfield = $options = '';
				$allowed_bbcode = $allowed_smilies = $allowed_urls = true;

				generate_text_for_storage($value, $uid, $bitfield, $options, $allowed_bbcode, $allowed_smilies, $allowed_urls);
				$value = generate_text_for_display($value, $uid, $bitfield, $options);
Selective
Registered User
Posts: 213
Joined: Sat Apr 19, 2014 10:30 am

Re: [Beta] Parse BBCode in Custom Profile Fields

Post by Selective »

The first post worked great, but then the mod update to this for

Code: Select all

Includes/functions_profile_fields.php
didn't work and disabled the work that was in the first post.

After removing what I did in the first post and what I did in the MOD update, I added the fix here

Code: Select all

Open:
includes/functions_profile_fields.php
Find:
            if ($value === NULL)
            {
               continue;
            }
Add after:
            $uid = $bitfield = $options = '';
            $allowed_bbcode = $allowed_smilies = $allowed_urls = true;

            generate_text_for_storage($value, $uid, $bitfield, $options, $allowed_bbcode, $allowed_smilies, $allowed_urls);
            $value = generate_text_for_display($value, $uid, $bitfield, $options);
It worked great, but sadly it was the same result as the original first post. I couldn't find any new settings or features.

I was hoping the "Edit Profile" page would have the actual BBcode Buttons for people to use, or that there would be control options added in the ACP, but it's just the same code. I love the code, but I really want BBcode Buttons added to the "Edit Profile" page.

Can anyone help?

Return to “[3.0.x] MODs in Development”