Downloads » Resources » WriteWord » WriteWord | 0.23

WriteWord 0.23

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
5 vote(s).

This snippet allows to generate image from the text with any font. Caching, templating and other options.

Works with MODx Version(s): 0.9.6
Submitted: Sep 6th 2007 | License: GPL - GNU Public | Downloads: 423

Description

Sometimes it is needed to use non-standard fonts to create a beautiful design or to follow strong requirements of the corporate identity.
This snippet allows to generate image from the text with any font. Images will be saved in the system cache folder and MODx will use it without creating it again. When website refreshes all files in the cache folder will be removed and they will be generated again while the document renders.

This snippet is like some other similar scripts (text2image, gtext) released early, but with more parameters. Some code was taken from MODx veriword.php.

Great thanks to Igor from Russian MODx Community for the translating of documentation from Russian to English!

Instructions

All instructions in readme.txt inside.

The sample usage[[WriteWord?&file=`media/SkodaSansRg.ttf` &text=`Your text will be here.` &text_size=`12` &text_color=`#FFFFFF` &bg_color=`#CCCCCC` &quality=`100` &tpl=`writeword`]]
The writeword chunk

<h1 class="pagetitle" style="background-image: url([+ww.fileurl+]); width: [+ww.width+]px; height: [+ww.height+]px;"><span>[+ww.text+]</span></h1>
CSS-code
h1.pagetitle span{
display: none;
}
As the result of running snippet we receive the similar code:
<h1 class="pagetitle" style="background-image: url(/assets/cache/499063c8c7a81af2e7691193c07f690d.pageCache.jpg); width: 167px; height: 15px;"><span>Your text will be here.</span></h1>
The image will be duplicated with a hidden text that will be a search engine friendly.

Updates


( back to top )