google informacia o webe

V tejto téme sa nachádzajú šablóny (templaty, vzhľady) pre Etomite.

Moderátor: Moderators

Používateľov profilový obrázok
Marek Adamec
Medium Star
Medium Star
Príspevky: 246
Dátum registrácie: Pi Dec 28, 2007 7:58 pm
Bydlisko: Dubnica nad Váhom
Kontaktovať používateľa:

google informacia o webe

Príspevok od používateľa Marek Adamec »

Ako sa da vlozit informacia, text o svojej web stranke do vyhladavaca google... lebo ked zadam do vyhladavaca slovo navrchol tak mi najde moju web stranku ale prida knej takyto text ako je na obrazku.

Obrázok

Chcel by som tam vlozit svoj vlastny text informaciu ktoru bude zobrazovat ked vyhlada moju stranku. da sa to spravit nejako?
Používateľov profilový obrázok
_rasel^
ETOMITE Admin
ETOMITE Admin
Príspevky: 1122
Dátum registrácie: Ut Sep 20, 2005 1:03 am
Bydlisko: Košice (SR)
Kontaktovať používateľa:

Re: google informacia o webe

Príspevok od používateľa _rasel^ »

Nedá sa to priamo ovplyvniť, len nepriamo: použitím snippetu metatagextra, kde je popis webu a dúfať, že ho Google zoberie za svoj, alebo krajším zdrojovým kódom príspevkov napr. použitím Texy (pozrri sa ako vyzerá teraz, nie je príliš optimalizovaný), tým sa docieli aj to, že Google bude lepšie indexovať celú stránku.
..:: Etomite CMS → Rulezzz !.!.!. ::..
Používateľov profilový obrázok
Marek Adamec
Medium Star
Medium Star
Príspevky: 246
Dátum registrácie: Pi Dec 28, 2007 7:58 pm
Bydlisko: Dubnica nad Váhom
Kontaktovať používateľa:

Re: google informacia o webe

Príspevok od používateľa Marek Adamec »

kde by som mal umiestnit ten metatagextra?
takto vypada moj templat ktory pouzivam:

Kód: Vybrať všetko

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="alternate" type="application/atom+xml" title="Meta Atom Feed" href="http://www.navrchol.sk/index.php?id=411" />

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="templates/andreas/01/andreas01.css" media="screen" title="andreas/01 (screen)" />
<title>[(site_name)] :: [*pagetitle*] :: Nechaj sa in&#353;pirova&#357; a zme&#328; svoj &#382;ivotný &#353;týl! :: </title>
</head>
<body>
<div id="wrap">
{{googlereklama}}


<p align="center">
<img border="0" src="http://www.navrchol.sk/obrazky/logonavrchol.PNG" alt="nechaj sa inšpirova&#357; " width="759" height="120">



<div id="avmenu">
<h2 class="hide">Menu:</h2>
<ul>
[[ListMenu?LM_node=0]]

{{oficialny partneri}}
{{menu2}}





</ul>
</div>

<div id="content">
<h2>[*longtitle*]</h2>
[*content*]

</div>

<div id="footer">

{{indexdole}}

</div>



<!--webbot bot="HTMLMarkup" endspan --></b></font></td>
  </tr>
</table>

</body>

</div>
</body>
</html>
A ako by som ho mal vyplnit? ja som uz vo svojej instalacii etomite mal snippet metatagextra a obsahuje toto:

Kód: Vybrať všetko

/*
Snippet Title:     MetaTagsExtra
Snippet Version:   2.2
Etomite Version:   0.6 +

Description:
  Returns XHTML for document meta tags: 
     Content-Type, Content-Language, Generator,
     Title, Description, Keywords, Abstract, Author, Copyright, 
     Robots, Googlebot, Cache-Control, Pragma, Expires, Last Modified,
     Distribution and Rating.
  Can also return XHTML for Dublin Core Metadata Initiative meta tags:
     DC.format, DC.language, DC.title, 
     DC.description, DC.subject, DC.title.alternative,
     DC.publisher, DC.creator, DC.rights,
     DC.date.created, DC.date.modified, DC.date.valid and DC.identifier.
  Can also return the GeoURL and GeoTags meta tags:
     DC.title, ICBM, geo.position, geo.placename and geo.region.

Snippet Author:
  Miels with mods by Lloyd Borrett (lloyd@borrett.id.au)

Version History:
  1.3 - Lloyd Borrett added the Robots meta tag based 
  on the idea in the SearchableSE snippet by jaredc

  1.4 - Lloyd Borrett added the Abstract meta tag
  based on the Site Name and the Long Title.
  Also added the Generator meta tag based on the Etomite version details.
  The Robots meta tag is now only output if the document is non-searchable,
  to reduce XHTML bloat. The Googlebot meta tag is now also output 
  when the document is non-searchable.

  1.5 - Lloyd Borrett added no-cache directives via the Cache-Control 
  and Pragma meta tags if the document is non-cacheable.
  Abstract meta tag uses the document description if long title not set.
  Cleaned up some other tests.

  1.6 - 2006-01-26 - Lloyd Borrett cleaned up some code.

  1.7 - 2006-01-27 - Lloyd Borrett
  Added support for the Distribution and Rating meta tags.
  Copyright meta tag can now include a year range being from either 
  a site creation year to the current year, or from the year the 
  document was created to the current year, e.g. 2005-2006.
  Added ability to specify a site wide author, and thus be able to
  skip looking up document author details.

  1.8 - 2006-01-27 - Lloyd Borrett
  Current year now based on local time using the Etomite
  Server Offset Time configuration setting

  1.9 - 2006-03-08 - Lloyd Borrett
  Dates in meta tags can be output in your choice of ISO 8601
  or RFC 822 formats.
  Dates in the meta tags are now corrected to local time.
  Fixed problem with the generation of the "description" meta tag.

  2.0 - 2006-03-10 - Lloyd Borrett
  Moved the generation of the "content-type", "content-language" 
  and "title" meta tags into this snippet.
  Added in support for the Dublin Core Metadata Initiative meta tags.

  2.1 - 2006-03-15 - Lloyd Borrett
  Dropped the choice of date formats. Dublin Core tags now use ISO dates. 
  Others tags use RFC 822 dates. This is what is properly supported.
  Added in support for GeoURL (www.geourl.org) and 
  GeoTags (www.geotags.com) meta tags.

  2.2 - 2006-04-07 - Lloyd Borrett
  Get the base URL from Etomite instead of it being a configuration option.
   
Snippet Category:
  Search Engines           

Usage:
  Insert [[MetaTagsExtra]] anywhere in the head section of your template.
  Don't forget to set the full name of all document authors.
  You can find it at "Manage users" -> your username -> "full name".
  This value is used for the Author and Copyright meta tags.

  When you mark a page as "NOT searchable" - a Robots meta tag 
  with "noindex, nofollow" is inserted to keep web search engines
  from indexing that document. After all, there's little value in 
  making your Etomite document unsearchable to Etomite, when 
  Google still knows where it is! For "searchable" documents, no
  Robots meta tag is inserted. The default is "index, follow", so not
  putting it in reduced HTML bloat.
  A Googlebot meta tag with "noindex, nofollow, noarchive, nosnippet"
  is also output, to tell Google to clean out its cache.

  When you mark a page as "non cacheable", no-cache directives 
  are inserted via the Cache-Control and Pragma meta tags.
*/

// *** Configuration Settings ***

// Provide the content type setting.
$content_type = "text/html; charset=iso-8859-1";

// Provide the language setting.
$language = "en";

// Distribution can be "global", "local" or "iu"
// If you want no Distribution meta tag use ''
$distribution = 'global';

// Rating can be "14 years", "general", "mature", "restricted" or "safe for kids"
// If you want no Rating meta tag use ''
$rating = 'general';

// Start Date of the web site as used for the copyright meta tag
// To use the document creation date, set this to ''
$site_start_year = '';

// Site Author can be used for the Author and Copyright meta tags
// To use the document author details of each document, set this to ''
$site_author = $etomite->config['site_name'];

// Provide the full URL of your web site.
// For example: http://www.yourdomain.com
// NOTE: Do not put a / on the end of the web site URL.
// Used to build the DC.identifier tag
global $ETOMITE_PAGE_BASE;
$websiteurl = $ETOMITE_PAGE_BASE['www'];

// Provide the latitude of the resource
$latitude = "";

// Provide the longitude of the resource
$longitude = "";

// Provide the place name of the resource
$placename = "";

// Provide the ISO 3166 region code of the resource
$region = "";

// DC Tags is used to specify if the Dublin Core Metadata Initiative 
// meta tags should also be generated.
// Set to true to generate them, false otherwise.
$dc_tags = true;

// Geo Tags is used to specify if the Geo Tags 
// meta tags should also be generated.
// Set to true to generate them, false otherwise.
$geo_tags = true;


// Initialise variables

$MetaType = "";
$MetaLanguage = "";
$MetaTitle = "";
$MetaGenerator = "";
$MetaDesc = "";
$MetaKeys = "";
$MetaAbstract = "";
$MetaAuthor = "";
$MetaCopyright = "";
$MetaRobots = "";
$MetaGooglebot = "";
$MetaCache = "";
$MetaPragma = "";
$MetaExpires = "";
$MetaEditedOn = "";
$MetaDistribution = "";
$MetaRating = "";

// The data format of the resource
$DC_format = "";

// The language of the content of the resource
$DC_language = "";

// The name given to the resource
$DC_title = "";

// A textual description of the content and/or purpose of the resource
// Equivalent to "description"
$DC_description = "";

// The subject and topic of the resource that succinctly 
// describes the content of the resource.
// Equivalent to "keywords"
$DC_subject = "";

// Any form of the title used as a substitute or alternative 
// to the formal title of the resource.
// Equivalent to "abstract"
$DC_title_alternative = "";

// The name of the entity responsible for making the resource available
// Equivalent to "author"
$DC_publisher = "";

// An entity primarily responsible for making the content of the resource
// Equivalent to "author"
$DC_creator = "";

// A statement or pointer to a statement about the 
// rights management information for the resource
// Equivalent to "copyright"
$DC_rights = "";

// The date the resource was created in its current form
$DC_date_created = "";

// The date the resource was last modified or updated
$DC_date_modified = "";

// The date of validity of the resource.
// Specified as from the creation date to the expiry date
$DC_date_valid = "";

// A unique identifier for the resource
$DC_identifier = "";


// The latitude and longitude of the resource
$Geo_position = "";

// The latitude and longitude of the resource
$Geo_icbm = "";

// The place name of the resource
$Geo_placename = "";

// The region of the resource
$Geo_region = "";


// *** FUNCTIONS ***

function get_local_GMT_offset($server_offset_time) {
    // Get the local GMT offset when given the
    // local to Etomite server offset time in seconds
    $GMT_offset = date("O");
    $GMT_hr = substr($GMT_offset,1,2);
    $GMT_min = substr($GMT_offset,4,2);
    $GMT_sign = substr($GMT_offset,0,1);
    $GMT_secs = (intval($GMT_hr) * 3600) + (intval($GMT_min) * 60);
    if ($GMT_sign == '-') { $GMT_secs = $GMT_secs * (-1); }

    // Get the local GMT offset in seconds
    $GMT_local_seconds = $GMT_secs + $server_offset_time;
    $GMT_local_secs = abs($GMT_local_seconds);

    // round down to the number of hours
    $GMT_local_hours = intval($GMT_local_secs / 3600);
    // round down to the number of minutes
    $GMT_local_minutes = intval(($GMT_local_secs - ($GMT_local_hours * 3600)) / 60);
    if ($GMT_local_seconds < 0) {
      $GMT_value = "-";
    } else {
      $GMT_value = "+";
    }
    $GMT_value .= sprintf("%02d:%02d", $GMT_local_hours, $GMT_local_minutes);
    return $GMT_value;
}

function get_local_iso_8601_date($int_date, $server_offset_time) {
    // Return an ISO 8601 style local date
    // $int_date: current date in UNIX timestamp
    $GMT_value = get_local_GMT_offset($server_offset_time);
    $local_date = date("Y-m-d\TH:i:s", $int_date + $server_offset_time);
    $local_date .= $GMT_value;
    return $local_date;
}

function get_local_rfc_822_date($int_date, $server_offset_time) {
    // return an RFC 822 style local date
    // $int_date: current date in UNIX timestamp
    $GMT_value = get_local_GMT_offset($server_offset_time);
    $local_date = date("D, d M Y H:i:s", $int_date + $server_offset_time);
    $local_date .= " ".str_replace(':', '', $GMT_value);
    return $local_date;
}


// *** Start Creating Meta Tags ***

// *** CONTENT-TYPE ***
$MetaType = " <meta http-equiv=\"content-type\" content=\"".$content_type."\" />\n";

// *** DC.FORMAT ***
if ($dc_tags) {
   $DC_format = " <meta name=\"DC.format\" content=\"".$content_type."\" />\n";
}


// *** CONTENT-LANGUAGE ***
$MetaLanguage = " <meta http-equiv=\"content-language\" content=\"".$language."\" />\n";

// *** DC.LANGUAGE ***
if ($dc_tags) {
   $DC_language = " <meta name=\"DC.language\" content=\"".$language."\" />\n";
}

// *** GENERATOR ***
$version = $etomite->getVersionData();
$version['version'] = trim($version['version']);
$version['code_name'] = trim($version['code_name']);
if (($version['version'] != "") || ($version['code_name'] != "")) {
   $MetaGenerator = " <meta name=\"generator\" content=\"Etomite";
   if($version['version'] != ""){
      $MetaGenerator .= " ".$version['version'];
   }
   if($version['code_name'] != ""){
      $MetaGenerator .= " (".$version['code_name'].")";
   }
   $MetaGenerator .= "\" />\n";
}

$docInfo = $etomite->getDocument($etomite->documentIdentifier);

// *** DESCRIPTION ***
// Trim and replace double quotes with entity
$description = $docInfo['description'];
$description = str_replace('"', '"', trim($description)); 
if(!$description == ""){
   $MetaDesc = " <meta name=\"description\" content=\"$description\" />\n";

// *** DC.DESCRIPTION ***
   if ($dc_tags) {
      $DC_description = " <meta name=\"DC.description\"";
      $DC_description .= " content=\"$description\" />\n";
   }
}

// *** KEYWORDS ***
$keywords = $etomite->getKeywords();
if(count($keywords)>0) {
   $keys = join($keywords, ", ");
   $MetaKeys = " <meta name=\"keywords\" content=\"$keys\" />\n";

// *** DC.SUBJECT ***
   if ($dc_tags) {
      $keys = join($keywords, "; ");
      $DC_subject = " <meta name=\"DC.subject\"";
      $DC_subject .= " content=\"$keys\" />\n";
   }
}

// *** ABSTRACT ***
// Use the Site Name and the documents Long Title (or Description)  
// to build an Abstract meta tag.
$sitename = $etomite->config['site_name'];
// Trim and replace double quotes with entity
$sitename = str_replace('"', '"', trim($sitename)); 

$abstract = trim($docInfo['longtitle']);
if($abstract == ""){
   $abstract = $description;
}
// Replace double quotes with entity
$abstract = str_replace('"', '"', $abstract); 

if(($sitename != "") || ($abstract != "")) {
   $separator = " - ";
   if($sitename == ""){
      $separator = "";
   }
   $MetaAbstract = " <meta name=\"abstract\" content=\"".$sitename.$separator.$abstract."\" />\n";

// *** DC.TITLE.ALTERNATIVE ***
   if ($dc_tags) {
      $DC_title_alternative = " <meta name=\"DC.title.atlernative\"";
      $DC_title_alternative .= " content=\"".$sitename.$separator.$abstract."\" />\n";
   }
}

// *** TITLE ***
// Use the Site Name and the documents Page Title and Long Title  
// to build the Title meta tag.

// Start with the site name
$title = $sitename;
// Get the pagetitle, trim and replace double quotes with entity
$pagetitle = str_replace('"', '"', trim($docInfo['pagetitle'])); 
if ($pagetitle != "") {
   if ($title == "") {
      $title = $pagetitle;
   } else {
      $title .= " - ".$pagetitle;
   }
}
// Get the longtitle, trim and replace double quotes with entity
$longtitle = str_replace('"', '"', trim($docInfo['longtitle'])); 
if ($longtitle != "") {
   if ($title == "") {
      $title = $longtitle;
   } else {
      $title .= " - ".$longtitle;
   }
}
if ($title != "") {
   $MetaTitle = " <title>".$title."</title>\n";

// *** DC.TITLE ***
   if ($dc_tags || $geo_tags) {
      $DC_title = " <meta name=\"DC.title\"";
      $DC_title .= " content=\"".$title."\" />\n";
   }
}

// *** AUTHOR ***
if ($site_author == '') {
   $authorid = $docInfo['createdby'];
   $tbl = $etomite->dbConfig['dbase'].".".$etomite->dbConfig['table_prefix']."user_attributes";
   $query = "SELECT fullname FROM $tbl WHERE $tbl.id = $authorid"; 
   $rs = $etomite->dbQuery($query);
   $limit = $etomite->recordCount($rs); 
   if($limit=1) {
      $resourceauthor = $etomite->fetchRow($rs); 
      $authorname = $resourceauthor['fullname'];  
   }
   // Trim and replace double quotes with entity
   $authorname = str_replace('"', '"', trim($authorname));
} else {
   $authorname = $site_author;
}
if (!$authorname == ""){
   $MetaAuthor = " <meta name=\"author\" content=\"$authorname\" />\n";

// *** DC.PUBLISHER & DC.CREATOR ***
   if ($dc_tags) {
      $DC_publisher = " <meta name=\"DC.publisher\" content=\"$authorname\" />\n";
      $DC_creator = " <meta name=\"DC.creator\" content=\"$authorname\" />\n";
   }
}

// *** COPYRIGHT ***
// get the Etomite server offset time in seconds
$server_offset_time = $etomite->config['server_offset_time'];
if (!$server_offset_time) {
   $server_offset_time = 0;
}

// get the current time and apply the offset
$timestamp = time() + $server_offset_time;
// Set the current year
$today_year = date('Y',$timestamp);
$createdon = date('Y',$docInfo['createdon']);
if ($site_start_year == '') {
   if ($today_year != $createdon) {
      $copydate = $createdon."&#8211;".$today_year;
   } else {
      $copydate = $today_year;
   }
} else {
   if ($today_year != $site_start_year) {
      $copydate = $site_start_year."&#8211;".$today_year;
   } else {
      $copydate = $today_year;
   }
}
if ($authorname == '') {
   $copyname = $authorname;
} else {
   $copyname = " by ".$authorname;
}
$MetaCopyright = " <meta name=\"copyright\" content=\"Copyright &#169; ";
$MetaCopyright .= $copydate.$copyname.". All rights reserved.\" />\n";

// *** DC.RIGHTS ***
if ($dc_tags) {
   $DC_rights = " <meta name=\"DC.rights\" content=\"Copyright &#169; ";
   $DC_rights .= $copydate.$copyname.". All rights reserved.\" />\n";
}

// *** ROBOTS and GOOGLEBOT ***
// Determine if this document has been set to non-searchable.
// As the default for the Robots and Googlebot Meta Tags are index and follow,
// these tags are only needed when we don't want the document searched. 
if(!$etomite->documentObject['searchable']){
   $MetaRobots = " <meta name=\"robots\" content=\"noindex, nofollow\" />\n";
   $MetaGooglebot = " <meta name=\"googlebot\" content=\"noindex, nofollow, noarchive, nosnippet\" />\n";
}

// *** CACHE-CONTROL and PRAGMA ***
// Output no-cache directives via the Cache-Control and Pragma meta tags
// if this document is set to non-cacheable. 
$cacheable = $docInfo['cacheable'];
if (!$cacheable) {
   $MetaCache = " <meta http-equiv=\"cache-control\" content=\"no-cache\" />\n";
   $MetaPragma = " <meta http-equiv=\"pragma\" content=\"no-cache\" />\n";
}

// *** DC.DATE.CREATED ***
if ($dc_tags) {
   $createdon = get_local_iso_8601_date($docInfo['createdon'], $server_offset_time);
   $created = substr($createdon,0,10);
   $DC_date_created = " <meta name=\"DC.date.created\" content=\"";
   $DC_date_created .= $created."\" />\n";
}

// *** EXPIRES ***
$unpub_date = $docInfo['unpub_date'];
if ($unpub_date > 0) {
   $unpubdate = get_local_rfc_822_date($unpub_date, $server_offset_time);
   $MetaExpires = " <meta http-equiv=\"expires\" content=\"$unpubdate\" />\n";

// *** DC.DATE.VALID ***
   if ($dc_tags) {
      $dcunpubdate = get_local_iso_8601_date($unpub_date, $server_offset_time);
      $valid = substr($dcunpubdate,0,10);
      $DC_date_valid = " <meta name=\"DC.date.valid\" content=\"";
      $DC_date_valid .= $created."/".$valid."\" />\n";
   }
}

// *** LAST MODIFIED ***
$editedon = get_local_rfc_822_date($docInfo['editedon'], $server_offset_time);
$MetaEditedOn = " <meta http-equiv=\"last-modified\" content=\"$editedon\" />\n";

// *** DC.DATE.MODIFIED ***
if ($dc_tags) {
   $dceditedon = get_local_iso_8601_date($docInfo['editedon'], $server_offset_time);
   $modified = substr($dceditedon,0,10);
   $DC_date_modified = " <meta name=\"DC.date.modified\" content=\"";
   $DC_date_modified .= $modified."\" />\n";
}

// *** DISTRIBUTION ***
if (!$distribution == '') {
   $MetaDistribution = " <meta name=\"distribution\" content=\"".$distribution."\" />\n";
}

// *** RATING ***
if (!$rating == '') {
   $MetaRating = " <meta name=\"rating\" content=\"".$rating."\" />\n";
}

if ($dc_tags) {

// *** DC.IDENTIFIER ***
   $url = $websiteurl."[~".$etomite->documentIdentifier."~]";
   $DC_identifier = " <meta name=\"DC.identifier\" content=\"".$url."\" />\n";
}


if ($geo_tags) {
   if (($latitude != "") && (longitude != "")) {

// *** GEO.ICBM ***
      $Geo_icbm = " <meta name=\"ICBM\"";
      $Geo_icbm .= " content=\"".$latitude.", ".$longitude."\" />\n";

// *** GEO.POSITION ***
      $Geo_position = " <meta name=\"geo.position\"";
      $Geo_position .= " content=\"".$latitude.";".$longitude."\" />\n";
   }

   if ($region != "") {

// *** GEO.REGION ***
      $Geo_region = " <meta name=\"geo.region\"";
      $Geo_region .= " content=\"".$region."\" />\n";
   }

   if ($placename != "") {

// *** GEO.PLACENAME ***
      $Geo_placename = " <meta name=\"geo.placename\"";
      $Geo_placename .= " content=\"".$placename."\" />\n";
   }

}


// *** RETURN RESULTS ***

$output = $MetaType.$MetaLanguage.$MetaGenerator;
$output .= $MetaTitle.$MetaDesc.$MetaKeys;
$output .= $MetaAbstract.$MetaAuthor.$MetaCopyright;
$output .= $MetaRobots.$MetaGooglebot;
$output .= $MetaCache.$MetaPragma.$MetaExpires.$MetaEditedOn;
$output .= $MetaDistribution.$MetaRating;

if ($dc_tags) {
  $dc_output = $DC_format.$DC_language.$DC_title;
  $dc_output .= $DC_description.$DC_subject.$DC_title_alternative;
  $dc_output .= $DC_publisher.$DC_creator.$DC_rights;
  $dc_output .= $DC_date_created.$DC_date_modified.$DC_date_valid;
  $dc_output .= $DC_identifier;
  if ($dc_output != "") {
    $output .= " \n".$dc_output;
  }
}
if ($geo_tags) {
  $geo_output = "";
  if (!$dc_tags) {
    $geo_output .= $DC_title;
  }
  $geo_output .= $Geo_icbm;
  $geo_output .= $Geo_position.$Geo_region.$Geo_placename;
  if ($geo_output != "") {
    $output .= " \n".$geo_output;
  }
}

return $output;
len neviem co tam a kde mam uprqavit...:(
Napísať odpoveď