Drag and drop into FileZilla

After installing FileZilla on my fresh Window 8 machine, I quickly found out that dragging and dropping files into FileZilla did not work. After some searching found out how to solve it.

  1. Open cmd and CD into the FileZilla directory.
  2. Type the following commands
  3.  Restart FileZilla

Now you should be able to drag and drop files into FileZilla again.

 

Commandline

Commandline


Get all users in a HashMap in BonitaBPM 6

To add a dropdown (select) in BonitaBPM 6 to diplay a list of users do the following. Add a Groovy script just before the form you want to display the list of users in. The Groovy script should look like the following:

The script gets all users (well, a maximum of 10.000 users) and sorts them by firstname’s ascending (which does not really make sense if you are understanding the rest of the code). The full list of sorts available is:

  • FIRST_NAME_ASC
  • FIRST_NAME_DESC
  • LAST_NAME_ASC
  • LAST_NAME_DESC
  • USER_NAME_ASC
  • USER_NAME_DESC

Or see the bonitasoft documentation here.

We create our own HashMap to fill with the users and usernames. The usernames will be added as values in the dropdown and the lastname + firstname will be added and shown to the users in the dropdown.

The result of the script should be mapped on another datafield of the type HashMap in the Output operations screen of the connector wizard. By default the result is recognized as an java Object. You can change this by opening the expression editor on the result variable and then go to the expression type script. In the bottom of the screen you can change the object type.

Now you have a variable available which you can add to fill a select field.

BonitaBPM map objects

BonitaBPM map objects


Create frontend WordPress login

It is quite easy and quite commonly described how you can create a WordPress login form. However, the default behaviour of this form will redirect you to the wp-login form when you enter the wrong credentials. In this blog I will give a brief description on how to create the WordPress login form and redirect to this page for credential errors.

First, you will need to create the form. Which you can do as follows.

More detail can be found at the codex.

Read more…


Get the Facebook Avatar for JetPack comments

When you add JetPack comments to your WordPress website users can post using there Facebook, Google+ and Twitter accounts. You can enable this functionality quite fast though when you want to show a Facebook avatar for a poster you have to hack your way through it.

First you need to understand that JetPack uses WordPress.com functionality the problem here is that you won’t have any control over what happens with the user’s Facebook authorization. In other words, you can’t fully use the Facebook API to query for the user’s information.

Also, no user is registered at your blog when a someone posts via his/her Facebook account. Luckily, the comment_author_url is registered with the post. So, my solution is to strip the Facebook URL to get the username and then query for the user’s picture on the Facebook graph API. The code is quite easy to understand.

 


ManageWP

Last blog has been a while back. I’m quite busy lately but have to get back on the blogging. Especially, since I found a lot of cool stuff lately. One, of those cool things is ManageWP. Everyone who has a few WordPress instances running probably noticed that it could take a while to give them all the care they need. Using ManageWP you can manage all your blogs in a few clicks

Updates via ManageWP

In one overview you can update your blogs and plug-ins. To give you an idea; see the screenshot bellow. As you can see I have 2 WordPress instances running and both can use an update. Also, they both blogs have 3 plug-ins which need an update (6 in total). With hitting the “Update Everything” button all instances and plug-ins will start an update.

ScreenClip [1]

Back-ups everwhere!

ManageWP can help you make back-ups either on the WordPress instance’s server or on an off-site location like Amazon S3, DropBox, FTP, E-mail or Google Drive. If a back-up fails you can send yourself a notification.

Experimental features

One feature I personnaly think is very cool is the ability to run scripts over all of your instances from ManagWP.  A simple input and output is shown bellow.

ScreenClip [2]

 

ScreenClip [3]

 

Of course this blog was written form ManageWP :-)


Windows 7 Explorer crashes on Asus computer

Just got my laptop back from Asus repairs (Jeeh!). But something quite annoying happens. They re-installed Windows 7, together with a lot of Asus crap and now Windows 7 Explorer tends to crash, almost, everytime I open a new window.

The following error report is in Dutch but, basically tells that an error ocurred in explorer.exe. In the second line you can find module ASUSWSShellExt64.dll is the trouble maker.

Module ASUSWSShellExt64.dll is part of the ASUS WebStorage program and you can solve the issue by removing ASUS WebStorage.


Create complex data objects for Bonitasoft BPMS

In Bonita BPMS you can use complex data objects to save information used in a processes. In this example I use the Eclipse IDE to create an Java object to be used in Bonitastudio.

First create  a Java project in Eclipse.

Then create a object that implements the Serializable interface. This is important because otherwise the object can not be persisted by Bonita. You should take into account that every field created in this class should implement Serializable otherwise the data will be transient.

create serializable object
Read more…


Exporting as JAR in Eclipse

When you have a Java project in Eclipse it can happen that you want to export the project as a JAR ( Java ARchive). It is quite easy to make this happen. Open Eclipse and right-click on your Java project. A menu will popup and hit the Export item.

A Eclipse wizard will open. Under the tab Java you can find the JAR file item. Add the projects that you want in your JAR and you probably want to exlude the .project and .classpath file.

 


Creating a Bonitasoft connector

In Bonita studio it is fairly easy to create connectors. The only requirement is some basic knowledge of how the Java programming language. Though, I think with some basic programming knowledge you can get pretty far aswell.

To create a connector the easiest way is to use the build in wizard.

Go to connector -> new connector

A window will popup where you should enter information about the connector. You could add an icon to the connector so that it is easier to recognize in the list of connectors. Connectors expect some information going into the connector and some information going out of the connector. By creating pages you can build a setup wizard for the connector every input that is created in a page will be used as input for the connection. The same holds for the outputs, though, here your can only enter output values.

Create connector wizard

Create connector wizard

So, now we create a page to enter input data. The input data will be a firstname and a lastname. Both fields are manditory and have the type Text (String in Java).

Creating a connector wizard

Creating a connector wizard

The last step before Bonita studio generates our code is to put some outputs. In this case we want one output which is piece of text.

Read more…


Bonitasoft Subscription Pack – Forms

This post is a translated copy of a post I publish in Dutch on our corporate blog. Find the original post here.

As with many commercial open source products, Bonitasoft also has an open source edition and an enterprise edition (named the Subscription Pack (SP)). In the case of Bonitasoft there are actually, three different enterprise editions. In this blog we will not go into any detail of those different editions (a detailed comparison  can be found here), I would rather show some of the Subscription Pack features in more detail.

In this first post I would like to show some of the main differences between forms in the open source and enterprise edition. Creating forms in is something you want to do as much towards the end of an implementation as possible. Especially, when it concerns logic and custom design of forms. Though, creating forms in Bonita studio is quite easy, it can be better!

Read more…


301 Moved permanently in PHP

A 301 Moved permanently is a HTTP status code. 301 is the status code and Moved permanently is the status message. When you request for example a page called /option-x the server will usually respond with a HTTP status code 200. Which means OK and will send you the contents corresponding with your request.
What if you changed the location of your page or for SEO reasons want to locate the request to the same content to one URL (In this way you won’t get a duplicated content penalty).
The effect of the 301 would be that the search engines will index /option-a instead of /option-x. To do this in PHP do the following first add a header which creates the HTTP status code 301 instead of 200. The second header is the redirect, in this case to /option-a. You could also put a full URL in here.

After the redirect put exit(); to stop the rest of the script to execute

If you want to read more on HTTP status codes follow this link(W3C, 2012). Besides the status codes 200 and 301 there are a whole lot of other status codes that maybe interesting to look into. The most famous ones are ofcourse 404 (Page Not Found) and 500 (Internal Server Error)

W3C. (2012, March 12). 10 Status Code Definitions. Retrieved from http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Super productivity applications

I’ve seen a lot of these lists on internet and thought it was time to publish one of my own. Productivity application are supporting applications that facilitate you in being productive while at your computer, phone or tablet. If you do it right, some of the applications listed can even help with being productive after you have moved from your computer. Personally, I like simple, easy to use and most of all application that are in sync with all my computers.

Some of the applications listed, I already named once or twice in my previous blog posts.

Evernote

Since I installed Evernote I’m hooked. Evernote is a note taking application which lets you synchronize your notes with the cloud and thus with all your other Evernote instances. In fact I started writing this blog post in Evernote on my Android tablet and later refined it on my Windows computer. Personally, I love the clear overview of notes, integration/apps for almost every platform available (Windows, Android, iOS etc.) and of course the OCR in scanned documents.

Evernote

Evernote

When I started using Evernote my view on notes was very traditional. Traditional notes are made using pen and paper, and you will take only notes of stuff you hear and cannot bring with you. When someone gives a presentation and sheets are handed out, you will probably not make any notes or at least less notes. If you use Evernote (or any other note application) you should consider stuff like sheets as notes. Save those presentation, categorize them, tag them and use them. There is no excuse to lose stuff!

Read more…


What I hate about Evernote

First of all, I’m a huge fan of Evernote. Second of all, I’ll try not to show anything of me being a big Evernote fan in this article. Why? Would you probably ask. Well this is why. Evernote doesn’t alwasy manages expectations well and that causes some issues with me.Very recently got myself a dilema, I wanted to buy tablet. The choice is iOS or Android (or maybe Windows 8, but that never really crossed my mind), this choice should not be that difficult for a Google users as myself. Though, for the first time one other perspective popped up. What would be the best choice for me, as an Evernote user. This does say something about my as an Evernote user. I was willing to make a switch of religion because of Evernote. In the end, my religon was stronger than the urge of using all of Evernote’s apps.

At the moment of writing this post I was annoyed about the fact that more and more release of new Evernote apps are done on iOS, though I haven’t seen much movement on both Windows as on Android. Thereby, Evernote never releases anything about there roadmap and thus I, as user, expect that the awnser always is; “In two weeks”. Though, the real awnser is probably; “We thought of this but, we did not plan this feature for the next year.”

Read more…


New Blog

Though this blog is far from finished, I already made it available online. The last edition of this blog was based on Symfony 2 and this one is on WordPress. To me the problem with Symfony is that it takes a lot of work an time to make it a real blog. I did use a lot of the existing bundle in the previous blog and still it is a framework that you should use only if you really need to develop specific applications and not a blog like this one.

WordPress plugin: Crayon Syntax Highlighter

WordPress plugin: Crayon Syntax Highlighter

So, I decided to re-create this whole blog, this time based on WordPress (As I recall correctly, the blog before the “Symfony-edition” was based on Joomla). Using WordPress and some plug-ins I was able to make this blog easier to maintain and friendlier to write new posts. The main reason I dedicated a post to this blogging-platform-switch is a plugin called Crayon Syntax Highlighter.

Read more…


JQuery autocomplete with key-value pairs

Obviously, every client want autocompletion because Google has it. JQuery luckily makes our lives a bit more bearable by provide us a JQuery autocompletion plug-in. The problem, however, with this plug-in is that it will either show the value or the key if your lookup returns key-value pairs. The ultimate problem with this is that when you use this information to store in a database you will either get a database error because the value is not a valid key or you have to show the key as the value to your users. Our current solution is to add a hidden field which holds the valid key value.