Archive

Archive for January, 2016

InvoicePlane–Enabling friendly filenames when downloading PDF

January 29, 2016 Leave a comment

Modify /application/helpers/mpdf_helper.pdf       

Look for this particular code segment

if (!empty($invoice_array) AND $isGuest) {
            rsort($invoice_array);
            header(‘Content-type: application/pdf’);
return readfile($invoice_array[0]);       

 

then modify it to

if (!empty($invoice_array) AND $isGuest) {
            rsort($invoice_array);
            header(‘Content-type: application/pdf’);
header(‘Content-Disposition: attachment; filename="’.basename($invoice_array[0]).’"’); //<– add this line
return readfile($invoice_array[0]);       

Advertisements
Categories: Invoice Plane, Open Source

InvoicePlane–Adding custom recurring periods

January 29, 2016 Leave a comment

By default, invoice plans comes with recurring periods up to 1 year. However sometimes you need to add in additional recurring periods

To do so, you will need to edit 2 files

File #1: application\modules\invoices\models\mdl_invoices_recurring.php

Look for $recur_frequencies and then add in the periods you want e.g in this example, I added in 2, 3,4 and 5 years

image

File #2: application\language\english\custom_lang.php

You will need to map each of the values with an appropriate language value, e.g in this case 2_year maps to the phrase 2 Years

If you support more than the english language, you will need to do the same for the additional language

image

Categories: Invoice Plane, Open Source

IdentityServer 3.0–HTTP 404 for /assets resources

January 28, 2016 Leave a comment

IdentityServer 3.0 (https://identityserver.github.io/Documentation/) works as an OAuth provider, especially useful when you want to roll your own authentication.

However should you mimic the samples incorrectly, you may get the following screen, where the /assets resources are not found.

image

Because ID3 packages everything in a DLL, you will need to ensure that  runAllManagedModulesForAllRequests (RAMMR) is enabled in web.config

image

 

Once you have enabled RAMMR, simply save web.config and reload the page and viola

image

Categories: ASP.NET, IdentityServer 3

AppFabric–Unable to change database stores

January 25, 2016 Leave a comment

*Bear in mind that AppFabric is no longer supported and will EOL in 2017 (http://blogs.msdn.com/b/appfabric/archive/2015/06/19/appfabric-1-1-for-windows-server-support-lifecycle-extension-4-11-2017.aspx)

 

Because AppFabric depends on IIS, sometimes Windows Update can cause it to fail unexpectedly and the only way to get it fixed seems to be to remove and recreate the entire cache cluster.

Remove SQL connection strings

  1. Run IIS Manager
  2. Click on Configuration Editor
    image
  3. Click on the dropdown and select connectionStrings
    image
  4. Click on “..”
    image
  5. Select the 2 AppFabric ConnectionStrings and remove them
    image
  6. Click Apply

Removing Cache Cluster

In each of the cache server

  1. run Caching Administration Window Powershell as Administrator
  2. run Unregister-CacheHost
  3. run Remove-CacheHost

Now delete the actual database that is storing the AppFabric Caching service data

 

You can now proceed to recreate the entire cache cluster

Categories: AppFabric