My talk on Composer – The missing package manager for PHP

Here in Dhaka, a big technology fair is going on from 4th – 7th June, 2014 at Bangabandhu International Conference Center. Today (6th June, 2014), phpXperts arranged a DevCon with 11 interesting topic and thousands of viewers participated over there. It was such a blast!

Among them I also gave a talk on Composer and here’s my presentation.

Some Pictures

Introducing weGallery

Making consistent naming after my company weDevs, I named the documentation theme as weDocs. Now another plugin came as weGallery, very consistent!

Another Gallery?

There are many plugins available in the WordPress.org plugin directory for the same needs, gallery. I’ve seen the most downloaded NextGEN Gallery, it has lots of feature and very complex. If you need a simple gallery, it’s an overkill. So I wanted to create a new one, that would be very simple. Then I found Rocket Galleries via WP Tavern. It’s very simple and what I wanted, mostly!

Rocket Gallery

As I found the features I was looking for in rocket gallery, but it felt short. The plugin is nicely built and I liked the way it’s written, the codes! But it didn’t do something right:

  • Taking advantage of Custom Post Type
  • It used a custom table for galleries that I didn’t wanted.
  • It didn’t have a github repo, so I couldn’t contribute.
  • I saw some features that I would need, but no way to integrate there without forking.
  • Lastly, I want to use things that acts the way I want. If none does, I create them!

So weGallery born

I needed a gallery for a next venture I am working on. It’ll be public next month I hope, my first SaaS project. So as rocket gallery felt short, I jumped into the code and weGallery was born. It’s always fun to create new things and I hope to integrate more features into it. But if you are like me, wanted a gallery plugin, please feel free to add new features into the plugin.

Download GitHub

Translator Credits

I didn’t know about this until a fellow translator pointed it out. I am not sure if this was from before WordPress 3.9, but if you helped translate WordPress in your own language, your name will be placed on the WordPress credits screen.

WordPress translator credits

Feels good to see my name there, twice!

I maintain Bengali translation site of WordPress and I am validator. When you change the WordPress language to bn_BD or your native language code, translators for that language will be shown there at http://yoursite.com/wp-admin/credits.php.

Fetching User Information from Rapportive via PHP

Rapportive in Gmail

Rapportive in Gmail

I love Rapportive. It’s a nifty way to know about a user who sent you an email to your Gmail account. You can know about the person who sent the email and treat the person that way. It collects its data from various sources including social networks. But, you can only use that in your Gmail as a browser add-on.

As a developer, that’s kinda sad. Wouldn’t it be nice to be able to use those information in your custom application? Well, there is a hack that I found and turned it into a PHP class for easier usage and it’s kinda cool :D

So I wrote this nifty PHP class and it makes fetching the data a breeze.

Using

require dirname( __FILE__ ) . '/rapportive.php';

$rap = new WeDevs_Rapportive( 'tareq@wedevs.com' );
var_dump( $rap->get_data() );

Output

Data from Rapportive

GitHub

Dokan – A multi-vendor e-commerce app theme is coming soon…

“Dokan” – an upcoming WordPress app theme for building multi-seller e-commerce store, powered by WooCommerce. Me and my team are working on this for couple of months and it’s going to be released at end of this month or in first half of February.

It’s using WooCommerce as it’s backend engine and will be based on upcoming WooCommerce 2.1. So if you want to build a site having multiple vendors, you can easily do that.

Hopefully it’ll be released at end of this month or in first half of February.

It has a nice user friendly dashboard in front-end. So if you want to build a site for your client, may be it’ll be a good start if your client isn’t familier with WordPress dashboard :D

Screenshots

Continue reading

Wildcard search using WP_User_Query()

You can use WP_User_Query() class to fetch users by various arguments. With it’s search parameter, you can search users by these columns 'ID', 'login', 'user_nicename', 'user_email', 'user_url'. Although you’ve to specify which columns you want perform the search.

$user_query = new WP_User_Query( array( 'search' => 'Tareq' ) );

When searching users with the search parameter, by default WordPress searches for direct match. It doesn’t search with any wildcard even if you pass like this: array( 'search' => '%Tareq%' ), instead it’ll escape the percentage sign.

But there is a hidden gem by which you can search with wildcards. Just put * at the beginning and/or in the end of your string. WordPress will replace * with % sign and you can search with wildcard. There is no documentation about this!

Example:

$user_query = new WP_User_Query( array( 'search' => '*Tareq' ) ); // '%Tareq'
$user_query = new WP_User_Query( array( 'search' => 'Tareq*' ) ); // 'Tareq%'
$user_query = new WP_User_Query( array( 'search' => '*Tareq*' ) ); // '%Tareq%

Pretty neat!