PHP 7.0.0 on EasyPHP DevServer 14.1 VC11

Learn how to run PHP 7.0.0 on EasyPHP DevServer 14.1 VC11 with easy 8 steps for less than 10 minutes!

Waiting to EasyPHP DevServer release v15.10 with bundled PHP 7, I went to install latest PHP on my machine running v14.1 VC 11. And, actually, that was quick and easy. You can do it by following 8 easy steps below.

Continue reading “PHP 7.0.0 on EasyPHP DevServer 14.1 VC11”

Easy Webinar Plugin on Steroids

If you already use Easy Webinar Plugin within your WordPress website, and you are on EWP version 4.2.7 or older, you probably noticed kind of slow dashboard. In this article you can learn how to achieve speed up with single code snippet.

If you already use Easy Webinar Plugin (4.2.7 or older) within your WordPress website, you probably noticed a kind of slow dashboard.

In this article you can learn how to speedup EWP with a piece of code snippet. All you need to have is basic knowledge of PHP editing, and FTP access to website host. Continue reading “Easy Webinar Plugin on Steroids”

Store Locator Plus: Make Phone Number Clickable

Store Locator Plus – Google Maps is a great free plugin for WordPress with enhanced locations and layouts functionality.

But, there is a small lack of it – phone number for location, displayed in bubble on map, has not clickable. So, if you wish to use Skype or other VoIP software on your computer to make a call, you can`t.

Until author make this available (I raised support topic Phone number in bubble as link long time ago), you can apply hack described below to achieve this enhancement.

Step 1: Modify slp.js wrapper

First you must modify JavaScript wrapper library. That is JS file located at /wp-content/plugins/store-locator-le/js/slp.js

Open this file in editor, and go to line 1223 (this is related to plugin version 4.2.39), just above line that contains case 'fullspan', and insert 4 lines of code highlighted below:

Save this modified file and you are done with first step. PasteBin code snippet https://pastebin.com/iq6fgq4f

Step 2: Modify bubble syntax

Now we have support for phone as link, but we still did not used that in bubble. So, now you can use this as:

  • proper solution – custom bubble syntax from plugin settings (this solution requires Enhanced Map addon – price 50 USD)
  • hack solution – custom bubble syntax modified in plugin core file

Proper Solution

So, you have Enhanced Map addon. Go in Dashboard to Store Locator Plus → User Experience → Map → Map Features → Enhanced Map → Buble Layout

Now find in HTML code part for phone number highlighted below

and replace it with part of code highlighted below

And that’s it. You are done. PasteBin code snippet https://pastebin.com/hFagYuSq

Hack Solution

So, you don’t have Enhanced Map, but you wish to modify core file. No problem, it’s legal (as plugin is released under GNU GPL3 license).

Open file /wp-content/plugins/store-locator-le/include/class.slplus.php in your editor and go to line 186 (this is related to version 4.2.39) and replace part of code for phone in Bubble HTML syntax (line 186-187) with version I provided above (three highlighted lines of second snippet in Proper Solution section).

Final Result

Now when you have set phone number for location, in bubble you’ll have clickable phone number, so visitor can click and call phone by skype or other VoIP software directly from PC/Laptop or mobile device.

Store Locator Plus: Clickable phone number in Map Bubble
Store Locator Plus: Clickable phone number in Map Bubble

Disclaimer

Please note, modified files (slp.js and class.slplus.php) will be overwritten on Store Locator plus plugin update. So, remember that before you ask me “where my fix disappeared after plugin/website upgrade” 😉

How To Add Custom Colours To TinyMCE 4 in WordPress 3.9+

TinyMCE 4 in WordPress 3.9 break old customization for adding custom colours, so here we have a tip about how to convert old code to new format supported in TinyMCE 4

WordPress 3.9 brings up latest TinyMCE 4 rich text editor as grat speed improvement, but this update break a lot of TinyMCE plugins (advanced image, advanced link, etc), including various handy customizations for TinyMCE editor in WP-way.

One of them are custom colour swatches. Until 3.9 we simply put following code to functions.php and got our own colours in editor:

Convert TinyMCE option for custom colour swatches to version 4

This solution will not work in WP 3.9, so we need to replace it with working solution below (to be clear, format of colours array is changed, along to TinyMCE option name):

As you can see, option is changed from theme_advanced_text_colors to textcolor_map, and simple array of HEX codes separated by commas, now is changed to JavaScript array that threat elements as pairs of HEX colour value and colour nice name. All is wrapped to brackets.

Change number of colour swatches

Please note, my default TinyMCE 4 have limit up to 40 colour swatches (80 array elements) distributed in 5×8 grid (ROWSxCOLS). So, to append custom colours after default colours, we need to increase number of rows displayed on swatches popup.

To achieve this, we use textcolor_rows parameter.

We even can change grid layout and alter default 5×8 with, for example, 4×10 by setting parameters below:

Please note, this is just example. You can play with layout and colour set as you wish.

How To Add ‘More Colors’ Functionality?

TinyMCE 4 drop support for ‘More Colors’ option, but now there is WordPress plugin TinyMCE Color Picker that brings back this functionality to WordPress 3.9+

Did this tips helped you?

If you found this tips useful, feel free to 

A question posed to StakOverflow encouraged me to explain how this problem can be resolved quickly and easily.

Dropdown attribute with default value in WPBakery Visual Composer

Learn how to preselect value in dropdown list when custom Visual Composer block is added to page/post layout, based on default plugin settings.

I’m currently implementing support for Visual Composer to my plugins, and went to not well documented dropdown attribute parameters.

So, when we have array of available values (no matter if array contains key=>value, values only or it’s mixed), and we also have default value for that parameter set in plugin options (for example), it is possible to pre-select that default value in dropdown list.

Even you will not find clear explanation about how to do that in WPBakery Knowledge base for vc_map() functionality, if you dig plugin files, or analyse other plugins, you’ll find it for sure 🙂

Example parameters for dropdown attribute

So, here we go. Magic parameter that we need here is std, and should contain default value (key for multidimensional array). Here is demo code:

 

Easy Tables and support for shortcodes

Easy Tables for Visual Composer allows you to use only text content, but shortcodes are not processed. We have a working solution.

Easy Tables is a table manager for Visual Composer that allows you to create and manage tables with drag and drop interface. Main difference between tables inserted through TinyMCE inside VC Text Block is that Easy Tables use standalone block.

Currently, only text can be inserted as content of cells, and shortcodes are not processed. So, we have a solution for that lack (until author implement this functionality to original plugin).

Easy Tables hack

It’s really easy. Simply open plugins file /wp-content/plugins/easy-tables-vc/lib/templates/vc_table.html.php and change last line in file that says

to

And voila, all shortcodes inside Easy Tables cells will bee processed.