Sep
26
2008
0

YourTutorial Second Life Presentation System

The tutorials from YourTutorial are now available in Second Life, too.

With our presentation system for Second Life you can make presentations

with tutorials from YourTutorial, without any uploading in Second Life.

The system currently is still beta. We will post if the system is

ready to get.

Written by admin in: YourTutorial News | Tags: , ,
Sep
24
2008
1

Ensure that your RewriteRules are unique and existing

Imagine you have a Homepage that has a database of articles.

To make the URLs SEO-friendly you usually put something like this in your .htaccess:

RewriteRule ^([0-9A-Za-z\-\_]+)_([0-9]+)\.html$ /show_article.htm?articleId=$2&tit=$1 [QSA,L]

An URL like http://yourdomain.com/my_first_article_1.html will then lead to the article with ID 1.

But what happens if someone enters

http://yourdomain.com/my_second_article_1.html?

Then he will also be leaded to article 1 but through an other URL. This happens because the article usually is selected by the ID only.

If somebody link you with that wrong urls search engines will cache both URLs that both will lead to the same article. Thats bad for both pagerank and analysing the data.

And http://yourdomain.com/my_second_article_333.html will produce a STATUS 200 which means for

Search Engines that this article is existing.

There are two solutions two avoid this:

1. Pass the whole URI to PHP

Instead of defining single Rewrites for articles, categories, etc. you can pass the whole URI to PHP.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Non-existing files(=RewriteUrls) are redirected to index.php this way.

The index.php can interprete the the value of $_SERVER['REQUEST_URI'] which contains the whole URI without the domain. Then you can validate the entered URL and compare it with the URI you want certain pages to have, and if they are not equal you can put out a 301 redirect.

2. Check in your show_article.php if the article exist and the URL is correct

Then you can put out redirects if the URLs don’t match or the article does not exists.

$articleData=$dbModule->getArticle($articleId);

if(!isset($articleData)){
header( ‘HTTP/1.0 404 Not Found’ );
header( ‘Status: 404 Not Found’ );
require ‘your404page.php’;
header( ‘Connection: close’ );
exit();
}

//RUN actions here

$articleSEOurl=’/’.$yourutils->makeSEOurl($articleData);
if($_SERVER['REQUEST_URI']!=$articleSEOurl){
header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: “.$articleSEOurl);
header(”Connection: close”);
exit();
}
Another cool side effect of the second solution is, that if you run actions (make_comment, new_article)

before you are making the 301 redirect, something like this:

http://yourdomain.com/show_article.php?id=4&action=make_comment

will cause a new comment and after that the user is again redirected to the SEO friendly URL.

I think this is a very elegant way to keep the browser’s address bar clean.

Written by admin in: Programming, SEO | Tags: , , , , , ,
Sep
24
2008
0

YourTutorial Widget for Opera released

Today, Opera approved the official YourTutorial Widget for Opera 9.5 .

The Widget is called “YourTutorialExplorer”.

YourTutorial Explorer is the best way to find tutorials from YourTutorial quickly.
Just enter a search phrase in the text field and you get all tutorials
from YourTutorial about that topic immediately.

Check it out:

YourTutorial Explorer for Opera 9.5

Written by admin in: YourTutorial News | Tags:
Sep
24
2008
2

Why tableless layout does not mean painless layout

If you look after “tableless layout” in google, you will find many articles about why you should not use tables for layout purposes.

Indeed, the most occurrences of tables in html code should be replaced by ul’s or div’s, especially for horizontal lists. But if you want to display a tabular structure, like spredsheets, table’s still are the best solution, and finally that was the original purpose for them.

Working with divs there with “display:table” produces unclear code and you never know which div is a row and which one is a cell without switching between html and css permanently(or you call everything “td” or “tr”). In addition it’s still not working properly in some browsers. Of course, it would be nice to change the full layout with css only, but i think in practice it’s also important that you understand your own code, especially after a longer period of time. Doing everything with css also means that your css will grow and grow, and i think it’s hard to choose clear and recognizable id- and class-names for big projects, so the css will often become unclear, too.

Working with “float:left|right” is a good solution in some cases, but i think it’s still more harder to imagine and to debug if something is wrong. “display:absolute” makes the layout absolute static.

Some people say that some readers, especially from disabled people, cannot handle tables. I cannot believe that. Since there was a time where almost the whole web was made of tables, the readers should have learned to convert tables into simpler structures today.

Tables should not be used to place an icon in front of a link, or to make horizontal lists, but i think in some cases its just the easiest way to realize some type of layouts. If you earn your keep with webdesign time will be money!

Learn more about tableless layout:

http://www.w3.org/2002/11/homepage

http://webdesign.about.com/od/css/a/aa102102a.htm

Written by admin in: Programming | Tags:
Sep
22
2008
0

Add tutorials to your Blog

With YourTutorial you can easily create tutorials and add them into your Blog.

An example:

How to add a tutorial to your blog

  1. Visit YourTutorial
  2. Select a tutorial
  3. Copy the code and paste it into your blog
    Written by admin in: YourTutorial News | Tags: , , , ,
    Sep
    22
    2008
    0

    Round corners pure css solution

    Css 3 affords the posibility to make the corners of divs or tables round without using images.

    However, some Browsers already support that features:

    Safari:

    -webkit-border-top-left-radius:10px;
    -webkit-border-top-right-radius:0px;
    -webkit-border-bottom-left-radius:10px;
    -webkit-border-bottom-right-radius:10px;

    Konqueror:
    -khtml-border-radius-topleft:10px;
    -khtml-border-radius-topright:0px;
    -khtml-border-radius-bottomleft:10px;
    -khtml-border-radius-bottomright:10px;

    Mozilla:

    -moz-border-radius-topleft:10px;
    -moz-border-radius-topright:0px;
    -moz-border-radius-bottomleft:10px;
    -moz-border-radius-bottomright:10px;

    Regards,

    Philipp from YourTutorial

    Written by admin in: Programming | Tags:
    Sep
    21
    2008
    0

    Why we switched to Wordpress Blog

    Before i discovered Wordpress, i was using a blog hosted on blogspot. The problem of using Blogspot or other Blog-Services for your business is, that you get an url inside the domain of the Blog-Service, in our case the url was yourtutorialnet.blogspot.com. So every link to my blog resulted in a upvaluation of blogspot.com, which is renownedly the Blog-Service of Google.

    Google does not need your help to make their pagerank bigger, because they calculate the pagerank by theirselves! So think about installing an independant blog on your host so the blog can be reached by an url inside your domain. Our Blog now is accessible under http://yourtutorial.net/blog/. Now every link to our blog results in an upvaluation of our own domain.

    I can advise Wordpress, its really easy to install, the administration is exemplary and their are many themes out there. Visit http://wordpress.org and get your really-own Blog!

    Regards,

    Philipp from YourTutorial

    Written by admin in: YourTutorial News | Tags: , , , ,
    Sep
    21
    2008
    0

    Welcome Back

    Welcome back to our new Blog!

    Written by admin in: YourTutorial News |
    Terms of Use |  Privacy Policy |  Blog |  Contact