Codes Meister
Setting up an android project
Wordpress Plugin Development Beginner's Information
Wordpress basic functionality is provide a blogging platform. But now a days it is not a just blogging platform but it use into many other scripts such as web forums, classic web page, CMS (Content Management System) etc.
We can extend wordpress capabilities by theme, plugin or page template.In this tutorial we learn the basic information about the wordpress plugin development.
Naming Conventions
When write your plugin code, it is best practice to follow regulations set up by wordpress.
Always choose function name unique and related to plugin name. so it doesn’t create ambiguity with other plugin.
Put comment wherever and whenever needed in code.
Plugin folder
Plugins directory you will find inside wp-content directory. Wordpress allow you to place the plug-in sigle php file directly into the wp-content/plugins directory. But it’s good practice to create a sub directory name with plugin name inside the wp-content directory. Inside you can put JS, CSS, PHP, HTML & readme.txt etc.
Understanding Actions and Filters
add_action() and add_filter() are heart of a wordpress plugins. Both functions also called as a wordpress hooks. It is very important to know the difference between both function before start wordpress plugins development.
add_action($tag,$fun) :
used to call functions in your plugin at specific time. Wordpress offers various action list.
add_filter($tag,$fun) :
used to modify different types data before any action like adding it to the database or sending it to the browser screen.More about the wordpress hooks.
Standard Plugin information
The first line of every plugin must be comment information for parsing wordpress engine. This comment line known as standard Plugin information header. Below is an example of header format.
1: <?php
2: /*3: Plugin Name: Name Of The Plugin
4: Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
5: Description: A brief description of the Plugin.
6: Version: The Plugin's Version Number, e.g.: 1.0
7: Author: Name Of The Plugin Author
8: Author URI: http://URI_Of_The_Plugin_Author
9: License: A "Slug" license name e.g. GPL2
10: */11: ?>
This header part parse by the wordpress engine and add it to the plugins screen so it can be activated, load it, and run it’s function. Without header information plugin never run.
Plugin Name line must be present in header part, without it can not work. Order of the lines is not important.
Display only posts from one category
<?php
query_posts('category_name=category1&showposts=50'.'&paged='.$paged);
while ( have_posts() ) : the_post();
echo '<li>';
the_title();
echo '</li>';
endwhile;
?>
Accessing VDU memory using C Language
#include<stdio.h>
#include<conio.h>
char far *vdmem = (char far*)0xB8000000;
void printchar(int,int,char,int);
void main()
{
int i;
clrscr();
for(i=48;i<58;i++)
printchar(0,i-48,i,112);
getch();
}
void printchar(int r,int c,char ch,int clr)
{
char far *v;
v = vdmem + r * 160 + c * 2; //Calculate Address
*v = ch; //Store Character on VDU Memory
v++;
*v = clr;//Set color attribute
}
How to add custom welcome tab in your facebook fan page
- 1. The first and most important, you need to be the administrator of the page.
- 2. Search for Static HTML : iframe tabs in the search box and reach the application
- 3. Select page to which you want to add the new tab.
- 1. Click on Edit Page Button.
- 2. Now click on Apps tab
- 3. Make sure that the tab setting is added.
- 4. You can also change the tab name
- 1. Click on View Page Button
- 2. Select your tab.
- 3. And use HTML tags to add the any content.
- 4. You can also use FBML (Facebook Markup Language) tags.
Make this tab default landing tab (Welcome Tab) :
- 1. Click on Edit Page Button.
- 2. Click on Manage Permissions tab
- 3. Select default landing tab.
How to make Homepage (Front Page) in wordpress ?
How to change screen display mode using Turbo C
#include <dos.h>
union REGS regs;
main()
{
regs.h.ah = 0;
regs.h.al = 1;
int86( 0x10, ®s, ®s );
printf("Fourty by Twenty-Five color mode.");
}
regs.h.al Screen Mode







