1 mostmodernist_jenny Jun 28, 2009 06:52
3 mostmodernist_jenny Jun 28, 2009 09:58
BIG thanks! I'm going to try this right now. brb.
4 mostmodernist_jenny Jun 28, 2009 10:27
GREAT! It works. Thank you!
Question:
Is there a way to control the video search (queries) inside the html doc via the post content? That way I can change the search query on a per post basis rather than having multiple html docs... Or even some way to change it based on the post itself from within the one html doc? some kind of call and response...
for instance, the naive method I just tried was to put
<?php $Item->title(); ?>
in the search query of the google script inside the html doc, so that the post title would serve as the search query.
it failed. what can i say, i'm running on instinct.
5 john Jun 28, 2009 10:45
Ummmm.... buggered if I know on a Sunday night, but it's a good point.
It may be worth asking on the Goog API forums
http://groups.google.com/group/Google-AJAX-Search-API
Sorry, maybe one of the b2 gurus can come up with a slick trick
6 mostmodernist_jenny Jun 28, 2009 11:41
no big deal. you solved the big deal. thanks again.
7 john Jun 28, 2009 11:59
Post Tags would be the perfect thing to feed into that search query
<?php
// List all tags attached to this post:
$Item->tags( array(
'before' => ' ',
'after' => ' ',
'separator' => ', ',
) );
?>
8 mostmodernist_jenny Jun 28, 2009 12:33
yeah it would but I can't figure out how to get the php to talk to the javascript :(
unless maybe calling the script through a .php page instead of an html?
my feeling, tho, is that it would require some js, or, as you mentioned, some slick tricks from a b2 vet *cough*
8|
Hi, I can get this to work in a post by loading the Google code as a html document using object tags. It allows for video search etc and can be sized and styled to prevent scroll bars..
Saved Google code...
There may be some issues with IE, especially IE8. If you can allow iframes then you could use the following.... Note: Untested!!
Good luck