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

251
Visualizações
vBulletin 3x - Creating an Ajax Load More Threads Button Results in Error

This question is intended for vBulletin developers, some methods may not make since if you are not familiar with the software.

So this is petty standard feature of most sites today, load more by pressing a button. So what Im trying to do is make an ajax request to a duplicated modified forumdisplay.php to load the next page of threads automatically.

Heres the procedure. In my forumdisplay template I have created an ajax script:

<script>
$(document).ready(function(){
    $('.load-more').click(function(){
        perpage = $perpage + 10;
        $('.block-threadlist').load('loadmore.php', {
            perPageNew: perpage
        });
    });
});
</script>

loadmore.php is essentially a modified duplicate of forumdisplay.php

The notable changes are:

I have included $perPageNew = $_POST['perPageNew']; and I have changed the eval template from FORUMDISPLAY to loadmore

The loadmore template ONLY includes $threadbits

Loading loadmore.php in browser, this works exactly how I expect it to, with only showing the threadbits of each thread, un-styled due to not being rendered with the head or any other templates. That's ok though because once they are loaded where they are supposed to be, they should be styled.

The problem comes when I hit my button.

<button type="button" class="btn btn-primary btn-lg load-more">Load More</button>

Which is placed directly below $threadbits in the forumdisplay template. I am recieving an error.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.]]>

That is all the error gives me, with nothing being posted in my php error log.

I have tried striping as much as I could out of the loadmore.php file so that it only includes what is required for the threadbits but I am not getting anywhere with the error.

Am I going about doing this the correct way, or would vBulletin require me to approach this in a different manor?

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