Text2Gif Plugin

Aus Earthdawn-Wiki.v2
Version vom 22. Oktober 2024, 19:37 Uhr von Root (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „With this Plugin for [http://www.jspwiki.org JSPWiki] you can display text as gifs - why? Because you won't show your email in a text form for example. When you display it as gif, no spam spider can catch it. For the generation of the GIF images the ACME.jar of the [http://www.acme.com ACME Laboratories] is used (Freeware). ====Example==== {Text2gif size='14' bgcolor='white' Hello World! } is cr…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

With this Plugin for JSPWiki you can display text as gifs - why? Because you won't show your email in a text form for example. When you display it as gif, no spam spider can catch it.

For the generation of the GIF images the ACME.jar of the ACME Laboratories is used (Freeware).

Example

{Text2gif size='14' bgcolor='white' Hello World! }

is created by the following syntax:

<code>

[{Text2gif size='14' bgcolor='white'

Hello World!
}]

</code>

Text2Gif-Plugin-Parameters

Name Description Necessity
body Text to be shown required
align center, left, right optional (none)
fontsize size of the base font optional (12?)
width size of the produced gif optional (600?)
height size of the produced gif optional (200?)
bgcolor color of the background optional (white)
color color of the text optional (black)

Installation

1. The following jars must be copied to {JSPWiki}/WEB-INF/lib:

2. The following must be added to {JSPWiki}/WEB-INF/web.xml:

<code>
        <servlet> 
	   <servlet-name>DownloadJobServlet</servlet-name> 
	   <servlet-class>
	      com.ecyrd.jspwiki.plugin.DownloadJobServlet
	   </servlet-class> 
	</servlet> 
	
	<servlet-mapping> 
	   <servlet-name>DownloadJobServlet</servlet-name> 
	   <url-pattern>/downloadJob</url-pattern> 
	</servlet-mapping> 
</code>

3. Under Linux/Unix you may enable the awt headless mode (see Headless-Mode in JDK 1.4). You can do it in two ways:

  • Edit Wiki.jsp and append System.setProperty("java.awt.headless", "true"); in the init-method
  • edit the catalina.sh and append CATALINA_OPTS='-Djava.awt.headless=true' at the head of the file

Source Code

The source code is part of the SBaltesPlugins.jar.

License

Text2GifPlugin itself is under the LGPL and uses freeware libraries:

Text2GifPlugin a JspWiki Plugin for visualising text as gifs.

Copyright (C) 2004 Sebastian Baltes

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

GNU LESSER GENERAL PUBLIC LICENSE Version 2.1