|
HowToConfigure
Configure'''Note:''' This tutorial assumes that you have create an application called "opensocial" and an application module called "app". The first part to create an OpenSocial application is to configure it. Because an OpenSocial application is a gadget you need to say to symfony that it should render the "indexSuccess.php" as a gadget. In this plugin you can find an gadget-layout under "sfOpenSocialPlugin/misc/app/templates/" and you need to set the "indexSuccess.php" layout as a gadget-layout. This is done by setting your "apps/opensocial/modules/application/config/view.yml" like this: indexSuccess:
http_metas:
content-type: application/xml
layout: gadget_layoutIf you've used "init-opensocial-app"( look at HowToConfigure ) task you already have this configured and you don't need to do it again. After you had configured the gadget you need to configure the OpenSocial application and in this plugin you can choose two ways of doing it:
Configuring the application means to set key-values pairs like:
# default values
all:
opensocial:
base_url: http://www.palcoprincipal.com
api_version: 0.7
module_prefs: #ref: http://code.google.com/apis/gadgets/docs/reference.html#Moduleprefs_Ref
title: My First OpenSocial Application
# directory_title
# title_url
description: This application was created by sfOpenSocialPlugin
author: Daniel Botelho
author_email: botelho.daniel@gmail.com
# author_affiliation
# author_location
# screenshot
thumbnail: http://www.palcoprincipal.com/images/logos/logo_palco_3.jpg
# height
# width
# scaling
# scrolling
# singleton
# author_photo
# author_aboutme
# author_link
# author_quote
locale:
- lang: en
country: us
# messages
# language_direction
requires:
- feature: opensocial-0.7
# - feature: dynamic-height
# - feature: setprefs
# - feature: settitle
# - feature: tabs
# - feature: drag
# - feature: grid
# - feature: minimessage
# - feature: analytics
# - feature: flash
# - feature: finance
user_prefs: # ref: http://code.google.com/apis/gadgets/docs/reference.html#Userprefs_Ref
# - name: difficulty # the name of the User Preference
# display_name: asd
# urlparam: asd
# datatype: asd
# required: asd
# default_value: asd
# enum_value:
# - {value: enum1, display_value: xx }
# - {value: enum2, display_value: xx}
content: # ref: http://code.google.com/apis/gadgets/docs/reference.html#Content_Ref
type: html
# href
# cdata
But for this application to work properly should put in 'all_opensocial_base_url' your symfony project base url. This base_url is used to allow to automatically include stylesheet and Javascript files (look at OpenSocialHelper for more information) |