Category Archives: Hacks

How to configure the perfect-scrollbar jQuery plugin

Today I encountered a problem with the perfect-scrollbar jQuery plugin on a WordPress page whose content needed to scroll as one block. The plugin worked correctly with plain text, but the layout broke when an ol, ul, or table element … Continue reading →

Posted in Blog, Hacks | Leave a comment

“Nivo Slider” v1.9 quick fix

“Nivo Slider” is a useful slideshow plugin, but version 1.9 introduced a bug that displays the following warning: Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /homepages/19/d395780486/htdocs/wp-content/plugins/nivo-slider/nivo-slider.php on line 1572 A quick workaround … Continue reading →

Posted in Blog, Hacks | Leave a comment

How to add custom post types to the main WordPress RSS feed

Several articles, including this discussion and this tutorial, explain how to add custom post types to the main WordPress RSS feed. None of the suggested methods worked for me with WordPress 3.5.1, so I created another solution with a more … Continue reading →

Posted in Blog, Hacks | Leave a comment

Using “Debug Bar”, “Debug Bar Action Hooks”, and “Kint Debugger” together

I needed to trace the execution of a WordPress plugin, so I installed several developer tools: “Developer”, “Debug Bar”, “Debug Bar Transients”, “Debug Bar Action Hooks”, and “Kint Debugger”. I then tried to display a variable with Kint Debugger, but … Continue reading →

Posted in Blog, Hacks | Leave a comment

Working around the maximum execution time in WordPress

Today I found a problem: time ends… Well, for a WordPress plugin only, the KC s2M+MC one. I mean I got “Maximum execution time of 60 seconds exceeded” error, when I run a long operation (synchronizing members in MailChimp list … Continue reading →

Posted in Blog, Hacks | Tagged , , , , | Leave a comment

Inspecting the WordPress AJAX procedure

Here I describe an unusual way to use AJAX inside WordPress, by usual “admin-ajax.php” URL. Usually we run AJAX in WordPress with following code: add_action(‘wp_ajax_mp_my_action’, ‘my_action’); add_action(‘wp_ajax_nopriv_my_action’, ‘my_action’); function my_action() { … } Then we fire it with GET query … Continue reading →

Posted in Blog, Hacks | Tagged , | Leave a comment

Hack the KC Tools…

Sometimes you need to inspect the information a server receives from a complex form or POST request. The following method works with all versions of KC Tools. Set the form’s action attribute to: KC Tools WP and KC Tools WP … Continue reading →

Posted in Blog, Hacks, KC Tools | Tagged , , , , , , | Leave a comment

s2Member® hack – custom ccaps

WordPres’s plugin s2Member® have his own “scripting language” of several []-tags. One (and maybe most used) tag is [s2If …] [/s2If], where we can set conditionals to show or hide content, functions etc, depending of privileges of current viewer, like … Continue reading →

Posted in Blog, Hacks | Tagged , , , , , , , , , , , , , , , | Leave a comment

Unexpected parseFloat behavior with this.innerHTML in Chrome

This was an unusual case. In one project, I used the JavaScript parseFloat() function to calculate a final total, but the value came from HTML previously generated by a jQuery AJAX request: $(‘#’+id).html(rezult+’ ‘+currency); … $(‘#total’).html(‘TOTAL: ‘+totalcalc()); The value therefore … Continue reading →

Posted in Blog, Hacks | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Chinese characters from Excel to HTML, handled with VBA

This macros turns Chinese letters in “MS Excel 2007” spreadsheet to HTML codes. It will works with all Unicode chars, so can be used with Cyrilic, Hebrew, Arab, Japan an all others languages. In my case it prepares XML form … Continue reading →

Posted in Blog, Hacks | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment