Topic: @font face web in cutenews system
How to change fonts to @font face web
(Active News,
Full Story,
Comment,
Add comment form,
News Pagination,
Comments Pagination)?
Dear CuteNews Users! Please feel free to contact us via our new Feedback Form and please send information about bugs to our bug tracker.
You are not logged in. Please login or register.
CutePHP Forums → Problem Solving / Help & Support → @font face web in cutenews system
How to change fonts to @font face web
(Active News,
Full Story,
Comment,
Add comment form,
News Pagination,
Comments Pagination)?
How to change fonts to @font face web
(Active News,
Full Story,
Comment,
Add comment form,
News Pagination,
Comments Pagination)?
Edit the relevant template(s) and add the html code where you want the font to show.
Edit the relevant template(s) and add the html code where you want the font to show.
i have default.tpl
<?php
///////////////////// TEMPLATE Default /////////////////////
$template_active = <<<HTML
<div style="width:420px; margin-bottom:30px;">
<div><h4><strong>{title}</strong> {star-rate}</h4></div>
<div style="text-align:justify; padding:3px; margin-top:3px; margin-bottom:5px; border-top:1px solid #D3D3D3;">{short-story}</div>
<div><h5><em>z dnia {date}</em></h5></div>
</div>
HTML;
$template_full = <<<HTML
<div style="width:420px; margin-bottom:15px;">
<div><strong>{title}</strong> {star-rate}</div>
{avatar}
<div style="text-align:justify; padding:3px; margin-top:3px; margin-bottom:5px; border-top:1px solid #D3D3D3;">{full-story}</div>
<div style="float: right;">{comments-num} Comments</div>
<div>[edit]Edit | [/edit]<em>Posted on {date} by {author}</em></div>
</div>
HTML;
$template_comment = <<<HTML
<div style="width: 400px; margin-bottom:20px;">
<div style="border-bottom:1px solid black;"> by <strong>{author}</strong> @ {date}</div>
<div style="padding:2px; background-color:#F9F9F9">{comment}</div>
</div>
HTML;
$template_form = <<<HTML
<table border="0" width="370" cellspacing="0" cellpadding="0">
<tr>
<td width="60">Name:</td>
<td><input type="text" name="name" value="{username}"></td>
</tr>
<tr>
<td>E-mail:</td>
<td><input type="text" name="mail" value="{usermail}"> (optional)</td>
</tr>
<tr>
<td>Smile:</td>
<td>{smilies}</td>
</tr>
<tr>
<td colspan="2">
<textarea cols="40" rows="6" id=commentsbox name="comments"></textarea>
<input type="submit" name="submit" value="Add My Comment">
{remember_me}
</td>
</tr>
</table>
HTML;
$template_prev_next = <<<HTML
<p align="center">[prev-link]<font style="color: white;"><< Poprzedni</font>[/prev-link] | [next-link]<font style="color: white;">Następny >></font>[/next-link]</p>
HTML;
$template_comments_prev_next = <<<HTML
<p align="center" class="current">[prev-link]<< Older[/prev-link] ({pages}) [next-link]Newest >>[/next-link]</p>
HTML;
?>
and i have css style
@font-face {
font-family: 'CenturyGothicRegular';
src: url('../fonts/gothic.eot');
src: url('../fonts/gothic.eot') format('embedded-opentype'),
url('../fonts/gothic.woff') format('woff'),
url('../fonts/gothic.ttf') format('truetype'),
url('../fonts/gothic.svg#CenturyGothicRegular') format('svg');
}
where do I put the above code?
i have default.tpl
<?php ///////////////////// TEMPLATE Default ///////////////////// $template_active = <<<HTML <div style="width:420px; margin-bottom:30px;"> <div><h4><strong>{title}</strong> {star-rate}</h4></div> <div style="text-align:justify; padding:3px; margin-top:3px; margin-bottom:5px; border-top:1px solid #D3D3D3;">{short-story}</div> <div><h5><em>z dnia {date}</em></h5></div> </div> HTML; $template_full = <<<HTML <div style="width:420px; margin-bottom:15px;"> <div><strong>{title}</strong> {star-rate}</div> {avatar} <div style="text-align:justify; padding:3px; margin-top:3px; margin-bottom:5px; border-top:1px solid #D3D3D3;">{full-story}</div> <div style="float: right;">{comments-num} Comments</div> <div>[edit]Edit | [/edit]<em>Posted on {date} by {author}</em></div> </div> HTML; $template_comment = <<<HTML <div style="width: 400px; margin-bottom:20px;"> <div style="border-bottom:1px solid black;"> by <strong>{author}</strong> @ {date}</div> <div style="padding:2px; background-color:#F9F9F9">{comment}</div> </div> HTML; $template_form = <<<HTML <table border="0" width="370" cellspacing="0" cellpadding="0"> <tr> <td width="60">Name:</td> <td><input type="text" name="name" value="{username}"></td> </tr> <tr> <td>E-mail:</td> <td><input type="text" name="mail" value="{usermail}"> (optional)</td> </tr> <tr> <td>Smile:</td> <td>{smilies}</td> </tr> <tr> <td colspan="2"> <textarea cols="40" rows="6" id=commentsbox name="comments"></textarea> <input type="submit" name="submit" value="Add My Comment"> {remember_me} </td> </tr> </table> HTML; $template_prev_next = <<<HTML <p align="center">[prev-link]<font style="color: white;"><< Poprzedni</font>[/prev-link] | [next-link]<font style="color: white;">Następny >></font>[/next-link]</p> HTML; $template_comments_prev_next = <<<HTML <p align="center" class="current">[prev-link]<< Older[/prev-link] ({pages}) [next-link]Newest >>[/next-link]</p> HTML; ?>
and i have css style
@font-face { font-family: 'CenturyGothicRegular'; src: url('../fonts/gothic.eot'); src: url('../fonts/gothic.eot') format('embedded-opentype'), url('../fonts/gothic.woff') format('woff'), url('../fonts/gothic.ttf') format('truetype'), url('../fonts/gothic.svg#CenturyGothicRegular') format('svg'); }
where do I put the above code?
If using css and not html then put it in the main page carrying your news or build it into the div style where you want it effective
If using css and not html then put it in the main page carrying your news or build it into the div style where you want it effective
Could you give me an example of how to do it?
Could you give me an example of how to do it?
If you want to use such custom font in CSS, read the following article to avoid some mistakes in use of it: web fonts with CSS @font-face rule in detail. Anyway it should be a big problem.
CutePHP Forums → Problem Solving / Help & Support → @font face web in cutenews system
Powered by PunBB, supported by Informer Technologies, Inc.
The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.