Tuesday, January 20, 2009

What's a Teaser?

 

What's a Teaser?

This is from a post by zoon_unit on January 10, 2007.

A "teaser" is essentially a snippet of text designed to tell the user the content of a post without reading the entire post. Since most writers have embraced the common journalistic style of explaining the nature of an article in the first paragraph, teasers work well for most articles.

Here's what happens:

  1. A node contains an entire article.
  2. Drupal's "teaser" function, "node_teaser," strips the first x number of characters from the article and makes it available as content. The exact length is determined by the value set in Drupal's Administer » Content management >> Post settings.
  3. So, you list a bunch of articles on a page. You want the articles to display only a snippet of text from the full article, so that you can fit a bunch of articles on a page without requiring the user to page down through tons of text. If the user likes the "teaser" content of the article, they will click on the article's title and see the full content of the article on its own page. In a sense, teasers function like summaries of an article, except that the software decides where to cut off the text. If you want to determine where a teaser article ends, you can insert the comment tag to instruct Drupal exactly where to fashion the break between full text and teaser text.
 

Make your 404 pages more useful

 

Make your 404 pages more useful

Tuesday, August 19, 2008 at 10:13 AM

Your visitors may stumble into a 404 "Not found" page on your website for a variety of reasons:
  • A mistyped URL, or a copy-and-paste mistake
  • Broken or truncated links on web pages or in an email message
  • Moved or deleted content
Confronted by a 404 page, they may then attempt to manually correct the URL, click the back button, or even navigate away from your site. As hinted in an earlier post for "404 week at Webmaster Central", there are various ways to help your visitors get out of the dead-end situation. In our quest to make 404 pages more useful, we've just added a section in Webmaster Tools called "Enhance 404 pages". If you've created a custom 404 page this allows you to embed a widget in your 404 page that helps your visitors find what they're looking for by providing suggestions based on the incorrect URL.


Example: Jamie receives the link www.example.com/activities/adventurecruise.html in an email message. Because of formatting due to a bad email client, the URL is truncated to www.example.com/activities/adventur. As a result it returns a 404 page. With the 404 widget added, however, she could instead see the following:



In addition to attempting to correct the URL, the 404 widget also suggests the following, if available:
  • a link to the parent subdirectory
  • a sitemap webpage
  • site search query suggestions and search box

How do you add the widget? Visit the "Enhance 404 pages" section in Webmaster Tools, which allows you to generate a JavaScript snippet. You can then copy and paste this into your custom 404 page's code. As always, don't forget to return a proper 404 code.

Can you change the way it looks? Sure. We leave the HTML unstyled initially, but you can edit the CSS block that we've included. For more information, check out our guide on how to customize the look of your 404 widget.

This feature is currently experimental -- we might not provide corrections and suggestions for your site but we'll be working to improve the coverage. In the meantime, let us know what you think in the comments below or in our group discussion. Thanks for helping us make the Internet a more friendly place!

Written by Sahala Swenson, Webmaster Tools team

How to add sub-domains on Lunarpages

by Alan

How to add sub-domains For your domain?


IF your primary domain(example.com) is hosted on Lunarpages

  • eg. zhipeng-zhang.com(NameServer on Lunarpages) : just do the normal steps in the Cpanel under sub-domain section, make sure do not make redirection.
IF your primary domain(example.com) is NOT hosted on Lunarpages


  • eg. web80s.net(NameServer on Godaddy): I wish to have subdomain demo.web80s.net. Add a A Record being host is demo, IP is 67.210.123.65(Web Server: topaz.lunarbreeze.com 's IP).
  • Go to the cpanel where web80s.net is hosted, add sub-domain demo.web80s.net.

In this way when demo.web80s.net is requested to get resolved, it first goes to web80s.net, then goes to second level domain demo.web80s.net. Becuase Godady hosts domain web80s.net, so when demo.web80s.net is requested in the browser, godaddy looks for web80s.net first, then it looks for demo.web80s.net. Finally it checks the ARecord if host "demo" exist. As we already added the ARecord host "demo" being IP is 67.210.123.65(Web Server). So the http request gest response from the web server where web80s.net resides.


zhipengzhang.net (NameServer on Lunarpages) : same steps to take as zhipeng-zhang.com. Because its name server is on Lunarpages.




A Few Catch ups
An A Record(IP address) : It is a DNS record that can be used to point your domain name and host names to a static IP address. You can use a A record whenever you have to assign a specific IP to a domain name or to a sub-domain.
A MX (Mail Exchange) : It is a type of resource record in the Domain Name System specifying how Internet e-mail should be routed. It point to the servers that should receive e-mail, and their priority relative to each other.
A CNAME (Canonical Name) : It allows you to have as many subdomains as you wish without having to specify the IP for every record.

SSL Connections at google Apps

 

SSL Connections

Print
This article describes a feature for Premier and Education Editions only.

SSL (Secure Sockets Layer) is a protocol that provides secure communications on the Internet for such things as web browsing, e-mail, instant messaging and other data transfers. If you enable SSL connections, Google will force HTTPS (Hypertext Transfer Protocol Secure) when your users access most services in Google Apps. Some access points do not offer SSL.

SSL varies by service:

Email - Yes.
Calendar - Yes.
Docs - Yes.
Sites - Yes.
Chat - Yes. SSL supports Chat in Gmail. The Google Talk Client is always over a secure connection (TLS).
Video - Not available.
Start Page - Not available. This includes start page gadgets for email, chat, calendar, and docs account.

Additionally, as the administrator, if you access your account by linking directly from the control panel, HTTPS is not forced.

The advantage of SSL is added security for your users. If your users access Google Apps on a non-secure Internet connection, such as a public wireless or non-encrypted network, your users' accounts may be more vulnerable to hijacking. A secure connection prevents hijacking by protecting the cookie session. Cookie session hijacking refers to a situation where an impostor gains unauthorized access to cookies and seizes control of a legitimate session while it is still in progress.

However, forcing HTTPS for your users can make Gmail a little slower. If you trust the security of your network, you can turn this feature off at any time. When the feature is disabled, your users will access Google Apps via HTTP (Hypertext Transfer Protocol).

To enable this feature for your domain:

  1. Log in to the control panel.
  2. Click Domain settings.
  3. Under the General tab and in the SSL section, check the box next to Enable SSL.
  4. Click Save changes.

To enable this feature for an individual email account, visit the Gmail Help Center.

Note: If you force HTTPS for your domain, your users won't be able to disable HTTPS on an individual basis. However, if you don't force HTTPS for your domain, your users can enable HTTPS when necessary.

Monday, January 19, 2009

Computer Hewlett Packard Pentium4-2.8ghz, SystemFast Full system gumtree

 
 

Computer Hewlett Packard Pentium4-2.8ghz, SystemFast Full system

Price: AUD $ 290.00
Ad ID: 100730689
  Visits: 19
Address: Springfield, Qld 4300 View map
Location: Brisbane
Date Listed: 19/01/2009

Super Fast  Hewlett  Packard  DC7100 Model Full System:
Hardwares:
_
                     
                     _Intel Pentium 4 processor 2.8Ghz Speed.
                     _1Gb Ram(1024MB RAM).MEMORY.
                     _80Gig  Hard Drive STORAGE.
                     _Dual layer DVD Writer (Copy DVD movies or CD).
                     _Vibrant 17" LCD flat SCREEN.
                     _3D Video Graphics
                     _Onboard sound with built-in speaker
                     _Superfast Gigabit ethernet network port ready for 
                       broadband internet.
                     _8 x  USB ports ( 2 Fronts & 6 Rear ).
                     _Audio speaker jack
                     _Keyboad/Optical Mouse.
                     _FULL COMPLETE SYSTEM .
Softwares:
* Genuine Microsoft Windows XP Professional Service Pack 3 with license and fully update to latest update.  
* Microsoft OFFICE07/ Windows Media Player 11/ Internet Explorer 7. * NERO Express BURNING  softwares__to burn DVD or CD. * AVG_ Antivirus  Software  for  INTERNET SECURITY.
This Super Fast Computer System is suitable for anything:  HOME/OFFICE/STUDY internet browsing, email, text chat, voice/video chat, video and DVD playback, audio playback and recording, 2D games, 3D games, 3D and video rendering tasks. With a 80gig Hard disk you can store thousands of Songs\Videos\Pictures etc.

CAN SHOW THE SYSTEM IS IN PERFECT WORKING ORDER & EXTREME FAST. READY TO USE, with Windows XP freshly installed and activated with legitimate product key on the CERTIFICATE of AUTHENTICITY which is supplied with the COMPUTER.

Mobile:  (0415) 913 871...Sell $ 290 .....  WELCOME to  Inspect or Test.

四月物语

 
 
  • 流云无声飘过――四月物语里的时光
    <

  • 落水的桃子
  • 落水的桃子  

      在东京,
      去宫崎峻美术馆时
      路过了武藏野
      朋友说,看,这就是四月物语里的武藏野
      松隆子在这里骑着她的自行车
      寻找那间书店
      
      有没有那么一天,刚刚睡醒,眼睛还迷迷糊糊,头脑中的种种烦恼就铺天盖地的涌来?似乎还是孩子的心性却已经要穿C cup,曾经是大人们的烦恼如今却变成自己要面临的问题?17岁,它不知道什么时候径自走了,就象某个早晨醒来,流云无声飘过。
      
      17岁,在那么优秀的重点中学里,偏要看喜欢的片子没用的闲书,然后说十七岁只有一次,我偏要那么干!十七岁只有一次,年级组长从那些愚蠢好学生的嘴里听到小报告,这么叛逆的宣言,岂能让这星星之火去燎原?于是,年级大会上省去姓名的批评不够,还要找来家长继续谈话,那是我的十七岁。
      
      十七岁,她却已经穿着白毛衣,干净的手扶上火车的玻璃,然后,钢琴声轻轻响起,轻轻地离开家,去了东京。
      
      干净的街道上,有披着白衣的新娘,五颜六色的雨伞遮着他们,一个,两个,三个,四个……纷纷扬扬的不是雨,不是雪,是那漫天满眼的樱花。然后,她来了。带着许许多多的家具行李和白色的镂空花纹小椅子。
      
      镜头里,我们已经和她一起沐浴在温暖的四月阳光里,和熙的风吹来,花瓣就洒落了,这是一个象她一样恬淡的午后时光。
      
      搬家,开学,认识新的朋友,她常常象小动物那样略有不安地回视别人,然后有礼貌地微笑,打招呼。腼腆羞涩,却又在不经意间露出明亮的笑容。
      
      布拉德皮特演的大河恋你看过吗?他便是飞越钓鱼。帅气的社团组长问她。布拉德皮特最后被熊杀死了,她说。原来,她,也是个有趣的女孩。
      
      落日的余晖洒在草地上,她向空中挥动鱼竿,用飞越流派的技法,一下,一下……她的笑容如此美好,于是鱼线仿佛变成了风筝线,去向无尽的天空。
      
      直到有一天,书店里,发现她的惊慌超出了平日镇定的界限,她闪烁的目光里竟然流出爱恋,不禁生出疑问,她是不是喜欢了那个帅气的书店店员?她怎么会喜欢上那瘦高的陌生男孩?
      
      她骑自行车穿梭在那些有着大樱树的道路上,她做咖喱饭请邻居一起来吃,她跟好朋友谈起山崎,她用小提琴拉出激越的曲子……然后,她骑着车出现在田野里,身影越来越小――那是她内心的回忆,我们跟着一起走了进去。
      
      少女的回忆,就像揭开一个谜底。也许,我们每个人心中都曾有过这样一个谜语。喜欢上一个人,喜欢他干净的笑,他打篮球以后微湿的头发,他弹吉他的样子,他的高个子,和有他在的那片青春时光,青涩心事……
      
      那时的心情如此干净,就像她穿着发亮的淡蓝裙子坐在绿色的原野里,低着头,然后风吹起少女的长发,闪动的阳光中发丝轻舞,她轻吻着武藏野那本书,那本和他相关的书,幸福就像她脸上的光影那样,明媚动人。
      
      看到这样的画面,似乎每个定格都可以变成一幅淡彩写意,然后,心中杂陈出零星的斑驳。为什么隔壁姐姐说她每次恋爱都像第一次,北影的哥哥说他的喜欢就是发生关系,可是我却那么那么难去喜欢上一个人?不不,我说的不是partner,我也不要门当户对举案齐眉,我说的就是淡彩样的喜欢,就像那年轻的,不知天高地厚的皮肤,就像那时简陋而真切的心情。
      
      只可惜,那样的心情,就像我们的年华,已经散落在天涯。
      
      成长就像从冥府回来时无法回头的路,我们谁也无法回头,惟有继续前行。路途中会看到很多真相,如同花坛背后的粪肥,美食背后的厨房,那些都和我们原先想的不一样,我们也并不一定想知道究竟是怎样,只是它们就像一扇扇窗,在那里,就总会被我们的好奇推开。即使还能保持自己的心,那未见世事时的心情,却再也回不去了……也许,这就是成长留下的代价吧。
      
      
      
      我看到武藏野
      仿佛也看到你
      昨天那个穿着校服羞涩微笑的你
      还站在那里
      从未离开
      青春
      还在那里
      
      十七岁真的只有一次
      
      我们忘记的时光
      四月物语会记得……
  • Sunday, January 18, 2009

    .htaccess Tutorial

     
     

    .htaccess Tutorial
    Part 1 - Introduction

    Introduction

    In this tutorial you will find out about the .htaccess file and the power it has to improve your website. Although .htaccess is only a file, it can change settings on the servers and allow you to do many different things, the most popular being able to have your own custom 404 error pages. .htaccess isn't difficult to use and is really just made up of a few simple instructions in a text file.

    Will My Host Support It?

    This is probably the hardest question to give a simple answer to. Many hosts support .htaccess but don't actually publicise it and many other hosts have the capability but do not allow their users to have a .htaccess file. As a general rule, if your server runs Unix or Linux, or any version of the Apache web server it will support .htaccess, although your host may not allow you to use it.

    A good sign of whether your host allows .htaccess files is if they support password protection of folders. To do this they will need to offer .htaccess (although in a few cases they will offer password protection but not let you use .htaccess). The best thing to do if you are unsure is to either upload your own .htaccess file and see if it works or e-mail your web host and ask them.

    What Can I Do?

    You may be wondering what .htaccess can do, or you may have read about some of its uses but don't realise how many things you can actually do with it.

    There is a huge range of things .htaccess can do including: password protecting folders, redirecting users automatically, custom error pages, changing your file extensions, banning users with certian IP addresses, only allowing users with certain IP addresses, stopping directory listings and using a different file as the index file.

    Creating A .htaccess File

    Creating a .htaccess file may cause you a few problems. Writing the file is easy, you just need enter the appropriate code into a text editor (like notepad). You may run into problems with saving the file. Because .htaccess is a strange file name (the file actually has no name but a 8 letter file extension) it may not be accepted on certain systems (e.g. Windows 3.1). With most operating systems, though, all you need to do is to save the file by entering the name as:

    ".htaccess"

    (including the quotes). If this doesn't work, you will need to name it something else (e.g. htaccess.txt) and then upload it to the server. Once you have uploaded the file you can then rename it using an FTP program.

    Warning

    Before beginning using .htaccess, I should give you one warning. Although using .htaccess on your server is extremely unlikely to cause you any problems (if something is wrong it simply won't work), you should be wary if you are using the Microsoft FrontPage Extensions. The FrontPage extensions use the .htaccess file so you should not really edit it to add your own information. If you do want to (this is not recommended, but possible) you should download the .htaccess file from your server first (if it exists) and then add your code to the beginning.

    Custom Error Pages

    The first use of the .htaccess file which I will cover is custom error pages. These will allow you to have your own, personal error pages (for example when a file is not found) instead of using your host's error pages or having no page. This will make your site seem much more professional in the unlikely event of an error. It will also allow you to create scripts to notify you if there is an error (for example I use a PHP script on Free Webmaster Help to automatically e-mail me when a page is not found).

    You can use custom error pages for any error as long as you know its number (like 404 for page not found) by adding the following to your .htaccess file:

    ErrorDocument errornumber /file.html

    For example if I had the file notfound.html in the root direct
    ory of my site and I wanted to use it for a 404 error I would use:

    ErrorDocument 404 /notfound.html

    If the file is not in the root directory of your site, you just need to put the path to it:

    ErrorDocument 500 /errorpages/500.html

    These are some of the most common errors:

    401 - Authorization Required
    400 - Bad request
    403 - Forbidden
    500 - Internal Server Error
    404 - Wrong page

    Then, all you need to do is to create a file to display when the error happens and upload it and the .htaccess file.

    Part 2

    In part 2 I will show you how to use some of the other .htaccess functions to improve your website.

     

    Part 2 - .htaccess Commands

    Introduction

    In the last part I introduced you to .htaccess and some of its useful features. In this part I will show you how to use the .htaccess file to implement some of these.

    Stop A Directory Index From Being Shown

    Sometimes, for one reason or another, you will have no index file in your directory. This will, of course, mean that if someone types the directory name into their browser, a full listing of all the files in that directory will be shown. This could be a security risk for your site.

    To prevent against this (without creating lots of new 'index' files, you can enter a command into your .htaccess file to stop the directory list from being shown:

    Options -Indexes

    Deny/Allow Certian IP Addresses

    In some situations, you may want to only allow people with specific IP addresses to access your site (for example, only allowing people using a particular ISP to get into a certian directory) or you may want to ban certian IP addresses (for example, keeping disruptive memembers out of your message boards). Of course, this will only work if you know the IP addresses you want to ban and, as most people on the internet now have a dynamic IP address, so this is not always the best way to limit usage.

    You can block an IP address by using:

    deny from 000.000.000.000

    where 000.000.000.000 is the IP address. If you only specify 1 or 2 of the groups of numbers, you will block a whole range.

    You can allow an IP address by using:

    allow from 000.000.000.000

    where 000.000.000.000 is the IP address. If you only specify 1 or 2 of the groups of numbers, you will allow a whole range.

    If you want to deny everyone from accessing a directory, you can use:

    deny from all

    but this will still allow scripts to use the files in the directory.

    Alternative Index Files

    You may not always want to use index.htm or index.html as your index file for a directory, for example if you are using PHP files in your site, you may want index.php to be the index file for a directory. You are not limited to 'index' files though. Using .htaccess you can set foofoo.blah to be your index file if you want to!

    Alternate index files are entered in a list. The server will work from left to right, checking to see if each file exists, if none of them exisit it will display a directory listing (unless, of course, you have turned this off).

    DirectoryIndex index.php index.php3 messagebrd.pl index.html index.htm

    Redirection

    One of the most useful functions of the .htaccess file is to redirect requests to different files, either on the same server, or on a completely different web site. It can be extremely useful if you change the name of one of your files but allow users to still find it. Another use (which I find very useful) is to redirect to a longer URL, for example in my newsletters I can use a very short URL for my affiliate links. The following can be done to redirect a specific file:

    Redirect /location/from/root/file.ext http://www.othersite.com/new/file/location.xyz

    In this above example, a file in the root directory called oldfile.html would be entered as:

    /oldfile.html

    and a file in the old subdirectory would be entered as:

    /old/oldfile.html

    You can also redirect whole directoires of your site using the .htaccess file, for example if you had a directory called olddirectory on your site and you had set up the same files on a new site at: http://www.newsite.com/newdirectory/ you could redirect all the files in that directory without having to specify each one:

    Redirect /olddirectory http://www.newsite.com/newdirectory

    Then, any request to your site below /olddirectory will bee redirected to the new site, with the
    extra information in the URL added on, for example if someone typed in:

    http://www.youroldsite.com/olddirecotry/oldfiles/images/image.gif

    They would be redirected to:

    http://www.newsite.com/newdirectory/oldfiles/images/image.gif

    This can prove to be extremely powerful if used correctly.

    Part 3

    In part 3 I will cover a few other uses of the .htaccess file including password protection.

     

    Part 3 - Password Protection

    Introduction

    Although there are many uses of the .htaccess file, by far the most popular, and probably most useful, is being able to relaibly password protect directories on websites. Although JavaScript etc. can also be used to do this, only .htaccess has total security (as someone must know the password to get into the directory, there are no 'back doors')

    The .htaccess File

    Adding password protection to a directory using .htaccess takes two stages. The first part is to add the appropriate lines to your .htaccess file in the directory you would like to protect. Everything below this directory will be password protected:

    AuthName "Section Name"
    AuthType Basic
    AuthUserFile /full/path/to/.htpasswd
    Require valid-user

    There are a few parts of this which you will need to change for your site. You should replace "Section Name" with the name of the part of the site you are protecting e.g. "Members Area".

    The /full/parth/to/.htpasswd should be changed to reflect the full server path to the .htpasswd file (more on this later). If you do not know what the full path to your webspace is, contact your system administrator for details.

    The .htpasswd File

    Password protecting a directory takes a little more work than any of the other .htaccess functions because you must also create a file to contain the usernames and passwords which are allowed to access the site. These should be placed in a file which (by default) should be called .htpasswd. Like the .htaccess file, this is a file with no name and an 8 letter extension. This can be placed anywhere within you website (as the passwords are encrypted) but it is advisable to store it outside the web root so that it is impossible to access it from the web.

    Entering Usernames And Passwords

    Once you have created your .htpasswd file (you can do this in a standard text editor) you must enter the usernames and passwords to access the site. They should be entered as follows:

    username:password

    where the password is the encrypted format of the password. To encrypt the password you will either need to use one of the premade scripts available on the web or write your own. There is a good username/password service at the KxS site which will allow you to enter the user name and password and will output it in the correct format.

    For multiple users, just add extra lines to your .htpasswd file in the same format as the first. There are even scripts available for free which will manage the .htpasswd file and will allow automatic adding/removing of users etc.

    Accessing The Site

    When you try to access a site which has been protected by .htaccess your browser will pop up a standard username/password dialog box. If you don't like this, there are certain scripts available which allow you to embed a username/password box in a website to do the authentication. You can also send the username and password (unencrypted) in the URL as follows:

    http://username:password@www.website.com/directory/

    Summary

    .htaccess is one of the most useful files a webmaster can use. There are a wide variety of different uses for it which can save time and increase security on your website.