<?php $db_password = ‘root’; $db_user = ‘root’; $db_host = “-h localhost”; // Probably localhost $db_name = ‘test’; $prefix =’smarttips_’; $remove = ‘removeprefix’;//set a a condition name if(strtolower($remove) == ‘removeprefix’ || strtolower($remove) == ‘remove’){ $removeprefix = (bool) TRUE; } else { $removeprefix = (bool) FALSE; } $renmeQuery = “mysql -u$db_user -B -p$db_password -s -r $db_host $port…
send mails using socialengine
sentMailConfirmation = Engine_Api::_()->getApi(‘mail’, ‘core’)->sendSystem( $filteruserEmailTo, $mailType, $mailParams, $fromaddress );
copy to clipboard using jQuery
<a href=”javascript:void(0);” id=”userlinkId” style=”display: inline;”>http://localhost/profile/sijo</a> <script type=”text/javascript”> jQuery(document).ready(function(){ jQuery(“a#userlinkId”).zclip({ path:’js/ZeroClipboard.swf’, copy:jQuery(‘#userlinkId’).text(), beforeCopy:function(){ jQuery(‘#userlinkId’).hide(); jQuery(‘#copymessage’).css(‘color’,’red’); jQuery(‘#copymessage’).html(‘Copied to clipboard’); jQuery(‘#copymessage’).delay(2000).fadeOut(400); }, …
How to find the length or count of javascript array object?
oFriends= { ‘sijo’:1,’ajo’:2,’rijo’:3 } var count = Object.keys(oFriends).length;
Placeholder positioning
::-webkit-input-placeholder { text-align:center; } :-moz-placeholder { /* Firefox 18- */ text-align:center; } ::-moz-placeholder { /* Firefox 19+ */ text-align:center; } :-ms-input-placeholder { text-align:center; }