Hints & tips Overview In this chapter you can find several useful tips, hints and other advices on how to accomplish more or less difficult database tasks using &name; project. &name; is an open-source application developed by open community. This community is proud of this project and is happy to share its knowledge with others. Please share with us your knowledge and contribute interesting examples of &name; usage, if you found some. You can do so by using our . Handling national characters &name; is used across the whole world by many users of various nationalities speaking and writing several different languages. The most common problem that occured for people located in the east, central or north Europe, Asia and other countries is, that &name; does not handle their national language characters correctly. The reason for this is very simple. In order to simplify &name; integration into larger production systems, the generated code does not contain by default any HTML header or footer. But even if the HTML header and footer is turned on, the generated META tags do not contain any entry defining the proper type of content and character set. It's up to you to send this kind information with the served page. You can do this using HTTP protocol headers or HTML META tags. Below are two examples how to define an iso-8859-2 character set for the HTML page. This charset is most suitable for countries in central Europe, such as Slovakia, Czech republic, Poland, and so on. For your country you will certainly need to determine the appropriate character set. Charset defined with META tag ]]> Charset defined with HTTP header ]]> Data removal protection One very old database maintenance rule basically says:
unknown author No entry should by removed from a database, but just marked as deleted.
According to this rule, we may want to implement similar functionality also in &name; and it is possible, of course. First of all we need to set-up &name; to list only valid non-deleted records. This can be accomplished using $opts['filters'] configuration option. We suppose that we have table where a column named deleted indicates if record is deleted or not. Non-deleted records listing Than we have to create a "delete before" trigger and we are done. Trigger PHP code should look similar to this example: Trigger for marking records as deleted tb, $newvals['id']); $this->MyQuery($query2); return false; ]]> To recover a particular record just change the value in the deleted column from 1 to 0 using your SQL client or interface (for example using phpMyAdmin).
Integration into other systems PHP-Nuke integration To integrate &name; into PHP-Nuke content management system, just add a name variable with a $module_name value into a set of &name; persistent variables. &name; integrated into PHP-Nuke PostNuke integration Integration into PostNuke content management system is most likely very similar to . other systems If you know useful information about how to integrate &name; with a particular system, please notify project developers.