Ina Code Blog

bunch of code in one place
Nov
14

Insert favicon to your web page

Posted by admin in tips

What is a favicon? A favicon is a small 16×16px image that appears next to the URL of your web page in browser location bar and bookmarks.

  1. Create favicon.ico (create .gif or .jpg image and rename it to .ico) .
  2. Insert the following HTML code inside the <head> tag of your web page:

    <link rel=”shortcut icon” href=”favicon.ico”>

That’s it!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Nov
13

Google sitemaps generator plugin for WordPress

Posted by admin in wordpress

Building a sitemap is very useful as it informs search engines about pages on your website that are available for crawling. Sitemap is an XML file that lists URLs for a site along with additional metadata about each URL so that search engines can more intelligently crawl your website. If you are using Wordpress this plugin does everything.

Main features:

  • Customize all settings in Wordpress admin page
  • Automatic sitemap generation for all types of pages
  • Calculates a priority for each post, based on the number of comments
  • Tells Ask.com, Google and Yahoo about changes via ping
  • Multi language support

Set it up:

  1. Download the plugin: google-sitemap-generator.zip
  2. Unzip and upload the folder to your plugin folder (usually: /wp-content/plugins/).
  3. Activate the plugin.
  4. Go to ‘Options -> Sitemap’ and customize it.
  5. Click on ‘Rebuild Sitemap’ to create your sitemap for the first time.
    Tip: Make your blog directory writable OR create two files named sitemap.xml and sitemap.xml.gz and make them writable via CHMOD. In most cases, your blog directory is already writable so you don’t need to do anything.

Plugin’s homepage.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Nov
12

Cforms II plugin for Wordpress

Posted by admin in wordpress

This Wordpress plugin covers just about everything you need in a contact form. It’s fully configurable and realy easy to use.

Main features:

  • Ajax supported form submission
  • Multiple forms on one or many pages / posts
  • WP Dashboard Support (showing last 5 entries)
  • “WP Comment/Message to author” Feature (!)
  • Full localization support
  • Tell-A-Friend functionality
  • File attachments / Upload, fully configurable per form
  • Captcha verification
  • Role Manager support
  • Database based tracking of submitted data
  • Cloning / duplication of forms
  • Drag and drop form management
  • Set of predefined themes

Set it up:

  1. Download the plugin: cforms.zip
  2. Unzip and upload the folder to your plugin folder (usually: /wp-content/plugins/).
  3. Activate the plugin.
  4. In main menu link ‘cforms II’ appears. Click it to add/edit forms and its settings.
  5. Insert the following code to your posts or pages (X is the id of your form):

    <!–cformsX–>

Plugin’s homepage.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Nov
11

Sticky menu plugin for Wordpress

Posted by admin in wordpress

Have you ever try to create more complex web page with Wordpress? If yes, then you probably came accross problem with menu’s as Wordpress creates them automaticaly. With Sticky menu plugin you can create as many custom menu’s as you need and put them exactly where you need it. And it’s very easy to use!

  1. Download the plugin: sticky_menu.zip
  2. Unzip and upload the folder to your plugin folder (usually: /wp-content/plugins/).
  3. Activate the plugin.
  4. Go to ‘Manage -> Sticky Menu’ and create your custom menu.
  5. Insert the following code to your theme files where you want the created menu to aprear (index.php, archive.php):

    $menu = new stickymenu;
    $menu->display_menu(’menu=Main’); //Display’s menu named ‘Main’

Plugin’s homepage.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Nov
10

Flexible upload of images for Wordpress

Posted by admin in wordpress

Flexible upload is very useful plugin for uploadnig images in Wordpress.

Main features:

  • Automatically resize pictures at upload
  • Let you decide whether or not to create a thumbnail and specify its size
  • Picture alignment (left, right, center)
  • Support Lightbox, Thichbox, Greybox
  • Support for picture caption
  • Optional include watermark in every uploaded picture
  • Multi-language support
  • Fully configurable

Plugin’s homepage.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Nov
6

Center page verticaly and horizontaly

Posted by admin in html / css

I have to center almost all web pages horizontaly and it is simply made by adding margin and width parameter to your container div. Then I came accross the problem to align the page also verticaly to the center of a browser. I found some suggestions with 50% width or height of divs, but the problem was that page would hide at the top of the browser window as you resize it. Sometimes it’s good to look a little in the past as I found the solution using tables (for a long time now I use nothing but divs!). Page is verticaly centered if you add the vertical-align parameter to the table tag. Below you can find full code for centering your page.

HTML code:

<html>
<head>
  <title>Center page verticaly and horizontaly</title>
</head>
<body>
<table id=”container”>
  <tr>
    <td>Contenet is centered verticaly and horizontaly.</td>
  </tr>
</table>
</body>
</html>

CSS code:

html, body, #container {
  height:100%;
  margin: 0;
  padding: 0;
  border: none;
  text-align: center;
}
#container {
  margin: 0 auto;
  text-align: left;
  vertical-align: middle;
  width: 400px;
}

Here is example.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]