Category5.TV Community Forum
[Web Dev] clippy-js? - Printable Version

+- Category5.TV Community Forum (
+-- Forum: Talk Nerdy To Me (
+--- Forum: Technical Questions (
+--- Thread: [Web Dev] clippy-js? (/thread-57.html)

Pages: 1 2

[Web Dev] clippy-js? - ignacio82 - 06-02-2012


I'm trying to implement clippy-js ( in my web page (based on the cat5 tutorial).

What I did so far was to add to my header.php this
<link rel="stylesheet" type="text/css" href="clippy.css" media="all">

And to my body.close.php this
<!-- Clippy -->
<script src="jquery.1.7.min.js"></script>
<script src="clippy.min.js"></script>
<!-- Init script -->
<script type="text/javascript">
clippy.load('clippy', function(agent) {
// Do anything with the loaded agent;

I also downloaded but I'm not sure where to extract it.

Thanks for the help!


RE: [Web Dev] clippy-js? - Robbie Ferguson - 06-05-2012


Want us to answer this on the show? If yes, please send via

Let me know.


RE: [Web Dev] clippy-js? - ignacio82 - 06-05-2012

I get this error when trying to submit the question

Forbidden access
(<script> tag in POST)

Thanks for the help.
I will do my best to be online tonight.

RE: [Web Dev] clippy-js? - Robbie Ferguson - 06-05-2012

Ahh, sorry. It thinks you're trying to inject code, since your question has code in it.

I'll read on air and hope to help!


RE: [Web Dev] clippy-js? - ignacio82 - 06-13-2012

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

Error 403

[Rest of error message redacted by admin]

RE: [Web Dev] clippy-js? - Garbee - 06-13-2012

Yea, working on it. It needs to be a direct link and the forum blocks them, figuring something out real quick.

RE: [Web Dev] clippy-js? - Garbee - 06-13-2012

I linked to an archive above that is a demo using the HTML5 Boilerplate and Clippy. It has instructions within it on how to install clippy. Enjoy.

P.S. The link is only good for 30 days, after that the file will be removed from the server.

RE: [Web Dev] clippy-js? - ignacio82 - 06-13-2012

lol... Microsoft...
We can't show you that page
Our server is having a problem. We're working to fix it as soon as we can, so try again in a few minutes.
Now it works.
Thanks a lot for the help!
It works!
Can you help me with one more thing?
I want him to say a random quote from a file that i have. Right now I'm making appear the quote at the end of my page, but It would be clearly better if he says it :-)

This is the code I use for the random quote
<div id="quote">
$content = trim(file_get_contents('quotes.txt'));
$quotes = explode("\n", $content);
echo $quotes[rand(0, count($quotes)-1)];

And one more thing, how can i make him appear by default in the bottom left corner instead of the right?

In case you are curious

RE: [Web Dev] clippy-js? - Garbee - 06-13-2012

For doing multiple quotes I honestly think the *best* way would be to build an array in javascript of the quotes and have it pseudo-randomly pull one out of the array to display. *How* you actually do that using code I do not know.

Further as far as the corner issue, as your site sits moving it would be bad since it would cover content. If you really want to do it though, look through the javascript and css file. I tried changing the class in the javascript to clippy-bottom-left instead of clippy for the created element, but that forced it below the footer always. Which you don't want since it needs to float above other elements. So getting that moved is up to you or someone else to figure it out since I don't have the time to really look into it right now.

RE: [Web Dev] clippy-js? - ignacio82 - 06-13-2012

If someone else knows how to implement the random quotes I would appreciate the help :-)