ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 9274


Ignore:
Timestamp:
Nov 20, 2008, 2:54:53 PM (11 years ago)
Author:
ShogoKawahara
Message:

#3119:core.io.getProxyUrl() で正しいアドレスを返すように変更

Location:
OpenPNE3/plugins/opOpenSocialPlugin/trunk/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/lib/user/Config.class.php

    r9137 r9274  
    88  static private function loadConfig()
    99  {
     10    $webprefix = sfContext::getInstance()->getController()->genUrl('@homepage');
     11    $webprefix = preg_replace('/(.+)\/$/', "$1", $webprefix);
    1012    $shindigConfig = array(
    1113      // Show debug backtrace's. Disable this on a production site
     
    1719
    1820      // The URL Prefix under which shindig lives ie if you have http://myhost.com/shindig/php set web_prefix to /shindig/php
    19       'web_prefix' => $_SERVER['SCRIPT_NAME'],
     21      'web_prefix' => $webprefix,
    2022      // If you changed the web prefix, add the prefix to these too
    21       'default_js_prefix' => $_SERVER['SCRIPT_NAME'].'/gadgets/js/',
    22       'default_iframe_prefix' => $_SERVER['SCRIPT_NAME'].'/gadgets/ifr?',
     23      'default_js_prefix' => $webprefix.'/gadgets/js/',
     24      'default_iframe_prefix' => $webprefix.'/gadgets/ifr?',
    2325
    2426      // The X-XRDS-Location value for your implementing container, if any, see http://code.google.com/p/partuza/source/browse/trunk/Library/XRDS.php for an example
     
    4951      'private_key_file' => realpath(dirname(__FILE__) . '/../vendor/Shindig/certs').'/private.key',
    5052      'public_key_file' => realpath(dirname(__FILE__) . '/../vendor/Shindig/certs').'/public.crt',
    51       'private_key_phrase' => 'partuza',
     53      'private_key_phrase' => 'openpne3',
    5254      'jsondb_path' => realpath(dirname(__FILE__) . '/../vendor/Shindig/javascript/sampledata').'/canonicaldb.json',
    5355
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/lib/vendor/Shindig/config/container.js

    r8915 r9274  
    2727//              {"gadgets.container" : ["default"],
    2828//  to
    29 //              {"gadgets.container" : ["myContainer"],
     29//              {"gadgets.container" : ["myContainer"],
    3030// And make your changes that you need to myContainer.js.
    3131// Just make sure on the iframe URL you specify &container=myContainer
     
    8989  "core.io" : {
    9090    // Note: /proxy is an open proxy. Be careful how you expose this!
    91     "proxyUrl" : "http://%host%/gadgets/proxy?refresh=%refresh%&url=%url%",
    92     "jsonProxyUrl" : "http://%host%/gadgets/makeRequest"
     91    "proxyUrl" : "http://%host%%webprefix%gadgets/proxy?refresh=%refresh%&url=%url%",
     92    "jsonProxyUrl" : "http://%host%%webprefix%gadgets/makeRequest"
    9393  },
    9494  "views" : {
     
    130130    // Must be on the same domain as the gadget rendering server
    131131    "impl" : "rpc",  //Use "rpc" to enable JSON-RPC, "rest' for REST
    132     "path" : "http://%host%/social",
     132    "path" : "http://%host%%webprefix%/social",
    133133    "domain" : "shindig",
    134134    "enableCaja" : false,
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/lib/vendor/Shindig/features/core.io/io.js

    r8915 r9274  
    355355      }
    356356
    357       var proxyUrl = config.jsonProxyUrl.replace("%host%", document.location.host);
     357      if (!web_prefix)
     358      {
     359        web_prefix = "/";
     360      }
     361      var proxyUrl = config.jsonProxyUrl.replace("%host%", document.location.host).replace("%webprefix%", web_prefix);
    358362
    359363      if (!respondWithPreload(paramData, params, callback, processResponse)) {
     
    444448      var urlParams = gadgets.util.getUrlParameters();
    445449
     450      if (!web_prefix)
     451      {
     452        web_prefix = "/";
     453      }
    446454      return config.proxyUrl.replace("%url%", encodeURIComponent(url)).
    447455          replace("%host%", document.location.host).
     456          replace("%webprefix%", web_prefix).
    448457          replace("%rawurl%", url).
    449458          replace("%refresh%", encodeURIComponent(refresh)).
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/lib/vendor/Shindig/src/gadgets/servlet/GadgetRenderingServlet.php

    r8979 r9274  
    162162                if (! empty($forcedLibs)) {
    163163                        $libs = explode(':', $forcedLibs);
    164                         echo sprintf($externFmt, Config::get('default_js_prefix') . $this->getJsUrl($libs, $gadget) . "&container=" . $context->getContainer()) . "\n";
    165                 }
     164                        $content .= sprintf($externFmt, Config::get('default_js_prefix') . $this->getJsUrl($libs, $gadget) . "&container=" . $context->getContainer()) . "\n";
     165        }
     166        // web_prefix libs
     167        $content .= sprintf($externFmt, Config::get('web_prefix').'/application/js.js')."\n";
    166168                $content .= "<script>\n";
    167169               
Note: See TracChangeset for help on using the changeset viewer.