|
|
NOTE: this page is for programmers only!
HyperPublish, EasyWebEditor, 1site, CDFrontEnd, PaperKiller and EBooksWriter support "text effects" plugins and "image effects" plugins.
The purpose of an "image" plugin is to input a graphic file (gif or jpg), to enhance it, and to output modifications to the same file.
The purpose of a "text" plugin is to input text parameters (caption, font, color, bgcolor, style, size), to enhance it, and to output the result to a graphic file (name is also given as parameter).
The following text contains the specifications for programmers wishing to build a plugin application (or want to adapt their apps to work as a plugin). A plugin is very easy to implement: parameters are passed through the command-line, no OLE-COM stuff.
Text Plugins
To install a text plugin you need to add registry keys such as these:
[HKEY_CURRENT_USER\Software\VV\Iper\PluginText]
[HKEY_CURRENT_USER\Software\VV\Iper\PluginText\MyPluginText1]
"EffectName"="My plugin text 1"
"EffectPath"="c:\\tmp\\myplugin.exe"
"EffectPars"="/text"
[HKEY_CURRENT_USER\Software\VV\Iper\PluginText\PlugText2]
"EffectName"="Text eff 2"
"EffectPath"="c:\\windows\\myapp.exe"
"EffectPars"="/runiniperpluginmode /e2"
HP/EWE/PK/EBW call the plugin’s exe with given parameters (EffectPars) on command line, plus these parameters:
/Icaption="Hello word!" /Ifont="Times new roman" /Isize=12
/Icolor=#aa0000 /Ibg=#ffffff /Ib=0 /Ii=0 c:\...\heretheresult.gif
(Note that parameter values are replaced with selected text block ones. In the caption, an eventual "" means ". b=0 no bold, i=0 no italic).
In short, your application should generate the image passed as parameter ( c:\...\heretheresult.gif ) by using the other parameters.
(1.2 only, 2003) In case your program could not return a GIF image, just return a BMP image, same path and name, just different extension.
Image plugins
To install an image plugin you need to add registry keys such as these:
[HKEY_CURRENT_USER\Software\VV\Iper\PluginImage]
[HKEY_CURRENT_USER\Software\VV\Iper\PluginImage\MyPluginImg1]
"EffectName"="My plugin image 1"
"EffectPath"="c:\\tmp\\myplugin.exe"
"EffectPars"="/img"
HP/EWE/PK/EBW calls the plugin’s exe with given parameters on command line, plus this parameter:
c:\thepath...\theNameOfTheImage.gif
(1.2 only, 2003) In case your program could not return a GIF image, just return a BMP image, same path and name, just different extension.
Hints
A text plugin is very useful if you can select a portion of text on your web pages, apply an effect, and can then quickly repeat this process for all titles of the page.
If your software is (for example) tePRO.exe, you can quickly implement that behavior in this way.
[HKEY_CURRENT_USER\Software\VV\Iper\PluginText\TextEffectPRO]
"EffectName"="Text Effect PRO effects"
"EffectPath"="c:\\windows\\tePRO.exe"
"EffectPars"="/effects"
[HKEY_CURRENT_USER\Software\VV\Iper\PluginText\
TextEffectPROredo]
"EffectName"="Text Effect PRO repeat last effect"
"EffectPath"="c:\\windows\\tePRO.exe"
"EffectPars"="/redolasteffect"
The software tePRO.exe should store the last effect done for HP/EWE/PK/EBW (for example in the same reg key, maybe by using a string like "EffectLast"), and should retrieve it when called with “/redolasteffect” option.
Note that this hint also apllies for “image effects”.
Test and debugging
You can use any of our programs to test plugins (download here): when reg keys are found, a "magic" button will show for text and another one for images: you can select a text block or an image and use the button.
A sample plugin application (exe demo and delphi source) is available here: http://visualvision.com/download/plugapp.zip
Send comments to iper@visualvision.com.
|