Developer's Manual  Blocks  Writing Blocks

Writing Blocks

In this section you can learn how to write your SiteSupra blocks. A few basic rules are:

PHP

SiteSupra blocks are written in PHP, so writing blocks requires PHP skills. You can use all spectrum of PHP functions in your SiteSupra blocks.

SiteSupra Specific Features

When writing SiteSupra blocks you should keep in mind a few SiteSupra specific requirements to your code, which are:

  1. Keep in mind website language versions
  2. Know how to format links to pages
  3. Use block templates
Read about those features below in this chapter.

Best Practice

It is up to you how to code and design your blocks, but we recommend to keep to basic Best Practice standards, which are:

  1. Focus to the block's basic function, implement the most effective and easy-to-use option.
  2. Optimize your code.
  3. Comment your code.
  4. Keep to SiteSupra GUI to make block's management easy.
  5. Write documentation for your block, especially when writing commercial blocks for Plugin Exchange on SSDN.

Study Demo Material

Learn by looking into the free blocks supplied with the Demo site.

Dmitry Poltaryonok, dmitry dot poltaryonok at sitesupra dot com | 21.10.2005 23:10
Block is installed automatically, you just need to reread configuration. After reading configuration SiteSupra will see your block in block list. To reread configuration either use http://yoursite.com?cmd=readConf:all if you are not logged into SiteSupra, this will reload configuration for all languages; or use SiteSupra's menu item Tools->Read confs while you are logged into SiteSupra (this will reload configuration only for language you are currently in).
Michelle McGinnis, mmcginnis at nfusion dot com | 21.10.2005 22:10
How do you install a block? I've looked at the free blocks and copied one over and renamed the folder, block name within the conf, etc, but it doesn't appear within SiteSupra so I can't apply "my" block to anything. The instructions are non-existent. Anyone have any success with this?
Please login to add comments.