Question: Can we add custom functions in quickbook?
Answer: Yes, In quickbook.php file we need to add Constants to make custom function and we can add as many as we want. After defining these constant we can map these in our web service.
Suppose we Read more…
CSRF stands for cross-site request forgery. CSRF token is basically used for security purpose in Laravel forms. To understand how it works read here: https://laravel.com/docs/5.4/csrf
How to disable it if required?
CSRF protection is enabled by default in all routes of Laravel 5 Read more…
Create and Download CSV of table Records using OUTFILE Sql command and PHP
1. Create temporary CSV file using OUTFILE SQL command: OUTFILE command is used to write your sql command output to the specified location. You can write the output to some files using OUTFILE when required Read more…
In one of our projects, requirement was to compare two password values using HTML5 form validation (display the message in the same format as regular HTML5 messages are displayed).
Let us assume that we have a HTML5 form for change password screen:
<div Read more…
1. Place Scripts at the Bottom of the Page: If we include script at the top, sometime page elements are not loaded completely and script starts working. So we need to include scripts after loading all the elements. Also if scripts are loaded at the top, browser has Read more…
JSONB (JSON Blob) datatype in Postgres is used to save JSON data. We can search on JSONB type of column after creating an index on it.
Usage in PostgreSQL:
1. Create table and index
CREATE TABLE tests
id integer NOT NULL,
email citext NOT NULL,
address jsonb NOT Read more…
Handling content and image sharing with twitter and google plus share buttons in wordpress
To achieve dynamic content(including image) sharing from a website with share buttons (or links) for share and likes on social sites like twitter and google plus, wordpress requires somewhat more specific functions while creating plugin Read more…
To create a new customized plugin with email functionality and sending a pdf file as attachment requires some simple lines of code with TCPDF library file inside the library directory of moodle. And for performing file operations, filelib.php reference is required. For creating pdf file from HTML content, append Read more…
Google reCaptcha is a free service API provided by Google to protect your site from unauthorized access, abuses and spam. The API uses advanced risk analysis technique to distinguish among a human being and a bot. The reCaptcha API comes in the form of a widget and it can be Read more…
In wordpress, a child theme is a theme that inherits the functionality and styling of its parent theme.
Child themes are the recommended way of modifying an existing theme (like inheritance in object oriented programming). If we have any theme and we want to modify its header or any other Read more…
Fatal Error on website whenever we were pushing any code change to our website hosted on heroku.
We were suddenly facing a fatal error (error 500) on our website. After making debugger on, it displayed the following error :
After exploring about it, we found that it was due to the Read more…
How to send email using google api (gmail) in cakephp 2.x?
Answer: When you send email using google api, you’ll need:
1. Cakephp 2.x
2. A Google account with Gmail enabled.
3. PHPMailer Library.
Download PHPMailer library from below link:
After downloading Read more…
In one of our projects we have multiple groups of checkboxes and corresponding divs with id as checkbox label. Now we want our checkboxes to perform AND and OR logic .
<div id=”_Java_less than 1500_Basic_Dennis Ritchie” class=”6″ style=”display:none;”> Read more…
What is Ajax? How to send the request using different Jquery methods?
Cakephp and Laravel are MVC frameworks for php. Both frameworks have totally different application structure. In the following document I have described all the important folders and their respective locations in Cakephp and Laravel (project_name is the root folder of your project)
Some other Important Points Read more…
There are multiple ways to enable/disable maintenance mode in Moodle.
Enable Maintenance Mode:
* Go to the Site Administration.
* Click on Server.
* Click on Maintenance Mode option:
* On the next screen: Maintenance mode ->Select “Enable” from drop-down. And write the message which Read more…
In wordpress, we can also change the appearance of wp-login page. There are so many plugins available for this purpose like Alter – White Label WordPress plugin. We can change the appearance of wp-login page through this plugin like I have changed the background image and color in this Read more…
1. Open config/app.php file inside your project and then modify the default email configuration and setup your SMTP account there:
‘EmailTransport’ => [
‘default’ => [
‘className’ => ‘SMTP’,
// The following keys are used in SMTP transports
‘host’ => ‘ssl://smtp.gmail.com’,
‘port’ => 465,
‘timeout’ => Read more…
In cakephp we do not need to set hard coded relative paths.There are methods by calling which we can build the url dynamically.
To get the base url use
Router::fullBaseUrl(); => http://localhost //Output
To get the Application Url
Router::url(); =>/CakeApp/ //Output
To build Read more…
We have mail() function to send emails in PHP. It uses built in sendmail command that uses local mail server to send emails. PHPMailer, on the other hand, is very different. Rather than relying on sendmail, it communicates directly with the SMTP server and relays the mail itself.
One of Read more…