ã¯ããã«
ãmixiã¢ããªã§å§ããOpenSocialå ¥éã第3åç®ã¨ãªãã¾ãããããã¾ã§OpenSocialã®æ¦è¦ã¨ãmixiã¢ããªã®ä½ææ¹æ³ã«ã¤ãã¦è§£èª¬ãã¦ãã¾ããããä»åã¯OpenSocialã¢ããªã±ã¼ã·ã§ã³ã®åºæ¬ã¨ãªãã¬ã¸ã§ããXMLã®ä»æ§ã¨ããã¥ã¼ã¨ã¦ã¼ã¶ã¼ã®å½¹å²ã¨ããæ¦å¿µã«ã¤ãã¦è§£èª¬ãã¾ãã次åãã詳ãã解説ããOpenSocial APIã使ãä¸ã§éè¦ãªãã¤ã³ããå«ã¾ãã¦ãã¾ãã®ã§ããã£ããæ¼ããã¦ããã¾ãããã
ã¬ã¸ã§ããXMLã®ä»æ§
ãã·ãªã¼ãºã®éå»2åã§ãå°ã解説ãã¾ããããOpenSocialã¢ããªã±ã¼ã·ã§ã³ã®å®ä½ã¯ã¬ã¸ã§ããXMLã¨å¼ã°ããXMLãã¡ã¤ã«ã§ããã¬ã¸ã§ããXMLã®åºæ¬çãªæ§é ã¯æ¬¡ã®ã¨ããã§ãã
ãã¬ã¸ã§ããXMLã¯ãã«ã¼ãã®Moduleè¦ç´ 以ä¸ã«ãOpenSocialã¢ããªã±ã¼ã·ã§ã³ã®è¨å®æ å ±ã®ããã®ModulePrefsè¦ç´ ã¨ã表示ããã³ã³ãã³ãã®ããã®Contentè¦ç´ ãç½®ããã¨ã«ãªã£ã¦ãã¾ãã
ãModulePrefsè¦ç´ 以ä¸ã«ã¯ã使ç¨ããã¢ã¸ã¥ã¼ã«ãå®ç¾©ããããã®Requireè¦ç´ ã¨ãã³ã³ããã«å¯¾ãããªãã·ã§ã³æå®ãè¡ãããã®Optionalè¦ç´ ãç½®ãã¾ãã
ã¢ã¸ã¥ã¼ã«ã«ã¤ãã¦ï¼Requireè¦ç´ ï¼
ã第1åã§OpenSocialã®JavaScript APIããGadgets APIãã¨ãOpenSocial APIãã§æ§æããã¦ãããã¨ã説æãã¾ããããããããã®APIã¯ããã«ç´°ããã¢ã¸ã¥ã¼ã«ã¨ããåä½ã«åå²ããã¦ãã¾ãã以ä¸ã«ãmixiã¢ããªã§æå®å¯è½ãªã¢ã¸ã¥ã¼ã«ã®ããã¤ãã示ãã¾ãã
ã¢ã¸ã¥ã¼ã«å | 対å¿ããAPI | 説æ |
opensocial-0.8 | OpenSocial API | OpenSocial APIå ¨ä½ãå«ãã¢ã¸ã¥ã¼ã«ãã³ã³ããããã®æ å ±åå¾ãªã©ãè¡ãå ´åã«ã¯å¿ é |
tabs | Gagdets API | ã¿ãæ©è½ã®ããã®ã¢ã¸ã¥ã¼ã« |
dynamic-height | Gagdets API | ã¢ããªã±ã¼ã·ã§ã³ã®è¡¨ç¤ºé åã調æ´ããããã®ã¢ã¸ã¥ã¼ã« |
flash | Gagdets API | Flashã³ã³ãã³ããåãè¾¼ãããã®ã¢ã¸ã¥ã¼ã« |
minimessage | Gagdets API | ã¢ããªã±ã¼ã·ã§ã³ããã¦ã¼ã¶ã¼ã«å¯¾ããã¡ãã»ã¼ã¸ã表示ããããã®ã¢ã¸ã¥ã¼ã« |
views | Gagdets API | ãã¥ã¼ï¼å¾è¿°ï¼ã®æ å ±ã®åå¾ãåæ¿ã®ããã®ã¢ã¸ã¥ã¼ã« |
ã表ã«ãè¨ããããã«ãOpenSocial APIã使ã£ãmixiã¢ããªãä½æããå ´åã¯ãopensocial-0.8ã¢ã¸ã¥ã¼ã«ã®æå®ã¯å¿ é ã¨ãªãã¾ãï¼éã«ãååã®ãµã³ãã«ã®ããã«OpenSocial APIãå¼ã³åºããªãã®ã§ããã°ãopensocial-0.8ã¢ã¸ã¥ã¼ã«ã¯ä¸è¦ã§ãï¼ã
ãGadgets APIã¯æ©è½ãã¨ã«ã¢ã¸ã¥ã¼ã«ã«åå²ããã¦ãããå¿ è¦ã¨ããæ©è½ã«å¿ãã¦ã¢ã¸ã¥ã¼ã«ãæå®ãã¦ä½¿ç¨ãã¾ããGadgets APIã«å«ã¾ããã¢ã¸ã¥ã¼ã«ã®ããã¤ãã¯ããã®é£è¼ã§ã解説ããäºå®ã§ãã
ã³ã³ããã¸ã®ãªãã·ã§ã³æå®ï¼Optionalè¦ç´ ï¼
ãOptionalè¦ç´ ã¯ãã³ã³ããã«å¯¾ãã¦ç¹å®ã®ãªãã·ã§ã³ãæå®ããããã®è¦ç´ ã§ããã³ã³ãããã¨ã«æ©è½ãç°ãªããããOpenSocialã§ã¯å ·ä½çãªæ©è½ã¯å®ç¾©ããã¦ãã¾ããã
ãmixiã¢ããªã«ã¤ãã¦ç¾æç¹ã§å ¬éããã¦ããæ å ±ã®ç¯å²ã§ã¯ãå å説æãããOptionalè¦ç´ ã®æå®ã«ããContent Rewriteã®å¶å¾¡æ©è½ã ããå®ç¾©ããã¦ãã¾ãã
表示ããã³ã³ãã³ãï¼Contentè¦ç´ ï¼
ãContentè¦ç´ ã«ã¯ãå®éã«Webãã©ã¦ã¶ã«è¡¨ç¤ºããã³ã³ãã³ããè¨è¿°ãã¾ãã
ãtypeå±æ§ã«"html"ãæå®ããå ´åã«ã¯ãCDATAã»ã¯ã·ã§ã³ã¨ãã¦HTMLå½¢å¼ã§ã³ã³ãã³ããè¨è¿°ãã¾ããtypeå±æ§ã«"url"ãæå®ããå ´åã«ã¯ãhrefå±æ§ã«ã³ã³ãã³ãã®URLãæå®ãã¾ãã
ãtypeå±æ§ã«"html"ãæå®ããå ´åãã¬ã¸ã§ããXMLãã³ã³ããã§è§£æãããWebãã©ã¦ã¶ã«éä¿¡ãããéã«ã¯ãHTMLã®bodyè¦ç´ 以ä¸ã«Contentè¦ç´ ã®CDATAã»ã¯ã·ã§ã³ã®å 容ãå±éããã¾ããå¾ã£ã¦ãhtmlè¦ç´ ãheadè¦ç´ ãªã©ãCDATAã»ã¯ã·ã§ã³å ã«è¨è¿°ãããã¨ã¯ã§ãã¾ãããCDATAã»ã¯ã·ã§ã³ã«ã¯HTMLã ãã§ãªããJavaScriptãCSSãªã©ãè¨è¿°ãããã¨ãã§ãã¾ããCDATAã»ã¯ã·ã§ã³å ã®è¦ç´ ãã©ã®ããã«å¤æããããã«ã¤ãã¦ã¯ã第1åã®èª¬æãåç §ãã¦ãã ããã
ãtypeå±æ§ã«"url"ãæå®ããå ´åã«ã¯ãã¢ããªã±ã¼ã·ã§ã³ã®å 容ã¨ãã¦æå®ããURLã®å 容ã表示ããã¾ããåç´ã«Webãã©ã¦ã¶ãæå®ããURLã«ç§»åããã®ã§ã¯ãªããOpenSocialã¢ããªã±ã¼ã·ã§ã³ã®è¡¨ç¤ºé åå ã«ãæå®ããURLã®å 容ã表示ããã¾ãã
ãã¢ããªã±ã¼ã·ã§ã³ã®ãã¥ã¼ãã¨ã«ç°ãªã£ãå 容ã表示ããããããContentè¦ç´ ã¯è¤æ°è¨è¿°ãããã¨ãã§ãã¾ãããã®æ©è½ã«ã¤ãã¦ã¯ãã¥ã¼ã®è©³ç´°ã¨ä½µãã¦æ¬¡é ã§èª¬æãã¾ãã