Posts

Convert array to string comma separated in JavaScript

You can use JavaScript Array toString() Method Example:  var arrTags = ['Software Development and Engineering','Information Technology','Data Science and Analytics']; var strTags = arrTags.toString(); OutPut : Software Development and Engineering,Information Technology,Data Science and Analytics

Add and use wow.js into WordPress theme

1. Download animate.min.css and wow.min.js from github (https://github.com/daneden/animate.css) 2. Create a subfolder in your theme / child theme called css 3. Place animate.min.css there. 4. Create a subfolder in your theme / child theme called js 5. Place wow.min.js there. 6. Add the following lines to your theme / child theme's functions.php file //* Enqueue WOW.js Animate.CSS and function zeal_enqueue_scripts() { wp_enqueue_style( 'wow-css', get_template_directory_uri(). '/css/animate.min.css' ); wp_enqueue_script('wow-js',get_template_directory_uri().'/js/wow.min.js', array(), '',true); } add_action( 'wp_enqueue_scripts', 'zeal_enqueue_scripts ); 7. Add below JavaScript code before </body> tag to theme's footer.php <script type="text/javascript"> var wow = new WOW({ boxClass:     'wow',      // animated element css class (default is wow) animateClass: 'animated...

Change text and url on wordpress admin login page

Add below code into your active theme's function.php // changing the logo link from wordpress.org to your site function admin_login_url() { return home_url(); } // changing the alt text on the logo to show your site name function admin_login_title() { return get_option('blogname'); } // calling it only on the login page add_filter('login_headerurl', 'admin_login_url'); add_filter('login_headertext', 'admin_login_title');

Ubuntu, Apache, PHP and MySql configuration with AWS

Image
Login into AWS: https://console.aws.amazon.com/ 1. Choose EC2  2. Launch Instance 3. Choose Machine type (Ubuntu) 4. Select Free Tier and Next: Configure Instance Details 5. Next: Add Storage 6. Change Size(GB) 8 to 30(Max) and Next: Add tags 7. Add tags (Optional) and Next: Configure Security Group 8. Configure Security Group Add Rules (SSH, All TCP, All UDP, RDP, All Traffic, HTTP, HTTPS) Change Source custom to Anywhere 9. Review Instance and Launch 10. Create Key Pair and Launch Instance 11. Instance Status 12. Instance IP Connectivity with Ubuntu 1. Download and Install Putty Key generator 2. Load .pem file 3. Save private key 4. Download and install PuTTy 5. Enter server details 6. Choose saved private key file Installation Apache, MySQL & PHP Step 1 — Installing Apache and Updating the Firewall Install Apache using Ubuntu's package manager • sudo apt update • sudo apt install apache2 Adju...

Missing export as SQL format in single table in phpMyAdmin

In phpMyAdmin version 4.8.4 in wamp server export as SQL format is missing in single table but you fixed this issue to follow below steps: Go to "C:\wamp64\apps\phpmyadmin4.8.4\libraries\classes\Display" and Edit " Export.php " Find line /* Scan for plugins */ Add the following above the line:              // Export a single table if (isset($_GET['single_table'])) { $GLOBALS['single_table'] = $_GET['single_table']; } I hope it will work for you. Thanks

Setup a Virtual Host on WAMP 3

Setting up a virtual host provides several benefits: Virtual Hosts make URL cleaner Virtual Hosts make permissions easier Some applications require a “.” in the URL like Magento. So, let's setup a virtual host (vhost) in WAMP 3. Step 1: Change Virtual Host Configuration File in Apache Open your Apache configuration file located in C:\wamp64\bin\apache\apache2.4.37\conf\httpd.conf Search LoadModule vhost_alias_module  and un-comment the line  LoadModule vhost_alias_module modules/mod_vhost_alias.so Search Virtual Hosts and un-comment the line  Include conf/extra/httpd-vhosts.conf Save and close the httpd.conf file Step 2: Update Virtual Host Configuration File Open your vhost configuration file located one directory down from the Apache configuration file directory in  C:\wamp64\bin\apache\apache2.4.37\conf\extra\httpd-vhosts.conf Add the configuration for your new vhost like below #Your new site <VirtualHost *:80> ...

Update existing session array variable in CodeIgniter

If you want to change one or two data then need to load old session variable and add new value as per your need. $userData    =   $this->session->userdata('frontend'); // old session array $userData['theme']= $this->input->post('theme'); // new value $this->session->set_userdata('frontend', $userData);