আইটি প্রোফেশনালদের জন্য CIPS মেম্বারশীপ

সাস্কাচুয়ান অকুপেশন ডিমান্ড লিস্টে কিছু কিছু প্রফেশনে আলাদা করে সার্টিফিকেশন দরকার পড়ে। নিচের তিনটি প্রফেশন এর মধ্যে অন্যতমঃ

১। Computer Engineer
২। Software Engineer and Designer
৩। Web Developer and Designer

Computer Engineer পেশায় আবেদনের জন্য আপনাকে APEGS – Association of Professional Engineers and Geoscientists of Saskatchewan এর মেম্বারশীপ হতে হয়।

Software Engineer এবং Web Developer দের জন্য CIPS – Canadian Association of Information Technology Professionals এর মেম্বারশীপ দরকার পড়বে। আমরা আজ CIPS মেম্বারশীপ নিয়ে কথা বলব।

CIPS মেম্বারশীপ আপনি তিনটা স্ট্যাটাসের মাধ্যমে অর্জন করতে পারেন:
১। AITP – Candidate Membership as an Associate Information Technology Professional
২। ISP – Certified Membership as an Information Systems Professional
৩। ITCP – Certified Membership as an Information Technology Certified Professional of Canada  Read More

post

HTTP Error when uploading images in WordPress – no thumbnail

Did you ever see HTTP Error when uploading an image in wordpress? Most of the times the images are uploaded but no thumbnail is created. And sometimes the images are not even uploaded. We are going to discuss about this right now!

There could be several issues that cause this error. First of all, we can assume that you don’t have enough memory for the script to be executed. So, try adding something like the following in your wp-config.php file:
[php]
define(‘WP_MEMORY_LIMIT’, ’64MB’);
[/php]

In stead of 64MB you may need more, though you can’t exceed the limit that your host allows you to use :)

If the solution doesn’t work, then open the .htaccess file from root of wordpress installation and add the following line:
[html]
AddType x-mapp-php5 .php
[/html]

Third issue could be mod_security is enabled in your server. To overwrite the default, create a .htaccess file in your wp-admin folder and paste the following code in there:
[html]

SecFilterEngine Off
SecFilterScanPOST Off

[/html]

Another main issue I suppose that your script is using ImageMagick library, but you need to use GD library to resolve the HTTP error. You need to force wordpress to use GD library in this case. To force you can use the following code:
[php]
add_filter( ‘wp_image_editors’, ‘force_to_use_GD’ );
function force_to_use_GD($array) {
return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ );
}
[/php]

I hope one of the above should fix your issue. There are more possible options out there though, but these are the common ones :)

post

Unique display name and nickname in wordpress

Hiya Folks!

We know that display name and nickname are very useful option in wordpress. Some users want to show display name or nickname instead of username. But there is possibility to be the display name and username same for more than one users. It will create confusion in plugin like BuddyPress or Classifieds or so.

But, if you can protect your user and system to create duplicate display name and nickname, then it’s achievable. Let’s make the hands dirty :)

You can add these codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name ‘mu-plugins’. If there is no folder in that name, then create a folder, name it ‘mu-plugins’, create a file inside that, give any name you like and paste the code in their. You don’t need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always.

<?php
// A dirty script by Ash
add_action( 'personal_options_update', 'check_display_name' );
add_action( 'edit_user_profile_update', 'check_display_name' );
function check_display_name( $user_id ) {
global $wpdb;
// Getting user data and user meta data
$err['display'] = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->users WHERE display_name = %s AND ID <> %d", $_POST['display_name'], $_POST['user_id'] ) );
$err['nick'] = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->users as users, $wpdb->usermeta as meta WHERE users.ID = meta.user_id AND meta.meta_key = 'nickname' AND meta.meta_value = %s AND users.ID <> %d", $_POST['nickname'], $_POST['user_id'] ) );
foreach( $err as $key => $e ) {
// If display name or nickname already exists
if( $e >= 1 ) {
$err[$key] = $_POST['username'];
// Adding filter to corresponding error
add_filter( 'user_profile_update_errors', "check_{$key}_field", 10, 3 );
}
}
}
/*
* Filter function for display name error
*/
function check_display_field( $errors, $update, $user ) {
$errors->add( 'display_name_error', __( 'Sorry, Display Name is already in use. It needs to be unique.' ) );
return false;
}
/*
* Filter function for nickname error
*/
function check_nick_field( $errors, $update, $user ) {
$errors->add( 'display_nick_error', __( 'Sorry, Nickname is already in use. It needs to be unique.' ) );
return false;
}
/*
* Check for duplicate display name and nickname and replace with username
*/
function display_name_and_nickname_duplicate_check() {
global $wpdb;
$query = $wpdb->get_results( "select * from $wpdb->users" );
$query2 = $wpdb->get_results( "SELECT * FROM $wpdb->users as users, $wpdb->usermeta as meta WHERE users.ID = meta.user_id AND meta.meta_key = 'nickname'" );
$c = count( $query );
for( $i = 0; $i < $c; $i++ ) {
for( $j = $i+1; $j < $c; $j++ ) {
if( $query[$i]->display_name == $query[$j]->display_name ){
wp_update_user(
array(
'ID' => $query[$i]->ID,
'display_name' => $query[$i]->user_login
)
);
}
if( $query2[$i]->meta_value == $query2[$j]->meta_value ){
update_user_meta( $query2[$i]->ID, 'nickname', $query2[$i]->user_login, $prev_value );
}
}
}
}
// Call this function once
display_name_and_nickname_duplicate_check();
/*
* Calling the display_name_and_nickname_duplicate_check() again when a new user is registered
*/
add_action( 'user_register', 'check_nickname', 10, 1 );
function check_nickname() {
display_name_and_nickname_duplicate_check();
}

view raw
code.php
hosted with ❤ by GitHub

The above code speaks a lot!
Many thanks to my colleague Vaughan Montgomery.

Suggestions are welcome :)