Flat, Shiny Keyboard Is Actually a Touch screen

April 28, 2011 Leave a comment

If you like typing on a touch screen, you’re going to love this thin Minebea Cool Leaf Keyboard.
Touch screen keybord

Strangely enough, even though the keyboard itself is one large touch screen, it doesn’t bring any of the versatility could offer. For instance, imagine substituting a video window for the number pad, or designing your own keyboard layouts for specific tasks, or even displaying tool palettes for Photoshop. Let’s hope Minebea explores that kind of versatility with this keyboard that already possesses multitouch capability.
If you’re touch typist, the inability to feel the keys might be a dealbreaker, but if you’re a germ freak, this flat and shiny keyboard will be a whole lot easier to keep clean. It must be a fingerprint magnet, as evidenced by its shiny nature and included cleaning cloth.
Touch Screen Keybord
To be released first in Japan on May 13, it’s a USB keyboard with 108 keys that only works with Windows thus far. Minebea reps say a Mac version will be available soon, and the Japanese version will be rolling out first, followed by those that contain the correct character set and key layout for English, German, French and Italian.
When you turn the keyboard off, its surface is reflective enough to be used as a mirror, perfect for looking yourself in the face and asking yourself this question: Why did I just spend $245 on this keyboard?
Check the video out.


 

Adding template page from plugin

April 18, 2011 Leave a comment

Hello readers,

I have found a very simple solutions to assign a template page to specific or all pages . According to my previous tutorial for creating the template page and placing into the wordpress current template.

For creating the template you need to add comment on the top of the page as known from my blog

/*
Template Name: new template
*/

Now what ever you want add the functionality to the page and then add header/footer as on your preference.
Now your template file is ready to run or attach to page. But now no need to copy that php file to the template folder of wordpress.
all you need to do is call the following hook

add_filter( 'page_template', 'catch_plugin_template' );

Now this will be called on every page/post load.

add_filter( 'page_template', 'catch_plugin_template' );
function catch_plugin_template($template)
{
if(is_page())
{
$template = WP_PLUGIN_DIR . '/yourpluginname/template-file.php';
return $template;
}
}

Now the above could will execute on every page and the template would be assigned to all the pages you have created.

Thank You for reading.

Auto save problem for custom variables

April 14, 2011 2 comments

Readers while developing with wordpress i found a problem with the post . I had custom variable into my metabox.

So there is a default hook to be called to save that custom variable into the database.

add_action('save_post','function_save_var');

So by default when u click publish post or update post then ‘function_save_var’ would be called .
So when u update the post and then close the page then this would work perfectly fine but then i din know
auto save would call this hook too .

So when my page would be open for a while all my values would reset and my functionality would fail. So
after a little search i got the solution.

function function_save_var()
{
       // Function without avoiding auto save.
}

The above function would fail as it would reset everything .

but then to avoid; you need to add the following code in the start of the function

if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
        return $post_id;

if the post will autosave this would directly return n do not update anything . Thus this is all solved.

Creating Template page

March 2, 2011 3 comments

Hello Readers, I am back after a long time today will give you a short tutorial for the wordpress custom template page.
Firstly remember the changes which would be done are template specific. So if the template changed ,changes are gone.
firstly go into the template folder ie

yoursiteaddres/wp-content/themes

So for now i m considering the default template for wordpress 3.0 is twentyten. Now create a empty file inside the the twenty ten folder .

new_template.php

Now we have the custom template which do not contain any code. but now you might be thinking where to access this template file . But wait this file wont show up into the wordpress admin area unless u write the following code.

/*
Template Name: new template
*/

now we could say we have a template page installed on to the wordpress current theme . You could write any html code or could copy the content from the page.php and delete the content which you don want to display . So now will add the following code.

<?php
/*
Template Name: new_template
*/
get_header();?>
 <div id="container">
 <div id="content" role="main">

      This is a  custom Template Page
      <!-- Any HTML Content Here -->
 </div>
 </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

As you can see above will give the same look as the other but here you have freedom to write any static or call any php function or any functionality you want to extend to this template or wordpress. So now we have a complete page where we could have our custom page.So now its time to access this new template page. Step1: Got the Pages->Add New Step 2: Select the new template created . Template page As you can see you will get the template page that we created into the combobox. So now do not enter any content into the page just leave blank and select the template page and publish the page. Then from the main menu you could see the menu is created and also the content you have added . Thank you all for reading hope you it could have been a useful article.

Shortcode with wordpress

February 16, 2011 Leave a comment

Hello readers here is one more article for creating a shortcode into the wordpress . Like if you want to have custom tags to be written into a post and should replace it with another function then could be achieved it in minutes ..
Say for example you want to add a tag [google] which will replace with http://www.google.com,so here we could do.
First decide what shortcode you want to name as for now we have named it [google].
Step 1:
Not time for calling the wordpress function. Yes wordpress has provided inbuilt function creating shortcode.


add_shortcode(name-of-shortcode,function-name);

This above function would call the specified function whenever wp will find the shortcode. In our case [google].


add_shortcode('google',get_google_url);

So now the get_google_url would echo the http://www.google.com url.


add_shortcode('google',get_google_url);

function get_google_url()
{
      return "http://www.google.com";
}

Oh thats done !! basic of the shortcode is done .. Thats easy now will go ahead to get parameters from the shortcode. Like if we want to add search url like http://www.google.com?q=search+value So with shortcode [google supercar] will give output like http://www.google.com?q=supercar . Could achieve by the following way

add_shortcode('google',get_google_url);

function get_google_url($atts)
{
      return "http://www.google.com/search?q=".$atts[0];
}

So now where ever you will put [google value] then it will output google search url.

but remember if there are two parameters like [google value1 value2] they would be treated as seperate parameters not one .

Hope its easy to learn wordpress .

Thanx Readers.
Ketan Mujumdar

Adding Metabox In Post

February 9, 2011 Leave a comment

Hello readers here is one more post for adding any HTML content while creating a post. Today will associate a value to a meta box like below :

Demo Meta Box

As you could see we are going to add a custom combo box and there will add certain static values and display them on the post.

Read more…

My First Plugin Development

February 8, 2011 12 comments

Hello readers this my first blog on wordpress plugin development . When i started with wordpress development i was dam tensed , i din even know how to install but then when i went into deep i got to know how its dam easy . Just follow my steps you would know how to create a plugin . Soon i would add a video tutorial for this.

Read more…

%d bloggers like this: