Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Tuesday, May 26, 2020

XAMPP : Upgrade PHP and MySQL to latest Version

Many of us work on multiple projects and on long term projects also. While working condition may arise to upgrade PHP version for a project on your local development server. We just can't remove our old installation as it would also impact our old projects as old projects might be completely lost in this process.
A better way to handle this is that we might want to upgrade the existing XAMPP version to match the required PHP and MySQL version. This can be done by following the below steps.
  1. First of all take a backup of your existing htdocs and data folder (it is a subfolder of MySQL folder in XAMPP).
  2. In case you have made some changes in the configuration files like php.ini, httpd.config or any other files, than please take backup of those files also.
  3. Download the latest Version of XAMPP from their official website. (https://www.apachefriends.org/download.html)
  4. Now, reinstall the downgraded version and replace those folders with the old ones.
  5. After this replace the php.ini, httpd.config and other configuration files if you have taken backup.
With the above steps your PHP and MySQL Version will be upgraded to the latest version.

Monday, October 14, 2019

WordPress LearnDash Course Completion URL filter

If you want to set the completion URL as a custom one so that after completion of course user will be sent to this URL instead of the default LearnDash URL than can use the following available filter of LearnDash with WordPress.

 add_filter("learndash_course_completion_url", function($link, $course_id) {
//You can change the link here
return $link;
}, 5, 2);

You can set or change the priority of the filter execution as per your need or keep it as it is.

WordPress LearnDash Quiz Completion Hook

If you want to call a hook when a Quiz is completed in LearnDash using WordPress than you can do it in the following way.

 add_action("learndash_quiz_completed", function($data) {
//Called when quiz is completed
}, 5, 1);

You can adjust the priority of the function as per your need.  

WordPress LearnDash Topic Completion Hook

If you want to call a hook when a Topic is completed in LearnDash using WordPress than you can do it in the following way.

 add_action("learndash_topic_completed", function($data) {
//Called when topic is completed
}, 5, 1);

You can adjust the priority of the function as per your need.

WordPress LearnDash Lesson Completion Hook

If you want to call a hook when a Lesson is completed in LearnDash using WordPress than you can do it in the following way.

 add_action("learndash_lesson_completed", function($data) {
//Called when lesson is completed
}, 5, 1);

You can adjust the priority of the function as per your need.

WordPress LearnDash Course Completion Hook

If you want to call a hook when a course is completed in LearnDash using WordPress than you can do it in the following way.

 add_action("learndash_course_completed", function($data) {
//Called when course is completed
}, 5, 1);

You can adjust the priority of the function as per your need.

Tuesday, November 8, 2016

Magento 2 Contact Page With Google Map

In Magento 2 contact page is present and it can be enabled from the Admin section from the configuration options. The contact page shows a form and captcha. By default map is not available on the contact page in Magento 2.

In many cases users need to also show the shop address on the contact page with the help of an Google map. For this purpose this extension can be used.

Important Features of the Extension are as follows:

(1) Extension is very easy to install
(2) Text area option to enter any address in Admin
(3) Option to manage map height.
(4) Option to upload custom images for marker .
(5) Option to customize the page layout.
(6) Text field Option to enter latitude and longitude for the map marker.
(7) User can easily enable and disable this module.

This extension can be downloaded from the Magento Marketplace.

Please refer the following URL:  https://marketplace.magento.com/clarion-contact.html

WordPress WePay Woocommerce addon

Woocommerce is used to convert a wordpress website into an shopping cart. Whenever a shopping cart website is built payment gateways are also needed to accept and process the payment online.

There are many payment gateways like paypal, authorize.net, stripe etc. Similarly WePay is also an payment and to integrate the payment system with WordPress Woocommerce this plugin is made.

This plugin is for WooCommerce to implement a payment gateway for accepting and processing Credit Cards Payments By merchants via the WePay Payment Gateway

You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/woo-payment-addon/

WordPress Shortcodes In Widgets

In WordPress user can display output of a plugin or functionality on a page, template or post by using shortcode. shortcode can be pasted in an page or post or can be written in template with some programming knowledge.

In the widgets which are displayed in the sidebar cannot display shortcode output. But sometime we need to display shortcode output in sidebar with the help of the widget. In such scenario this plugin can be used.

Features of the plugin are as follows:

  • Option to add shortcode in an widget and output will be displayed in frontend of the website.

You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/shortcodes-in-widgets/

WordPress Redirect After Comment To Custom Page

Every blog has a feature that uses to express their views regarding an article. That feature is no other than but the commenting system. Using the commenting system the users/visitors of the website can start a discussion regarding an article.

Sometimes in many scenarios it is needed to redirect the user to a different page after commenting to an article. For this purpose this plugin can be used.

Features of the plugin are as follows:

  • Redirect user to custom page after comment.
  • Option to set custom Page URL from the plugin settings screen in the Admin section.
  • URL can be set of an post, page or any other external URL.

You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/wp-comment-redirect/

WordPress OutBoundLinks

In many cases we need the links of external website which are present in the content should open in new tab as the original website is not lost. Every time is not possible to add a target blank attribute to the external link while adding the content in the blog post.

Also it helps with the SEO of the website. This plugin automatically adds the target blank attribute to external links present in the content.

Features of the plugin are as follows:

  • It Works with all WordPress posts.
  • It Opens all external links of a post in a new tab.
  • It adds a query string parameter "?rel=outbound" to an hyper-link.
  • The Links which refer within the site are excluded.

You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/outboundlinks/

WordPress Interactive SVG Map

This WordPress Plugin is based on Github JQV MAP.

URL: https://github.com/manifestinteractive/jqvmap

Many times we need map in SVG format as Google map does not fit for every requirement. We can have more control on SVG map than Google map. using this plugin you can create map with options as you wish.

You just need to place a shortcode for the plugin on any post or page and the map is loaded on that particular page or post.

Features of the plugin are as follows:

  • Map is displayed in SVG format. 
  • Options to configure Map from the admin section.
  • Options to customize the map output on front-end.
  • The following Maps are available supported by the plugin.
    •   World Map
    •   USA
    •   Europe
    •   Germany
    •   Africa
    •   Asia
    •   Australia
    •   Argentina
    •   Algeria
    •   Brazil
    •   Canada
    •   France
    •   Greece
    •   Iran
    •   Iraq
    •   North America
    •   Russia
    •   South America
    •   Tunisia
    •   Turkey
You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/interactive-svg-map/

WordPress Hide Administrator Bar

This plugin allows the administrator of the website to hide the administrator bar on the front-end. This can be done for all users including administrator himself.

Features of the plugin are as follows:

  • Plugin Option to Hide Admin Bar for all Users in Frontend.
  • Plugin Option to Hide Admin Bar for Non Admin users in Frontend.
  • Plugin Option to Hide Admin Bar for Admin users in Frontend.
  • Plugin option settings to configure to which user will the administrator bar will be visible.

You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/hide-administrator-bar/

WordPress Forbidden Author Words

When managing a multi-author blog there are users who have the rights to post blog post content on the website. Not every time it is possible to check the entire content. So, to avoid misuse of some offensive words or words which may not be quite right for your website can be restricted using this plugin.

Features of the plugin are as follows:

  • Add words in the plugin option that are to be restricted.
  • User can set the option to restrict the word in post title, content or both.
  • user can set the option to display the "Restricted words" as a notice in the entire Admin section and it can be activated or deactivated from Admin.

You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/forbidden-author-words/

WordPress Empty Categories In Widgets

WordPress had a options to show categories list with post count as a widget in sidebar. But empty categories are excluded and only categories which have at-least one post assigned are shown.

Some times we need to show empty categories also in the sidebar. For this we can use this plugin.

Features of the plugin are as follows:

  • Shows Empty Categories In Sidebar as a Widget.


You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/empty-categories-in-widgets/

WordPress Disable Plugin Deactivation

This plugin provides options to disable plugin deactivation, activation, deletion, and update. Many times when working on a project we need to create multiple accounts with administrator rights.

So in many of the cases other users with administrator rights can mess with the plugin settings by activating, deactivating, updating, deleting plugins. To avoid such a mess and scenario this plugin can be used.

Features of the plugin are as follows:

  • Disable plugin activation from the plugin screen in the Admin section.
  • Disable plugin deactivation from the plugin screen in the Admin section.
  • Disable plugin update option from the plugin screen in the Admin section.
  • Disable plugin delete option from the plugin screen in the Admin section.
  • Disable plugin edit link from the plugin screen in the Admin section.


You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/disable-plugin-deactivation/

WordPress Disable Lost Password Email

Many times in WordPress spam users tries to reset password by clicking on the "forget password" link which sends a email to the email address of the user with the reset link. Doing it many times sends multiple emails and may blacklist the domain as spam email domain by the hosting companies and email service providers.

To avoid this many times we need to disable any email sending. To achieve this we can use this plugin. This plugin disables forgot password email for all the users including administrator of the website.

Features of the plugin are as follows:

  • It Disables lost email functionality for all users including the administrator.


You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/disable-lost-password-email/

WordPress Bulk Edit Post Titles

Sometimes we need to edit multiple post titles at same time to give same titles. This feature is not provided by WordPress till now. To overcome this drawback there you can use this plugin which add this functionality.

Features of this plugin:

  • Bulk edit post titles at once.
  • User can select any number of posts.
  • This plugin can work with single as well as multiple post titles.


You can download this plugin at https://wordpress.org/plugins/bulk-edit-post-titles/

WordPress BuddyPress Registration Widget

Want to add BuddyPress Registration Widget in sidebar? You can use this plugin.

Using this plugin you can "Display BuddyPress Registration form as a Widget".

This plugin provides BuddyPress registration form as a widget.

Features of this plugin are as follows:

  • BuddyPress registration form as a widget in sidebar.
  • Disable BuddyPress cover image for all users.
  • Make Profile image mandatory excluding super Admin.


You can download this plugin at https://wordpress.org/plugins/buddy-registration-widget/

WordPress Automatically Empty Trash

This plugin can be used to Automatically Empty Trash after the n number of days the user wishes.

Using this plugin the user can set the number of days from which the trash should be automatically deleted in the plugin option from the Admin plugin section.

Features of the plugin are as follows:

  • Option to set number of days after which the trash should be automatically emptied.


This Plugin can be downloaded at  https://wordpress.org/plugins/automatically-empty-trash/

MS SQL : How to identify fragmentation in your indexes?

Almost all of us know what fragmentation in SQL indexes are and how it can affect the performance. For those who are new Index fragmentation...