Category Archives: Tech News

How to make placeholder work in IE browser

As we all know that HTML 5 placeholder attribute is not working in IE less than 10 version. If you have input elements in your DOM with placeholder attribute and access the page in IE browser less than 10 version then you will get an error message that placeholder is not defined. To resolve this issue you have to use javascript or jQuery. I have attached a sample code file please download and check it out in different browser. Sample Code

Apple eyes Passbook coupons with touch of NFC

passbook-baseball-tickets
passbook-baseball-tickets

passbook-baseball-tickets-1690

A new patent from Apple provides loads of information on Passbook and hints at the possibility of using near-field communications with the app.

Published today by the U.S. Patent and Trademark Office, the patent, dubbed “Integrated Coupon Storage, Discovery, And Redemption System,” goes into great detail about a system that lets you manage and redeem electronic coupons on a mobile device.

As described in the patent, such a system could trigger an alert on your phone when you’re near a store where a saved coupon can be used. It could also alert you when you’re using your device to buy something.

Passbook currently allows you to store digital coupons on your iOS device so that you can redeem them at different stores and merchants. Read More…

How to make compatible nextgen gallery with AWS plugin

From few peoples I heard that nextgen gallery plugin is not working with AWS plugin as it should and asking me How to make compatible nextgen gallery with AWS plugin? So I have work around it and come out with some solution explaining below:

– Create gallery and add images as per the rule of NGG.
– Show your created gallery as per the rule of NGG.
– Now find out the ID of the div in which all your gallery images are present.
– Put this ID in “AWS Options” admin form’s first field named “No ajax container IDs”.

- Now add the below code in AWS plugins ajaxify.js file just before the "$body.removeClass('loading');"(at line 179)
scriptNode = document.createElement('script');
contentNode.appendChild(scriptNode);
scriptNode.setAttribute('src', rootUrl + 'wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js');

scriptNode = document.createElement(‘script’);
contentNode.appendChild(scriptNode);
scriptNode.setAttribute(‘src’, rootUrl + ‘wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js’);

scriptNode = document.createElement(‘script’);
contentNode.appendChild(scriptNode);
scriptNode.setAttribute(‘src’, rootUrl + ‘wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js’);

that’s it :)
– Example site link: http://www.youngtechleads.com/development/ngg-aws/

How to modify Active Directory passwords through PHP

The secret is keep in Active Directory on a user object within the unicodePwd attribute. This attribute is written under some restricted conditions, however it can’t be accessible, but the value of this attribute can be modify or alter.
In order to alter this attribute, you must have a 128-bit Secure Socket Layer (SSL) connection to the server. For this connection to be possible, the server must possess a server certificate for a 128-bit RSA connection, the client must trust the certificate authority (CA) that generated the server certificate, and both client and server must be capable of 128-bit encryption.

Passwords must meet complexity requirements determines whether password complexity is enforced. If this setting is enabled, user passwords meet the following requirements:

  • The password is at least six characters long.
  • The password contains characters from at least three of the following five categories:
    • English uppercase characters (A – Z)
    • English lowercase characters (a – z)
    • Base 10 digits (0 – 9)
    • Non-alphanumeric (For example: !, $, #, or %)
    • Unicode characters
  • The password does not contain three or more characters from the user’s account name.

PHP code as follows:
function create_ldap_connection() {
$ip = "Ad server IP";
$ldaps_url = "ldaps://$ip";
$port = 636;

$ldap_conn = ldap_connect( $ldaps_url, $port ) or die("Sorry! Could not connect to LDAP server ($ip)");

ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);

$username = "AdminUserName";
$password = "AdminPassword";
$binddn = "CN=Administrator,CN=Users,DC=TestDomain,DC=local";

$result = ldap_bind( $ldap_conn, $binddn, $password ) or die("
Error: Couldn't bind to server using provided credentials!");

if($result) {
return $ldap_conn;
} else {
die("
Error: Couldn't bind to server with supplied credentials!");
}
}

function get_user_dn( $ldap_conn, $user_name ) {
/* Write the below details as per your AD setting */
$basedn = "DC=AD Test,DC=Local";
/* Search the user details in AD server */
$searchResults = ldap_search( $ldap_conn, $basedn, $user_name );
if ( !is_resource( $searchResults ) )
die('Error in search results.');

/* Get the first entry from the searched result */
$entry = ldap_first_entry( $ldap_conn, $searchResults );
return ldap_get_dn( $ldap_conn, $entry );
}

function pwd_encryption( $newPassword ) {
$newPassword = "\"" . $newPassword . "\"";
$len = strlen( $newPassword );
$newPassw = "";
for ( $i = 0; $i < $len; $i++ ){
$newPassw .= "{$newPassword{$i}}\000";
}
$userdata["unicodePwd"] = $newPassw;
return $userdata;
}

$user_name = "(sAMAccountName=UserName of user whose password want to change)";//Dont remove parentheses brackets
$user_password = "New Password";

$ldap_conn = create_ldap_connection();
$userDn = get_user_dn($ldap_conn, $user_name);
$userdata = pwd_encryption($user_password);

$result = ldap_mod_replace($ldap_conn, $userDn , $userdata);
/* Check whether the password updated successfully or not. */
if ( $result )
die("Password changed successfully!");
else
die("Error: Please try again later!");

PHP CMS lists

Following are the PHP CMS list and their brief details.

Name Supported databases Latest stable release Licenses Latest release date
AdaptCMS Lite MySQL 2.0.1 GPL 2011-09-21
ATutor MySQL 2.0.3 GPL 2011-09-14
b2evolution MySQL 4.1.4 GPL 2012-04-06
BEdita MySQL 3.1.5 AGPL 2012-03-05
BLOG:CMS MySQL 4.2.1.g GPL 2011-06-06
CivicSpace MySQL 0.8.3 GPL 2005-05-01
CMS Made Simple MySQL, PostgreSQL 1.10.3 GPL 2012-01-09
Concrete5 MySQL 5.5.1 MIT 2012-01-23
Cotonti MySQL 0.9.11 BSD 2012-08-01
Dotclear MySQL, PostgreSQL, SQLite 2.4.2 GPL 2012-02-11
Drupal MySQL, Oracle, PostgreSQL, SQLite, Microsoft SQL Server 7.14 GPL 2012-05-02
Elxis CMS MySQL, Oracle, PostgreSQL 2009.3 GNU/GPL 2011-11-23
DynPG MySQL 4.5.1 GPL 2011-12-17
e107 MySQL 1.0.0 GPL v2 2011-12-28
Exponent CMS MySQL 2.0.4 GPL 2012-01-27
eZ Publish MySQL, PostgreSQL, Oracle, Microsoft SQL Server 4.6.0 GPL 2011-11-22
Frog CMS MySQL, SQLite 0.9.5 GPL 2009-04-26
Geeklog MySQL, PostgreSQL, Microsoft SQL Server 1.8.0 GPL 2011-06-12
Habari MySQL, PostgreSQL, SQLite 0.8.0 Apache License 2011-12-13
ImpressCMS MySQL 1.3.1 GPL 2011-12-27
Joomla! MySQL, MSSQL, PostgreSQL, Oracle, SQLite 2.5.6 GPL 2012-03-15
Jumbo SQLite 1.3.7 GPL v3 2011-09-16
Kajona MySQL, PostgreSQL, SQLite 3.4.1 LGPL 2011-11-08
KnowledgeTree Community Edition MySQL 3.7 GPL & proprietary 2009-12
Lyceum MySQL 1.0.2 GPL 2008-06-04
Mambo MySQL 4.6.5 GPL 2008-06-01
Mediawiki MySQL, PostgreSQL, SQLite 1.19.0 GPL 2012-05-02
MiaCMS MySQL 4.6.5 GPL 2008-09-11
Midgard CMS MySQL 8.09.9.2 LGPL 2010-07-22
MODx MySQL 2.2.0-pl2 GPL 2012-01-04
Moodle MySQL, Postgres, MSSQL, or Oracle 2.3.1 GPLv3+ 2012-07-09
Nucleus CMS MySQL 3.64 GPL 2011-03-14
Ocportal MySQL 7.1.5 CPAL 2011-09-06
Opus MySQL 2.29 GPL 2008-07-08
papaya CMS MySQL, PostgreSQL, SQLite 5.3.10 GNU/GPL 2 2012-02-13
Phire CMS MySQL 1.1.2 New BSD License 2011-07-07
PHP-Fusion MySQL 7.02.04 AGPLv3 2011-11-10
PHP-Nuke MySQL 8.1 GPL 2009-05-22
PHPSlash MySQL 0.8.1.1 GPL 2006-01-15
Phpweblog MySQL 0.5.2 GPL 2001-10-31
phpWebSite MySQL, PostgreSQL 1.6.3 LGPL 2009-06-17
pimcore MySQL 1.4.5 BSD 2012-04-16
PivotX MySQL, Flat-file database 2.3.0 GPL 2011-08-15
Pixie (CMS) MySQL 1.0.2 GPL 2009-03-24
Prestashop MySQL 1.4.7 GPL 2012-02-08
ProcessWire MySQL 2.2.2 GPL 2012-01-11
Redaxscript MySQL 1.0 GPL 2012-08-10
RavenNuke CMS MySQL 2.4.0 GPL 2009-10-12
RenovatioCMS MySQL 001.110 GPL 2011-10-18
SMW+ MySQL 1.6.0 GPL 2011-12-02
Serendipity MySQL, PostgreSQL, MySQLi, SQLite 1.6.0 BSD 2011-10-27
SilverStripe MySQL, Microsoft SQL Server, PostgreSQL, SQLite, Oracle 2.4.7 BSD 2012-02-01
SPIP MySQL, PostgreSQL, SQLite 2.1.12 GPL 2011-11-17
Squiz CMS (Squiz) PostgreSQL GPL 2011-12-08
Squiz Matrix (Squiz) PostgreSQL, Oracle 4.6.3 GPL 2012-02-06
TangoCMS MySQL 2.6.1 GNU/GPL 2 2010-11-29
Textpattern MySQL 4.4.1 GPL 2011-06-18
Tiki Wiki CMS Groupware MySQL 9.0 LGPL 2012-06-26
Tribiq CMS MySQL 6.0.3b GPL 2012-02-03
TYPO3 MySQL, Oracle, PostgreSQL 4.7.1 GPL 2012-05-22
WolfCMS MySQL, SQLite, PostgreSQL 0.7.5 GPL v3 2011-04-12
WordPress MySQL 3.4.1 GPL 2012-06-27
Xpress Engine MySQL, Cubrid, PostgreSQL, SQLite, Firebird, MSSQL 1.5.1.2 LGPL v2 2012-01-05
Xaraya MySQL, PostgreSQL 2.2.0 GPL 2011-07-09
XOOPS MySQL 2.5.5 GPL 2012-04-17
Zikula MySQL, PostgreSQL, MSSQL, Oracle 1.2.8 GPL 2011-09-09