[ansel] Watermark replaceable text - what variables

Heath S. Hendrickson heath at outerspaceconsultants.com
Fri Mar 19 05:29:56 PST 2004


I'm just using the standard PHP strreplace($search, $replace, $sting) 
function... it's very easy and flexible.  To add more placeholders, just 
extend the $search and $replace arrays.  I might try and put both 
$search and $replace into an associateive array to make it easier to map 
one to the other... but it's not critical at this point with only a 
handful of placeholders.  I'll submit a patch for image.php shortly.

On a side note, I'm also trying to work with the font selection 
(starting by making it selectable from the stock 5 GD fonts).  I think I 
have everything in place for at least allowing the user to select from 
the default 5 fonts (1-5)... but does anyone know if there is a standard 
way of identifying all the fonts that a server has available and 
providing that list to the user?  I suppose I could scan the fontpaths 
and do it the hard way, but I figured that there had to be an easier way 
to get this.  I haven't found anything via google on this, so I thought 
I'd ask the experts...

h

Jan Schneider wrote:

> Zitat von "Heath S. Hendrickson" <heath at outerspaceconsultants.com>:
>
>> Okay, I'm working on the TODO of the watermark text having placeholders,
>> and here's the ones that I have so far... I wanted to get feedback on
>> what other ones people would like to see:
>>
>>
>> %N - Users name
>> %L - Users login
>> %Y - year of webserver ("2004")
>> %D - date of webserver ("|Sat Mar 10 15:16:08 MST 2001")|
>
>
> To save you some time and to allow even more flexibility, why don't 
> you use
> strftime() to generate the string and only add the missing placeholders
> (user name etc.)?
>
> Jan.
>
> -- 
> http://www.horde.org - The Horde Project
> http://www.ammma.de - Neue Wege des Lernens
> http://www.tip4all.de - Deine private Tippgemeinschaft




More information about the ansel mailing list