Hello There, Guest!  
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[Web Dev] clippy-js?

#1
Hi,

I'm trying to implement clippy-js (http://www.smore.com/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
agent.show();
agent.Play('Searching')
});
</script>

I also downloaded smore-inc-clippy.js-3a9a1b3.zip but I'm not sure where to extract it.

Thanks for the help!

-Ignacio


 Reply
#2
Amazing.

Want us to answer this on the show? If yes, please send via http://cat5.tv/ask

Let me know.

Thanks,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#3
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.
 Reply
#4
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!

Cheers.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#5
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]
 Reply
#6
Yea, working on it. It needs to be a direct link and the forum blocks them, figuring something out real quick.
CompTIA A+ 602 Certified
Cisco Certified Entry Network Technician (Expired)
Google Developer Expert for Web Technology
 Reply
#7
http://sdrv.ms/MDC5gj

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.
CompTIA A+ 602 Certified
Cisco Certified Entry Network Technician (Expired)
Google Developer Expert for Web Technology
 Reply
#8
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">
<?php
$content = trim(file_get_contents('quotes.txt'));
$quotes = explode("\n", $content);
echo $quotes[rand(0, count($quotes)-1)];
?>
</div>

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 http://people.virginia.edu/~im5j/
 Reply
#9
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.
CompTIA A+ 602 Certified
Cisco Certified Entry Network Technician (Expired)
Google Developer Expert for Web Technology
 Reply
#10
Thanks!
If someone else knows how to implement the random quotes I would appreciate the help :-)
 Reply
 
 
Forum Jump:

Users browsing this thread: 1 Guest(s)