One solution may be to use [[{p}|{page}]] instead of [[{p}|+]]. The +
returns the title, which is  capitalized (ucwords). The {page} returns
the page name, uncapitalized.

It may be easier to fix the problem by simply changing line ~2227 in
engine.php below to strip out the ucwords function:

                if (BOLTutf2url($BOLTvar[$page]['title']) ==
$BOLTvar[$page]['title']) $BOLTvar[$page]['title'] =
ucwords($BOLTvar[$page]['title']);

Of course, the problem with hacking the core, is every time you do an
upgrade you have to make the changes again.

One option is to create a custom link function: something like this in
config.php

function myBOLTMlinks($link, $defaultAttr, $attr, $label, $missingPage) {
        $label = strtolower($label);
        return BOLTescape('<a href="'.$link.'" '.$defaultAttr.$attr.'>') .
BOLTtranslate($label) . BOLTescape("$missingPage</a>");
        }

But it would make every label lower case...  Maybe that is overkill.

The other option would be for me to put in a site.config option, like
titleCaps: false or something to disable the capitalizing where
desired.

But if simply using [[{p}|{page}]] works, let's just go with that!

Cheers,
Dan


On Sun, Mar 7, 2010 at 11:34 AM, Phoenix Wu <[email protected]> wrote:
> It seems that the page link markup [[link|+]] always uses ucfirst() to
> uppercase the first character of the link label.
> Because I want the tags in "tag cloud"(tag.xx or tag.yy, .etc) to be
> case-sensitive, so this is very annoying to me.
>
> I tried to find a solution on 
> http://www.boltwire.com/index.php?p=docs.handbook.markups,
> but I have no lock.
> so I decided to modify some codes by myself to fix it. (I'm not a
> programmer at all.)
>
> boltwire v3.3.9
>
> c:\www_root\boltwire\barn\scripts\markups.php
> function BOLTMlinks($x) {
> ...
> line:546
>                        if ($label == '+') {
>                                if (strpos($link, '&') !== false) $label = 
> BOLTvars(substr($link,
> 0, strpos($link, '&')) . ':title');
>                                elseif (strpos($link, '#') !== false) $label =
> ucfirst(substr($link, strpos($link, '#') + 1));
>                                else $label = BOLTvars("$link:title");
>                                }
>                        /////////// add a new custom link label, try not to
> uppercase the first char of tags
>                        elseif ($label == 't') {
>                                if (strpos($link, 'tag.') !== false) $label = 
> substr($link,
> strpos($link, '.') + 1);
>                                }
>                        ////////////////////////////////
>
> c:\www_root\boltwire\farm\plugins\infotags.php
> function BOLTinfoTagCloud($info, $args) {
> ...
> line:28
> change
>                $out .= " <span style=\"font-size: " . $x . 
> "px;\">[[?tag.$i|+]]</
> span> ";
> to
>                $out .= " <span style=\"font-size: " . $x . 
> "px;\">[[?tag.$i|t]]</
> span> ";
>
> showing tags in pages:
> change
>  Tags: [(list '{info.tags::{p}}' delimiter=' ' join=' | ' fmt='[[?tag.
> {+p}|+]]')]
> to
>  Tags: [(list '{info.tags::{p}}' delimiter=' ' join=' | ' fmt='[[?tag.
> {+p}|t]]')]
>
>
> It works fine to me but maybe someone has a better solution?
>
> --
> 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.
>
>

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