phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Long user name alters format of one forum section only


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
Chapter 24
Board Member



Joined: 30 Dec 2008

Posts: 48



PostPosted: Wed Dec 02, 2009 7:38 pm 
Post subject: Long user name alters format of one forum section only

Hi, I have a member with a long user name (25 characters including spaces), and in one forum section only, the threads he makes wind up being double-spaced because his name as thread creator goes to three lines (his name is three words). This doesn't happen in any of the other forum sections. In the other sections, his name only takes up two lines and the spacing remains normal and consistent with the other threads.

Anyone familiar with this problem and can help me fix it (aside from telling him to shorten his name)? I don't know why it should be fine in all forum sections but one. It's as if the width of the frames surrounding the topic field are narrower or something and it can't accommodate the long name without forcing it to three lines and creating extra space to the top and bottom of each subject line of the threads he's created. I hate how it breaks up the consistency of the topic list page spacing.

I hope I'm making enough sense as I'm typing this quickly while on break from work.
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Wed Dec 02, 2009 11:44 pm 
Post subject: Re: Long user name alters format of one forum section only

Use substr() to truncate username output when displaying the list of topics.
_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL • Mac 512K Blog • Mac GUI
Back to top
Chapter 24
Board Member



Joined: 30 Dec 2008

Posts: 48



PostPosted: Wed Dec 02, 2009 11:58 pm 
Post subject: Re: Long user name alters format of one forum section only

Thank you for the quick reply.
I'm afraid that I'll need a bit more guidance though. I've edited files to install some MODs a couple years ago, but that's about it for my phpbb programming knowledge.
How do I implement this suggestion and what does it do? Does it cut off part of his name?
Exactly which file do I edit? Or is it a database query?
Any extra info is appreciated. Thanks!
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Thu Dec 03, 2009 4:49 pm 
Post subject: Re: Long user name alters format of one forum section only

Chapter 24 wrote:
Does it cut off part of his name?
Yes.
Quote:
Exactly which file do I edit?
viewforum.php

To truncate the topic author's name to 20 characters, make the following revision to viewforum.php:

FIND
Code:
      $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );


REPLACE WITH
Code:
      $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? substr($topic_rowset[$i]['username'], 0, 20) : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );


That is all.

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL • Mac 512K Blog • Mac GUI
Back to top
Merri
Board Member



Joined: 02 Feb 2009

Posts: 63
Location: Kanta-Hδme


flag
PostPosted: Fri Dec 04, 2009 8:49 am 
Post subject: Re: Long user name alters format of one forum section only

Since I consider that more as a workaround method, I'd like to see the actual page in question. I'm probably able to see what could be changed in the template/CSS to make it manage this problem better, so that there wouldn't be a need to shorten the user's name.
_________________
Comboa Twitter
Back to top
lumpy burgertushie
Board Member



Joined: 19 Nov 2008

Posts: 217


flag
PostPosted: Mon Dec 07, 2009 1:56 am 
Post subject: Re: Long user name alters format of one forum section only

why not make it a rule that you can only have x characters in your name and enforce the rule?

change his name to a more normal username so it won't disrupt your layout.


robert
Back to top
Chapter 24
Board Member



Joined: 30 Dec 2008

Posts: 48



PostPosted: Mon Dec 07, 2009 2:55 am 
Post subject: Re: Long user name alters format of one forum section only

Thanks everyone for the replies and suggestions icon_smile.gif

Does phpbb2 already have a built-in maximum character limit on user names? I've actually been meaning to ask that question for awhile. I was thinking it was limited to 25 characters already because there was a person who once registered using a name that was a lyric line from a song and it seemed to cut him off in the middle of a word once he hit 25 characters. I never got around to testing to see if I could register a name using more than 25 characters or not.

Since first posting this question here I have noticed why his name goes to three lines on this one particular forum page and not the others. It is because on the other pages there are people who started threads who have fairly long names, but no spaces in the names, so those names are forcing the "author" field to expand, and thus accommodate this new guy's name within two lines rather than breaking it up into three lines.

I'm starting to get used to how it looks, and I'm probably the only one on the forum who cares about it anyway ... not sure if I should try doing anything about it or not. icon_neutral.gif
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Mon Dec 07, 2009 5:20 pm 
Post subject: Re: Long user name alters format of one forum section only

Yeah, it's 25 by default. There's a function called phpbb_clean_username() which enforces some standards.
_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL • Mac 512K Blog • Mac GUI
Back to top
Chapter 24
Board Member



Joined: 30 Dec 2008

Posts: 48



PostPosted: Fri Dec 18, 2009 6:29 am 
Post subject: Re: Long user name alters format of one forum section only

Sorry I didn't reply sooner, but thank you for confirming that Dog Cow.
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0283 seconds using 15 queries. (SQL 0.0025 Parse 0.0009 Other 0.0249)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo