background preloader

Coding

Facebook Twitter

Html. Html5. Seo - HTML5 tags: how to use them correctly? Should You Use Inline-Blocks As A Substitute For Floats? When it comes to developing a site layout with css, floats do most of the heavy lifting. We use them for the big blocks like our main content and sidebar and we use them for the smaller blocks inside these big ones. Are floats always the answer? They generally work well, but sometimes they can be hard to work with. This is especially true when it comes to inside blocks like a grid of images that won’t line up as expected.

Inline-blocks are another option we can use. They mimic some of the behaviors of floats that we want, while not holding some of the issues we don’t. Inline-blocks aren’t anything new and it’s quite possible you’re already using them. What is an inline-block? Inline-block is one of the values we can assign to the display property of an element. Block elements — form boxes according to the css box-model. If you think about it, that’s not too far off from how a floated elements behaves. The Difference Between Floats and Inline-Blocks Solving the Whitespace issue Summary. Html - Add <strong> tag inside <a> or outside <a> tag. Put <strong> outside of <a> for XHTML syntax. Reference. World Wide Web Consortium (W3C) Css. Css - using background image for li. CSS Syntax. Php. $_SERVER. Template engines. RainTPL - easy php template engine.

Smarty. $compile_dir. Basic Installation. Install the Smarty library files which are in the /libs/ sub directory of the distribution. These are .php files that you SHOULD NOT edit. They are shared among all applications and only get changed when you upgrade to a new version of Smarty. In the examples below the Smarty tarball has been unpacked to: /usr/local/lib/Smarty-v.e.r/ for *nix machines and c:\webroot\libs\Smarty-v.e.r\ for the windows enviroment. Example 2.1. Required Smarty library files Smarty-v.e.r/ libs/ Smarty.class.php Smarty_Compiler.class.php Config_File.class.php debug.tpl internals/*.php (all of them) plugins/*.php (all of them) Smarty uses a PHP constant named SMARTY_DIR which is the full system file path to the Smarty libs/ directory. Here's how you create an instance of Smarty in your PHP scripts: Try running the above script. Example 2.2. Example 2.3. Example 2.4. ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; *nix: "/path1:/path2" include_path = ".

Example 2.5. Example 2.6. Note. PHP Template Engine | Smarty. Tools. Editors. Vim. How to do case insensitive search in Vim. Vim documentation: filetype. *filetype.txt* For Vim バージョン 7.4. Last change: 2013 May 25 VIMリファレンスマニュアル by Bram Moolenaar ファイル形式 *filetype* *file-type* 1. ファイル形式 |filetypes| 2. ファイル形式別プラグイン |filetype-plugins| 3. 標準で付属する形式別プラグインの解説 |ftplugin-docs| |autocmd.txt|も参照。 {Vi にはこれらのコマンドはない} ============================================================================== 1. Vimは編集しているファイルの形式を検出することができる。 *:filetype* *:filet* ファイル形式の検出を有効化するには、vimrcファイルでこのコマンドを使用する: :filetype on 新しいファイルや既存のファイルを編集する際には必ず、Vimはファイルの形式を認識 し 'filetype' オプションを設定しようと試みる。

NOTE: Vi互換とは全てのオプションがグローバルであることを意味するので、ファイル 形式識別と 'compatible' は同時に使うことはできない。 詳細: ":filetype on" コマンドは次のファイルのうち1つをロードする。 独自のファイルタイプを追加するには、下の|new-filetype|を参照。 :help ft-vim-indent :help ft-vim-syntax :help ft-man-plugin ファイル形式を自動的に検出できなかった場合や、間違った形式になってしまった場合 には、'filetype' オプションを手動で設定するか、ファイルにモード行(modeline)を 追加する選択肢がある。 :set filetype=idl この|modeline|をファイルに追加する:/* vim: set filetype=idl : */ *:filetype-plugin-on* ファイル形式別プラグインのロードを有効化するには: :filetype plugin on まだファイル形式検出が有効になっていない時には、同時に有効化される。 :filetype. Authorship. Google Authorship the Easy Way. New Method Google authorship has been made easier with new options for adding “rel=author” code that passes the Google rich snippet tools test. Step one is now extremely simple in Thesis. You have two options. The first option is to use the Thesis interface. Following this click sequence: WP Admin > Thesis > Site Options > Document Head > Additional Scripts You can simply paste this into the available area: Replace the X’s with your Google Plus number — this can be found if you visit Google+ while logged into the system… simply look at your address bar to locate your unique number.

The alternative — if you prefer you add this as a function — would be to add this to your custom_functions.php file contents: As with the first option, replace the X’s with your unique Google Plus number. The second and third steps are checklist items within your Google Plus account. In your Google Plus profile, verify that you have a public link “back” to your Thesis site. Older Method. Authorship with nofollow ? Link to your Google+ profile using rel="author" - Webmaster Tools Help. The easiest and most reliable way to enable authorship information in Google search results is to provide a verified email address on the same domain as your content. If you don't have an email address on the same domain, however, you can associate your content with your Google+ profile by following the steps on this page.

Linking your content to your Google profile is a two-step process. First, you add a link from your website or page to your Google profile. Second, you update your Google profile by adding a link back to your site. 1. Create a link to your Google profile from your webpage, like this: <a href="[profile_url]? Replace [profile_url] with the your Google Profile URL, like this: <a href=" Your link must contain the ?

2. The second step of the verification process is to add a reciprocal link back from your profile to the site(s) you just updated. To add links to your Google profile: Sign in to your Google profile. Wordpress. Function Reference/get the tags. Function Reference/get the tags Languages: English • 日本語 • 한국어 • (Add your language) Description Returns an array of objects, one object for each tag assigned to the post. If this function is used in The Loop, then no ID need be passed. Usage This function does not display anything; you should access the objects and then echo or otherwise use the desired member variables.

The following example displays the tag name of each tag assigned to the post (this is like using the_tags(), but without linking each tag to the tag view, and using spaces instead of commas): <? Parameters $id (int) (optional) Post id. Default: None Examples Show tag Images This outputs tag images named after the term_id with the alt attribute set to name. Show the First tag Name Only <? Display code bases on different tag values This code will display HTML code depending on if this post has a certain tag or tag(s). <? Function to show tags in a dropdown This function outputs tags in a dropdown. Return Values (array) Member Variables name. New Post Screen. When creating a new post on WordPress.com, you may notice that you have a variety of boxes, also known as “modules”. These modules offer customizable options for publishing your post, such as adding Tags to entry or selecting whether or not comments are allowed on your post.

Editor The Editor is where you type the content of your post. For more information on using your editor, please see this guide. ↑ Table of Contents ↑ Publish The publish module includes your Post Status, Post Visibility, and when your post was published. The Post Status shows whether a post is published or unpublished. Published – The post has been published on your blog for all to see.Scheduled – When the post’s timestamp is set in the future for automatic publishing. You can learn more about changing your Post Visibility, including password protecting a post, here.

Post Title and Permalink URL The Title and URL of a post are related by default. The post slug is the part of the URL after the date in a post’s URL. Excerpt. Categories vs. Tags. Once upon a time, WordPress.com only provided a Category option. Categories allowed for a broad grouping of post topics, but when you wanted to describe a post in more specific terms, more categories were required. That led to very long category lists inside the blog and very long lists in Categories Widgets.

So we now have tags, too. Tags are similar to categories, but they are generally used to describe your post in more detail. For example: Frequently Asked Questions We understand that it may be a bit confusing upon first glance (especially to new bloggers), so here are some common questions and answers that may help you out. Do I have to use tags? Are categories and tags hierarchical? Is Tag the same as tag ? Is there a limit to the number of tags I can have?

Is there any advantage to using tags or categories, or both? However, you don’t want irrelevant content showing up on the topics listings or search, and neither do we. Why aren’t my posts showing up on the Topics pages? Tags. Tags provide a useful way to group related posts together and to quickly tell readers what a post is about. Tags also make it easier for people to find your content. Tags are similar to, but more specific than, categories. The use of tags is completely optional. For more information on the differences between tags and categories please check out this support doc. Depending on the theme and widgets you have activated, tags can be displayed at the top or bottom of posts, on the individual post view, and/or in the sidebar. You can assign and/or add new tags to posts before you publish them using the Post Tags module to the bottom right of the post editor: You can add tags one at a time by clicking the Add button or hitting the Enter/Return key on your keyboard after typing each tag.

To remove a tag from the post, click the small X icon next to the tag. To choose from your most commonly used tags, click Choose from the most used tags. . ↑ Table of Contents ↑ Bulk Actions Topic Listings. Plugins. Support » Removing link rel='prev' and link rel='next' using all in one SEO. Unix. Recursively Search All Files For A String. Grep -r "word" . 1996: SUMMARY: pwd vs. $cwd. Social. Widget builder. Pinterest. Tweet Button.

By using the Tweet Button, you agree to the Developer Rules of the Road. Overview The Tweet Button is a small widget which allows users to easily share your website with their followers. This page is for developers and users who wish to build their own Tweet Buttons. If you are looking for a quick way to build a Tweet Button for your website you can visit our Twitter Button Resources Page. If you have questions after reading this page try the Tweet Button FAQ. User Interaction The user interaction flow for the Tweet Button was designed to be as streamlined as possible and easy to use for both developers, website owners and users. The steps a user goes through when using the Tweet Button are: The user clicks the Tweet Button The user is asked to login to Twitter if they aren't already. Detect user interaction Ways to add the Tweet Button to your website There are three ways you can add the Tweet Button to your webpage, though we highly encourage using the Javascript version.

Using Javascript. Give access to our crawler in robots.txt file - AdSense Help. The Web Robots Pages. In a nutshell Web site owners use the /robots.txt file to give instructions about their site to web robots; this is called The Robots Exclusion Protocol. It works likes this: a robot wants to vists a Web site URL, say Before it does so, it firsts checks for and finds: User-agent: * Disallow: / The "User-agent: *" means this section applies to all robots. There are two important considerations when using /robots.txt: robots can ignore your /robots.txt. So don't try to use /robots.txt to hide information. See also: The details The /robots.txt is a de-facto standard, and is not owned by any standards body. In addition there are external resources: The /robots.txt standard is not actively developed. The rest of this page gives an overview of how to use /robots.txt on your server, with some simple recipes. How to create a /robots.txt file Where to put it The short answer: in the top-level directory of your web server.

Data-Vocabulary.org. 5 Microdata. Microdata 5.1 Introduction 5.1.1 Overview This section is non-normative. Sometimes, it is desirable to annotate content with specific machine-readable labels, e.g. to allow generic scripts to provide services that are customised to the page, or to enable content from a variety of cooperating authors to be processed by a single script in a consistent manner. For this purpose, authors can use the microdata features described in this section. Microdata allows nested groups of name-value pairs to be added to documents, in parallel with the existing content. 5.1.2 The basic syntax At a high level, microdata consists of a group of name-value pairs. To create an item, the itemscope attribute is used.

To add a property to an item, the itemprop attribute is used on one of the item's descendants. Here there are two items, each of which has the property "name": <div itemscope><p>My name is <span itemprop="name">Elizabeth</span>. Properties generally have values that are strings. 5.1.3 Typed items.

Breadcrumb microdata description · Data-Vocabulary.org. Error document. PHP to handle HTTP Status Codes for ErrorDocument. The php part of this article is based on my Advanced WordPress 404.php article from 2008. Many of the following ideas came out of the research performed to enumerate every single Apache ErrorDocument, including learning how to view the defaults and many cool tricks for htaccess. The PHP HTTP ErrorDocument Handler ^ Just save this as /err.php or whatever. The best is to put it in a cgi-bin script-alias directory under your DOCUMENT_ROOT like /cgi-bin/e.php but most people don't know how. That way you can setup some advanced stuff in a /cgi-bin/.htaccess file. Advantages and Reasons for Using ^ Fast, HTTP Protocol Compliance, protection.

Note: If you are installing this on a non-linux/non-apache machine/server, you will need to read your products documentation for custom error documents. Htaccess ErrorDocument Tips ^ The thing is, how do you setup your website to use this php file to be able to handle all those HTTP Status Codes gracefully? Using Redirect in .htaccess to trigger Errors ^ .htaccess - custom 404 error htaccess. .htaccess Error Documents for Beginners. Apache allows you to customize the server at the directory level, using .htaccess files. This tutorial explains how to use them to serve custom 404 error (page not found), and other common error pages, to your users.

In Apache, you can set up each directory on your server individually, giving them different properties or requirements for access. And while you can do this through normal Apache configuration, some hosts may wish to give users the ability to set up their own virtual server how they like. And so we have .htaccess files, a way to set Apache directives on a directory by directory basis without the need for direct server access, and without being able to affect other directories on the same server.

This has a fair few uses. [Aside: If you set up your custom error page to email you whenever a page isn't found, remember that "/favicon.ico" requests failing doesn't mean that a page is missing. Setting up your htaccess file is a piece of cake. ErrorDocument 404 /404.html. Custom error pages using .htaccess - Totally PHP. Home > Tutorials > Custom error pages using .htaccess Introduction We've all seen the dreaded Error 404 message - the result of broken links and mistyped URLs.

You've probably been on some websites where the error pages are customised with their own logo and message, and I'm sure you'll agree that it looks far more professional than the standard one. In this article we'll show you how to use Apache's .htaccess file to make your own customised error 404 pages. Create the .htaccess file Create a new text file on your computer, and call it "htaccess.txt". <Files .htaccess> order allow,deny deny from all </Files> ErrorDocument 404 /errordocs/error404.htm The first part stops people viewing your .htaccess file.

Create the 404 page Now you need to create the 404 page. Once it's done, login to your webspace with your FTP client, and create a new folder called "errordocs". Trying it out Now you need to see if it works. If it worked then you can now make a proper 404 page. Taking it further. 7 Version Control Systems Reviewed. How to redirect your 404 error to a custom page - Htaccess Basics. How to redirect your 404 error to a custom page - Htaccess Basics.