News:

Join the Facebook Fan Page.

Main Menu

username in posts

Started by Joker™, January 29, 2010, 08:41:31 AM

Previous topic - Next topic

Joker™

plz see the pic attached ..... the username is going out of user info area in posts

this pic if from smf site only...

i also have same problem on my forum .... i know there is one thread on this but it didn't helped on RC2

Hope someone will suggest solution soon
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Nick Whetstone

Someone correct me if I'm wrong, but I think that is too long of a display name. ;p Not really much I would know how to do except to ask the members to change their display name/change it for them.
The artist formerly known as (Ha)²

Former Support Specialist

Please do not solicit support via PM. Here's why!

Joker™

but that;s not a solution .....

the idea in my mind is to too shrink the name size if it exceeds certain limit ....

like after 10 or 15 character of name the font size for name will get reduced itself ....
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Nick Whetstone

Interesting idea... I may look into writing this into a Mod.
The artist formerly known as (Ha)²

Former Support Specialist

Please do not solicit support via PM. Here's why!

Joker™

one of my friends did that already some time ago .... i'll try to ask him..... it took him a very small modification to make it work
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Nick Whetstone

Quote from: sid2varun on January 29, 2010, 09:29:35 AM
one of my friends did that already some time ago .... i'll try to ask him..... it took him a very small modification to make it work

Really? If you find it, let me know; I don't recall ever seeing it before.
The artist formerly known as (Ha)²

Former Support Specialist

Please do not solicit support via PM. Here's why!

Joker™

Lol nearly a complete year since I asked tis question and a lot has changed since then ;). I was working on this problem today and got a fix.

To accomplish this, go to

Sources\Load.php (Make backup of file before editing it)

Find:
// Are we also loading the members custom fields into context?


Add before:
if(strlen($memberContext[$user]['name']) > 14)
{
$memberContext[$user]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '" style="font-size:70%;">' . $profile['real_name'] . '</a>';
}


If i get time, I'm surely gonna alter this a bit more and will be submitting this as a mod ;).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kays

Why not just reduce the size of the name?


if(strlen($memberContext[$user]['name']) > 14)
   $memberContext[$user]['name'] = shorten_subject($memberContext[$user]['name'], 14);

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Joker™

Quote from: Kays on January 24, 2011, 12:29:01 PM
Why not just reduce the size of the name?
The screen shot attached above is of one of the username on SMF. SO my basic idea was to reduce the font size of username, not the characters from username as by shorting the meaning of name might get changed completely.

BTW, nice code Kays.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kays

Your choice. Probably looks nicer too. :)

I'm more tempted to shorten the name (or hide the overflow) just to annoy the user and discourage long user names.  ;D

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Joker™

Quote from: Kays on January 24, 2011, 01:38:58 PM
Your choice. Probably looks nicer too. :)

I'm more tempted to shorten the name (or hide the overflow) just to annoy the user and discourage long user names.  ;D
or we can give choice to user to decide that in which way they want to use it ;). If you like I can add your code also in the mod.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kays

That bit of code is insignificant. Add it if you wish. :)

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Joker™

Well we can manipulate it to some extent, I like the ideology you have used in your code.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: