Strange little problem with Cufon...
Permalink
Hi everyone,
I've been banging my head against a brick wall with this one for several hours now, so I had a quick search on the forum and tried all the suggestions I could find regarding implementation of .js within C5.
I am converting a HTML/CSS theme to C5. I bought it and them modified the styling and graphics to use as a basis for website for a client.
The theme already had a lot of .js in it for accordions, slideshows etc but also included cufon for font replacement.
I've made a good start on the new C5 theme. I have my theme folder and in it I have another folder called js containing all the supplied .js files.
My template has a separate header file 'header.php' which calls the .js files like this:
And I made sure that this appears AFTER my
All looks great BUT, when I put the page in edit mode, my editable areas are not clickable - they don't highlight when rolled over so you can't edit the content.
When I remove the call to the cufon .js file the areas become editable again.
Has anyone experienced anything like this?
I am developing locally on my Mac which has MAMP installed - I haven't tested on a web server yet.
To be honest I'm just about ready to remove cufon altogether and use websafe font instead as it's only the headings, but it's irritating me. Probably something stupid I've done LOL!
Many thanks
Allison
I've been banging my head against a brick wall with this one for several hours now, so I had a quick search on the forum and tried all the suggestions I could find regarding implementation of .js within C5.
I am converting a HTML/CSS theme to C5. I bought it and them modified the styling and graphics to use as a basis for website for a client.
The theme already had a lot of .js in it for accordions, slideshows etc but also included cufon for font replacement.
I've made a good start on the new C5 theme. I have my theme folder and in it I have another folder called js containing all the supplied .js files.
My template has a separate header file 'header.php' which calls the .js files like this:
<script type="text/javascript" src="themes/acumen_theme/js/cufon-yui.js"></script> <script type="text/javascript" src="themes/acumen_theme/js/Anivers_400.font.js"></script> <script type="text/javascript"> Cufon.replace('h1', 'h2'); </script>
And I made sure that this appears AFTER my
<?php Loader::element('header_required'); ?>
All looks great BUT, when I put the page in edit mode, my editable areas are not clickable - they don't highlight when rolled over so you can't edit the content.
When I remove the call to the cufon .js file the areas become editable again.
Has anyone experienced anything like this?
I am developing locally on my Mac which has MAMP installed - I haven't tested on a web server yet.
To be honest I'm just about ready to remove cufon altogether and use websafe font instead as it's only the headings, but it's irritating me. Probably something stupid I've done LOL!
Many thanks
Allison
try using getthemepath instead of the full path. Also, is it below the css links as well? if you can't figure out cufon but want font replacement id check out font squirrel.
Just to clarify, it should look like this:
<script type="text/javascript" src="<?php echo $this->getThemePath(); ?>/js/cufon-yui.js"></script>
Yep, tried getThemePath - nothing doing.
I've got my css links, then loader::element then the .js files - is that correct?
Cheers
Al
I've got my css links, then loader::element then the .js files - is that correct?
Cheers
Al
think thats right. pvergnalia wrote something, could double check with his
http://www.weblicating.com/c5/cuf-n-fonts/...
http://www.weblicating.com/c5/cuf-n-fonts/...
Ooh, looks promising. Checking it out.
Thanks
:)
Thanks
:)
Thanks for the replies guys.
Just to clarify - cufon IS working, it's just that when cufon is implemented it means my pages are not editable - the editable areas are visible in edit mode but they can't be clicked on.
So it seems like a clash between cufon and something in the core system.
Cheers
Al
Just to clarify - cufon IS working, it's just that when cufon is implemented it means my pages are not editable - the editable areas are visible in edit mode but they can't be clicked on.
So it seems like a clash between cufon and something in the core system.
Cheers
Al
http://www.concrete5.org/profile/-/view/1439/ has a cufon block coming out.
Hi Thanks for the suggestions.
I have to say that the support on this forum is better than any other I have used!
Everyone is super-helpful and friendly.
On this particular project the deadline was looming and I removed cufon in the end and set a websafe font stack in CSS instead.
However I do have another build to do so I may experiment with cufon on this if I have time.
I will post back with my findings.
Thanks again
Al
I have to say that the support on this forum is better than any other I have used!
Everyone is super-helpful and friendly.
On this particular project the deadline was looming and I removed cufon in the end and set a websafe font stack in CSS instead.
However I do have another build to do so I may experiment with cufon on this if I have time.
I will post back with my findings.
Thanks again
Al
I'm not sure but probably something like
could help you.
if(!$c->isEditMode()) { //your cufon code here }
could help you.
This thread is kind of old now, but I just wanted to pipe in and praise the glory that is Font Squirrel:
http://www.fontsquirrel.com/fontface/generator...
You upload a truetype font and it sends back a zip file containing a bunch of different file formats for that font that will work in different browsers, AND css code that you can paste into your stylesheet. I have been using it for the past 6 months or so and every single time I try it it "just works" -- across ALL broswers (even IE6!).
No more Cufon (or SIFR -- blech!) for me.
-Jordan
http://www.fontsquirrel.com/fontface/generator...
You upload a truetype font and it sends back a zip file containing a bunch of different file formats for that font that will work in different browsers, AND css code that you can paste into your stylesheet. I have been using it for the past 6 months or so and every single time I try it it "just works" -- across ALL broswers (even IE6!).
No more Cufon (or SIFR -- blech!) for me.
-Jordan
Looks really interesting! Thanks, Jordan!
-Steve
-Steve