Hi again,

I don't know if I should add this as a plugin, but while playig with 
Boltwire, it came to me that the if conditions missed something just like a 
simple substring
Hence, the following condition function:
function BOLTCinstring($args='') {
## CHECKS TO SEE IF AN ITEM (FIND OR POS2) IS IN GIVEN SRING (VALUE OR 
POS1). USEFUL TO LOOK FOR SUBSTRING OF MANY VARS... VALUE DEFAULTS TO 
CURRENT PAGE TITLE AND FIND DEFAULTS TO CURRENT ID. CASE INSENSITIVE IF 
CASE IS SET TO FALSE.
    global $pageLink, $BOLTid;
    $content = BOLTinit($pageLink, $args[1], $args['value']);
    $find = BOLTinit($BOLTid, $args[2], $args['find']);
    if ($args['case'] == 'false') {
        $content = strtolower($content);
        $find = strtolower($find);
        }
    if (strpos($content, $find) !== false) return true;
    $find2 = BOLTurl2utf($find);
    if (strpos($content, $find2) !== false) return true;
    }

I am using that to display all pages whose url contain a given substring. I 
did not want to use data fields or info fields for that, and most of the 
time, the substring I am looking for is itself the substring a a page url 
part. Also, I am looking for quite generic terms that will for sure appear 
in the content of many other pages which I don't want to return as a result.

As people may want to overuse this condition instead of using what already 
exists in very powerful ways for the search, list and other features using 
condtions, I am proposing to add that as a plugin, but you tell me.

Cheers,
Tiffany

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.

Reply via email to