Hack Request

3.2 Forum ONLY: If you've run into a problem, such as an error message, blank page, or similar problem, this is where to look. Post any installation or other problems or questions here, and I and other users will try to help.
  
12 Nov '09 Thu Nov 12, 2009 15:58    
rosbif
BetaTester  BetaTester
  •  

Posten Hack Request

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.4.1

 
 
 
 
  
12 Nov '09 Thu Nov 12, 2009 21:00    
layingback
Site Admin  
  •  

Posten Re: Hack Request

Hmmm... I really thought I'd reached the end of feature additions! Surprised

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? Wink

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 Smile



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
12 Nov '09 Thu Nov 12, 2009 22:13    
rosbif
BetaTester  BetaTester
  •  

Posten Re: Hack Request

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.4.1

 
 
 
 
  
29 Nov '09 Sun Nov 29, 2009 01:28    
layingback
Site Admin  
  •  

Posten Re: Hack Request

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 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
29 Nov '09 Sun Nov 29, 2009 01:44    
rosbif
BetaTester  BetaTester
  •  

Posten Re: Hack Request

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.4.1

 
 
 
 
Link  QR 
Share this Druckbare Version  facebook   google+   linkedin   twitthis  
Show more ...


Forenzugangskontrolle - Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst keine Dateien anhängen.
Du kannst keine Dateien herunterladen.