PDA

View Full Version : Adding a request to pagenav?


TheLastBatman
03-15-2021, 02:21 AM
I am trying hook into the pagenav to add a request within showthread.

I have been able to achieve this using the pagenav_page hook and defining $address .= '&test' but this is causing a weird error with multiple pages.

It is adding 1 request for each page that exist. so if I have 2 pages in a thread, the page 2 link becomes showthread.php?t=6&test&test&page=2 and page 4 becomes showthread.php?t=6&test&test&test&test&page=4

I am trying to get it showthread.php?t=6&test&page=4 no matter how many pages there are.

I have looked through the functions and noted address is defined as
$address = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$thread[threadid]";

I have tried re defining address as
$address = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$thread[threadid]&test";
within pagenav_page but it will not detect the threadid when I do it this way. Is there a way I can get this to work properly?

end goal
showthread.php?t=6&test&page=4