Donations

Help support Pro_News and become a member of our Sponsors Group
The tip jar is at PayPal, but does not require a PayPal account
User Info
Bienvenue Anonyme
Adhésion:
Dernier: Witewolf
Nouveau aujourd'hui: 0
Nouveau hier: 0
Tous: 151
Visiteurs en ligne:
Membres: 0
Visiteurs: 36
Bots: 3
Total: 39
Qui est Où:
Visiteurs:Support Forums
Pro News Articles
Pro News Articles
Support Forums
Nedlastninger
Support Forums
Support Forums
Pro News Articles
Support Forums
Support Forums
Pro News Articles
Downloads
Nedladdningar
Nedlastninger
Downloads
Pro News Articles
Downloads
Support Forums
Downloads
Support Forums
Pro News Articles
Nedlastninger
Pro News Articles
Support Forums
My Account
Support Forums
Support Forums
Pro News Articles
Pro News Articles
Support Forums
Nedlastninger
Pro News Articles
Support Forums
Pro News Articles
Pro News Articles
Pro News Articles
Bots:Google > Pro News Articles
Baidu > Support Forums
YANDEX > Nedladdningar
Admin en Ligne:
Pas d'Admin en ligne!
Simpler URL's for pagination.
Simpler URL's for pagination.
Posté le: Sun May 29, 2011 4:48 am
The URI's generated my Pro News for pagination are large and not 100% "useful":
example:
Pro_News/mode=/sid=/cid=/page=2.html
And if you're seeing a category in particular: (Pro_News/cid=2.html)
Pro_News/mode=/sid=0/cid=2/page=2.html
Whats the point of those parameters if they're not useful even for Pro News on those cases?
Well the solution is simple:
/Pro_News/functions.php
line 1979 (V 3.3.26 Revision 3.39)
Find
pagination('Pro_News&mode='.($is_home ? 'home' : '').'&sid='.$sid.'&cid='.$cid.'&page=', $pages, 1, $page);
and Replace with:
pagination('Pro_News'.($is_home ? '&mode=home' : '').($sid ? '&sid='.$sid : '').($cid ? '&cid='.$cid :'').'&page=', $pages, 1, $page);
The you'll get shorter URI's:
Pro_News/cid=2/page=2.html (For Category 2)
Pro_News/mode=home/page=2.html (for Home, no category or section defined)
Category and Section parameters are only added to the URL when necessary.
greenday2k please enter your server specs in your user profile!

greenday2k- Poster

- Messages: 21
- Inscrit le: May 18, 2009
- Localisation: Bogotá
Re: Simpler URL's for pagination.
Posté le: Tue May 31, 2011 7:00 am
Thanks! Good mod.
Please keep them coming, I'm more than happy to accept and incorporate improvements to Pro_News. I want this to be a community project, that's why it's F/OSS!
Included in 3.3.2.7 - with attribution.
Note to all: If applying greenday2k's fix for yourselves note that you will also need to edit & into & a m p ; (without the spaces) as your browser reduced them to &. There should be 4 occurrences in that line. Without them you may get W3/Tidy warnings.
Thanks again!
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum
You cannot attach files in this forum
You cannot download files in this forum
Toutes les heures sont au format GMT











