Support Forum
I am probably being really silly here and the fact is that most users are unlikely to have a problem but how can I truncate or limit a username in Forum and Topic Views?
For instance
sp_PostIndexUserName('tagClass=spPostUserName spCenter&truncate=50');
Does not work.
It is possible to have really long usernames such as hyphenated names that really mess up the appearance of both Topic and Forum View. We insist on real names for our forums and there are a couple of names that will cause problems with this.
Can it be fixed?
Conrad
There isn't an argument available like that for truncating a user name like there is for a topic name.
I can see how this could cause you some formatting issues in several places depending on your layout.
Maybe the spTruncate function could be used to globally truncate a username instead of having to do so on every line that shows a user name.
I am sure Steve or Andy will pipe in with ideas.
No afraid not... that might look quite odd... but we can consider it...
there is an sp function you can use on the returned value: sp_truncate($name, $length)
and try to truncate it yourself... be careful, if you have it set to be a link though, the html will consume characters...
Visit Cruise Talk Central and Mr Papa's World
You would use truncateUser in each view file and set the length.
For example in GroupView.php to truncate to 5 for last post.
sp_ForumIndexLastPost('tagClass=spInRowPostLink&nicedate=1&date=0&time=0&stackdate=0&truncateUser=5', __sp('Last Post'), __sp('No Topics'));
like the other truncation, but for users... valid for: sp_SubForumIndexLastPost, sp_TopicIndexFirstPost, sp_TopicIndexLastPost, sp_ForumIndexLastPost, sp_ListLastPost and sp_PostIndexUserName
Visit Cruise Talk Central and Mr Papa's World
cool. thanks for the confirmation and update...
Visit Cruise Talk Central and Mr Papa's World