Latest Entries »

CSS reset Code


HTML tags – Css Reset codes you can used in your style.css

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


Example of current dates array:

array(4) {

[0]=> string(10) "2012-02-01"

[1]=> string(10) "2012-02-02"

[2]=> string(10) "2011-02-03"

[3]=> string(10) "2011-03-04"

[4]=> string(10) "2011-04-05"

}

Example of what I need returned if in “Year View”

array(2) {

[0]=> Array(2) {

[0]=> string(10) "2012-02-01"

[1]=> string(10) "2012-02-02"

}

[1]=> Array(3) {

[0]=> string(10) "2011-02-03"

[1]=> string(10) "2011-03-14"

[2]=> string(10) "2011-04-18"

}

}

Here is the same expected result but in “Month” view mode

array(3) {

[0]=> Array(3) {

[0]=> string(10) "2012-02-01"

[1]=> string(10) "2012-02-02"

[2]=> string(10) "2011-02-03"

}

[1]=> Array(1) {

[1]=> string(10) "2011-03-14"

}

[2]=> Array(1) {

[1]=> string(10) "2011-04-18"

}

}

SOLUTION:


$years = Array();
$months = Array();
foreach($dates as $d) {
list($y,$m) = explode("-",$d);
$years[$y][] = $d;
$months[$y."-".$m][] = $d;
}
$years = array_values($years);
$months = array_values($months);

var_dump($years,$months);


As a responsive web developer you will need to check your web coding with mobile or other devices, but its hard to inspect + fix things on mobile and there is no way to check mobile touch features and other issues without mobile device, and this can be done via Mobile emulation

I found one good working solution for Mobile emulation for web

Checkout the link https://developers.google.com/chrome-developer-tools/docs/mobile-emulation – Download the app and setup and follow their instruction – you will get this working..

mobile_emulator

Save lots of my time – how about yours ???

WordPress WYSIWYG Editor fill with Default Text



add_filter('default_content', 'om_editor_content');

function om_editor_content( $content ) {
	$content = "Default Content will go here...";
	return $content;
}



When Community gives you many help – its your responsibility to give some back to them.

I know many people write blog, many help via email or IM, or forum, But i think experts with FREE time can join

http://stackexchange.com/ – to answer the questions people are asking !

This will be lot of fun – solving different issues found from many people. I know there are people – who love to take challenges try join and solve issues.


Million Dollar Question ?

YES !! Its is

But the answer is simple :

Believe in Yourself and Keep Moving.


Copy this code into your functions.php theme file.


function replace_admin_howdy( $wp_admin_bar ) {
 $my_account=$wp_admin_bar->get_node('my-account');
 $newtitle = str_replace( 'Howdy,', 'Hi, Welcome back!', $my_account->title );
 $wp_admin_bar->add_node( array(
 'id' => 'my-account',
 'title' => $newtitle,
 ) );
 }
 add_filter( 'admin_bar_menu', 'replace_admin_howdy',25 );

List item – List style disc – COLOR


ul {
    list-style: none;
    padding:0;
    margin:0;
}

li { 
    padding-left: 1em; 
    text-indent: -.7em;
}

li:before {
    content: "02022";
    color: red;
    font-size: 16px; /* or whatever color you prefer */
}

Customize WordPress FEED


remove_all_actions( 'do_feed_rss2' );
add_action( 'do_feed_rss2', 'sp_events_feed_rss2', 10, 1 );

function sp_events_feed_rss2( $for_comments ) {
$rss_template = get_template_directory() . '/feed-sp_events.php';
if( get_query_var( 'post_type' ) == 'sp_events' and file_exists( $rss_template ) )
load_template( $rss_template );
else
do_feed_rss2( $for_comments ); // Call default function
}

Reference : http://codex.wordpress.org/Customizing_Feeds

Seamless Responsive Image Grid


gallery


<div id=”images”>
<img src=”images/sample1.jpg” alt=”” />
<img src=”images/sample2.jpg” alt=”” />
<img src=”images/sample4.jpg” alt=”” />
<img src=”images/sample5.jpg” alt=”” />

</div>

CSS CODE

#images{
line-height: 0;
-webkit-column-count: 3;
-webkit-column-gap: 0px;
-moz-column-count: 3;
-moz-column-gap: 0px;
column-count: 3;
column-gap: 0px;

}
#images img {
width: 100% !important;
height: auto !important;
}

FOR RESPONSIVE – ADAPTIVE screen

@media (max-width: 400px) {
#photos {
-moz-column-count: 1;
-webkit-column-count: 1;
column-count: 1;
}
}

For more JS based solution : use link link Click here


While transfer money via Skrill ( monybookers ), you need some information like your address [ bank account or mailing address ] , your full name, birthday to secure the transaction.

Sometimes i think we did a common mistake, we make Facebook profile / Twitter or other public service account and add many information there as public – like birthday + address etc, what is not good to me:

What can we do then ?

1. Ok what’s about creating two or three Fake Birth Day : for Public Services ?
Say we use Real Birth Day for $$$$ payment gateway services and we use a different Year : or Month : Or day for Many other public social network or services? this may secure your payment gateway

2. Don’t put the address and private information as public

Always try to check the address bar in browser – for https:// or the SSL certificate to make sure its really from skrill (https://www.moneybookers.com )

Always be aware of sub domain, if its sub domain from original Domain it should be (.) prefix, not (-)

For example : if you get any email from

donotreply@secure-moneybookers.com

or you get a email where your suggested to check moneybookers Change the Birth day for security reason : its a fake email make sure its really coming from moneybookers before you place the username and password.

If any such email [warning ] mail from moneybookers come – don’t click the links from the email but go login moneybookers.com first then check the link – if it still asked you for password again – then be aware of hacked your account.

Those type of email come – from spammer or hacker – what they do is sent you an email with

Moneybookers or skrill – security Alert : you need to change your settings or birthday or whatever.

they link you to a fake domain like

https://www.security-moneybookers.com

https://www.terms-moneybookers.com

https://www.private-moneybookers.com

https://www.moneybookers-private.com

https://www.moneybookers-security.com

this is not from original moneybookers.com – they register a fake domain like those and then sent you an interface like moneybookers login screen and asked you for password and user ID, and then next screen will be Change your Birthday :O WOW, then you give them all to hack your money

They simply log that information to their account and run a redirect to moneybookers again and then you see you asked for password again ? this time your on moneybookers.com real site :) and your already been smug.

****** All right – if you face this problem already please go moeybookers.com and inform them about the issue and change your password immediately :)

This is something happen to http://www.paypal.com too,

[++ When you use any Payment gateway, make sure you don't put any private information on any public network that's important to your gateway services ++]

Failed to Switching to STA+AP mode ERROR !!


Switch STA+AP mode ERROR ( Soft-AP error )
Windows 7 64Bit’s ( Ralink Soft AP error )

I have big problem to switch Wireless Lan card to STA+AP.

i use last version Driver for Windows 7 64BIT’S ( 08/24/2009 ).

“soft ad-hoc” don´t work for PS3 , Nintendo DS, PSP e etc. etc.

I try use console command to corretily it’s error:

??????????????????????????????????????????????????

INSTRUCTIONS

STEP 0: Open a command-prompt with administrator privileges.

Click on Start menu, All Programs, Accessories, right-click on Command Prompt, select “Run as administrator”). Type in:

STEP 1: Configure the “hosted” interface:

netsh wlan set hostednetwork mode=allow ssid=Test key=letmein

This example creates an access-point with an SSID of “Test”, with a WPA password of “letmein”.

STEP 2: Configure Internet Connection Sharing (ICS)

Open up the networking control panel. Select the interface that currently has Internet connection (like your Ethernet or normal wifi), enable “Sharing”, and then select the special “hosted” interface.

STEP 3: Start it

netsh wlan start hostednetwork

STEP 4: Enjoy

On your other devices (say, iPhone), connect to “Test” and give the WPA password of “letmein”.


If you forget your wordpress password and you don’t even get into your cpanel or phpmyadmin access – all you can do is FTP access the theme files? ok no worry you can then reset your wordpress password.

Lets try how we can do it —

First check your site -> Source code via Browser -> View Page source and make sure which theme the site is running ? ok you get the theme ?

All right – now we have our theme name that run the site… Next step …

Download and backup the header.php or footer.php and copy the following code to reset the password and know the user_login name

      

		global $wpdb;
               $result = $wpdb->get_results("SELECT ID, user_login, user_pass FROM wp_users");
               var_dump($result);
               
               $wpdb->query("update wp_users set user_pass = '".MD5('yournewpassword_here')."' where ID =1");
               
               $result = $wpdb->get_results("SELECT ID, user_login, user_pass FROM wp_users");
               var_dump($result);

 

Once you reset the password, your user_name will be dump on the site and the new password will be ‘yournewpassword_here’ – :)

DONE?

Don’t forget to remove the code and upload again the previous backup version // header.php or footer.php // where you place the code :)

? Works or still have problem ? – Comment please if not work or issues.


@PHP : To find Today , Yesterday , This week First Day and Last day , Last week first day + Last day, This Month first day and last day, Last month First day and last day , This year First day and last day, Last year first day and last day //





In FF 10.0.2 or later no button “Add overlay” present.

But I found quick fix – Search for computer for PixelPerfectPanel.js and in file PixelPerfectPanel.js add line:

addMenuOption(‘Add Overlay’, Firebug.PixelPerfectModule.addOverlay, false);
after:
addMenuOption(‘Hide Statusbar Icon’, buildToggleBoolPrefFn(hideStatusBarPref), pixelPerfect.utils.getBoolPref(hideStatusBarPref));
addMenuOption(‘Hide Overlay When Inspecting’, buildToggleBoolPrefFn(hideWhenFocusLostPref), pixelPerfect.utils.getBoolPref(hideWhenFocusLostPref));


oDesk Recently Add a new wire transfer to Bangladesh.

Don’t get excited, Before you take decision please read this https://kb.odesk.com/questions/1315/With+Wire+Transfer+%28PKR%29%2C+what+is+the+exchange+rate+and+who+does+the+conversion%3F+

This will not cost you only < $5.0 , it may cost at least $25, you can send a test transaction before you decide to use that as primary payment withdrawal method. :)

They don't send the $USD to your Bank account, they rather convert it to BDT and send to your Bank that's how they takes some exchange FEE. :) So be sure how much it cost before you send your Total Balance.


একটা জিনিস আমাদের দেশের অনেকে বুজতে চায় না। ফ্রীলাঞ্চিং – সবার জন্যে নয়, বুজেনা শুনেনা ২কলম প্রোগ্রামিং শিখে অথবা ২লাইন এস,ই,ও – ইত্যাদি স্খিখেই কেন যে …বাংলাদেশ এর সুনাম ধংষ করতেছে …

Amon onek Bangladeshi Freelancer ace jader kaj atoi valo j akta client – tar onno akta project posting a Bangladeshi kew apply korle take nite chay ba Nia o ney, karon sudhu aktai – tar impression was good about Bangladesh. Same thing – amon onek Freelancer ace jader sathe atoi biroktikor obostha toiri hoy j pore – onno project a Bangladeshi dekhlei or matha gorom hoya jay ! othocho – ata howa uchit na. ++ .Keno ata nia ato worry ! Dolancer or other MLM – polapan gulare jotoi bujan that’s not freelance – they will say its the TRUE Freelance – always free to work/earn. No work no payment, no commitment ! r ai Dolancer kora chele pele onekei Nijer computer manage korche, network manage korche – potarito hoye – new google search dia bujteche odesk,freelancer,elance, ai sob site was real freelance website then they Sign up and continue bid on every projects ! what they even can’t handle – what ever the price their main target is to get a job to start :O. what happen ? “A Bad Impression” – I know its not only Bangladesh, its a major problem in “South Asia”. But i should only be aware of Bangladeshi Freelancer, its Bangladeshi Freelancer community and i am not going discuss on other country status,

*i want make my country men, more better.
*Lets not work until – know some standard.
* We can help each other to get better
*we can do one thing at least =”At least make a good Profile with good feedback and rating – no compromise”
*Don’t take too much project at once, don’t
* Don’t forget that ‘Freelance Need Hard work to success’
* Don’t think about “Easy money or Be Rich in a Day or Two” – Give some time.
* Don’t take project what you can’t handle
* Refund if you can’t did the job, or discuss your client if you can’t to get a solution, then client will guide or learn you many things that you can ever imagine.
* Remember -its your business, there are ups and down in Business, many types of customer can come and go. Be happy with your life, be confident.


As per my experience working on oDesk and Elance, i get the below …

1. oDesk – Good place for Hourly Projects, no escrow for fixed price job.
1. Elance – Good place for big project, specially for fixed price budget.

2.oDesk – No Escrow / No milestone payment – no guarantee for fixed price jobs. So no dispute, need faith on your client about payment.
2. Elance – Have Escrow + Milestone Settings – so you can place dispute even if client not pay for work.

3. oDesk apply quota is 20+5per week – as a Free and no paid membership.
3. Elance – There is different membership plan, and 15 connect for FREE members. Elance makes business here, but one better thing is filter provider apply on many projects.

4. oDesk – takes 10% fixed FEE on project payments.
4. Elance takes max = 8.75% project FEE, and different FEE from different membership.

5. oDesk – User Friendly for new providers or clients.
5. Elance – Bit hassle for new users/providers – Their Phone verification/Identity verification confusing.

6. oDesk – Clients Repeat rate for hourly project is Good, Good for full time hourly jobs.
6. Elance – Repeat projects mostly fixed price, good for offline workers.

7. oDesk – Don’t hassle providers more, as they use no dispute system for fixed price job.
7. Elance – Escorw or dispute system makes provider hassle, they asked for Policy violation and terminate profile.

8. oDesk – Less Terminate activities
8. Elance – Elance performance team terminate any provider profile without warning about any Policy violation. (Terms of services).

9. oDesk. – If you return/refund all the money from client then the project will not listed on your Profile.
9. Elance – Even you cancel a project it will listed on your Profile. And for more project cancel after award Elance performance Team can terminate your profile.

10. oDesk – Good Experience
10. Elance – Not Good all times, Elance Terminate many people’s profile even without Warning and don’t even told you what exactly you did wrong, except so called “Policy violation”

Over all my experience is not to wast time with Elance when you get jobs on oDesk.

WordPress Loop counter $loopcounter


<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); $loopcounter++; ?>

  // the loop stuffs

  <?php if ($loopcounter <= 1) { include (TEMPLATEPATH . '/afterfirstpost.php'); } ?>

<?php endwhile; ?>

<?php else : ?>

<?php endif; ?>

WordPress Dynamic Title tag


<title>
<?php 
if (is_home()) {
	echo bloginfo('name');
} elseif (is_404()) {
	echo '404 Not Found';
} elseif (is_category()) {
	echo 'Category:'; wp_title('');
} elseif (is_search()) {
	echo 'Search Results';
} elseif ( is_day() || is_month() || is_year() ) {
	echo 'Archives:'; wp_title('');
} else {
	echo wp_title('');
}
?>
</title>
Follow

Get every new post delivered to your Inbox.