Monthly Archives: March 2014

Free PDF Bridge Plugin for WordPress Developers

Note: This plugin was initially developed for our WatuPRO customers (more info here) but it’s not limited to a specific plugin. So we are releasing it to other developers.

What Does the PDF Bridge Do?

This plugin lets you apply WordPress filter to any piece of content and convert it to PDF. Simple as that. Depending on the version you download it uses the html2fpdf library or the MPDF library.

How To Use It In Your Plugin Or Theme?

The plugin is super simple (you could very well write it yourself) and adds a filter that can be used from your plugin or theme. The filter name is “pdf-bridge-convert” and all you need to do it, is to apply it to your HTML content. Then don’t forget to output PDF headers when sending the content to the user. Here is an example assuming you have your HTML in $content:

$content = apply_filters("pdf-bridge-convert", $content);
header('Content-Length: '.strlen($content));
header('Content-type: application/pdf');
echo $content;
exit;

Download

The plugin has two versions:

  • Version 0.2 that uses html2fpdf library. It’s small (121 KB) but doesn’t work with complex designs or foreign languages.
  • Version 0.6 that uses MPDF library. It’s large (12.9 MB) but works with different languages and complicated designs.

Enjoy and let us know if you think it needs improvements.

Getting “None” for Grade/Result in WatuPRO

Here’s a frequently asked question. Why are my users sometimes getting “None” as grade/result on a quiz?

The answer is that None is shown when no grade/result matching the points or percentage achieved is found. This is always the reason, no exceptions.

So please check your grades. They must cover the whole possible range of:

a) points, if you are calculating grades by points (this is the default option)

b) percentage, if you have selected “Calculate grades by % correct answers instead of points collected”. For versions older than 4.2.5 please make sure that your percentage based grades overlap so any decimals are covered. For example if grade A is defined as 80% to 100% correct answers, then the lower grade should be defined as (for example) 60% – 80% and NOT to 79%. Versions newer than 4.2.5 will round the percent to whole number so this will not be required.

You can use the variables %%POINTS%% or %%PERCENTAGE%% on the final screen to help you figure out what is achieved by the user and why they are not getting any grade.

Please also don’t confuse category grades with global grades.

Email Design Templates in Arigato PRO / Intelligence Module

Design templates allow you to quickly attach pre-defined designs to newsletters or autoresponder email messages in Arigato PRO for WordPress (Intelligence module required).

The “Design templates” feature is available from the following versions:
– Arigato PRO version 2.2
– Intelligence module version 0.8.5

Here is a quick example of how to use the feature:

1. Create your design template

There is nothing special about this – you can design visually or enter HTML code. The only important thing is that each template is required to contain the {{{contents}}} mask in the place where you want your specific email contents to appear. Example:

design-template

 

2. Create Your Newsletter or Autoresponder Message

Create your message having in mind the design you want to apply. Nothing special here as well:

newsletter

 

3. Select Your Design

While creating or editing the email message, select your design template:

select-design

 

4. That’s it!

Here is how your current email message will look when the template is automatically applied during sending:

message

Important about new lines

If your HTML template contains any HTML tags we will not automatically add new lines or paragraphs to avoid breaking your code. In such cases you have to use proper HTML to format paragraphs – use <p> tags where you want to have different paragraphs.