/[drupal]/contributions/modules/leech/leech_keywords/engines/google_video/leech_keywords_engine_google_video.module
ViewVC logotype

Diff of /contributions/modules/leech/leech_keywords/engines/google_video/leech_keywords_engine_google_video.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Tue Nov 6 16:31:45 2007 UTC revision 1.1.2.1, Tue Nov 6 16:31:45 2007 UTC
# Line 0  Line 1 
1    <?php
2    /*
3     * Created on Apr 6, 2007
4     *
5     * To change the template for this generated file go to
6     * Window - Preferences - PHPeclipse - PHP - Code Templates
7     */
8    
9    function leech_keywords_google_video_engine_info() {
10      return t('Google video');
11    }
12    
13    function leech_keywords_engine_google_video_keywords_engine_api($action, $args = array()) {
14      switch($action) {
15        case 'list_engines':
16          return array('engine_google_video' => t('Google video engine.'));
17          break;
18        case 'parse_url':
19          if( isset($args['engines']['engine_google_video']) && $args['engines']['engine_google_video'] != FALSE ) {
20            return array('engine_google_video' => _google_video_engine_parse_url($args['keywords']));
21          }
22          break;
23      }
24    }
25    
26    function _google_video_engine_parse_url ($keywords = ""){
27      $keywords = urlencode($keywords);
28      $url = "http://video.google.com/videofeed?type=search&q=$keywords&so=0&num=20&output=rss";
29      return $url;
30    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2