Cronological (Oldest first) not working

All notes and input on 2.0 Development are herein. <ul><li>Feature requests</li>
<li>Bug Reports</li>
<li>Beta Testing Feedback</li>
<li>Open Dev Discussion</li></ul>

Moderator: Coranto Moderator Team

Cronological (Oldest first) not working

Postby Von Snellfharer » Wed Sep 10, 2003 1:52 pm

Cor v. 1.21.3 one basic profile set to sort chronological (oldest first).

It's blody NOT working!!!

Please excuse the frustration.
Von Snellfharer
________________________________________
last of the fullgrown men
User avatar
Von Snellfharer
 
Posts: 255
Joined: Fri Jun 21, 2002 8:03 am
Location: Semi arctic

Postby kriko » Wed Sep 10, 2003 2:00 pm

try 1.21.5?
Kristjan aka. kriko
now a wireless expert
User avatar
kriko
 
Posts: 3328
Joined: Sat Feb 24, 2007 8:13 pm

Postby Von Snellfharer » Wed Sep 10, 2003 2:41 pm

same shit new wrapping.

(Again, please excuse the frustration)

The cronological order works on a different profile that uses a different style.
The buggy profile is set to inklude 1 item (preferably the oldest), the other is a headlines style that includes all items (the one that works).
Von Snellfharer
________________________________________
last of the fullgrown men
User avatar
Von Snellfharer
 
Posts: 255
Joined: Fri Jun 21, 2002 8:03 am
Location: Semi arctic

Postby Parahead » Wed Sep 10, 2003 5:28 pm

This one is a classic.

The problem is that if you specify a number that should be included, it is *always* sorted by the submit-date, *then* it is sorted the way you have specified. In this case it makes it always include one post (the latest) and then you do a sort by oldest first, guess which one you ends up with? ;-)

This thread discuss the problem and a solution:
http://coranto.org/forum/viewtopic.php?t=3892

So leave the "Filter By Number"-field blank and use the code below in your style:
Code: Select all
<PerlCode>
  $countitems{$ProfileName}++;

  if($countitems{$ProfileName} > 1) {
    last;
  }
</PerlCode>
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Lawrence » Thu Sep 11, 2003 1:49 pm

hmmm if i'm not mistaken ( i'm at work now and can't test it ), switching the code for the filtering and sorting should allow both sorting styles to work as you'd expect them to.

I'll look into it.
Stuff I'm working on:
- nothing

Addons:
http://sourceforge.net/projects/lw-craddons/
Lawrence
 
Posts: 1524
Joined: Sun Sep 16, 2001 4:24 am

Postby Parahead » Thu Sep 11, 2003 7:55 pm

Lawrence,

personally I would be a little bit careful with that. It really depends on what the user is trying to accomplish when doing a sort/filter or filter/sort. I agree that it seams most logical to sort first and then filter out, but I can also see where the oposit can be useful and there may be someone out there who has implemented a site that rely on this functionality and by switching the sort/filter-routines screws that up...

And another thing is that if you let it be, it is possible for the user to choose sort/filter or filter/sort, but if you implement sort/filter in the core of Coranto, it is not possible to achive filter/sort by any Perl-code in the style.

So in my opinion having it the way it is leaves more flexibility but should instead be pointed out more clearly and maybe have a Perl-snip as an example or the best would be to have a radiobutton in the profiles adminpage for filter/sort - sort/filter... But this is just me rumbling... ;-)
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Parahead » Sat Jan 15, 2005 9:29 pm

I know this is a an old thread, but I just wanted to correct the code snippet I used as an example above.

If using a profile with Sort Order set to anything else but "Default (Reverse Chronological)" the correct code to use is:
Code: Select all
<PerlCode>
  $countitems{$ProfileName}++;

  if($countitems{$ProfileName} > 1) {
    next;
  }
</PerlCode>

And if using a profile with the Sort Order set to "Default (Reverse Chronological)" use:
Code: Select all
<PerlCode>
  $countitems{$ProfileName}++;

  if($countitems{$ProfileName} > 1) {
    next PROFLOOP;
  }
</PerlCode>
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Any resolution on this yet?

Postby shovi » Mon Jan 31, 2005 2:29 am

FYI, I posted this question in another similar thread in the Customizations forum....hope nobody minds.

Has there been any resolution to this issue? I'm running v1.24 and have my profile sorted to Oldest First, mainly because I want to dislplay a list of upcoming events. I'd also like to put a "1" in "Filter by Time" part of the profile, so that the day after the event passes, it moves off the list.

It sounds like what we're trying to do is similar to what many are trying to do with coranto, that is, get the sorting mechanism to work.

So I was wondering if there has been any resolution to this issue?

Thanks.
shovi
 
Posts: 3
Joined: Mon Jan 31, 2005 2:16 am

Re: Any resolution on this yet?

Postby bozoka45 » Mon Jan 31, 2005 6:47 am

shovi wrote:Has there been any resolution to this issue? I'm running v1.24 and have my profile sorted to Oldest First, mainly because I want to dislplay a list of upcoming events. I'd also like to put a "1" in "Filter by Time" part of the profile, so that the day after the event passes, it moves off the list.


Try using the ChangeDateNew addon, I believe that it is capable of doing exactly what you're looking for.
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans


Return to Coranto 2.0 Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron