WordPress and CUFON

10 views
Skip to first unread message

jollymoon

unread,
Oct 3, 2009, 7:09:13 PM10/3/09
to cufón, webm...@edparton.com
Simo:

Here is a good one for you. [you're not that busy, you know ya
wanna!]

:ERROR ERROR ERROR:

expected ')' in regular expression
blog/

prototype.js line: 464
code 0: char: 5

URI: http://www.edparton.com/blog/lightbox/prototype.js

this is the offending line:

460: shift: function() {
461: var result = this[0];
462: for (var i = 0; i < this.length - 1; i++)
463: this[i] = this[i + 1];
464: this.length--;
464: return result;
466: },

What is this LENGTH refering to? Everything else works on the
page,including LightBox and Scrolling Sidebar menu and all.

I thought I was good at this. Troubleshooting and website building
all day long. But I just can't lock this one down...! Got all the
errors solved in activating the CUFON, but now that I get a readable
response in the TITLE section "ED PARTON", which is an a:hover, and
can know that
the CUFON is affecting the area in question, I get a Prototype.js
error.

As you can see the prototype.js is in the LightBox directory which
works fine with the WordPress Blog, so I would like to keep it and the
CUFON.

I just did this on another website: www.jollymoon.info/000/demo.html,
for Nanyana, and it seems to be working just fine.

Super Great Job you do...wish I could pay you what you're worth!

www.edparton.com/blog

jollymoon

unread,
Oct 4, 2009, 5:12:31 PM10/4/09
to cufón
Well, persistance pays off, but I still have a headache!

I tried the Cufon.set like below, but got no help with the HOVER.

<![CDATA[
Cufon.set('forceHitArea', 'true');
Cufon.set('hover', 'true');
Cufon.set('hoverables', 'a:true');
Cufon.replace('.blogtitle', { fontFamily: 'Celexa',
color:'#990000' });
Cufon.replace('.blogtitle a', { fontFamily: 'Celexa',
color:'#990000' });
//]]>

I had the wrong path for the cufon-ui.js: "<?php bloginfo
('template_directory'); ?>/cufon-yui.js"
which was tricky with WordPress, but finally got it right.

<script src="<?php bloginfo('template_directory'); ?>/cufon-yui.js"
type="text/javascript"></script>
(BEFORE PROTOTYPE ! in the header...)
<script src="<?php bloginfo('template_directory'); ?>/
Celexa_400.font.js" type="text/javascript" charset="utf-8"></script>

I had chosen a random font file for my testing, not knowing that the
cufon generator messed up the font translation (or it wasn't a totaly
FREE font). I thought to choose a different font -- and it worked!

And make SURE you get the www.edparton.com and edparton.com right in
the Cufon Generator "Limit usage to the following domain(s)" just
replace your EXACT domain and NO extra spaces...

The prototype.js line: 464 error was caused by prototype being loaded
in the background (by WordPress) and I was trying to load it in the
header too!

And I got lucky with the LightBox because it just worked ! (glad the
same ProtoType.js file worked for the CUFON and the LightBox !

So, check your path (especially WordPress), use a different CUFON
generated font, and don't load ProtoType two times!

Hope this post helps a bunch of people not waste a weekend hunting
down little bugs, gremlins, and net boogers.

So I offer two pages for review and sample:

http://www.edparton.com/blog
http://www.jollymoon.info/000/demo.html (demo very complicated setup)
http://www.nanyana.com (FINAL to be finished soon from above DEMO)

Thanx, Mucho Gracis, Gratsi, Merci, Danke, Arigato, ect, ect.

keep up the good work

----------------------------
Reply all
Reply to author
Forward
0 new messages