PHP Frameworks Archives - Page 6 of 13

Postgres | JSONB data type field in PostgreSQL(9.4) and using it in CakePHP

Author - Kailash
|
0 Comments
|

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.

For example:

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 twitter and google plus share button in wordpress

Author - Harleen Kaur

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…

Moodle | Writing HTML content into pdf file and sending the pdf file as attachment

Author - Harleen Kaur
|
0 Comments
|

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…

Using Google reCaptcha to authenticate user login on login form

Author - Richa

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…

Importance and Need of child theme in WordPress

Author - Neelam
|
0 Comments
|

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…

Heroku | Fatal error due to PHP 7 and old version of CakePHP

Author - Manju Kashyap
|
0 Comments
|

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…

Cakephp | How to send email using google api (gmail) in cakephp 2.x ?

Author - Webner
|
0 Comments
|

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:
https://github.com/PHPMailer/PHPMailer

After downloading Read more…

Jquery : Filter array by applying AND & OR logic on checkboxes

Author - Kritika Sood

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 .

For Example:

<html>
<div id=”_Java_less than 1500_Basic_Dennis Ritchie” class=”6″ style=”display:none;”&gt Read more…

What is Ajax? How to send the request using different Jquery methods?

Author - Webner

What is Ajax? How to send the request using different Jquery methods?
Ajax: Ajax stands for Asynchronous JavaScript and XML. Ajax is a technique for creating fast and dynamic web pages. Ajax allows web pages to be updated asynchronously by exchanging small amounts of data with the server Read more…

Application Structure comparison between Laravel and Cakephp 3.x

Author - Rita
|
0 Comments
|

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…

Moodle/Totara | Different ways to enable/disable maintenance mode

Author - Webner
|
0 Comments
|

There are multiple ways to enable/disable maintenance mode in Moodle.

From UI

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…

WordPress | How To change login (wp-admin) page css in WordPress

Author - Komal
|
0 Comments
|

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…

CakePHP | Send Email using SMTP in cakephp 3

Author - Gopi
|
1 Comment
|

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’ =&gt Read more…

Cakephp 3.0 | Methods to get base and application url

Author - Parminder Kaur
|
0 Comments
|

In cakephp we do not need to set hard coded relative paths.There are methods by calling which we can build the url dynamically.

use Cake\Routing\Router;
To get the base url use
Router::fullBaseUrl(); => http://localhost //Output

To get the Application Url
Router::url(); =>/CakeApp/ //Output

To build Read more…

PHP | Send mail through Gmail SMTP server and phpmailer

Author - Tanuj

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…

Couple of different ways to rename table name through UI in phpmyadmin

Author - Parminder Kaur
|
0 Comments
|

First method:

1. Click on the database (from list of databases on the phpMyAdmin home screen) in which you want to rename table name.
2. You will see a list of tables on click of the database.
3. Select the table and there is a dropdown below the tables with Read more…

What is PDO? Why PDO should be used in PHP?

Author - Ishpreet Kaur
|
0 Comments
|

PDO stands for PHP Data Objects. PDO is a consistent way to access databases.
Today, mostly websites or desktop based applications store their data in databases. Therefore, PHP has also provided the way to connect with databases.

PHP supports following ways to connect to the database:

1. Mysql Read more…

Moodle | Hyperlinks in course summary

Author - Kritika Sood
|
2 Comments
|

In Moodle when we create a new course we have an option to add summary/description of course. We can use this summary anywhere while showing courses. This summary could be anything. It can be simple text, image, multimedia or hyperlinks.

Hyperlinks are 2 forms:

Hyperlink launches a Read more…

How to send ical attachment via PHPMailer

Author - Kailash
|
4 Comments
|

We can send ical attachment in email using attach ical file (filename with .ics file extension).

For example, following is the object containing the information about ical like event start date and time, location, event summary etc:
$ical_content = “BEGIN:VCALENDAR
VERSION:2.0
PRODID://Drupal iCal API//EN
BEGIN:VEVENT Read more…

PHP FPDF (To generate PDF files)

Author - Tanuj
|
0 Comments
|

FPDF (To generate PDF files)
Using PHP we can generate PDF files dynamically. FPDF is a free PHP class that contains a number of PHP functions with the help of which we can create and manipulate PDFs. To get started with FPDF, we just need to download FPDF library from Read more…

‹ Prev page1 2 3 4 5 6 7 8 9 10 11 ... 13 Next page ›