[pandorabots-general] Integration with vhost

Colin Meldrum colin at pandora.pandorabots.com
Thu May 29 23:13:53 PDT 2003


> From: Denson Smith <denson at discountman.com>
> Date: Sat, 24 May 2003 03:34:45 -0500
> 
> Is it possible to change the size of the character or the layout in my 
> pandorabots.com bots published with vhost? I'm trying to put the bot in one 
> frame and open pages in another frame. The default size is way to big. My 
> only alternative is to open the bot in a separate window, which seems to 
> confuse the very people I'm trying to help with the bot the most.
> I would like very much to be able to customize the vhost/pandorabots page 
> like I do the Pndorabots page alone. I have no problem with putting 
> prominent links etc to Pandorabots and vhost as part of the fee for the 
> service. My main goal is to build a slick website that uses the AI of the 
> bot's to help people have a good experience at the site.

There are two ways to add customized HTML for a Pandorabot published
with a VHost.

1. Create and upload a single custom HTML page and select that page to
   be used for your chatbot's response frame. This is the simpler of
   the two methods and uses the standard frame layout with the vhost
   in one frame above the chatbot's responses in the second. You can
   take a look at a demo of this at:

   http://www.pandorabots.com/pandora/talk-oddcast?botid=96e051555e34367d

2. Upload your own frameset definition as a custom HTML page, as well
   as HTML for the frames themselves. This is more complex but gives
   you complete control over the appearance of the final page. You can
   take a look at a domo of this at:

   http://www.pandorabots.com/pandora/talk?botid=b089bc570e34367c   

Method 1 - Using 'Publish with Vhost'

First you need to create a custom HTML skin for the bot response
page. You should create your custom HTML following the instructions
at:

   http://www.pandorabots.com/pandora/pics/pubhtml.html

In order to make the VHost speak, you need to also include in the
custom HTML the special marker:

   !SPEAK!

This can appear anywhere in the <body> of the HTML. Save the file as
input.html and then from 'Botmaster Control', Edit the bot and upload
the file using the upload in the 'Personalized published html page'
section. The example used in the demo can be viewed at:

   http://www.pandorabots.com/pandora/support/custom.html#input

After you have uploaded the custom HTML skin, publish it with a VHost
face in the normal way (click on 'Publish with VHost' from 'Botmaster
Control'). If you have successfully uploaded a custom HTML skin you
should see a pull-down labelled "Customized HTML Skin" - select your
custom .html file and click on 'Publish'.

Note, that a recent addition to this page is the addition of the field
labelled 'VHost Height'. This allows you to control the size of the
Flash component in the published page.

If all goes well your published chatbot should look similar to:

   http://www.pandorabots.com/pandora/talk-oddcast?botid=96e051555e34367d

Method 2 - Using Custom HTML frames.

You can upload multiple custom HTML skins for a single bot if they are
given different names. You can then under 'Personalized published html
page' select which one to use by default. This is the customized HTML
which will be used for the published URL:

   http://www.pandorabots.com/pandora/talk?botid=<botid>

You can talk to a chatbot using a non-default HTML skin by adding the
skin parameter to the URL.

   http://www.pandorabots.com/pandora/talk?botid=<botid>&skin=<skin-name>

where skin-name is the name of one of the uploaded custom HTML skins
without the .html extension. If you sepecify a skin-name of 'NONE'
you'll get the standard plain text chatbot interaction page.

This feature, as well as allowing you to have multiple appearances for
the same chatbot, also allows you to have an HTML frameset with
multiple frames for a chatbot. The rest of this section assumes
familiarity with HTML frames. Information on HTML frames is available
at:

   http://www.w3.org/TR/html401/present/frames.html

Firstly you need to create a custom HTML skin defining the <frameset>
which will be used as the default HTML skin for the chatbot. To
reference other custom HTML skins within the <frame> definitions you
use the custom HTML special marker:

   !TALKREF!

This will be substituted with published URL for the bot. ie: 

   http://www.pandorabots.com/pandora/talk?botid=<botid>

You can then append the skin argument eg.

   !TALKREF!&skin=<skin-name>

to form the URL to give as the <frame> 'src' argument. You should
create a <frameset> with two frames, one for the Flash component:

   <frame name="vhost" src="!TALKREF!&skin=vhost">

(Note this must be named "vhost" in order for the text to speech to
work correctly)

...and another for the chatbot user input and response:

   <frame name="input" src="!TALKREF!&skin=input&speak=true">

Note the extra speak=true in the URL. This enables text to speech for
the referenced HTML skin (allowing the same custom HTML skin to be
used both for VHost and non-VHost views of the chatbot).

The example custom HTML skin used in the demo can be viewed
at:

   http://www.pandorabots.com/pandora/support/custom.html#frame

You should then create custom HTML skins for the vhost and input
frames. Note that the uploaded files must have the same name as the
skin (as referenced in the above frame definitions) with the addition
of an .html extension - ie input.html and vhost.html

The input.html skin can be the same as in the first example. The
vhost.html skin should have an HTML body containing the special marker
!VHOST! This marker is substituted with the HTML code to embed the
VHost Flash component within the frame. The example custom HTML skin
used in the demo can be viewed at:

   http://www.pandorabots.com/pandora/support/custom.html#vhost

Once, you've uploaded the custom HTML skins, make sure that frame.html
is set as the default. Then you need to configure the VHost appearance
(size, face, voice) - you do this by clicking 'Publish with VHost' as
in the first method. Don't worry about setting the 'Customized HTML
skin' here - with this method, it's the default skin that's set under
'Personalized published html page' that's important.

Finally, after clicking the 'Publish' button, go back to 'Botmaster
Control' and click on 'Run Last Published' and if all goes well you
should see something similar to:

   http://www.pandorabots.com/pandora/talk?botid=b089bc570e34367c   

Thanks for your interest in Pandorabots,
Colin Meldrum.



More information about the pandorabots-general mailing list