WikiTips and Tricks ⇒ How to modify Meta Tags  

Glossary
The Project
Install
Dragonfly admin interface
Dragonfly public view
Dragonfly Themes
Build local server
Running Dragonfly CVS
Tips and Tricks
Rules & Regulations
v9 Developer's Manual
v10 Developer's manual
10.8: How to modify Meta Tags Parent

You can adjust your meta tags by editing includes/meta.php and includes/cmsinit.inc

includes/cmsinit.inc

$METATAGS['description'] = $slogan;
$METATAGS['keywords'] = '';
$METATAGS['resource-type'] = 'document';
$METATAGS['distribution'] = 'global';
$METATAGS['author'] = $sitename;
$METATAGS['copyright'] = 'Copyright (c) '.date('Y').' by '.$sitename;
$METATAGS['robots'] = 'index, follow';
$METATAGS['rating'] = 'general';
$METATAGS['generator'] = 'CPG Dragonfly CMS: Copyright (c) 2003-'.date('Y').' by CPG-Nuke Development Team, www.dragonflycms.org';
//$METATAGS['revisit-after'] = '1 days';
$METATAGS['MSSmartTagsPreventParsing'] = 'true';

includes/meta.php
case 'News':
  $METATAGS['description'] = _NewsLANG." $slogan";
  $METATAGS['keywords'] .= ', ';
break;

Note that you can set per-module meta tags by editing the case statement for case 'modulename':

To edit the default tags, edit those in the default: case. These will show up where the module name is not listed in the case list.

You can also edit tags that appear globally in includes/cmsinit.inc (Search for "Set default metatags").

Do take care when playing with either file, since inducing a php error will likely result in a blank front page

Be sure to make a backup of each file before editing.

*** WARNING ***
DO NOT USE NOTEPAD.EXE TO EDIT THESE FILES. Editing these files with notepad will cause UTF-8 BOM issues which may cause hangs or other bad behavior by some browsers.

Just be aware that these are PHP files. The information is contained between 'single quotes' and those must remain intact or you will break things. You may use doublequotes (if they're allowed in the HTML spec), but not single quotes.

Example Code:

case 'Your_Account':
  $METATAGS['description'] = _Your_AccountLANG." $slogan";
  $METATAGS['keywords'] .= ', fast, secure, security, cms, content, management, system';

For example, you can modify the portion that says ", fast, secure, security, cms, content, management, system" as you like, so long as you retain the quotes.

Info Provided by: SaintPeter and Head-e

Video tutorial can be found HERE

 
Updated: Tuesday, September 25, 2007 (03:39:22) by LilDevil
Created:  Thursday, March 24, 2005 (07:43:57) by Head-e

stopsoftwarepatents.eu petition banner

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.2686 seconds with 12 DB Queries in 0.0728 seconds
Memory Usage: 1.48 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy