Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.4k views
in Q2A Core by
edited by

Hi there,

Some users, are creating profile in full uppercase like this : "ALMANACH" to connect. Is there any way to put titles in users profiles like this => "Almanach"

Thanks, I can't find how!

 

Q2A version: Last version
by
same problem!
by
=> both answers below works perfecly together.

3 Answers

+2 votes
by
selected by
 
Best answer
Try to change the qa-include\qa-page-register.php - line:

$inhandle=qa_post_text('handle');

to:

$inhandle=strtolower(qa_post_text('handle'));

That should work.

Greetings,
Kai

 

PS: This is a core hack, if you update your q2a installation it will be lost. You should note that down to add the hack in the update.
by
edited by
Hi q2apro, thanks but every letters are lower now, but I want to keep First letter uppercase.
by
I fixe this by adding : $inhandle=ucfirst(strtolower(qa_post_text('handle')));
+1 vote
by

You can change for already registered user by adding this two lines in qa-include/qa-page-user.php

on line 35 find belo code at line #35

$handle=qa_request_part(1);

Add below line after that

$handle = str_replace($handle, strtolower($handle), $handle);
$handle = str_replace($handle, ucfirst($handle), $handle);

This will replace all existing users name with First letter uppercase and all other in lowercase.. Final code will be like this


	

$handle=qa_request_part(1); 
$handle = str_replace($handle, strtolower($handle), $handle); //this line to add 
$handle = str_replace($handle, ucfirst($handle), $handle); // this line to add

 

by
edited by
Hello Jatin, thanks, it works in the user page but it's not working in all other pages like "recent questions", i still have full uppercase profiles, any idea?
by
I fixe this by changing in the database.
0 votes
by
Thats works! Thx too much i have same problem, now i have solitions :)
...