October 14, 2016

Uploading image to the server via jQuery Ajax and php

I was solving a problem with uploading image to the server via jQuery Ajax. Finally I got a solution. HTML





CART


Javascript:




PHP script (just the simple solution, add some validation )

    //Custom data - Sent Via AJAX post method
    $file = $_POST['file']; //This is image sent via AJAX
    $fileName = $_POST['fileName'];    
    $brandingDesc = $_POST['brandingDesc'];
           
    $serverFile = time().$fileName;
 
    $uploads = wp_upload_dir();
    $upload_path = $uploads['basedir'];
 
    $serverFileName = $upload_path . "/" . $serverFile;
 
    //Get the base-64 string from data
    $filteredData=substr($_POST['file'], strpos($_POST['file'], ",")+1);
 
    //Decode the string
    $unencodedData=base64_decode($filteredData);
 
    //Save the image
    file_put_contents($serverFileName, $unencodedData);

October 5, 2016

New wordpress website

For one client we have created a new website based on the WordPress. Here you can find some plugins used:

Breadcrumb NavXT -
Adds a breadcrumb navigation showing the visitor's path to their current location.


Contact Form 7 -
Just another contact form plugin. Simple but flexible.

Bootstrap for Contact Form 7 - This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.


Duplicate Post -
Clone posts and pages.

Gallery -
Responsive image gallery with many views.

Loco Translate -
Translate themes and plugins directly in WordPress

Menu Image -
Provide uploading images to menu item

Newsletter -
Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business.

Projects -
project showcase plugin for WordPress. Show off your recent work using our shortcode, widget or template tag.

qTranslate-X -
Adds user-friendly and database-friendly multilingual content support.


Advanced Custom Fields
Customise WordPress with powerful, professional and intuitive fields
Advanced Custom Fields: qTranslate -
Provides multilingual versions of the text, text area, and wysiwyg fields.

Regenerate Thumbnails -
Allows you to regenerate all thumbnails after changing the thumbnail sizes.

Scroll Back to Top -
Adds a scroll to top button

Simple Custom CSS -
The simple, solid way to add custom CSS to your WordPress website. Simple Custom CSS allows you to add your own styles or override the default CSS of a plugin or theme.

Sitemap

Staff Directory -
Allows Wordpress to keep track of your staff directory for your website.

Superfly Menu -
Off-canvas hamburger menu for WordPress

Testimonials -
testimonials management plugin for WordPress. Show off what your customers or website users are saying about your business and how great they say you are, using our shortcode, widget or template tag.

WooCommerce -
An e-commerce toolkit that helps you sell anything.

WooCommerce & qTranslate-X -
Enables multilingual framework for plugin "WooCommerce".

WooCommerce Currency Switcher -
Currency Switcher for WooCommerce

WooCommerce Quick Donation -
Turns WooCommerce Into Online Donation

WP Add Custom CSS - Add custom css to the whole website and to specific posts, pages and custom post types.

Easy Smooth Scroll Links - Create anchors and add up to to 30 scrolling animation effects to links that link to page anchors. You can set scroll speed and offset value.

Login LockDown - Adds some extra security to WordPress by restricting the rate at which failed logins can be re-attempted from a given IP range.

wp-Typography - Improve your web typography with: hyphenation, space control, intelligent character replacement, and CSS hooks.

Clean Image Filenames - Filenames with special characters or language accent characters can sometimes be a problem. This plugin takes care of that by cleaning the filenames.

Advanced Custom Fields PRO - Advanced Custom Fields is the perfect solution for any WordPress website which needs more flexible data like other Content Management Systems.

FlowPaper - This is a PDF viewer plugin that allows you to embed your PDF catalogs, magazines and brochures as flipbooks on your web site in HTML5 format for free.

Force Strong Passwords - Forces privileged users to set a strong password.