This topic is locked

RTL Pagination Sort Order Fixed

5/12/2021 7:43:43 AM
PHPRunner Tips and Tricks
A
Abu Dhabi Customs author

Dear Amazing Xlinesoft team and members,

I had a problem having the pagination in my RTL (Arabic) phprunner list page , it is showing the numbers sorted from Left to Right, and it should be from Right to Left, so I tried several methods like using jquery to reverse the order , but that was not practical , finally found the where all this is being processed :

C:\Program Files\PHPRunner10.5\source\classes\runnerpage.php

I have changed this :

if(isRTL())
{
// Fixing the pagination order for RTL pages , numbers starts from right to left //

for($counter = $counterstart; $counter <= $counterend; $counter ++)
{
$pageLinks .= $separator . $this->getPaginationLink($counter,$counter, $counter == $this->myPage );
}
/* // Original Code //
for($counter = $counterend; $counter >= $counterstart; $counter --)
{
$pageLinks .= $separator . $this->getPaginationLink($counter,$counter, $counter == $this->myPage );
}
*/
}

This solved the problem (^_^)

img alt

Thank you Xlinesoft for this amazing software.

Best Regards,

Ahmed.

admin 5/12/2021

Ahmed,

thank you for sharing!

A
alghanim 5/15/2021

Hello brother Ahmed, the code does not work, it shows an error

A
alghanim 5/15/2021

Thank you .. this code works
Image

img alt