I found a solution in this extension -- infox(info extension)
http://www.boltwire.com/index.php?p=solutions.system.infox

There is a build-in clean function should be working.
function BOLTinfoClean($info, $args) {
        $before = count($info);
        $exists = implode(',', BOLTsearchPageList(Array()));
        foreach ($info as $p => $v) {
                if (strpos(",$exists,", ",$p,") === false) unset($info[$p]);
                }
        $after = count($info);
        return "Info fields cleaned.\nBefore: $before, After: $after.";
        }
But it seems have the unicode(utf-8) problem?
The return of strpos() will be wrong if the entry in info.tags
contains Chinese or Parentheses ()
Try to use mb_strpos() instead but still not working...



On 4月13日, 下午2時04分, Martin <[email protected]> wrote:
> Maybe it is a better solution to rename pages and have a search on
> page infotags only that pulls all the pages with their actual names?
>
> Greetings, Martin
>
> On Apr 13, 4:59 am, Phoenix Wu <[email protected]> wrote:
>
>
>
> > Need some help here~
> > Try to update info.tags when the page got renamed, but it doesn't
> > work.
> > BoltWire v3.4.11
>
> > action.rename
> > [form]>>New name for page:<< [text page '{p}' size=25] [submit RENAME]
>
> > [session if "exists {=page} ? warn=>>Page already exists. Could not
> > rename.<<"]
> > [session warn]
> > [session stamp {p}]
> > [session author {member}]
> > [session changesummary "Page renamed from {p} to {=page} by
> > {=author}."]
> > [session savedata author,changesummary]
> > =======================================================<< insert 2
> > lines
> > [session info "field='{=page}' value='{info.tags::{p}}'
> > target='info.tags'"]
> > [session info "delete field='{p}' target='info.tags'"]
> > =======================================================
> > [session rename '{p}|{=page}']
> > [session nextpage '{=page}']
> > [form]

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