What's new? | Help | Directory | Sign in
Google
pcdtr
PHP + CSS Dynamic Text Replacement
  
  
  
  
    
Show all Featured Downloads:
pcdtr1.6.2.zip
Show all Featured Wiki Pages:
FeatureSuggestions
Join project
Project owners:
  joaomak

A PHP + CSS script (javascript-free) that dynamically replaces html text using any custom font. All styles go in the CSS file!

Installation

  1. At the very beginning of the file insert: <?php include 'dtr/dtr.php'; ?>, and at the end: <?php ob_end_flush(); ?>
  2. Link the stylesheet: <link href="dtr/headings.css" rel="stylesheet" type="text/css" />
  3. Copy your font files (.ttf or .otf) to the DTR folder and start styling!

Usage Example

HTML:

<h1>My <a href="#">Example</a> Heading</h1>

CSS:

h1{
	font-family: MyCustomFont, Helvetica, Arial, sans;
	font-size:20pt;
	color:#2F751F;
	background-color:#fff;
}
h1 a{
        font-family: AnotherCustomFont, Times, serif;
	color:#2977C7;
        text-decoration:underline;
}
h1 a:hover{
	color:#eeb43f;
	text-decoration:none;
}

Demo

Example included in the zip file