Code Snippets
Code snippets are mostely not installed like modules.
Sometimes you only have to copy the snippet to a template - or there has to be installed a new function and you have to modify your template code. Please read the instructions to know what you have to do.
This module type allows to add own functions which can be invoked from the index.php file off your template or from a page/section of the type: Code. WebsiteBaker does not include any code snippets per default.
Code snippets are installed via the WebsiteBaker backend: Add-ons -> Modules -> Install Module. All functions contained in the include.php file of the code snippet can be invoked via the index.php file of your template or from a page/section of type code.
The list below provides all code snippets available for WebsiteBaker.
|
| ShowMenu2 Details: |
| Version |
4.9
|
| License |
GNU-GPL |
| Latest update |
01.10.2010 |
| Download Counter |
21905 |
| Developer |
Brodie Thiesfield |
| Developer Homepage |
Click here to visit |
| Documentation Url |
Click here to visit |
| Addon type |
Snippet |
| Category |
Other |
| WebsiteBaker Version |
>= 2.6.7 |
| Forum Discussion (EN) |
Click here to visit |
|
|
This snippet adds the new function: show_menu2()to WebsiteBaker.
The function is a very powerful replacement for the built in function show_menu().
It is included in WebsiteBaker since version 2.7.
See the snippet thread of the WB forum for further information. Details about the function parameters can be found in the English README (EN) or German README (DE) files. Visit this website to get an impression what the function is all about. Compatible with WB 2.6.x and WB 2.7.x.
Invoke the function from the index.php file of your template or from a page/section of type code.
Note: If your menu disappears after submitting a search, follow the steps described in the module thread... |
This snippet adds the new function: show_menu2()to WebsiteBaker.
Anynews 1.15 (Jan 29, 2010)
|
| Anynews Details: |
| Version |
1.15 (Jan 29, 2010)
|
| License |
GNU-GPL |
| Latest update |
04.10.2010 |
| Download Counter |
16833 |
| Developer |
C. Sommer (doc), Further maintained by: BlackBird, |
| Addon type |
Snippet |
| Category |
Content |
| WebsiteBaker Version |
>= 2.7 |
| Forum Discussion (EN) |
Click here to visit |
|
|
This snippet adds the new function: displayNewsItems() to WebsiteBaker. The function can be used to display news entries from the WebsiteBaker News module on any page you want. Details about the optional function parameters and tips and tricks to adjust the output to your needs are contained in the README (EN, NL outdated) files. For help or feature requests, please visit the Anynews forum thread.
Supported languages: English, German, French, Dutch and Estonian.
Note: invoke displayNewsItems() from the index.php file of your template or from a page/section of type code
|
This snippet adds the new function: displayNewsItems() to WebsiteBaker.
|
| Last Update Info Details: |
| Version |
0.3
|
| License |
GNU-GPL |
| Latest update |
01.10.2010 |
| Download Counter |
8914 |
| Developer |
Peter Vroegop |
| Addon type |
Snippet |
| Category |
Other |
| WebsiteBaker Version |
>= 2.8 |
|
|
This snippet adds the new function: get_modified_when() to WebsiteBaker.
The function displays the date and the name of the last author of a page. The function is invoked without any parameters.
Note: invoke the function from the index.php file of your template or from a page/section of type code |
This snippet adds the new function: get_modified_when() to WebsiteBaker.
|
| RandomImage Details: |
| Version |
0.11
|
| License |
GPL |
| Latest update |
01.10.2010 |
| Download Counter |
13551 |
| Developer |
pcwacht |
| Addon type |
Snippet |
| Category |
Image Handling |
| WebsiteBaker Version |
>= 2.6.7 |
|
|
This snippet adds the new function: RandomImage() to WebsiteBaker. The function displays a random image from a specified directory. As parameter the directory path starting from the WB root directory is required.
To display a random image from the subfolder '/pics' within the MEDIA directory, use: RandomImage(MEDIA_DIRECTORY .'/pics');
Note: invoke the function from the index.php file of your template or from a page/section of type code; the specified subfolder must contain at least two images (other wise you will see an error message). |
This snippet adds the new function: RandomImage() to WebsiteBaker.
|
| Newsletter Details: |
| Version |
0.17
|
| License |
GPL |
| Latest update |
01.10.2010 |
| Download Counter |
8313 |
| Developer |
Ralf Hertsch |
| Documentation Url |
Click here to visit |
| Addon type |
Snippet |
| Category |
Other |
| WebsiteBaker Version |
>= 2.8 |
| Forum Discussion (EN) |
Click here to visit |
|
|
Newsletter is a code snippet which provides an interface for visitors to sign for a newsletter. The module send an activation link to the user and after activation add the email to massmail. Supported languages: English, German, Dutch, French. See the module thread of the WB forum for further information or visit the website of the developer.
To get it work, intall the massmail module and the newsletter snippet via the WB backend and add the following code to the index.php of your template or to any code section:
if(function_exists('newsletter_info')) {
newsletter_info('Newsletter','newsletter(at)ralf-hertsch(dot)de',true,false);
}
|
Release history
Note: All versions below v0.16 had a XSS security vulnerability. Please upgrade. |
Newsletter is a code snippet which provides an interface for visitors to sign for a newsletter.