Oh, that's right. I had $BOLTvar global in mine. Guess I forgot to
mention it. As for $BOLTvar[language] it set it line 197 (somewhere in
that list of vars):

$BOLTvar['$language'] = BOLTconfig('BOLTlanguage');

Which allows {language} in the page. However I wonder if it wouldn't
be smarter to set it in the plugin. I added the line above on my
system and it worked just fine.

The other, maybe even better option is to do this. It is a more
standard way, uses less code, and is a bit eaiser on the eyes:

~1933-1934

        $sortFunc = 'BOLTsort' . BOLTconfig('BOLTlanguage');
        if ($sortFunc != 'BOLTsort'  && function_exists($sortFunc)) return
$sortFunc($outarray);

and ~2024-2025

                        $sortFunc = 'BOLTsort' . BOLTconfig('BOLTlanguage');
                        if ($sortFunc != 'BOLTsort'  && 
function_exists($sortFunc))
$sortarray = $sortFunc($sortarray);

No BOLTvar is needed, no change to the plugin is required, no
introduction of a new system variable.  I think this latter option is
the best yet. Thoughts?

Cheers,
Dan


On Thu, Oct 22, 2009 at 4:33 AM, Hans <[email protected]> wrote:
>
> Missing: in function BOLTsort() you need to declare $BOLTvar global.
> And the function starts with
>   if ($args['sort'] == 'false') return $outarray;
> which means it will never gert to the $sortFunc =
> "BOLTsort$BOLTvar[language]"; part.
>
> How do I set the $BOLTvar[language] ?
> in site.config
> language: de
> did not do it.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to