|
NOTE: this page is for programmers only!
HyperPublish, EasyWebEditor, 1site, CDFrontEnd, PaperKiller, RoboAuthor and EBooksWriter support "text effects" plugins, "image effects" plugins, "object insertion" plugins, "HTML / files postprocessing plugin"*, "Link plugin"*.
Example:
The purpose of an "image" plugin is to input a graphic file (GIF or JPG; plus BMP), to enhance it, and to output modifications to the same file (or to a BMP).
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 (the name is also given as parameter; default extension .GIF; .BMP also allowed).
The "insert object" plugin should output an image file that will be inserted into the page or used within the "choose image" dialog, say as background (the image name is given as parameter; default extension .GIF; .BMP also allowed).
A plugin is really easy to implement: your install must set some registry keys, while the runtime parameters are passed through the command-line (no OLE-COM stuff). If you want to build a plugin application, or want to adapt your application to work as a plugin, all the specifications are in this page.
1) "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 an image having as file name the one passed as parameter ( c:\...\heretheresult.gif ) by using the other parameters.
The "EffectPars" parameter is optional, for example it can contain a switch that your application needs in order to recognize that it is being called as a VisualVision plugin.
The names "MyPluginText1" and "PlugText2" are examples, please replace with meaningful names.
(1.2+ only, 2003 june) In case your program could not return a GIF image, just return a BMP image, same path and name, just different extension.
In the following example a plugin has installed 2 options, that are shown by the Text Plugin magic button:
As you see, we have selected a text block, then we have pressed the button. Now the focus is passed to the Plugin application, as per the specifications (imagine your application here):
When we press "Save and exit" (you can provide a similar button within your application), we are back to the VisualVision product, and the original text is replaced by the image produced by your Plugin:
If no image is returned, nothing is done.
The 3D Buttons plugin works this way click here to download the trial edition,
You can use any of our programs to test plugins (e.g. EasyWebEditor, click here for the unlimited trial; 2MB)
2) "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
The "EffectPars" parameter is optional, for example it can contain a switch that your application needs in order to recognize that it is being called as a VisualVision plugin.
The name "MyPluginImg1" is an example, please replace with a meaningful name.
(1.2+ only) In case your program could not return a GIF image, just return a BMP image, same path and name, just different extension (.BMP).
(1.4+ only, 2003, october) In case your program could not open a GIF image, now you will find in input a BMP image too. Its name will be something like c:\thepath...\theNameOfTheImage.tmp (just rename to .TMP the parameter that you will receive on the command line). The name is not .BMP to avoid incompatibilities with the Plugin 1.2.
In the following example a plugin has installed 1 option, that is shown by the Image Plugin magic button, or if you click the right mouse button over an image (1.4 only):
When you click on the option, the focus is passed to the Plugin application. The Plugin receives the parameters specified above, and will return to the VisualVision product the modified image. The modified image will replace the original image.
3) Insert / Add "Object" plugin (1.3 and 1.4 only)
To install a "insert object" plugin you need to add registry keys such as these:
[HKEY_CURRENT_USER\Software\VV\Iper\PluginObj]
[HKEY_CURRENT_USER\Software\VV\Iper\PluginObj\MyPluginObj1]
"EffectName"="My plugin obj 1"
"EffectPath"="c:\\tmp\\myplugin.exe"
"EffectPars"="/obj"
[HKEY_CURRENT_USER\Software\VV\Iper\PluginObj\PlugText2]
"EffectName"="Effect 2"
"EffectPath"="c:\\windows\\myapp.exe"
"EffectPars"="/thisisjustasample /e2 /thiskeycanbeempty"
HP/EWE/PK/EBW call the plugin’s exe with given parameters (EffectPars) on command line, plus these parameters:
/Ifont="Times new roman" /Isize=12
/Icolor=#aa0000 /Ibg=#ffffff /Ib=0 /Ii=0 c:\...\heretheresult.gif
(if there is a "current text", parameter values are replaced with current text ones. b=0 no bold, i=0 no italic).
In short, your application should generate an image having as file name the one passed as parameter ( c:\...\heretheresult.gif ). It might use the other parameters parameters or it might not.
In case your program could not return a GIF image, just return a BMP image, same path and name, just different extension (.BMP).
The "EffectPars" parameter is optional, for example it can contain a switch that your application needs in order to recognize that it is being called as a VisualVision plugin.
The names "MyPluginObj1" and "PlugText2" are examples, please replace with meaningful names.
A Object Plugin is very versatile and allows you inserting any kind of object within the page. Furthermore (1.4 only) the Object Plugin options are shown inside all "Choose Image" dialog (the "Choose Image" dialog is shown for many tasks: when you choose the page or table background, when you specify a rollover image, when you insert an image reference inside direct HTML code...).
The Plugin simply returns an image that will be used according to the contest.
First example, simple insertion into the page:
Second example, we want to add an image background to the current page, so we choose "Format >Page properties":
If we select the "image background" button we will see the "Choose image" dialog. There we find the Object Plugin magic button:
The Magic Plugin button lists 1 option. If we choose this option the VisualVision product runs the Plugin. The Plugin returns an image that is inserted in the album and is selected within the left side list. So you can press OK to use this image as page background.
The Gliftex plugin works this way: download the trial edition here.
You can use any of our programs to test plugins (e.g. EasyWebEditor, click here for the unlimited trial, 2MB);
4) "HTML / file postprocessing" Plugins (1.5 only; something is 1.8 only)
To install an HTML / file postprocessing plugin (or maybe to make an existing application working also as plug-in) you need to add registry keys such as these:
[HKEY_CURRENT_USER\Software\VV\Iper\PluginHTMLpost]
[HKEY_CURRENT_USER\Software\VV\Iper\PluginHTMLpost\MyPlugin1]
"EffectName"="Process the HTML with MyPlugin1"
"EffectPath"="c:\\tmp\\myplugin.exe"
"EffectPars"="/vv"
"Kind"="processSingleHtm"
[HKEY_CURRENT_USER\Software\VV\Iper\PluginHTMLpost\MyPlugin1Properties]
"EffectName"="Set MyPlugin1 options"
"EffectPath"="c:\\tmp\\myplugin.exe"
"EffectPars"="/vvoptions"
"Kind"="showOptions"
For the postprocessing, HP/EWE/PK call the plugin’s exe with the EffectPars parameters on command line, plus the name of the single file or the single folder to process:
c:\...\heretheresult.htm
If a file, your application should input this file, process it, save it.
If a folder, your application must scan the folder for all files and process them. For choosing if file or folder see the "Kind" parameter below.
(1.8 only, February 2005) Your application may save (to the same folder path obtained in input) a file with the name vv-ftp-list.txt (fixed) that contains (one per line, with CR-LF) a list of files that needs to be uploaded on the Web site (just the names; must be within the same folder). This is useful if your application doesn’t just process our HTML but also adds other files (scripts, indexes, secondary CSS, etc.) that needs to be updated on the server.
The "EffectPars" parameter is optional, for example it can contain a switch that your application needs in order to recognize that it is being called as a VisualVision plugin.
The names "MyPlugin1" and "MyPlugin1Properties" are examples, please replace with meaningful names.
The "Kind" parameter tells the VisualVision application the kind of the plugin. Allowed:
- "processFolder" the plugin wants to be called once, with the folder name; it will process the folder;
- "showOptions" the plugin wants to be called once; it will show an "options" dialog;
- "processSingleAll" the plugin wants to be called for all files, one by one;
- "processSingleHtm" the plugin wants to be called for each htm/html file, one by one;
- "processSingleImages" the plugin wants to be called for each image (gif/jpeg/wmf) file, one by one;
- "processCss" the plugin wants to be called for the CSS file (there is a single CSS);
- "processJs" the plugin wants to be called for the JS file (there is a single JS);
If "EffectPath" is set to "debug", instead of running your plugin the VV application will show a debug message.
Example:
5) "Link plugin" Plugins (1.6 only; since October 2004)
To install a Link plugin you need to add registry keys such as these:
[HKEY_CURRENT_USER\Software\VV\Iper\PluginLink]
[HKEY_CURRENT_USER\Software\VV\Iper\PluginLink\MyPlugin1]
"EffectName"="Nice external link (created with MyPlugin1)"
"EffectPath"="c:\\tmp\\myplugin.exe"
"EffectPars"="/vv"
HP/EWE/PK/EBW call the plugin’s exe with given parameters (EffectPars) on command line, plus these parameters:
/html=abcprefix_000123.htm
where abcprefix_000123.htm is the willing HTML file name of the caller page
c:\...\somename.txt
a file that contains parameters to be processed. Actually, if the link is an existing link, your plugin will possibly find two files. The first is the one passed on the command line, a text file somename.txt that does contain the link HREF code; the second one is within the same directory, and has the same name but .psc as extension (e.g. somename.psc), and it does contain a script associated with the link (if any). As you guessed you can obtain the name of the second file just by changing the file extension.
If these files don't exist, your application should create them by using the name provided. If there are no "scripts" the file .psc should simply not exist.
The "EffectPars" parameter is optional, for example it can contain a switch that your application needs in order to recognize that it is being called as a VisualVision plugin.
The name "MyPlugin1" is an example, please replace with a meaningful name.
There is a sample application, please download it here (http://visualvision.com/download/plugapplink.zip 200KBytes; .exe demo and Delphi code included).). Please install a VisualVision application first (e.g. EasyWebEditor, click here to download the unlimited trial edition; 2MB).
Just double click the application exe in order to install it as plugin, then start EasyWebEditor.
As you can see (image below; and take a look to the Registry), for the sample link plugin the EffectName parameter is "External link (long link)"
the sample program just shows this dialog:
when you press OK this link is placed within the page. You may use "Publish >Browser preview >Current page in default browser" to see the page and the generated code. Everything is optimized so if two links have the same script code (e.g. <!--dummy--> in the dialog above) it is placed within the HEAD only once.
Extract from the code generated from the link above:
...
<!--dummy-->
</HEAD>
<BODY TEXT=#000000 LINK=#0000FF VLINK=#FF0000 BGCOLOR=#F0F0F0 >
<BASE TARGET="_top">
<DIV class=s0>
link plugin test</DIV>
<DIV class=s0>
</DIV>
<DIV class=s0>
<A class=s0 HREF="http://defaultnewlink.com">link number 1</A></DIV>
To edit an existing link you need to right click on the link: from the popup menu that is shown please choose "Link properties" (this is the normal way the other links work - your plugin will be "transparent" to the end user).
A Link Plugin is very versatile as allows you to provide to the end user a visual interface for inserting complex link codes (such as shopping cart codes).
Another example: you can see the Pageville Shopping cart plugin, that does allow to insert Paypal and Pageville "buy" and "checkout" buttons within Web pages, visually (click here to download trial edition).
Some Hints for plugins
a) both standalone and plugin
Your application can work both as standalone and as a plugin. You don't need to write a separate application: you may simply modify your existing application in order to run as plugin if it detects (say) the /vvplugin parameter in the command line. That parameter is configurable (with EffectPars), in our above examples we often use /vv.
b) detect VisualVision applications
If you'd like to autodetect if a VisualVision application is installed on the system, simply test the Registry for the Uninstall entry.
For old versions, the key is like this:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Uninstall\HyperPublishT.exe
(this is the one for HyperPublish trial, you may just test for a key that begins with HyperPublish), for new versions (after October 2004; plugin specs. 1.6) it is like this:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Uninstall\VisualVision_HyperPublishT.exe
so you may just scan for a key that begins with VisualVision (if the plugin works with all products)
c) install as multiple plugin
Your application can install itself as multiple plugin. You are not forced to choose between 1, 2, 3, 4. You can implement them all if your application fits.
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. Say your software is tePRO.exe, then 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 applies for “image effects”.
Test and debugging
You can use any of our programs to test plugins (e.g. EasyWebEditor, click here for the unlimited trial; 2MB): 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 (200KBytes).
Or get a real plugin application: click here for the 3D Button trial (it's a "text" plugin, it transform texts into images). Please install a VisualVision application first (e.g. EasyWebEditor, click here to download the unlimited trial edition).
Plugin History:
Plugin Specs 1.5; October 2003; available in all products since November 30, 2003.
Added "HTML postprocessing" plugin
Plugin Specs 1.4; September 2003; available in all products since October 30, 2003.
Added parallel BMP in input for Image plugins; Object plugins button added to all image dialogs (e.g. you can add a plugin that can be used when the people is choosing the background image)
Plugin Specs 1.3; April 2003; available in all products since May 30, 2003.
Added Object plugins
Plugin Specs 1.2; January 2003; available in all products since January 30, 2003.
Added support for BMP, your plugin can now output a BMP, will be converted
Plugin Specs 1.0; July 2002; available in all products since July 1, 2002.
Notes:
* "HTML / files postprocessing plugin" (and in some cases also the "Link plugin") don't work with EBooksWriter and CDFrontEnd
Send comments to info @ visualvision.com.
|