OK, a simple hack, so my immediate problem is resolved. You may try
to figure out a better way for your next release.
In search.php around line 283, looks like this
elseif (preg_match('/^p[0-9]{1}\=$/', $field) != 0) {
$index = substr($field, 1, 1);
foreach ($outarray as $page) {
$tempArray = explode(".", $page);
if ($index == 0) $sortarray[$page] =
count($tempArray);
else $sortarray[$page] =
$tempArray[$index - 1];
}
}
I understand the preg_match is looking for p0,p1,p2, up to p9, but i
don;t know how to change it to also accept just 'p'!!
So I will never need p0 (the count of the group heirarchy) so for now
I utilize p0 and set it to page name around line 287
change:
if ($index == 0) $sortarray[$page] =
count($tempArray);
TO:
if ($index == 0) $sortarray[$page] =
$tempArray[count($tempArray)-1];
which is the equivalent of 'p' or 'page' in other parts of boltwire.
So my final hack looks like this with only line 287 commented and
replaced:
elseif (preg_match('/^p[0-9]{1}\=$/', $field) != 0) {
$index = substr($field, 1, 1);
foreach ($outarray as $page) {
$tempArray = explode(".", $page);
//if ($index == 0) $sortarray[$page] =
count($tempArray);
if ($index == 0) $sortarray[$page] =
$tempArray[count($tempArray)-1];
else $sortarray[$page] =
$tempArray[$index - 1];
}
}
The search command I used now sorts by just the final page name, which
in my cast is a timestamp, regardless of the group heirarchy preceding
the timestamp pagename.
[(search sort=p0 group=jacadmin*.jtask_notdone.* template=jtasknotdone
order=reverse count=12)]
results in list at
http://www.vacationrentalworkshop.com/jacwiki/jac/index.php?p=jacadmin
Thankx again all.
On Sep 7, 12:20 pm, "The Editor" <[EMAIL PROTECTED]> wrote:
> On Sun, Sep 7, 2008 at 10:49 AM, jacmgr <[EMAIL PROTECTED]> wrote:
>
> > To me that is strange, but I will find a work around. In the sample
> > file list above, you see that the actual page name could be anywhere,
> > p0,p1,p2,p3, p4 etc.... It is simply the last p.
>
> > I think wanting to sort or order your pages by the actual name would
> > be a common need, but maybe I am misunderstanding.
>
> No, you are probably right. I just didn't work out the code for it.
> Probably only a line or to in search.php, the BOLTsort function. If
> you can hack it in a line or two, I'll add it. Just a bit busy right
> at the moment, or I'd do it right now...
>
> > also confirm that for example, I I wanted the page sorted by p3, I
> > should use: sort=p3 and not order=p3 ??
>
> Yes, this is correct. Order really only has two meaningful values:
> reverse and random.
>
> Cheers,
> Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---