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
Welcome Anonymous
Membership:
Latest: Witewolf
New Today: 0
New Yesterday: 0
Overall: 151
People Online:
Members: 0
Visitors: 45
Bots: 3
Total: 48
Who Is Where:
Visitors:Support Forums
Support Forums
Pro News Articles
Pro News Articles
My Account
Home
Nedlastninger
Pro News Articles
Downloads
Pro News Articles
Pro News Articles
Support Forums
Support Forums
Pro News Articles
Support Forums
Pro News Articles
Nedlastninger
Pro News Articles
Pro News Articles
Support Forums
My Account
Downloads
Home
Pro News Articles
Support Forums
Pro News Articles
Pro News Articles
Support Forums
Support Forums
Support Forums
Home
Home
Downloads
Nedlastninger
Support Forums
Pro News Articles
Support Forums
Pro News Articles
Support Forums
Downloads
Support Forums
Pro News Articles
Support Forums
Support Forums
Pro News Articles
Bots:Google > Pro News Articles
Baidu > Pro News Articles
YANDEX > Downloads
Staff Online:
No staff members are online!
Hack Request
Hack Request
Posted: Thu Nov 12, 2009 8:58 am
OK, here's my hack request...
I use 'Articles by Category by Section' for the order of my article display. This is perfect because (as an example on my site) I have a cricket club section and a school section etc, so that when I look at the news from that section my articles are then listed in category order (so the latest news from the CC is listed first followed by the match reports etc). Perfect for those indivual sections.
However, what I would like to do is, on my home page, to have the articles just listed by article date order. That way the home page would be a digest of all the articles submitted and wouldn't be ordered at all - so it would just be a general news section.
Is there any way of using the home page hack that you've used to change the default display order? So, if home page display by article order, if not home page display by the order selected in config?
rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif- BetaTester

- Posts: 492
- Joined: Aug 01, 2007
- Location: Chantilly, France
Re: Hack Request
Posted: Thu Nov 12, 2009 2:00 pm
Hmmm... I really thought I'd reached the end of feature additions!
And it'll take a lot more than just a trick with url's.
First reaction is to add a new option in Config to specify 'Listed Articles By in Home'. But that seems like a difficult concept to get across to a new-to-Pro_News-Admin user. Even hard to say in English in just a few words! And sooner or later someone will want it different for hdlines and normal home display, no? ![]()
OTOH Section now has override on most of the Config options, thanks to fishingfan and masino_sinaga, but not List Articles By. Would it make sense to do it that way? Have an option List Articles By per Section? Obviously there would only be 2 choices, because the Articles only and Articles by Section would be equivalent within any given section. Would that accomplish what you're after?
Please think it over carefully, as it may be quite a task, and I don't want to even spend the time to think its implementation through if it won't accomplish your goals.
And no, this does not form a commitment ![]()
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

- Posts: 1229
- Joined: Mar 18, 2006
Re: Hack Request
Posted: Thu Nov 12, 2009 3:13 pm
I would have thought most people use the existing news module in a by article order for their home page, then allowing people to view per category (or topic as that is called) also. By adding sections you will have taken the news module and added another sort order in effect - surely the great 'pro' of pro_news!
Would the easiest way be to have a 'Sort by in home' option? That could then be by article or whatever. In an ideal world you'd have an option like that for home (displayed on the main config page) then another sort order shown under each section (there could be a default on the main config page but maybe that would be confusing things too much?)
rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif- BetaTester

- Posts: 492
- Joined: Aug 01, 2007
- Location: Chantilly, France
Re: Hack Request
Posted: Sat Nov 28, 2009 6:28 pm
OK, I *think* I have just managed to figure out the extremely complex logic to pull off the change you wanted.
Give me a few days to complete the rest of the release, and then I'd ask you to do a quick confirmation test before I release to all.
The Config settings are unchanged (for this feature at least), so you would still set List By to 'Articles', as this is what you want in "Home" I believe. But for the 2 Sections that you want to display differently when displayed on their own, you would use the new entry in Sections: List By and set to 'Articles within Categories'. That should give you the effect that you desire.
[ Reason for logic complexity is that the List By for Sections has to be stored in the Sections db file, so I have to do the actual selections override (if setting in sections different then ...) in SQL! If I did it in PHP then I'd have to read the db twice, once to get the List By data, and again to get the articles in the required order - slowing everybody down whether they used the feature or not. Problem is that SQL has very limited if/case constructs, so it took me - literally - days to figure out valid logic, which was already fairly complex, that was actually possible to express in the available SQL constructs. ]
Other changes to this release will be a fix to a (3.1?) bug which has stopped Category and Section headings displaying, a new Config parameter to limit length of Intro text, and new Config parameters to disable Category and Section headings (still to be written) as some will have sites implemented when sec/cat headings were disabled due to the bug, plus the usual array of minor cleanups. And of course the finished cross-browser FCS.
Plus an xHMTL (ie non-table) version of sections.html - if I get the time.
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

- Posts: 1229
- Joined: Mar 18, 2006
Re: Hack Request
Posted: Sat Nov 28, 2009 6:44 pm
Wow! Really looking forward to this. Thanks LB for all this work!
rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif- BetaTester

- Posts: 492
- Joined: Aug 01, 2007
- Location: Chantilly, France
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
All times are GMT











