- JacORB: 2.2.4 2.3.0
- Java: 1.4.2 1.5.0 6.0
- JiBX: 1.1.6a
- spring-webflow: 1.0.5
- spring-ws: 1.5.4
- springframework: 2.5.x
JAVA_HOME
tells the Java programs where to find their libraries, and the PATH
tells your command shell where to find the programs. Under Windows:
set JAVA_HOME=C:\Java\j2sdk1.4.2_07 set PATH=%JAVA_HOME%\bin;%PATH%Or under Unix:
export JAVA_HOME=/usr/local/jdk1.6.0_07 export PATH=$JAVA_HOME:$PATHNow we need to get packages. Under windows, we will need to issue the
dir
command with the following options:
dir /b/on/ad/s src > packages.txt/b: Uses bare format (no heading information or summary) /on: sorts by name /ad: only list directories /s: search sub directories src: top level directory of source files or if you love Unix:
find src -type d -print > packages.txtOnce you have your list of packages we can run the Javadoc program to generate the API documentation for each of the packages from the source. Below is the command to do this. The backslashes are Unix-speak for new line breaks:
javadoc \ -sourcepath src \ -d dest \ -windowtitle “JavaDoc Documentation Repository - JacORB 2.2.4″ \ @packages.txt-sourcepath <dir>: top level directory of source files -d <dir>: directory where to put the API documentation (the output) -windowtitle <title>: what to put in the title of the each of the generated HTML pages @<file>: name of the file where the package names are held. And there you have it!
root
and issue the following command. This will look at the processes running and filter only the ones with the spam filter daemon.
ps -eaf | grep spamdIf you see something like:
popuser 18404 30558 0 18:40 ? 00:00:12 spamd child popuser 19352 30558 0 18:44 ? 00:00:20 spamd child popuser 22247 30558 0 19:05 ? 00:00:08 spamd childthen your spam filter is running. It just looks like your system has forgotten the current Bayes setting - it will mean you will have to retrain your spam filter. If you don’t see the spamd processes then you will have to restart it:
/usr/local/psa/admin/bin/spamd –startThe only other glitch I have come across after 2 weeks of successful operation is related to forwarding email to other mailboxes that are not keeping copies of the mail. That is mail that was sent via the Forwarding Plesk mail from a virtual email address to multiple recipients method, forgot all the forwarding email addresses. This only effected accounts with more than one forwarding email address. All the forward email addresses are removed. Normal email addresses that forward to only one address are fine. I suspect that because the plesk front end does not accept more than one forwarding email address for this field it revalidated its configuration after the upgrades which cleaned them out… but I’m not sure.
jokes.xml
:
<?xml version="1.0" ?>
<jokes>
<joke id="123">
<question>What do you call a man with a spade on his head</question>
<answer>Edward</answer>
</joke>
<joke id="456">
<question>What do you call a man with a seagull on his head</question>
<answer>Cliff</answer>
</joke>
</jokes>
Now we need a way of transforming the XML data into HTML which can be understood and drawn by a browser.
jokes.xsl
:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html"/>
<xsl:template match="joke">
<p>
<b><xsl:value-of select="question"/>?</b><br/>
<xsl:value-of select="answer"/>
</p>
</xsl:template>
<html>
<head>
<title>Name jokes results</title>
</head>
<body>
<xsl:template match="/jokes">
<xsl:apply-templates select="joke"/>
</xsl:template>
</body>
</html>
</xsl:stylesheet>
The document is split into several sections, beginning with the standard XML header which tells us the type of document that this is. In this case it is a standard XML document that uses UTF-8 character encoding.
<?xml version="1.0" encoding="UTF-8"?>
Next is the root object called stylesheet. To conform to standards we must supply the name spaces that the stylesheet document uses.
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
All tags starting with xmlns:xsl are defined in http://www.w3.org/1999/XSL/Transform, all other tags without a name: are defined in http://www.w3.org/1999/xhtml and are, in our case, standard HTML mark-up tags.
The final stage is to associate the XML document with the XSL document. Now the application designer can concentrate on providing the raw data and out-source the front end look and feel to a third party.
jokes.xml
:
<?xml version="1.0" ?>
<?xml-stylesheet href="jokes.xsl" type="text/xsl" ?>
<jokes>
<joke>
<question>What do you call a man with a seagull on his head</question>
<answer>Cliff</answer>
</joke>
<joke>
<question>What do you call a man with a spade on his head</question>
<answer>Edward</answer>
</joke>
</jokes>
Load jobs.xml into your browser and marvel!
Job done!I’ve recently become a member of LinkLift and they asked me to add a bit of PHP to my blog in order to plug into their system. LinkLift have a plugin for WordPress and a whole host of other blogs, but not one for B2evolution.
There is a FreeHTML plugin that allows you to inject custom HTML, but couldn’t find a plugin to allow me to inject PHP code. I found a lot of people in the forums asking for one, but there is quite a lot of opposition to it.
The people who want a FreePHP plugin have not thought about the security implications of having it, and the people who could write the plugin won’t because they understand the security implications! The plugin writers are saving the novice users from themselves!
Hacking the blog source code can be done to achieve the same thing, but it makes it really difficult to upgrade. On each upgrade you will have to reapply the changes which can be time consuming. If the changes are written as a plugin then on upgrade you can simply reinstall the plugin and your done. Another advantage is that the widget interface provides all sorts of facilities that help with positioning the widget in different locations on the screen.
I am the only person on this blog so I don’t have novice users to keep an eye on, I have the technical expertise to write the plugin and I fully understand the implications. I’m sure there are others, like me, out there that don’t have the time to research the B2evolution plugin architecture.
Ultimately, I would like to build a LinkLift plugin but this seems like a good first step.
The plugin provides the ability to add user defined PHP code inside a widget. I have labelled it as a development release. It will probably remain like that because I don’t want people to assume that because it is stable it is safe - because it isn’t and will never be.
If, however, you are a responsible single user or you would like an example of how to write a b2evolution plugin, then you will probably find a number of uses for this.
For information on source, installation and downloading this plugin then go to B2evolution - Free PHP Widget Plugin