Jesin's Blog

Welcome to the Portal of Technology

  • Facebook
  • GitHub
  • Google+
  • RSS
  • Twitter
  • Home
  • Categories
    • Domains
    • Linux
    • Networking
    • PHP
    • Virtualization
    • Web Design
    • Web Servers
    • Windows
  • WordPress Plugins
    • Custom Error Pages
    • HTTP Digest Authentication
    • Mailgun Email Validator
  • Toolbox
    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool
  • About Me
  • Contact Me
  • Sitemap
Home ›
PHP

How to prevent WordPress comment Spam using JavaScript

March 7, 2015 PHP Jesin A Leave a Comment

Akismet does a great job in catching comment spam but it is still inserted into the database causing it to bloat over time. So I developed a small WordPress plugin that stops 99% of the comment spam (atleast for me). It uses JavaScript to dynamically add a “hidden” input field to the comments form. A visitor making a comment will also “POST” this value which will be verified before the comment is inserted into the database. No more pesky captchas or asking users to solve dumb calculations.Continue Reading…

Tags: javascript, wordpress

How to customize the BuddyPress activation email

April 24, 2014 PHP Jesin A 30 Comments

BuddyPress the social networking plugin for WordPress sends an activation email when a new user registers. This email is very plain so why not add some spice to it by having your custom email. There are many forum threads out there for this topic but 99% of them don’t mention if their method is for single site or multi site. So I spent a lot of time trying customize this activation mailer without any success. Finally I sank into the code of BuddyPress and found the right set of hooks for the each environment – single or multi site.Continue Reading…

Tags: php, wordpress

WordPress Hooks (Actions and Filters) Search Tool

December 20, 2013 PHP Jesin A 5 Comments

wordpress hooks search tool thumbnail

This started out as a PHP regex experiment. I wanted to find the WordPress “action” hooks in a particular theme so that I can add my own action function to it.

So instead of searching through the whole lot of files for do_actions I sat down writing a regular expression to do this. I was very satisfied with the results which made me think about creating a tool to do this.

So here you go a standalone PHP script which seeps through the PHP code of the WordPress core, plugins, themes or anything you specify and gets you a list of actions and filters.

I use the word “standalone” because this isn’t a WordPress plugin or anything which requires WordPress functions. This is a script which uses a regex in preg_match_all() to find all “tag” names in the do_action() and apply_filters() function. This does not even require WordPress, if you want to find the hooks in a plugin just download the plugin, unzip it to a directory readable by this tool.

Download WordPress Hooks Search Tool | GitHubContinue Reading…

Tags: ajax, php scripts, wordpress

Custom 403 and 401 error pages in WordPress

September 18, 2013 PHP Jesin A 5 Comments

wordpress custom 403 error page

Earlier I had written an article on custom error pages for Apache but doing the same with WordPress is not that straightforward. WordPress has the ability to handle 404s internally but doing the same for other 4xx errors requires modifying the code.

I’ve been searching how to do this for months without luck. Recently after I created my own theme for this blog I got some knowledge of WordPress internals.

I put that to use and after several hours of experimenting built the 403 and 401 custom error pages for my WordPress blog.Continue Reading…

Tags: custom error pages, php, wordpress

Redirecting WordPress archives to a page

June 26, 2013 PHP Jesin A 24 Comments

php category thumbnail

WordPress started as a blogging platform but soon evolved into a Content Management System (CMS) used to create full websites. But certain features meant for a blog doesn’t suit well for websites and one among them is displaying archives. An archive in a blog contains a list of “posts” based on date, category or author, sometimes even bloggers (like me) don’t like to displaying date archives. So I decided to redirect the date archives in my blog to the home page without using any plugin and in the process also learnt redirecting category archives to other wordpress pages also. There are many ways to do this like editing the .htaccess file or using a plugin and here I’ll be editing the wordpress PHP theme files.Continue Reading…

Tags: php, redirect, wordpress

apc.php Download

March 20, 2013 PHP Jesin A Leave a Comment

php category thumbnail

PHP APC (Alternative PHP Cache) is a framework which speeds up PHP applications by storing the result of compiled PHP programs in the memory a.k.a. caching. The apc.php file is available in the APC package if downloaded as source from the APC page of the PECL website, but if you have installed it from the Linux repository by using the command yum install php-apc or apt-get install php-apc this file will not be available. I have extracted the apc.php file from the APC source downloaded from the PECL website and it is available for download here.

Download apc.php (12KB)

Extract this file and upload it to your document root, access it from your browser and you will see a page similar to the following.Continue Reading…

Tags: download, php

  • 1
  • 2
  • 3
  • …
  • 5
  • Next Page »

Get a wealth of information delivered to your inbox. Subscribe and never miss a single article.

  • Tutorials and howtos
  • Code, scripts and commands
  • Online Tools

* No spam, unsubscribe anytime

Hire Me

  • SSL installation and hardening (A+ on Qualys SSL test)
  • Apache & Nginx configuration
  • Email deliverability improvement (10/10 on Mail Tester & MailGenius)
  • WordPress customization, optimization and migration
  • and much more…

    Tools

    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool

    Nav

    • Home
    • About Me
    • Contact Me
    • Privacy Policy
    • Sitemap
    Vultr SSD VPS

    Creative Commons License
    Jesin's Blog by Jesin A is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
    Based on a work at websistent.com.