Hi there,
I have watched the video tutorials on sIFR and have tried to incorporate some custom fonts in my dotnetnuke site, but with no success so far.
Currently I am only trying to replace h1, and I get a white block where the heading 1 should be, but no visible text (this white block changes colour when I change the sBgColor value in javascript when replacing tags).
If I right-click on the white block, I get "Movie Not Loaded..." grayed out on the adobe flashplayer menu.
The steps I have taken are a bit different from the tutorial, so I will list them here:
1. I have added sifr.js and sifr-addons.js to the skin directory
2. I have added the mandator.swf file to the skin directory. This was created from a true-type font using this web-app:
http://ianpurton.com/sifr/ - Note: I have also tried the vandenkeere.swf and tradegothic.swf files included in the sifr 2.0.2 download but with no success.
3. I have added a third js file to the skin directory called sifr-replace.js. This contains the following code:
/*
Designates which tags to replace with sifr
*/
if(typeof sIFR == "function"){
// This is the preferred "named argument" syntax
sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"mandator.swf",
sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC",
nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"}));
};
4. I have made the changes to the css file as in the tutorials, so the sifr screen and print css sections are in there according to the video.
5. All three javascript files are included using the code-behind file of the skin ascx control. The process I have done to link to the js files is as follows:
// Note: This function is called from Page_Load in the ASCX control code-behind
// file of the skin
private void AttachJsFiles()
{
// Add the sifr js files to the HTML page
HtmlGenericControl jscript = null;
jscript = new HtmlGenericControl("script");
jscript.Attributes.Add("language", "javascript");
jscript.Attributes.Add("src", Path.Combine(this.SkinPath, "sifr.js"));
jscript.Attributes.Add("type", "text/javascript");
Controls.Add(jscript);
jscript = new HtmlGenericControl("script");
jscript.Attributes.Add("language", "javascript");
jscript.Attributes.Add("src", Path.Combine(this.SkinPath, "sifr-addons.js"));
jscript.Attributes.Add("type", "text/javascript");
Controls.Add(jscript);
jscript = new HtmlGenericControl("script");
jscript.Attributes.Add("language", "javascript");
jscript.Attributes.Add("src", Path.Combine(this.SkinPath, "sifr-replace.js"));
jscript.Attributes.Add("type", "text/javascript");
Controls.Add(jscript);
}
Finally, here's a screenshot of the result I am getting:
Any ideas?!