Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: wynnyelle - joulukuu 17, 2013, 01:04:24 IP

Otsikko: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 01:04:24 IP
I want to make it bigger in there so people can put a longer text if they want to. Is there an easy way to do this?

I want to let members use it as an About Me on their profile.  On mini profile maybe I could limit how long it gets, but let the whole thing display on the profile. would this be hard? On the mini profile it could just go with the "..." after too long.

But the first step is letting people get more text in there at all.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: shadow82x - joulukuu 17, 2013, 01:59:06 IP
Why not use a custom profile field?
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: kat - joulukuu 17, 2013, 02:10:22 IP
If that's not of use, you could try this. No guarantees, though, coz I haven't checked it...

Sources>Profile-Modify.php

'personal_text' => array(
'type' => 'text',
'label' => $txt['personal_text'],
'log_change' => true,
'input_attr' => array('maxlength="50"'),
'size' => 50,
'permission' => 'profile_extra',


Change 'maxlength="50"' to suit. You MIGHT need to adjust 'size', on the next line, too.

As I said, I haven't tried this, so keep a copy of the original file, in case I've just typed a load of rubbish, woncha? ;)
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 02:35:30 IP
thank you guys!!

I like the custom profile field idea for this too! How would I set that up though? I know we have the controls, but it would need to go into the correct area on the profile page--right underneath the avatar, in that same square block as the avatar and name.

Ok I created the custom field called About Me, but it isn't where I need it to be. It's way down at the bottom and I need it to be right under the avatar.

now I put text into it and it disappeared except for a tiny squish flat thing. what am i doing wrong???
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 02:58:05 IP
Lainaus käyttäjältä: K@ - joulukuu 17, 2013, 02:10:22 IP
If that's not of use, you could try this. No guarantees, though, coz I haven't checked it...

Sources>Profile-Modify.php

'personal_text' => array(
'type' => 'text',
'label' => $txt['personal_text'],
'log_change' => true,
'input_attr' => array('maxlength="50"'),
'size' => 50,
'permission' => 'profile_extra',


Change 'maxlength="50"' to suit. You MIGHT need to adjust 'size', on the next line, too.

As I said, I haven't tried this, so keep a copy of the original file, in case I've just typed a load of rubbish, woncha? ;)

This worked, by the way! Thank you!

The only problem is that it doesn't work quite right in the text box on the forum profile page. Instead of just having a text box that increases vertically with more text, it stays on one single line and gets longer and longer. There a way to fix this?

Also, there a way to let people use BBcode on it?
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: margarett - joulukuu 17, 2013, 03:09:32 IP
Use a custom profile field. It natively allows BBC, if you choose so ;)
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 03:16:15 IP
But I tried that and it didn't work...See up higher in this thread.

It didn't appear where it has to appear it was down at the bottom instead. It needs to be under the avatar in that block, and have its own CSS class so people can make it fancy if they like.

thanks!!!
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: kat - joulukuu 17, 2013, 03:34:22 IP
No idea how to sort that box size, I'm afraid. :(

It's possible that that's controlled in index.css. I'm really not certain, though.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 04:32:34 IP
I don't know either but need to sort it out. Cause the custom field aint popping up where it needs to we're using the personal text as an about me.

Also, discovered that even though I set the thing to allow 400 characters it still only allows around 250. Not the worst thing in the world, but 400 would be cool, also, would it be possible to let people use BBcode on it?

They also want to be able to justify it or not. There be a way to put a little checkboxes in there to click it to centre it, justify it or left align/right align it?
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Arantor - joulukuu 17, 2013, 04:47:06 IP
Neither making it bigger nor using bbc is recommended.

The bbc parser is the single largest - and slowest - component of SMF. It consumes half of Subs.php on its own. Running it dozens more times at once is not recommended.

Making the field bigger as it normally stands adds a performance hit to the members table, which hurts everywhere that the personal text is used. Custom fields have a slightly lower penalty in that respect though.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 04:49:13 IP
So if I made this a custom field that would solve a lot of these issues. I saw the check box that lets you put bbcode into there.

But it's putting it at the bottom and I want it at the top under the avatar. It is supposed to be an about me text area. If I could just move it, it would be great. Do you know how?
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: margarett - joulukuu 17, 2013, 04:51:48 IP
A small tweak in Display.template.php can fix that for you ;)
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Arantor - joulukuu 17, 2013, 04:52:31 IP
No, it wouldn't solve much of them at all. Custom fields don't allow for two separate things to be stored at once, so that's no help to you, using bbcode is still a performance nightmare whatever you do (like I already said)

Yes, you could move the textbox up but it would have other consequences, there's no easy way to pull just one field out and move it on its own.

Though why you need to put this mini-bio on every single post seems a bit beyond me.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 04:54:17 IP
It wouldn't need to go on the mini profile if we were using a custom profile field. Just on the main profile page would be enough.

I just need to move it to right up below the avatar, or under the avatar and icons, same basic idea.

Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Arantor - joulukuu 17, 2013, 04:55:43 IP
So use the custom field and only display in the main profile area... not sure what the problem is at this point.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 05:07:59 IP
It won't display under the avatar that's the problem.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Arantor - joulukuu 17, 2013, 05:10:11 IP
Except just now you said it wouldn't need to go on the mini profile (= the one inside posts) if it were a custom field because it would be on the main profile...

Sorry, shouldn't have said anything.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 05:13:20 IP
Yes I said that. But it is still not going under the avatar it gets stuck on the bottom. What does that have to do with the mini profile?

Do you want me to show you screenshots?
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Arantor - joulukuu 17, 2013, 05:14:26 IP
Except the mini profile is the one in posts. So one minute you're saying it should be in there, the next you're saying it doesn't matter if it isn't.

I really should remember to ignore these threads because no good ever comes of my trying to help you
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Kindred - joulukuu 17, 2013, 05:17:45 IP
I think she is trying to stick it under the avatar in the profile summary screen.


Personally, I'd just use the ultimate profiles mod, which already includes a personal bio area as well as many more personalizable bits and baubles.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 05:19:38 IP
What are you talking about??? No, you are helping! But I don't know what you mean! ;_;

getting very upset please don't get upset at me I don't understand what I am saying wrong!


I made a screenshot for you! Please please say that it helps you understand what I am trying to tell you! Please..please :( ;_;

I am being polite to you, yet you get upset with me. I try and answer your questions calmly, yet you grow angry. Why? What am I saying wrong???

Please look at the screenshot!
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 17, 2013, 05:20:51 IP
Lainaus käyttäjältä: Kindred - joulukuu 17, 2013, 05:17:45 IP
I think she is trying to stick it under the avatar in the profile summary screen.


Personally, I'd just use the ultimate profiles mod, which already includes a personal bio area as well as many more personalizable bits and baubles.

YES This is what I mean! The full profile is not the mini profile!

Thank you thank you!

Beeble I am not saying I need it in both. The personal text thing shows up in both automatically so I was trying to custom tail it to fit in mini profile without too trouble, but now, if I get full profile only with profile custom field, then it is fine to only be in there because that is it by default.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Kindred - joulukuu 18, 2013, 08:11:23 AP
Seriously --   I suggest the ultimate profile mod.... (see attached)
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: wynnyelle - joulukuu 18, 2013, 01:39:38 IP
That is actually what we are using already. We have been using it for years. Yes, it's quite wonderful, though a lot about it on our site has been modified over time.

Thank you for your response.
Otsikko: Re: How to get more text in the personal text area on profile
Kirjoitti: Kindred - joulukuu 18, 2013, 03:42:03 IP
if that's what you have been using, then why are you not using the "personal info area" for person info instead of trying to use a different field?

You also never indicated that you were using the ultimate profile mod... and it makes a difference because, to move the contents of the custom profile fields to a different location, the changes for the standard profile and the ultimate profile are significantly different.