Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43600 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35850 invoked from network); 2 Apr 2009 16:13:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2009 16:13:14 -0000 Authentication-Results: pb1.pair.com header.from=chrisstocktonaz@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=chrisstocktonaz@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.178 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: chrisstocktonaz@gmail.com X-Host-Fingerprint: 209.85.217.178 mail-gx0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:59201] helo=mail-gx0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/63-22853-914E4D94 for ; Thu, 02 Apr 2009 11:13:13 -0500 Received: by gxk26 with SMTP id 26so1321867gxk.23 for ; Thu, 02 Apr 2009 09:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=CO1zCPAsJJF13u265S+LwLqNwotfGFQyyA78DU6mZJA=; b=Pyxk1pnDhCtIP1ez+934UixJ10bTsTEKi4CRhRyaA3Zbb23ogqCy5wlv+jORThvLba CxLiBr+SGCoxY0dmwiNzfweFX6aJssths6Rz51ytSxqNzxNA2HA47ev5cNtoehzwTEwY DvV7d2J7Mome1pbfhMvsoCggbFE5RvvlDYmBI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=MlcMtf7uZzFAj1pUYQyxGUEbTjhsCbs9nOJ1DCpRtCGtOUrqyQN9HV92s3jIxpNfLw JGmKgSGeSbfOR5agnCgnYsdTCH1chvyiAVhkUleln4iryA933+ikwb/6XuKV3oufaMt3 nznIkVPMdxVvMQhy8SzKjfj/KRi/ewR4bKkUc= MIME-Version: 1.0 Received: by 10.150.124.2 with SMTP id w2mr417318ybc.16.1238688791159; Thu, 02 Apr 2009 09:13:11 -0700 (PDT) In-Reply-To: <1238684543.8765.141.camel@localhost> References: <6F.F0.47115.84534D94@pb1.pair.com> <2dedb8a0904020508r6306c189peda001421d4e830f@mail.gmail.com> <2dedb8a0904020515k6bd68cdarea0ebd9bb3a8f6c9@mail.gmail.com> <49D4CE5F.3070805@php.net> <2dedb8a0904020745gf2d9e19wd0f1167dae53ac2d@mail.gmail.com> <1238684543.8765.141.camel@localhost> Date: Thu, 2 Apr 2009 09:13:11 -0700 Message-ID: To: Robert Cummings Cc: Kalle Sommer Nielsen , Scott MacVicar , David Coallier , Justin Martin , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Update to Zend Highlighter From: chrisstocktonaz@gmail.com (Chris Stockton) On Thu, Apr 2, 2009 at 8:02 AM, Robert Cummings wrot= e: > > Wrap the whole =A0highlighted block in a div with a class: > > =A0 =A0
> =A0 =A0
> > Add one more INI setting to change that class. Let users leverage > hierarchical CSS rules: > > div.php-highlighted-code span.keyword { color: red; } I like that, and would further elaborate instead of INI changes etc, allow a key-value pair array to be passed as a third argument. Perhaps ini changes could be the "default" names. mixed highlight_file (string $filename [, bool $return=3D false [, array $class_names]]); comment|default|keyword|html|string) Array( 'div_wrapper' =3D> 'xyz-cms-div-wrapper', 'default' =3D> 'xyz-cms-default', 'etc' =3D> 'xyz-cms-etc', ); The good thing about this as well, is for some odd or logical reason if your using highlighting multiple times, you can change the class names of each highlight without something like ini_set. -Chris