Changelog, Fixes and new functions of WB 2.6.7The main changes are:- 100% UTF8 support
- Search works for all languages and special chars and includes a highlighting function
- New functions allow to have all .css and .js files in the template header.
A summary of all changes you find here:Security fixesBug fixesCore Files:- Fixed: WB now 100% works with UTF8 and all other Charsets. (Changeset [442], [454], [461], [464], [504], [510])
- Fixed: Some issus in search especially with special chars and html tags (Changeset [445], [468], [474], [476], [482], [486], [490], [493])
- Fixed: search result displays private and registered pages to not logged in users. (Changeset [480])
- Fixed: "Fatal error: Call to a member function on a non-object ..." messages produced from the search (Changeset [466], [470])
- Fixed: multilingual support to the search (Changeset [440])
- Fixed: intro page (intro.php) can now parse PHP-Code (Changeset [433], [434])
- Fixed: root_parent is not being set correctly in database (Changeset [447])
- Fixed: bug with settings2.php and page extensions (Changeset [499])
- Fixed: bug where error message not displayed when script fails to create a page (Changeset [501])
- Fixed: issue with Permissions for pages sections (Changeset [410])
- Fixed: issue with escaped single quotes in pagenames generation (Changeset [488])
- Fixed: private pages are visible for all registered user in admin interface and menu (Changeset [472])
- Fixed: bug makes it possible to delete WB Installation from Admin-Panel (Changeset [428], [430])
Form-Modul- Fixed: Form modul stores empty records (Changeset [409])
- Fixed: Issues in search table entries (Changeset [415])
- Fixed: Wrong error message in form modul (Changeset [431])
News-Modul- Fixed: Error when uninstalling the news-modul (Changeset [413])
- Fixed: Bugs in Newsfeed (rss.php) (Changeset [414], [495])
Menulink- Fixed: Bug if you deleted a menulink page the linked page was also deleted in the pages directory (Changeset [444])
New functions- Added: Added package which allows to integrate optional JS & CSS module files (frontend.css, frontend.js, backend.css, backend.js) into the <head> section of the HTML code. This allows developers to code modules which creates (X)HTML valid output. (Changeset [435], [456], [458])
- Added: New variable $module_description wich allows to have optional a language specific description of the modules in the language files of the modules. (Changeset [421], [439])
- Added: Search highlighting by simply adding the class ".highlight { background-color: #D0D0D0;}" to the screen.css of the templates (Changeset [437], [438], [445], [478])
- Added: JS framweork codepress to allow highlighting for JS, HTML and PHP code (Changeset [458])
What does the new functions do?1. frontend.css, frontend.js, backend.css, backend.jsOne of the main issues of the WB modules is, that the style informations are stored in the database and displayed in the body tag of the page. This gives a not (X)HTML valid output. The new functions can now be used to have all css and js of every modul in the head section of the template. The integration is very simple. You only have to do the following steps:
1. Add the following code in the head section of the index.php of your template
<?php
if(function_exists('register_frontend_modfiles')) {
register_frontend_modfiles('css');
register_frontend_modfiles('js');
} ?>
2. Add to the modules a file called frontend.css
3. Copy the stylesheet definitions from the modul in the created frontend.css
4. Delete all stylesheet informations from the modul (database via options or hardcoded in view.php)
Thats all. Same works for .js files. Simply add a frontend.js to the modul wich includes the needed javascript.
But this is only the frontend part. Same could be done with the style for the admin backend. Take all styles out of the module files and store them in a backend.css or if javascript is needed in a backend.js file. This offers the ability for the users not only to easily style the frontend of the modules, they also can now style the backend. With the same functions it should be possible to make the whole WB admin interface skinable, wich will be a feature of one of the next WB versions.
2. $module_descriptionOne other issue is, that if a modul is installed and you look at the Admin interface to the modul description this info is always in english, no matter wich language you use in your admin interface. With this new variable we have now the ability to translate the modul description. And as soon as the script find a translation he displays the translated info instead of the default english description. The use is also very simple. Every multilingual modul has a languages folder with the language files in it. To get a translated modul description simply add the follwing line to the language file of the modul:
$module_description = 'Here comes the translated modul description';
3. Search highlightingWith 2.6.7 we introduce the search highlighting. All needed code is included in the core files of WB. The only thing you have to do to get the search results highlighted is to add one class to the css file of your template. Feel free to define this class to your wishes. In the default templates we simple add a background color. You can also use other fonts , font weights or whatever you want. Please add the following class to the css file of your template:
.highlight { background-color: #D0D0D0;}
4. JS framweork codepressThis is also an option for moduldeveloppers. Possible things wich can be done with this:
If someone don't wanna use an WYSIWYG Editor and wanna write the content of pages as pure text, this code can be used for syntax highlighting. Also all other existing modules like "Template Editor" or "Modul Editor" could be rewritten to use the syntax highlighting. The Idea behind adding this to the core files is, that the code is only on one place and can be used from different modules without the need to put the code in the modul itself.
Matthias