Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
How to Modify JS and PHP Code For Similar Question

Hey Stackoverflow Community...

I'm using Question2Answer PHP Script on My Q&A Website. Because My Website is in Hindi & Hinglish Language, So I'm Facing Some Problem. Please Help.

When User Asking the Question, Similar Question Suggestion is Showing Before Asking the Question. But, Sometimes the Exact Matched Question is Already Asked But in the Similar Question Suggestion List, That Question is Not Showing.

For Example-

Question "प्रकाश क्या है? Prakash Kya Hai?" is Already Asked by Any Users, But When Another User Asked Same Question "प्रकाश क्या है? Prakash Kya Hai?" Again, in the Similar Question Suggestion List, This Question is Not Showing.

That's Why Many Duplicate Question is Asked on My Website. It is Very Difficult to Find Duplicate Question and Then Deleting it.

I Humbly Request You Please Visit My Website Peddia and Help Me To Solve This Problem.

I'm Giving You Below The JS And PHP Code of Q2A Website. Please Tell Me Where Should I Have To Modify This Code?

qa-ask.js file

function qa_title_change(value)
{
    qa_ajax_post('asktitle', {title: value}, function(lines) {
        if (lines[0] == '1') {
            if (lines[1].length) {
                qa_tags_examples = lines[1];
                qa_tag_hints(true);
            }

            if (lines.length > 2) {
                var simelem = document.getElementById('similar');
                if (simelem)
                    simelem.innerHTML = lines.slice(2).join('\n');
            }

        } else if (lines[0] == '0')
            alert(lines[1]);
        else
            qa_ajax_error();
    });

    qa_show_waiting_after(document.getElementById('similar'), true);
}

asktitle.php code

if ($doaskcheck || $doexampletags) {
    $countqs = max($doexampletags ? QA_DB_RETRIEVE_ASK_TAG_QS : 0, $doaskcheck ? qa_opt('page_size_ask_check_qs') : 0);

    $relatedquestions = qa_db_select_with_pending(
        qa_db_search_posts_selectspec(null, qa_string_to_words($intitle), null, null, null, null, 0, false, $countqs)
    );
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda