Archive for the “Software” Category

Just released a new version of the tv_grab_nl_glashartmedia script. This version holds a few small bugfixes:

Changelog:

v0.7.0 – 12-Mar-2014
* fixes #5 Icon images are checked if they exist before placing the link in the xml. Thnx 2 Erwin
* fixes #6 Function gzdecode is moved to a separate file and not loaded if the function already exists in newer version of PHP. Thnx 2 Quint

v0.6.2 – 17-May-2012
* fixes #4 Changed the end= to stop= (should be stop= according to xmltv specs). Thnx 2 Sander Jongeleen
* fixes #2 Changed the location of the cache directory to a place under the .xmltv directory in the homedir of the user. Thnx 2 Robert Tomohamat
* fixes #1 Now loading 24 hours of EPG before configuring so all channels with EPG data should be included now. Thnx 2 Erwin

 

Go to tv-grab-nl-glashartmedia on Google Code for more information and download the newest release from tv-grab-nl-glashartmedia on Google Drive

Post to Twitter

Comments 1 Comment »

Since a few months I’ve been using WHMCS for all invoicing for my company Exa-Omicron. I’ve altered the standard email templates, but there was one thing that would not work very nicely and the richtext editor is causing problems.

I wanted to use foreach loops in the email templates to loop over all the invoice items. This way the customer can see all the invoice line items in the email instead of opening the PDF. By using a table for the invoice items, I made the email look almost exactly the same as the invoice PDF. So for example:

<p><strong>Invoice Items</strong></p>

<table style=”border-collapse: collapse;”>
<tbody><tr style=”background-color: #000; color: #fff”><td style=”border: 1px solid black;”>Description</td><td align=”right” style=”border: 1px solid black;”>Total</td></tr>

{foreach from=$invoice_items item=invline}

<tr><td style=”border: 1px solid black;”>{$invline.description}</td><td align=”right” style=”border: 1px solid black;”>{$invline.amount}</td></tr>

{/foreach}

<tr><td align=”right”>Subtotal</td><td align=”right”><strong>{$invoice_subtotal}<strong></strong></strong></td></tr>
<tr><td align=”right”>{$invoice_tax_rate} VAT</td><td align=”right”>{$invoice_tax}</td></tr>
<tr><td align=”right”><strong>Total</strong></td><td align=”right” style=”border-top: 1px solid black;”><strong>{$invoice_total}</strong></td></tr>
</tbody></table>

But when reopening the email template, the richtext editor does not understand the Smarty template elements like foreach. The richtext editor tries to correct the HTML and moves the foreach lines outside of the <table> tags. but this makes the whole email template unusable, because it will not generate correct HTML anymore. My html knowledge is good enough to write templates without a richtext editor, so I searched for an option to disable the richtext editor completely. Unfortunately I could not find such an option in WHMCS. So I added a apache rewriteengine rule in the .htaccess file to forward the webrequest from the browser to always disable the richtext editor.

# Always disable richtext editor
RewriteCond %{REQUEST_URI} ^/admin/configemailtemplates.php$
RewriteCond %{QUERY_STRING} ^action=edit&id=([0-9]+)$
RewriteRule .* ./admin/configemailtemplates.php?action=edit&id=%1&noeditor=1 [L]

So when the browser requests the url /admin/configemailtemplates.php and the query string only holds a action = edit and a numeric id, then the browser is redirected to the exactl same URI, but with a &noeditor=1 added to the query string.

And this solved all my ‘richtext editor tries to correct html’ issues 🙂

Post to Twitter

Comments No Comments »

When you need to configure multiple servers it’s always good to look at some configuration management software like Puppet of Chef. But there is a new kid in town and it looks promissing. I’ve played around with Ansible a bit to setup a complex network configration on 5 blade servers running a CentOS minimal. I mentioned this last weekend to Fabian Arrotin last weekend at FOSDEM and he told me to put that info online. So here it is!

Read the rest of this entry »

Post to Twitter

Comments 11 Comments »

Just released a new version of the tv_grab_nl_glashartmedia script. This version holds a few small bugfixes:

Changelog:

v0.6.2 – 17-May-2012
* fixes #4 Changed the end= to stop= (should be stop= according to xmltv specs). Thnx 2 Sander Jongeleen
* fixes #2 Changed the location of the cache directory to a place under the .xmltv directory in the homedir of the user. Thnx 2 Robert Tomohamat
* fixes #1 Now loading 24 hours of EPG before configuring so all channels with EPG data should be included now.

Go to http://code.google.com/p/tv-grab-nl-glashartmedia/downloads/list to download the latest version.

Post to Twitter

Comments No Comments »

I’ve played a bit with SketchUp a few years back, right after Google introduced it. I found it was (then) difficult to create a simple house in 3D. Now my company is moving to a new building (which is being built at this moment), it was time to have another look at SketchUp and see if I can make a 3D model of the building, which can be placed in Google Earth.

Read the rest of this entry »

Post to Twitter

Comments 1 Comment »