APRIL 20TH, 2015
By MOHAMMAD SAJJAD HOSSAIN
WordPress allows user to upload various types of files using the media upload functionality. There is no visible way for restricting users from uploading files of one or more file types. However you can do this using filters. So, I decided to create a plugin which will provide user interface for selecting which files the users will be able to upload. WP Upload Restriction is the plugin which allows administrators to choose the files types and restricts users from uploading files other than the selected types. It’s a very simple, easy-to-use, yet powerful plugin.
Currently the file type restriction is applied to all users except administrators. In next release(s) role wise restrictions will be added.
To grab a copy of this plugin visit this link https://wordpress.org/plugins/wp-upload-restriction/.
MAY 2ND, 2013
By MOHAMMAD SAJJAD HOSSAIN
My WordPress plugin WP Reroute Email has been approved and I have released the first version of it.
This plugin intercepts all outgoing emails from a WordPress site, sent using the wp_mail() function, and reroutes them to a predefined configurable email address. This is useful in case where you do not want email sent from a WordPress site to reach the users. For an example, to resolve an issue you downloaded production database to your development site and you want no email is sent to production users when testing. You may enable this plugin in development server and reroute emails to your given email address.
JUNE 21ST, 2008
By MOHAMMAD SAJJAD HOSSAIN
I have modified the plugin for DOMPDF which is found in CodeIgniter forum. I have added the paper size and orientation parameters. Here is the code to share with you.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
function pdf_create($html, $filename, $stream=true, $papersize = 'letter', $orientation = 'portrait')
{
require_once("dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper($papersize, $orientation);
$dompdf->render();
if ($stream)
{
$options['Attachment'] = 1;
$options['Accept-Ranges'] = 0;
$options['compress'] = 1;
$dompdf->stream($filename.".pdf", $options);
}
else
{
write_file("$filename.pdf", $dompdf->output());
}
}
?> |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
function pdf_create($html, $filename, $stream=true, $papersize = 'letter', $orientation = 'portrait')
{
require_once("dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper($papersize, $orientation);
$dompdf->render();
if ($stream)
{
$options['Attachment'] = 1;
$options['Accept-Ranges'] = 0;
$options['compress'] = 1;
$dompdf->stream($filename.".pdf", $options);
}
else
{
write_file("$filename.pdf", $dompdf->output());
}
}
?>