Template files include location fix

Utilizes proper user selected theme location and theme folder location
Fix toward #1367

Filters values for `$cfg['maxrowsperpage']`