Building a Shout Box in Sitellite
Chapter 5: Adding the Shout Box to your website
The quick method
For this last step, log into Sitellite again as an administrator and in the Web View, click the "Add New Sidebar" icon in one of your sidebar areas.
In the sidebar form, give it the ID "shoutbox" and the title "Shout Box", then instead of adding content to the WYSIWYG editor, click on the Properties tab and enter the following into the Alias field:
shoutbox/display
Before saving the sidebar, click on the State tab and make sure the Status is set to Approved, so that visitors can actually see the Shout Box, then click the Save button at the bottom of the form.
Adding the Shout Box to the Box Chooser dialog
A more easily reusable way of making boxes available to your site editors is to integrate with the Box Chooser. To do so, first create a new folder named "conf" inside your shoutbox app and save the following to a file named config.ini.php inside that folder.
app_name = Shoutbox default_handler = display default_handler_type = box boxchooser = yes
The first line will appear as the name of your app to site editors. The next two lines just tell Sitellite to use the shoutbox/display box as the default box to call if you go to /index/shoutbox-app in your browser. The last line tells Sitellite that your app has boxes to be included in the Box Chooser.
Now edit the access.php file in your shoutbox/display box and change it to the following. The inline option tells Sitellite that this box can be "inlined" into the contents of web pages.
sitellite_status = approved sitellite_access = public sitellite_action = on sitellite_inline = on
Lastly, create a file named settings.php in your shoutbox/display folder with the following contents. This gives your box a name for Sitellite to display in the Box Chooser.
[Meta] name = Display Shoutbox description = Displays the shoutbox application.
You should now be able to find your Shout Box in Sitellite's Box Chooser dialog, so you can add it to any web page or sidebar on your site.




John Luxford