Fork me on GitHub

pe_pplog demo page

Main menu

How to have a translate button on the webpage

No comments
First of all I do not recommend using automatic translation software, as the translation tends to be atrocious. I'm pretty sure google translate changed the "contact me" link into a suggestion to have an a bit more... intimate... interaction with me when I tried out the Icelandic translation. Even a more common translation, such as English to German is painful to read. However, there might be the need to make content quickly available to a group of speakers of a different language, so here is how to insert a "translate" button on the top of the menu.
I have to add, that the apostrophe ' needs to be preceded by a \, so you have to go through the HTML you paste and change ' to \'.

To use google translate you need to have a google account (of course!).
Go to http://translate.google.com/manager/website/, login, follow the instructions and place the resulting html code with the <meta> tag in $config_customHTMLhead and the code for the button in $config_customMenuHTMLtop

This blog in chinese

For German, Russian, French, Spanish, Portuguese and Italian there is Promt translator, which looks nicer and translates even worse. It does have the nice feature to show the original text on hover.

Examples...

Go to http://www.online-translator.com/Webmastertools.aspx, choose the button you like and copy the resulting code into $config_customHTMLtop
Posted on - Categories: how to


A plugin system

No comments
I wanted to create a possibility to add features, such as a contact me page, without imposing them on users (because I dislike clutter). I decided to go with plugins. At the moment three plugins exist: a contact me page; make a gallery; and edit the settings of the blog
For those interested how it works, the system consists of three parts.

First one adds the name of the plugin in the pe_Config.pl file.

For plugins for the main blog:
our @config_pluginsBlog = qw(plugin1 plugin2);

Plugins for the admin page:
our @config_pluginsAdmin = qw(plugin3);

This is all the user has to do. The script then takes these variables and makes a menu entry for them, such as:

foreach(@config_pluginsBlog)

{
print '<ul class="menu"><li><a href="?do='.$_.'">'.$_.'</a></li></ul>';
}


if the menu entry is clicked, the script calls the plugin file (in the /blog folder):


elsif (r('do') eq $config_pluginsBlog[$_] && r('do') ne '') #16.05
{
my $plugin = r('do');
do "$config_DatabaseFolder/$plugin.pl" or print $!.'<br />Sorry, the plugin does not seem to be installed! <a href="?page=1">go back</a>';
}
elsif (r('process') eq $config_pluginsBlog[$_] && r('process') ne '')
{
my $plugin = r('process');
do "$config_DatabaseFolder/$plugin.pl" or print '<br />Sorry, the plugin does not seem to be installed! <a href="?page=1">go back</a>';
}


at the moment a plugin can consist of a 'do' and a
'process' action, for example the newGallery plugin prints the newGallery form as a 'do' action and then creates the gallery as the 'process' action.

I partly created this, because it makes it easier for me to test new code, without having a syntax error (and boy do I like making them) mess up my whole blog script. And if someone wants to create their own feature, or just try things out, they can play around safely
Posted on - Categories: changes


Style changes in pe_pplog v2a

No comments
I decided to add a different style for viewing the blog on mobile devices, as well as a print layout.
Partly to make a mobile style work, partly because I think it is pretty a meu bar was added in the header
I also got rid of the javascript tooltips and used only CSS tooltips

Screenshots of the mobile style:






How to set up a xmpp chat on the website (using jappix)

No comments
I used to have a demo of the chat on this site, just to show that it is possible, here are the screenshots.

First set up a chatroom with your favorite Jabber/XMPP client

Then go to https://mini.jappix.com/get and fill out the information. Use the name of your room at "Chat room name".

Copy and paste the resulting script into $config_customHTMLhead
I have to add, that the apostrophe ' needs to be preceded by a \, so you have to go through the HTML you paste and change ' to \'.

Done!
Posted on - Categories: how to


Hiawatha

No comments
Dromeno was nice enough to bring some problems the pe_pplog had when running in the Hiawatha web-server to my attention. These have been fixed now, hence I released a bug-fixed version of the blog (v1.1b).
See download page.

Bug fixes: login for pe_admin.pl changed to set the header properly (it set two before)

archive bugfix from jamesbond (thank you!)

permissions for pe_admin.pl and pe_pplog.pl changed to make them executable (not really a bugfix, but takes out one step in installation...)

I really need one more computer as testing between lampp and hiawatha with one computer is annoying

Posted on - Categories: bugs


Pages: ... [4] [5] [6] [7] [8]