Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
–2 votes
1.0k views
in Q2A Core by
I think Question "by anonymous" is super ugly in this script ... so we need a temporary register from with name and email to post anonymously so instead of showing "by anonymous" we will hopefully have a name there !

See my previous question here: http://www.question2answer.org/qa/19183/anonymous-posting-by-name-and-email

DO YOU AGREE WITH THIS ISSUE?

Please add this feature as soon as possible :)
Q2A version: 1.5.3
by
You could change it in the language file to "by Guest" which sounds a little friendlier.
by
How can i do that please tell me.
by
@abhik21: What does your "that" mean?
by
I mean that how can we change language file to diaplay "By Guest" for anonymous posts.
by
@abhik21: This may help you.
http://www.question2answer.org/qa/23318

1 Answer

+2 votes
by

Ok, I finally figured out the code and a quick fix for the "by Anonymous" stuff. It only works for questions (I'll have to hack in the extra field in answers), but it looks a lot better with names, while preserving the anonymous IP info.

In qa-theme-base:

 

            function post_meta_who($post, $class)
                {
                        if (isset($post['who'])) {
                                require_once("qa-db-metas.php");
                                $name=$post['who']['data'];
                                if (strstr($name,'anonymous')){
                                        $name=qa_db_postmeta_get($id,'qa_q_extra');
                                        if ($name){
                                                $id=$post['raw']['postid'];
                                                $post['who']['data'] = str_replace('anonymous',$name,$post['who']['data']);
                                        }
                                }
 
simply replaces anonymous with the extra field. I've only been at this for a day so there may be holes, but it makes the questions list look a lot more personal.
by
Just to expand on this, in order to make this work properly I had to add the extra field to the comment and answer forms, save the extra field for comments and answers, and also make it a required field. The result is no anonymous posts. All posts show a name. Not perfect, but not bad, and certainly better than having 80% of the posts anonymous.
...