How to check string in string variable using php

PHP tutorial, we will show you how to check string in php variable using php language. This easy very easy using php language. we given code snippet.

Use can use the strpos function for string to search in

<?php
$mystring = 'abc xyz';
$findme&nbsp;&nbsp; = 'abc';
$check_string = strpos($mystring, $findme);


// because the position of 'a' was the 0th (first) character.
if ($check_string === false) {
 echo "The string '$findme' was not found in the string '$mystring'";
} else {
 echo "The string '$findme' was found in the string '$mystring'";
 echo " and exists at position $pos";
}
?>

What is surprise me feature in wordpress

After every new release, wordpress users want to know new features What is surprise me feature in wordpress and “what is exactly use of surprise me feature”

What is surprise me feature in wordpress

Yesterday wordpress started new feature in there CMS. which is called surprise me. That is really coll feature. Many wordpress users want to know about this features “what is this feature” and “how to use this feature” and “what is exactly use of surprise me feature”.

In this article I will tell you how to use surprise me feature and what is benefits and uses of surprise me feauture.

go to following URL and login to your wordpress.

http://dashboard.wordpress.com/wp-admin/users.php?page=grofiles-user-settings

What is surprise me feature in wordpress
What is surprise me feature in wordpress

If you’re open to new things and serendipitity in your blogging life try leaving it on as you go about your normal blogging activities of posting, commenting, checking your stats, and such, and see what pops up.

Still I am looking what more this surprise me feature is doing in wordpress. I am really excited what is this feature doing in future.

how to add thank you message after wordpress comments

Saying thank you is always good manners. In article, i have code for, add thank you message after wordpress comments after adding comments added by users. I got the same request from many of clients for adding the thank you message after putting comments after by the user who comes to site.

It was good to have this functionality. User will remember your site and you should send the thank you email to user for adding the comment to your wordpress website. For professional sites, it is very great functionality.

add thank you message after wordpress comments

In this article I will show how to add custom message after getting comments from users. For this we going use the wordpress api. WordPress filters are very useful. You can find all wordpress hooks and filters in wp-includes/default-filters.php file.

  • Method First
add_filter('comment_post_redirect', 'redirect_after_comment');
function redirect_after_comment($location){
    $newurl = substr($location, 0, strpos($location, "#comment"));
    return $newurl . '?c=y';
}

if($_GET[ 'c' ] == 'y'){
      echo 'Thank you your comemnt';
} 

Open your functions.php file from your active wordpress theme folder. copy paste the following code in that file. This is very simple trick but still it is really useful.

  • Method Second

For this method you need to create the “Thank you” page in wordpress site than open functions.php file and put following code in that file.


// Redirect to thank you post after comment
add_action('comment_post_redirect', 'redirect_to_thank_page');

function redirect_to_thank_page() {
return 'https://purabtech.in/thank-you';
}

Note: do not forget to change your URL thank you URL from code.  Above code will work in new wordpress versions.

 

 

add thank you message after wordpress comments
add thank you message after wordpress comments

Apple Confirmed about issue with Wi-Fi and iPad

The apple very successfully launched the ipad. They just sold 300,000 ipads in single weekend. “Weak Wifi Pages” already has over 10,000 views – remarkable since it’s only been 48 hours since the official iPad launch.

Apple Confirmed about issue with Wi-Fi and iPad

Apple Confirmed about issue with Wi-Fi and iPad
Apple Confirmed about issue with Wi-Fi and iPad

There is very serious issue with ipad and wi-fi router connection. So many people are struggling with wireless network and ipad. Another issue being reported is the iPad’s continuous request for re-authentication to a secured wireless router, even after a successful, initial connection to it.

What you can do with wi-fi and ipad issue.

If you’re an early adopter experiencing connectivity issues there are a few things you can do to until Apple comes up with a more definitive explanation and fix for this problem:

* Update Your Router’s Firmware. Before attempting to connect an iPad to a home network, make sure that you have the latest version of the firmware to ensure that the router is functioning at full capability. This is usually done within the router’s included software.

* Change The Router’s Location. Do you have your router positioned in close proximity to equipment that could be causing interference? Microwaves, cordless phones, baby monitors, wireless keyboards, and Bluetooth devices can muddy a W-Fi signal.

* Set Your Router To Operate On One 802.11 Standard. Most current routers support not only 802.11n, but a, b, and g as well. Set your router to operate exclusively on the greatest standard available, and do the same with the wireless devices on your network. The iPad ships with support for 802.11n, so you should have your router match that if possible.

* Change Your Router’s Security Encryption. Typically, security isn’t something that should be experimented with, but when attempting to boost network performance, it may be necessary. There’s no question that WPA and WPA2 encryption is more secure than WEP, but the jury’s still out about which encryption method can slow a network down more (some believe it’s WEP and others WPA). If you have either currently deployed in your home network, try changing to a different encryption setting and see if that makes any difference in your connectivity. Apple also recommends that you use the same security settings across the entire network.

* Rename Your Networks. Apple makes the somewhat odd suggestion that users rename their networks. “Create separate Wi-Fi network names to identify each band. This can be done easily by appending one or more characters to the current network name. Example: Add a G to the 802.11b/g network name and an N to the 802.11n network name.”

Google launched the google Buzz teen safety tips video

In this February google launched the google buzz that time many people asked questions about safety and security. On this monday google start to users to reconfirm their privacy settings.
Google really take attention over teenager.They launched the one you tube video about teen safery tips.

Google launched the google Buzz teen safety tips video

I personally liked this video very much and every google buzz user need to watch this video at least one time.

As per this video you can set the following privacy settings.

1. Keep your private information private. Posting publicly on the Web means that whatever you post is visible to all of your followers. It shows up on your public Google profile and may appear in Google search results.

2. Know who’s following you. Buzz sends a notification after someone starts following you and you can chose to block them. If you block someone Buzz doesn’t send them a message so they won’t necessarily know they’ve been blocked.

3. Control your Google profile. Before you can post on Buzz, you have to set up a public profile, but you don’t have to share anything more than your first and last name on the profile. The video reminds you that if you have a photo associated with your Gmail account, “you can chose to use this use this as your profile photo as well” but you can change or remove the photo if you don’t want it to be public. You can also elect whether you want your list of followers to show up publicly on your profile.

4. Manage posts and comments. Teens are reminded that they can edit and delete their own posts and delete any comments on your posts and you can remove comments you’ve made on other people’s posts.

5. Know how to turn it off. If you no longer want to use Buzz, you can disable it from Gmail settings. You can also hide Buzz in Gmail but still get it on your phone.

You can check the you tube video about google buzz privacy here.

how to add a favicon to your wordpress site

In this tutorial we will show, how to add a favicon to your wordpress site, If you want to add the favicon image in your wordpress website that is really easy.

First use any photo editing tool like photoshop or gimp for creating the favicon image.

how to add a favicon to your wordpress site

how to add a favicon to your wordpress site
how to add a favicon to your wordpress site

To create the favicon image you should follow following rules

  1. By cropping or adding space around the image, make the image square.
  2. Resize the image to 16 x 16 pixels.
  3. Save the file as favicon.ico

Open your active wordpress theme and put favicon.ico image file in that folder or using ftp client you can put favicon.ico file in theme folder. After coping the favicon image file in theme folder. Open your header.php file from wordpress theme folder. and Put following code in that file.

 

 <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" type="image/x-icon" />

Dont forget to put above code under head tag. Now your are set and changed the favicon from your wordpress site. To see the new favicon image you should clear your browser cache.

 

change background for specific page and category in wordpress

WordPress tutorial, We will show how to change background for specific page and category in wordpress theme. achieve using conditional tags.

change background for specific page and category in wordpress

Many times clients demands for different background color or different images as a background. We can very easily achieve this using wordpress conditional tags.

change background for specific page and category in wordpress
change background for specific page and category in wordpress

You can use following code in your page.php or category.php file which is present in wordpress theme. If you want to change the background for specific page then open page.php file from theme folder.


<body <?php if(is_page('contact us'))&nbsp; echo 'class="contact_us"';?>>

Use following css code in your style.css file


.contact_us{

.background-color:#ccc;

}

.php_category{

.background-color:#181818;

}

If you want to use different background for your category then use following code.



<body <?php if(is_category('php''))&nbsp; echo  'class="php_category"';?>>

joomla vs drupal

When we want to choose any CMS, First two biggest cms we get in mind. That is Joomla and druapl. Both are very best CMS. I personally love both. That is all depending on you what expertise you have and what is your client is demanding.

joomla vs drupal

joomla vs drupal
joomla vs drupal

Here in this article I will help you If you are not choosen any CMS and you are confused about Joomla and Drupal. They both offers similar kind of features in their CMS in different order. If user or client side if we talk then joomla’ admin panel gives you very nice and user-friendly user interface in admin side. Drupal has admin panel with good admin panel but that is complex as compare to joomla.

Here I will first talk about Drupal. Following is a list of drupal features which I like

1. So much flexible for configuration

2. Great Seo features

3. Drupal need some time of R&D for his features and modules

4. great theme  system. Any XHTML or CSS template can be easily converted to Drupal.

5. User groups & user permissions, OpenId compliant in Version 6

6. Drupal is having lots of free addons and modules

7. Community with great support and API

8. Performance and scalability wise good.

9. No Default WYSIWYG editor for editing content- Need to free module

10. For e-commerce use Ubercart

Now I will talk about Joomla. Here is a list of features which is in Joomla

1. Very easy to install & setup

2. very user-friendly and easy for using

3. No good seo as like drupal

4. free themes and moduls

5. No User groups & permissions

6. So many modules cost you money

7. Not scalable for bigger sites

8. Default WYSIWYG editor for editing content

9. For ecommerce use Virtuemart

Conclusion: I recommend choose Drupal as CMS. Drupal is litter hard then joomla for work on and user interface side. But performance and if you see future side drupal is good.

SEO is major factor in these days for your any website for ecommerce and marketing or anything. In that scenario choose Drupal. Because Drupal is providing best options and features with SEO.

What You are thinking about Joomla and Drupal, please share with me.

10 most surprising things about iPad

ipad used for may purposes. We figure out some things which you does not know. we collected very famous list of 10 most surprising things about iPad.

most surprising things about iPad

most surprising things about iPad
most surprising things about iPad

1. It screams
The early reviews all said that the iPad was “wicked fast,” and boy, they weren’t kidding. Applications literally fly open, and browsing the Web on Safari is way faster than on the iPhone. I could get used to this.

2. It’s heavier than I thought it would be

One-and-a-half pounds sounds pretty light, especially when you consider that the flyweight MacBook Air weighs in at about 3.5 pounds. That said, the iPad felt surprisingly heavy the first time I hefted it—not so heavy that I’m bursting a blood vessel or anything, but I’m curious to see how it’ll feel after an hour or so of reading an iBook, what Apple is calling the e-books you can download onto the device.

3. Good luck reading e-books in direct sunlight
Yes, the iPad has it all over the Kindle when it comes to its eye-catching color screen and sleek page-flicking animations. The beauty of the Kindle’s black-and-white e-ink screen, however, is that text stands out quite nicely when you’re reading in the sun; on the iPad, however, the color display looks disappointingly washed out in direct sunlight, problematic for reading e-books poolside.

4. Virtual QWERTY keypad isn’t as bad as I’d feared

No, it’s nothing like typing on a real keyboard, but for me, the iPad’s virtual QWERTY keypad isn’t nearly as terrible as many had warned. I’ve managed to bang out a few decent-sized emails on the thing, and it’s certainly better than typing on the iPhone. The key, I’ve found, is to relax and let the automatic error correction do its thing; if you keep hitting backspace to fix your errors (and there will be errors, trust me), you’ll be tapping all day. That said, keep in mind that to type on the iPad, you must do one of several things:

Prop it (awkwardly) in your lap to type

Place it flat on a table—not the best solution due to the iPad’s curved back

Hold it in one hand and tap with the other, effectively slashing your possible WPM

Invest in Apple’s $79 iPad keyboard dock

Use Apple’s $39 case to prop the iPad up at a good typing angle

5. Can’t charge iPad over a USB port
First I tried it on my USB hub, then on the powered USB port on my MacBook Pro, but nope…no juice—not even when the iPad’s syncing with iTunes. Looks like the only way to charge the iPad, apparently, is using the included AC wall adapter. Good thing the iPad’s battery is rated for 10-plus hours.

Update: Actually, according to Macworld, you can charge iPad via a high-power USB port, but for low-power USB ports (something that an “older Mac, most Windows PCs and most USB hubs” don’t have, Macworld notes) the iPad will only charge (“slowly”) when it’s asleep. Still surprising in my book, but apologies for the error.

6. HD videos look amazing
Practically the first thing I did after unpacking the iPad was queue up the 720p trailer for “Avatar,” and…whoa. Absolutely gorgeous. Watching movies on the plane will never be the same again.

7. Reflections on the display are pretty distracting
The moment the wife and I were done “oohing” and “ahhing” over that “Avatar” video, we started complaining about our reflections in the iPad’s glass display. It’s not bad at all when you’re surfing or composing email, but if you’re watching a movie—and especially during a darkly lit scene—prepare to see your reflected self looking back at you. (Yes, the iPhone’s screen suffers from glare, too, but at least I couldn’t see my entire head reflected in the glass.)

8. Location-based services work fine in a pinch

One of the problems with the Wi-Fi-only iPad versus the upcoming 3G-embedded model is that it lacks A-GPS, a system that combines satellite data with cell-tower triangulation to pinpoint your location, even when you’re indoors. That said, the Wi-Fi-only version can still attempt to find where you are using nearby Wi-Fi signals, and I was impressed when my new iPad immediately zeroed in on my apartment, within half a block. Not bad.

9, The iPad makes calls, with a little help from Skype
Yes, Apple had promised that “almost” all iPhone apps would work on the iPad, but I had my doubts about Skype. Today, though, I was finally able to put Skype on the iPad to the test: I loaded it up, logged into my (for-pay) Skype Out account, and dialed 777-FILM. The next thing I heard? “Hello, welcome to Moviefone! If you know the name of the movie you want to see, press one now!” (Of course, this would all be a little more amazing if the iPad had a front-facing camera for video calls.)

10. My iPhone seems really, really small now

After testing the iPad for about an hour or so, I went to check my iPhone for a second and…yikes, what is this tiny little thing? So puny!

Source Link

How to use multiple blogs in wordpress – multisite

Earlier wordpressmu was giving support for multisite support. Through this article, I will show you, How to use multiple blogs in wordpress – multisite.

use multiple blogs in wordpress – multisite

use multiple blogs in wordpress - multisite
use multiple blogs in wordpress – multisite

As we know wordpress 3.0 beta is released yesterday and as per wordpress team they merged the classic wordpress and wordpressMU.

But when we do installation of wordpress 3.0. There is no multiblog  facility available. For using the multiblog functionality we need to to some manual changes in code.

In this article I will tell you few steps about using the multiblog functionality in wordpress 3.0 beta.

First open the wp-config file and put following lines in that

define ('WP_ALLOW_MULTISITE', true  ) ;

Use following steps also
1 First, back up your exisiting wp-config.php and .htaccess files.

2. Create a blogs.dir directory under /wp-content/
This directory is used to stored uploaded media for your additional sites and must be writeable by the web server. They should be CHOWNed and CHMODed the same as your wp-content folder.

3. Add the extra lines provided to your wp-config.php file

These lines are dynamicly generated for you based on your configuration.

Put these lines right under the wp_allow_multisite line, mostly for readability.
Note: If you are installing in a folder the base and path will contain the folder name.

4. Replace the content of your .htaccess file with the following

(If there isn’t one, then create it.)

These lines are dynamicly generated for you based on your configuration.

5. Once the above steps are completed and the new wp-config.php & .htaccess files are saved, refresh your dashboard.
You will now see a new menu section called Super Admin. The menus contained in there are for adding and managing additional sites in your network. Your base WordPress install is now the main site in your network.

Now you can do the installtion of wordpress 3.0 beta and you are able to use multiblog functionality in wordpress 3.0