Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

Pager Link Structure Bug Workaround

This discussion is related to the Voting addon.
Not too elegant, but:

In file class.voting.plugin.php roundabout line 390 paste one line to correct the linkstructure of the popular page's pager.

// Build a pager.
$PagerFactory = new Gdn_PagerFactory();

$Sender->Pager = $PagerFactory->GetPager('Pager', $Sender);
$Sender->Pager->ClientID = 'Pager';
$Sender->Pager->Configure(
$Offset,
$Limit,
$CountDiscussions,
'discussions/popular/%1$s'
);
//paste following line
$Sender->SetData('_PagerUrl', 'discussions/popular/{Page}');


In your apache settings add following Rewrite:
RewriteRule ^/discussions/popular/(p)(\d*)$ /discussions/popular/$2 [R,L]
Tagged:

Answers

Sign In or Register to comment.