Needs work
Project:
Google Custom Search Engine Advanced
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2010 at 16:50 UTC
Updated:
2 Oct 2010 at 11:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
jweowu commentedComment #2
jweowu commentedComment #3
jweowu commentedpurdy_nc: Your XML example has an unexpected (to me) set of IMAGE elements in SL_MAIN which are not allowed for by the documentation, which is why I haven't implemented any support for that.
Comment #4
jweowu commentedWhile I'm here, I noticed a few formatting glitches in the code -- a handful of tabs crept into the indentation, a "foreach(" with no intervening space, etc...
You might want to run it through the coder module.
Comment #5
jweowu commentedI had unnecessarily included a couple of lines from
google_cse_adv_block_suggestion()in mygoogle_cse_adv_block_subscribed_links()This is the same patch, with those lines removed (and the data variable name changed to $links).
Comment #6
jweowu commentedOn the topic of unexpected components in the XML, notice that I've provided the original XML in the data passed to the theme function, so themers can still process any XML components which the module did not expect to see.
I haven't made any similar changes to other parts of the module in this patch, but I would suggest this as a useful thing to do in general.
Comment #7
jason_purdy commentedWow, that was fast, jweowu!
The image might be a new feature? Here's their documentation on the front-end of that:
http://code.google.com/intl/en/apis/customsearch/docs/special_results.ht...
Comment #8
jweowu commented> Wow, that was fast, jweowu!
Pure coincidence, in fact :) I was just about to create the issue in order to attach my patch, and I found that you'd asked for the exact same thing since I'd last checked the queue. For a moment I thought your XML attachment was a patch, and we'd both just implemented the same thing.
So... that image stuff looks fairly official, doesn't it? I guess we just add support for the current XML, and hope it doesn't change.
Comment #9
jason_purdy commentedLooks that way... I plan on using it on our site to create custom keywords that we use in our print magazine and highlight the online content associated w/ the keyword. It'll be cool to also have the images in there, too.
I hope this can get folded into the module base soon. :)
Comment #10
jweowu commentedFYI, if you've tested the patch and it all looks good to you, please say so. If you've reviewed the code as well, you might set the status to RTBC.
Comment #11
jason_purdy commentedI patched the module, but I'm not understanding how the blocks work. I see a new "Google CSE Advanced subscribed links / promotions" block and I added it to my content top region. But I don't see it showing up whenever I use a promotional query. I'm not sure I understand how the module's blocks work.
Thanks!
Comment #12
jweowu commentedHmm.. it's working fine for me with the exact same configuration. Can you verify that:
1) The promotion works correctly when searching via the google interface? (or check the XML being returned, as before).
2) The content top region is being rendered by your page template?
Comment #13
jason_purdy commentedIt works now! I think I wasn't letting enough time lapse between setting it up and it taking effect or something like that. Even the little icon thumbnail is showing up! :)
Now I just need to figure out how to get it to work inside of the results instead of in the content top.
Thanks, jweowu!
Comment #14
jweowu commentedsites/all/themes/(theme-name)/template.php:
sites/all/themes/(theme-name)/search-results.tpl.php:
Comment #15
jason_purdy commentedWow ... thanks, jweowu! I'm a Drupal n00b and that helped tremendously!
Comment #16
jweowu commentedPerhaps this module should provide its block contents in this fashion by default, with a
google_cse_adv_preprocess_search_results(), as a convenient alternative for themers?Comment #17
meba commentedYes, I think that's a good idea. Perhaps a setting to turn on/off this feature and then both block is exposed together with a variable in preprocess? If you do that, I will be happy to commit the patch.