Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Cufon Only seems to work on Home PageCufon Only seems to work on Home Page
Previous
 
Next
New Post
2/13/2012 10:21 AM
 

Hi - I wonder if anyone else has tried using Cufon to replace text.
I am using DNN5.6.3 and followed the instructions and uploaded a  cufon-yui javascript file which I placed in the www root folder of the site.  I also uploaded a cufon generated file which I added to the Header of a Text/Html module on my home page in order to replace the H1 font styling with Calibri instead.
This worked a treat so I thought I would replace a few more header fonts around the site but.....
....wherever I added the snippet of javascript elsewhere on the site it wouldn't work.
Does anyone out there have an idea why this only works on the Home Page?? I did check this by copying the module (working correctly) onto a different page where the cufon font no longer worked.
Any help would be most appreciated.

 
New Post
2/15/2012 11:21 AM
 

Hi,

You should reference your cufon js scripts in the skin ascx file. I usually place the scripts in a js sub-directory of the skin directory .

Something like this just below the @ Register block:

<script src="/Portals/0/Skins/MySkin/js/cufon-yui.js" type="text/javascript"></script>
<script src="/Portals/0/Skins/MySkin/js/Open_Sans_400.font.js" type="text/javascript"></script>
<script src="/Portals/0/Skins/MySkin/js/Open_Sans_Semibold_600.font.js" type="text/javascript"></script>
<script src="/Portals/0/Skins/MySkin/js/cufon-replace.js" type="text/javascript"></script>

 The key to getting the cufon replacements to display is in the cuton-replacement.js file.  Here is an example:

Cufon.replace('h1', { fontFamily: 'Open Sans' });
Cufon.replace('h2', { fontFamily: 'Open Sans Semibold' });
Cufon.replace('h3', { fontFamily: 'Open Sans Semibold' });
Cufon.replace('#SideMenu ul li a', { fontFamily: 'Open Sans Semibold', hover: true });
Cufon.replace('#SideMenu ul li.hot a', { fontFamily: 'Open Sans Semibold', hover: true });
Cufon.replace('p.intro', { fontFamily: 'Open Sans' });
Cufon.replace('p.consultation', { fontFamily: 'Open Sans' });
Cufon.replace('#Header ul li a', { fontFamily: 'Open Sans Semibold', hover: true });
Cufon.replace('.SideMenuTitle', { fontFamily: 'Open Sans Semibold' });
Cufon.replace('#dnnMenu ul li.root-selected a ', { fontFamily: 'Open Sans Semibold', hover: true });
Cufon.replace('p.quote', { fontFamily: 'Open Sans' });
Cufon.replace('p.quotename', { fontFamily: 'Open Sans Bold Italic' });
Cufon.replace('p.started', { fontFamily: 'Open Sans' });

You can tell your cufon replacement is working by right clicking on the text in question and if you see "view/save image" you know you got it.

Hope this helps.

Rich

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Cufon Only seems to work on Home PageCufon Only seems to work on Home Page


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out