Index: /buddyloo/update.sql
===================================================================
--- /buddyloo/update.sql (revision 390)
+++ /buddyloo/update.sql (revision 736)
@@ -1,34 +1,34 @@
-ALTER TABLE wcf1_user ADD socialID int(10) UNSIGNED NOT NULL DEFAULT '0';
-
-CREATE TABLE IF NOT EXISTS wcf1_buddyloo_social (
-  socialID int(10) unsigned NOT NULL auto_increment,
-  socialTitle varchar(80) NOT NULL,
-  socialAccess tinyint(1) unsigned NOT NULL DEFAULT 0,
-  PRIMARY KEY (socialID)
+DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables;
+CREATE TABLE wcf1_buddyloo_gadget_variables (
+  variableID int(10) unsigned NOT NULL auto_increment,
+  gadgetID int(10) unsigned NOT NULL,
+  variableName varchar(64) NOT NULL,
+  variableType ENUM('text','textarea','radio','checkbox','select','multiselect') NOT NULL,
+  variableDefault varchar(255) NOT NULL,
+  PRIMARY KEY (variableID),
+  UNIQUE(gadgetID, variableName)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
-CREATE TABLE IF NOT EXISTS wcf1_buddyloo_gadget (
-  gadgetID int(10) unsigned NOT NULL auto_increment,
-  gadgetTitle varchar(80) NOT NULL,
-  gadgetCode MEDIUMTEXT NOT NULL,
-  gadgetImage BLOB NULL DEFAULT NULL,
-  gadgetDescription TEXT NOT NULL,
-  PRIMARY KEY (gadgetID)
+DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables_value;
+CREATE TABLE wcf1_buddyloo_gadget_variables_value (
+  variableID int(10) unsigned NOT NULL,
+  boxID int(10) unsigned NOT NULL,
+  userID int(10) unsigned NOT NULL,
+  variableValue varchar(255) NOT NULL,
+  PRIMARY KEY (variableID, boxID, userID)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
-CREATE TABLE IF NOT EXISTS wcf1_buddyloo_gadget_to_social (
-  boxID int(10) unsigned NOT NULL auto_increment,
-  socialID int(10) unsigned NOT NULL,
-  gadgetID int(10) unsigned NOT NULL,
-  icolumn tinyint(1) unsigned NOT NULL,
-  irow tinyint(1) unsigned NOT NULL,
-  visible tinyint(1) unsigned NOT NULL DEFAULT 1,
-  PRIMARY KEY (boxID)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+INSERT INTO `wcf1_buddyloo_gadget` (`gadgetID`, `gadgetTitle`, `gadgetCode`, `gadgetImage`, `gadgetDescription`) VALUES
+(1, 'Members gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678532311" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''HEIGHT''] = ''385'';\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderMembersGadget(\r\n { id: ''div-1228678532311'',\r\n   site: ''08725200924522186419''},\r\n  skin);\r\n</script>\r\n', NULL, 'The Members gadget allows visitors to join your site, sign in and out, see pictures of other site members, see pictures of their friends, explore other members'' profiles, invite other people to join your site.'),
+(2, 'Sign In gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678744328" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\nskin[''ALIGNMENT''] = ''right'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderSignInGadget(\r\n { id: ''div-1228678744328'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'The Sign In gadget allows visitors to join your site, sign in and out, and invite people to become members. It doesn''t have all the features of the Members gadget, but it can fit neatly in to a small space.'),
+(3, '''User'' Wall gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228680667275" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\nskin[''DEFAULT_COMMENT_TEXT''] = ''{$DEFAULT_COMMENT_TEXT}'';\r\nskin[''HEADER_TEXT''] = ''{$HEADER_TEXT}'';\r\nskin[''POSTS_PER_PAGE''] = ''5'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderWallGadget(\r\n { id: ''div-1228680667275'',\r\n   site: ''{$siteID}'',\r\n   ''view-params'':{"scope":"ID","features":"video,comment","docId":"{$userID}"}\r\n},\r\n  skin);\r\n</script>\r\n', NULL, 'Allows viewers to post comments, or links to videos on your site.'),
+(4, 'Review/Rate gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678871007" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\nskin[''DEFAULT_COMMENT_TEXT''] = ''- add your review here -'';\r\nskin[''HEADER_TEXT''] = ''Ratings'';\r\nskin[''POSTS_PER_PAGE''] = ''5'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderReviewGadget(\r\n { id: ''div-1228678871007'',\r\n   site: ''{$siteID}'',\r\n   ''view-params'':{"disableMinMax":"false","scope":"ID","docId":"{$userID}","startMaximized":"true"}\r\n},\r\n  skin);\r\n</script>\r\n', NULL, 'Allows viewers to rate a page, or a section of a page. Viewers can use this to rate videos, articles, books, photos, songs, or anything else you can imagine. You can put multiple Review/Rate gadgets on one page, one for each item you want viewers to review.'),
+(5, 'OpenSocial Demo', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678942573" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderOpenSocialGadget(\r\n { id: ''div-1228678942573'',\r\n   url:''http://www.google.com/friendconnect/gadgets/sample.xml'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'This is a sample OpenSocial application that demonstrates the basic concepts that an OpenSocial developer can use in their application.'),
+(6, 'LameGame demo', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678995231" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderOpenSocialGadget(\r\n { id: ''div-1228678995231'',\r\n   url:''http://www.google.com/friendconnect/gadgets/lamegame.xml'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'Here is a silly game (lame) where visitors simply click as often as they can to increase their score vs. their friends and other members.'),
+(7, 'Custom Gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228679272840" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderOpenSocialGadget(\r\n { id: ''div-1228679272840'',\r\n   url:''{$GADGET_URL}'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'Use this to generate the code snippet that you need to add a custom OpenSocial gadget to your site.');
 
-CREATE TABLE IF NOT EXISTS wcf1_buddyloo_user_to_social (
-  userID int(10) unsigned NOT NULL,
-  socialID int(10) unsigned NOT NULL,
-  icolumn tinyint(1) unsigned NOT NULL,
-  PRIMARY KEY (userID,socialID)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+INSERT INTO `wcf1_buddyloo_gadget_variables` (`variableID`, `gadgetID`, `variableName`, `variableType`, `variableDefault`) VALUES
+(1, 3, 'DEFAULT_COMMENT_TEXT', 'text', '- add your comment here -'),
+(2, 3, 'HEADER_TEXT', 'text', 'Comments'),
+(3, 7, 'GADGET_URL', 'text', '');
Index: /buddyloo/tr.xml
===================================================================
--- /buddyloo/tr.xml (revision 674)
+++ /buddyloo/tr.xml (revision 736)
@@ -76,4 +76,10 @@
 		<item name="wcf.buddyloo.subject"><![CDATA[{$author} Sizin arkadaþýnýz olmak istiyor]]></item>
 	</category>
+	<category name="wcf.buddyloo.variables">
+		<!-- this is for the enduser - future version will not need language files //-->
+		<item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item>
+		<item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item>
+		<item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item>
+	</category>
 	<category name="wcf.user.whitelist">
 		<item name="wcf.user.whitelist.add.success"><![CDATA[{if $users|count == 1}&quot;{$users|array_shift}&quot; has{else}{implode from=$users item=user}&quot;{$user}&quot;{/implode} have{/if} were informed about your friendship-invitation.]]></item>
@@ -88,4 +94,6 @@
 	</category>
 	<category name="wcf.acp.option">
+		<item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item>
+		<item name="wcf.acp.option.google_friendconnect.description"><![CDATA[Pleasae register under <a href="http://www.google.com/friendconnect/">http://www.google.com/friendconnect/</a>]]></item>
 		<item name="wcf.acp.option.profile_show_connections"><![CDATA[Arkadaþ davet baðlantýlarý görüntülensin]]></item>
 		<item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Bu seçenek ile arkadaþ davet baðlantýlarýnýn üyeler tarafýndan görüntülenmesini saðlayabilirsiniz.]]></item>
@@ -104,4 +112,6 @@
 		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Sosyal arkadaþlýk sitelerine bakýlabilir.]]></item>
 		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Üyelerin sosyal - toplumsal sitelere bakabilmelerine izin verebilirsiniz.]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Can add custom gadgets to his page]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Should the user be allowed to add custom gadgets to his page?]]></item>
 	</category>
 </language>
Index: /buddyloo/de.xml
===================================================================
--- /buddyloo/de.xml (revision 534)
+++ /buddyloo/de.xml (revision 736)
@@ -85,4 +85,10 @@
 		<item name="wcf.buddyloo.social.page.access.2"><![CDATA[Nur Ihre Freunde haben Zugriff auf diese Seite.]]></item>
 	</category>
+	<category name="wcf.buddyloo.variables">
+		<!-- this is for the enduser - future version will not need language files //-->
+		<item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item>
+		<item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item>
+		<item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item>
+	</category>
 	<category name="wcf.user.whitelist">
 		<item name="wcf.user.whitelist.add.success"><![CDATA[{if $users|count == 1}Der Benutzer &raquo;{$users|array_shift}&laquo; wurde{else}Die Benutzer {implode from=$users item=user}&raquo;{$user}&laquo;{/implode} wurden{/if} ÃŒber ihre Freundschaftseinladung informiert.]]></item>
@@ -97,4 +103,6 @@
 	</category>
 	<category name="wcf.acp.option">
+		<item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item>
+		<item name="wcf.acp.option.google_friendconnect.description"><![CDATA[Pleasae register under <a href="http://www.google.com/friendconnect/">http://www.google.com/friendconnect/</a>]]></item>
 		<item name="wcf.acp.option.profile_show_connections"><![CDATA[Freundschafts-Verbindungen zeigen]]></item>
 		<item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Soll angezeigt werden ÃŒber welche Ecken sich Benutzer kennen?]]></item>
@@ -111,6 +119,8 @@
 		<item name="wcf.acp.group.option.user.profile.canInvite"><![CDATA[Darf Foren-Einladungen verschicken]]></item>
 		<item name="wcf.acp.group.option.user.profile.canInvite.description"><![CDATA[Soll der Benutzer Foren-Einladungen per E-Mail verschicken kÃ¶nnen, damit sich Leute registrieren?]]></item>
-		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten einsehen]]></item>
-		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Soll der Benutzer die persÃ¶nlichen Social Seiten einsehen kÃ¶nnen, die von Buddyloo zur VerfÃŒgung gestellt werden?]]></item>
+		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten benutzen]]></item>
+		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Soll der Benutzer die persÃ¶nlichen Social Seiten nutzen kÃ¶nnen, die von Buddyloo zur VerfÃŒgung gestellt werden?]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Darf beliebige Gadgets hinzufÃŒgen]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Soll der Benutzer beliebige Gadgets hinzufÃŒgen dÃŒrfen?]]></item>
 	</category>
 </language>
Index: /buddyloo/options.xml
===================================================================
--- /buddyloo/options.xml (revision 270)
+++ /buddyloo/options.xml (revision 736)
@@ -4,4 +4,9 @@
 	<import>
 		<options>
+			<option name="google_friendconnect">
+				<categoryname>general.page</categoryname>
+				<optiontype>text</optiontype>
+				<defaultvalue></defaultvalue>
+			</option>
 			<option name="profile_show_connections">
 				<categoryname>user.profile</categoryname>
Index: /buddyloo/package.xml
===================================================================
--- /buddyloo/package.xml (revision 674)
+++ /buddyloo/package.xml (revision 736)
@@ -7,5 +7,5 @@
 		<packagedescription language="de"><![CDATA[Buddy System fÃŒr das WCF. Freundschaften funktionieren nur in beide Richtungen. Das GegenÃŒber hat die Wahl zum ablehnen/akzeptieren der Freunschafts-Einladung.]]></packagedescription>
 		<packagedescription language="fr"><![CDATA[SystÃšme dâamitiÃ© pour le WCF. Les demandes dâamitiÃ© peuvent Ãªtre acceptÃ©es ou refusÃ©es.]]></packagedescription>
-		<version>0.9.6</version>
+		<version>0.9.7</version>
 		<date>DATE</date>
 		<plugin>com.woltlab.wcf</plugin>
@@ -15,5 +15,5 @@
 	<authorinformation>
 		<author>Torben Brodt</author>
-		<authorurl>http://www.easy-coding.de/trac/wcf</authorurl>
+		<authorurl>http://trac.easy-coding.de/trac/wcf</authorurl>
 	</authorinformation>
 
@@ -45,24 +45,9 @@
 	</instructions>
 	
-	<instructions type="update" fromversion="0.9.5 pl 2">
+	<instructions type="update" fromversion="0.9.6">
 		<files>files.tar</files>
-		<languages languagecode="tr">tr.xml</languages>
-	</instructions>
-	
-	<instructions type="update" fromversion="0.9.5 pl 1">
-		<!--<packageinstallationplugins>pip.tar</packageinstallationplugins>//-->
-		<files>files.tar</files>
-		<templates>templates.tar</templates>
-		<languages languagecode="de">de.xml</languages>
-		<languages languagecode="de-informal">de-informal.xml</languages>
-		<languages languagecode="en">en.xml</languages>
-		<languages languagecode="fr">fr.xml</languages>
-		<languages languagecode="tr">tr.xml</languages>
-	</instructions>
-	
-	<instructions type="update" fromversion="0.9.5">
-		<!--<packageinstallationplugins>pip.tar</packageinstallationplugins>//-->
-		<files>files.tar</files>
-		<templates>templates.tar</templates>
+		<sql>update.sql</sql>
+		<options>options.xml</options>
+		<groupoptions>groupoptions.xml</groupoptions>
 		<languages languagecode="de">de.xml</languages>
 		<languages languagecode="de-informal">de-informal.xml</languages>
Index: /buddyloo/de-informal.xml
===================================================================
--- /buddyloo/de-informal.xml (revision 534)
+++ /buddyloo/de-informal.xml (revision 736)
@@ -85,4 +85,10 @@
 		<item name="wcf.buddyloo.social.page.access.2"><![CDATA[Nur deine Freunde haben Zugriff auf diese Seite.]]></item>
 	</category>
+	<category name="wcf.buddyloo.variables">
+		<!-- this is for the enduser - future version will not need language files //-->
+		<item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item>
+		<item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item>
+		<item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item>
+	</category>
 	<category name="wcf.user.whitelist">
 		<item name="wcf.user.whitelist.add.success"><![CDATA[{if $users|count == 1}Der Benutzer &raquo;{$users|array_shift}&laquo; wurde{else}Die Benutzer {implode from=$users item=user}&raquo;{$user}&laquo;{/implode} wurden{/if} ÃŒber ihre Freundschaftseinladung informiert.]]></item>
@@ -97,4 +103,6 @@
 	</category>
 	<category name="wcf.acp.option">
+		<item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item>
+		<item name="wcf.acp.option.google_friendconnect.description"><![CDATA[Pleasae register under <a href="http://www.google.com/friendconnect/">http://www.google.com/friendconnect/</a>]]></item>
 		<item name="wcf.acp.option.profile_show_connections"><![CDATA[Freundschafts-Verbindungen zeigen]]></item>
 		<item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Soll angezeigt werden ÃŒber welche Ecken sich Benutzer kennen?]]></item>
@@ -111,6 +119,8 @@
 		<item name="wcf.acp.group.option.user.profile.canInvite"><![CDATA[Darf Foren-Einladungen verschicken]]></item>
 		<item name="wcf.acp.group.option.user.profile.canInvite.description"><![CDATA[Soll der Benutzer Foren-Einladungen per E-Mail verschicken kÃ¶nnen, damit sich Leute registrieren?]]></item>
-		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten einsehen]]></item>
-		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Soll der Benutzer die persÃ¶nlichen Social Seiten einsehen kÃ¶nnen, die von Buddyloo zur VerfÃŒgung gestellt werden?]]></item>
+		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten benutzen]]></item>
+		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Soll der Benutzer die persÃ¶nlichen Social Seiten nutzen kÃ¶nnen, die von Buddyloo zur VerfÃŒgung gestellt werden?]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Darf beliebige Gadgets hinzufÃŒgen]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Soll der Benutzer beliebige Gadgets hinzufÃŒgen dÃŒrfen?]]></item>
 	</category>
 </language>
Index: /buddyloo/en.xml
===================================================================
--- /buddyloo/en.xml (revision 534)
+++ /buddyloo/en.xml (revision 736)
@@ -85,4 +85,10 @@
 		<item name="wcf.buddyloo.social.page.access.2"><![CDATA[This social page is visible just for your friends.]]></item>
 	</category>
+	<category name="wcf.buddyloo.variables">
+		<!-- this is for the enduser - future version will not need language files //-->
+		<item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item>
+		<item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item>
+		<item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item>
+	</category>
 	<category name="wcf.user.whitelist">
 		<item name="wcf.user.whitelist.add.success"><![CDATA[{if $users|count == 1}&quot;{$users|array_shift}&quot; has{else}{implode from=$users item=user}&quot;{$user}&quot;{/implode} have{/if} were informed about your friendship-invitation.]]></item>
@@ -97,4 +103,6 @@
 	</category>
 	<category name="wcf.acp.option">
+		<item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item>
+		<item name="wcf.acp.option.google_friendconnect.description"><![CDATA[Pleasae register under <a href="http://www.google.com/friendconnect/">http://www.google.com/friendconnect/</a>]]></item>
 		<item name="wcf.acp.option.profile_show_connections"><![CDATA[Show friendship-connections]]></item>
 		<item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Should users see over which friendship-connections they know eachother.]]></item>
@@ -111,6 +119,8 @@
 		<item name="wcf.acp.group.option.user.profile.canInvite"><![CDATA[Can send community-invitations]]></item>
 		<item name="wcf.acp.group.option.user.profile.canInvite.description"><![CDATA[Can the user send invitations to allow recipients to register?]]></item>
-		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Can see Buddyloo Social Sites]]></item>
-		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Should the users be allowed to view the personal social sites, brought to you by  Buddyloo.]]></item>
+		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Can use Buddyloo Social Sites]]></item>
+		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Should the users be allowed to use the personal social sites, brought to you by  Buddyloo.]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Can add custom gadgets to his page]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Should the user be allowed to add custom gadgets to his page?]]></item>
 	</category>
 </language>
Index: /buddyloo/files/lib/data/user/BuddylooSocialData.class.php
===================================================================
--- /buddyloo/files/lib/data/user/BuddylooSocialData.class.php (revision 390)
+++ /buddyloo/files/lib/data/user/BuddylooSocialData.class.php (revision 736)
@@ -106,4 +106,33 @@
 		$result = WCF::getDB()->sendQuery($sql);
 		while ($row = WCF::getDB()->fetchArray($result)) {
+		
+			$replace = array();
+			$replace['{$userID}'] = $this->userID;
+			$replace['{$siteID}'] = GOOGLE_FRIENDCONNECT;
+
+			// replace variables
+			$sql = 'SELECT		v.variableName,
+						v.variableType,
+						IF(ISNULL(u.userID), v.variableDefault, u.variableValue) AS variableValue
+				FROM 		wcf'.WCF_N.'_buddyloo_gadget_to_social gs
+
+				INNER JOIN	wcf'.WCF_N.'_buddyloo_gadget_variables v
+				ON		gs.boxID = '.$row['boxID'].'
+				AND		gs.gadgetID = v.gadgetID
+
+				LEFT JOIN	wcf'.WCF_N.'_buddyloo_gadget_variables_value u
+				ON		u.userID = '.$this->userID.'
+				AND		v.variableID = u.variableID';
+			$result2 = WCF::getDB()->sendQuery($sql);
+			while ($row2 = WCF::getDB()->fetchArray($result2)) {
+				switch($row2['variableType']) {
+					case 'text':
+					case 'hidden':
+						$search = sprintf('{$%s}', $row2['variableName']);
+						$replace[$search] = addslashes($row2['variableValue']);
+					break;
+				}
+			}
+		
 			$icol = $row['icolumn'];
 			$irow = $row['irow'];
@@ -124,5 +153,5 @@
 				'img' => $img,
 				'title' => $row['gadgetTitle'],
-				'content' => $row['gadgetCode'],
+				'content' => str_replace(array_keys($replace), array_values($replace), $row['gadgetCode']),
 				'visible' => (boolean)$row['visible']
 			);
Index: /buddyloo/files/lib/page/GadgetListPage.class.php
===================================================================
--- /buddyloo/files/lib/page/GadgetListPage.class.php (revision 534)
+++ /buddyloo/files/lib/page/GadgetListPage.class.php (revision 736)
@@ -129,4 +129,6 @@
 		$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);
 		while ($row = WCF::getDB()->fetchArray($result)) {
+			if($row['gadgetID'] == 7 && !WCF::getUser()->getPermission('user.profile.canCustomGadget')) $row['used'] = 1;
+		
 			$name = $row['groupName'];
 			$button = $row['used'] ? '<a href="#"><img src="'.RELATIVE_WCF_DIR.'icon/defaultDisabledS.png" alt="" /> <span>'.WCF::getLanguage()->get('wcf.buddyloo.gadgets.add').'</span></a>' : '<a href="index.php?action=BuddylooSocial&amp;handle=addGadget&amp;gadgetID='.$row['gadgetID'].'&amp;userID='.$this->userID.'&amp;socialID='.$this->socialID.SID_ARG_2ND.'"><img src="'.RELATIVE_WCF_DIR.'icon/defaultS.png" alt="" /> <span>'.WCF::getLanguage()->get('wcf.buddyloo.gadgets.add').'</span></a>';
Index: /buddyloo/files/lib/action/BuddylooSocialAction.class.php
===================================================================
--- /buddyloo/files/lib/action/BuddylooSocialAction.class.php (revision 390)
+++ /buddyloo/files/lib/action/BuddylooSocialAction.class.php (revision 736)
@@ -145,4 +145,8 @@
 				WCF::getDB()->sendQuery($sql);
 				
+				$sql = 'DELETE FROM	wcf'.WCF_N.'_buddyloo_gadget_variables_value
+					WHERE		socialID = '.$this->socialID;
+				WCF::getDB()->sendQuery($sql);
+				
 				// finds the first socialpage to set as new default
 				$sql = 'SELECT 		IF(ISNULL(MIN(socialID)),0,MIN(socialID)) AS socialID
@@ -161,4 +165,5 @@
 			
 			case 'addGadget':
+				if($this->gadgetID == 7 && !WCF::getUser()->getPermission('user.profile.canCustomGadget')) return;
 				$visible = true;
 		
@@ -189,5 +194,4 @@
 				$sql = 'DELETE FROM	wcf'.WCF_N.'_buddyloo_gadget_to_social
 					WHERE		boxID = '.$this->boxID;
-				echo $sql;
 				WCF::getDB()->sendQuery($sql);
 			break;
@@ -214,5 +218,53 @@
 			break;
 			case 'configGadget':
-				
+			case 'configGadgetSave':
+				$sql = 'SELECT		gs.gadgetID,
+							v.variableID,
+							v.variableName,
+							v.variableType,
+							IF(ISNULL(u.userID), v.variableDefault, u.variableValue) AS variableValue
+					FROM 		wcf'.WCF_N.'_buddyloo_gadget_to_social gs
+
+					INNER JOIN	wcf'.WCF_N.'_buddyloo_gadget_variables v
+					ON		gs.boxID = '.$this->boxID.'
+					AND		gs.gadgetID = v.gadgetID
+
+					LEFT JOIN	wcf'.WCF_N.'_buddyloo_gadget_variables_value u
+					ON		u.userID = '.$this->userID.'
+					AND		v.variableID = u.variableID
+
+					ORDER BY	v.variableName ASC';
+
+				$result = WCF::getDB()->sendQuery($sql);
+				$return = '';
+				while ($row = WCF::getDB()->fetchArray($result)) {
+					// TODO build classes for every option text,textarea,radio,checkbox,select,multiselect
+					// should allow validation, ...
+					$row['variableName'] = WCF::getLanguage()->get('wcf.buddyloo.variables.'.$row['gadgetID'].'.'.$row['variableName']);
+					switch($this->handle) {
+						case 'configGadgetSave': // save
+							if($row['variableType'] == 'text') {
+								$val = $_POST['buddyloobox'][$this->boxID][$row['variableID']];
+								if(preg_match('/[^\(\)\{\}]+/', $val)) {
+									$sql = 'REPLACE INTO	wcf'.WCF_N.'_buddyloo_gadget_variables_value
+												(variableID, boxID, userID, variableValue)
+										VALUES		('.$row['variableID'].', '.$this->boxID.', '.$this->userID.', "'.$val.'")';
+									WCF::getDB()->sendQuery($sql);
+									
+									//TODO translation.. mark as red
+									echo 'alert("saved value for '.$row['variableName'].'");';
+								}
+							}
+							break;
+						case 'configGadget':
+							//TODO build classes for every option text,textarea,radio,checkbox,select,multiselect
+							if($row['variableType'] == 'text') {
+								$return .= sprintf('%s: <input type="text" name="buddyloobox[%d][%d]" value="%s" /><br/>', 
+									$row['variableName'], $this->boxID, $row['variableID'], $row['variableValue']);
+							}
+						break;
+					}
+				}
+				echo $return;
 			break;
 		}
Index: /buddyloo/files/js/buddylooSocial.js
===================================================================
--- /buddyloo/files/js/buddylooSocial.js (revision 390)
+++ /buddyloo/files/js/buddylooSocial.js (revision 736)
@@ -153,8 +153,44 @@
  *
  */
-function gadgetConfig(x) {
+function getFormData(form, asArray) {
+	var ret;
+	var add = function(n, v) {
+		if(asArray) {
+			if(ret == null) ret = new Array();
+			ret[n] = escape(v);
+		} else {
+			ret = (ret == null ? '' : ret+'&') + n +'='+ escape(v);
+		}
+	};
+ 
+	for(var i=0; i<form.elements.length; i++) {
+		var el = form.elements[i];
+		var type = (el.type || '');
+ 
+		if(type.match(/^(text|hidden|textarea)$/i) || (type.match(/^(radio|checkbox)$/i) && el.checked)) {
+			add(el.name, el.value);
+		} else if(el.nodeName.match(/^select$/i)) {
+			for(var j=0; j<el.options.length; j++) {
+				if(el.options[j].selected) {
+					add(el.name, el.options[j].value);
+				}
+			}
+		} else if(el.nodeName.match(/^textarea$/i)) {
+			add(el.name, el.value);
+		}
+	}
+	return ret != null ? ret : (asArray ? new Array() : '');
+}
+
+/**
+ *
+ */
+function gadgetConfig(form, boxID, x) {
+	var data = getFormData(form, 0);
 	// save config
-	$.post('index.php?action=BuddylooSocial&handle=configGadget&userID='+userID+'&socialID='+socialID, 'boxID='+this.parentNode.parentNode.id);
-	x.slideToggle(750);
+	$.post('index.php?action=BuddylooSocial&handle=configGadgetSave&userID='+userID+'&socialID='+socialID, 'boxID=box'+boxID+'&'+data, function(data) {
+		eval(data);
+	});
+	// x.slideToggle(750);
 	return false;
 }
@@ -175,8 +211,11 @@
 		// load custom config
 		$.post('index.php?action=BuddylooSocial&handle=configGadget&userID='+userID+'&socialID='+socialID, 'boxID='+this.parentNode.parentNode.id, function(data) {
+			if(data == '') return;
 			var form = document.createElement('form');
 			form.onsubmit = function() { 
-				return gadgetConfig(x); 
-			}
+				return gadgetConfig(this, boxID, x); 
+			}
+			
+			form.innerHTML = data;
 
 			var submit = document.createElement('input');
Index: /buddyloo/install.sql
===================================================================
--- /buddyloo/install.sql (revision 536)
+++ /buddyloo/install.sql (revision 736)
@@ -33,27 +33,4 @@
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
---CREATE TABLE `ModulePrefs` (
---`title` VARCHAR( 255 ) NOT NULL ,
---`directory_title` VARCHAR( 80 ) NOT NULL ,
---`title_url` VARCHAR( 255 ) NOT NULL ,
---`description` TEXT NOT NULL ,
---`author` VARCHAR( 80 ) NOT NULL ,
---`author_email` VARCHAR( 80 ) NOT NULL ,
---`author_affiliation` VARCHAR( 80 ) NOT NULL ,
---`author_location` VARCHAR( 80 ) NOT NULL ,
---`screenshot` VARCHAR( 255 ) NOT NULL ,
---`thumbnail` VARCHAR( 255 ) NOT NULL ,
---`height` INT UNSIGNED NOT NULL ,
---`width` INT UNSIGNED NOT NULL ,
---`scaling` BOOL NOT NULL ,
---`scrolling` BOOL NOT NULL ,
---`singleton` BOOL NOT NULL ,
---`author_photo` VARCHAR( 255 ) NOT NULL ,
---`author_aboutme` VARCHAR( 255 ) NOT NULL ,
---`author_link` VARCHAR( 255 ) NOT NULL ,
---`author_quote` VARCHAR( 255 ) NOT NULL
---) ENGINE = MYISAM 
-
-
 DROP TABLE IF EXISTS wcf1_buddyloo_gadget_to_social;
 CREATE TABLE wcf1_buddyloo_gadget_to_social (
@@ -74,2 +51,37 @@
   PRIMARY KEY (userID,socialID)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 	
+
+DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables;
+CREATE TABLE wcf1_buddyloo_gadget_variables (
+  variableID int(10) unsigned NOT NULL auto_increment,
+  gadgetID int(10) unsigned NOT NULL,
+  variableName varchar(64) NOT NULL,
+  variableType ENUM('text','textarea','radio','checkbox','select','multiselect') NOT NULL,
+  variableDefault varchar(255) NOT NULL,
+  PRIMARY KEY (variableID),
+  UNIQUE(gadgetID, variableName)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables_value;
+CREATE TABLE wcf1_buddyloo_gadget_variables_value (
+  variableID int(10) unsigned NOT NULL,
+  boxID int(10) unsigned NOT NULL,
+  userID int(10) unsigned NOT NULL,
+  variableValue varchar(255) NOT NULL,
+  PRIMARY KEY (variableID, boxID, userID)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+INSERT INTO `wcf1_buddyloo_gadget` (`gadgetID`, `gadgetTitle`, `gadgetCode`, `gadgetImage`, `gadgetDescription`) VALUES
+(1, 'Members gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678532311" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''HEIGHT''] = ''385'';\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderMembersGadget(\r\n { id: ''div-1228678532311'',\r\n   site: ''08725200924522186419''},\r\n  skin);\r\n</script>\r\n', NULL, 'The Members gadget allows visitors to join your site, sign in and out, see pictures of other site members, see pictures of their friends, explore other members'' profiles, invite other people to join your site.'),
+(2, 'Sign In gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678744328" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\nskin[''ALIGNMENT''] = ''right'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderSignInGadget(\r\n { id: ''div-1228678744328'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'The Sign In gadget allows visitors to join your site, sign in and out, and invite people to become members. It doesn''t have all the features of the Members gadget, but it can fit neatly in to a small space.'),
+(3, '''User'' Wall gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228680667275" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\nskin[''DEFAULT_COMMENT_TEXT''] = ''{$DEFAULT_COMMENT_TEXT}'';\r\nskin[''HEADER_TEXT''] = ''{$HEADER_TEXT}'';\r\nskin[''POSTS_PER_PAGE''] = ''5'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderWallGadget(\r\n { id: ''div-1228680667275'',\r\n   site: ''{$siteID}'',\r\n   ''view-params'':{"scope":"ID","features":"video,comment","docId":"{$userID}"}\r\n},\r\n  skin);\r\n</script>\r\n', NULL, 'Allows viewers to post comments, or links to videos on your site.'),
+(4, 'Review/Rate gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678871007" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\nskin[''DEFAULT_COMMENT_TEXT''] = ''- add your review here -'';\r\nskin[''HEADER_TEXT''] = ''Ratings'';\r\nskin[''POSTS_PER_PAGE''] = ''5'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderReviewGadget(\r\n { id: ''div-1228678871007'',\r\n   site: ''{$siteID}'',\r\n   ''view-params'':{"disableMinMax":"false","scope":"ID","docId":"{$userID}","startMaximized":"true"}\r\n},\r\n  skin);\r\n</script>\r\n', NULL, 'Allows viewers to rate a page, or a section of a page. Viewers can use this to rate videos, articles, books, photos, songs, or anything else you can imagine. You can put multiple Review/Rate gadgets on one page, one for each item you want viewers to review.'),
+(5, 'OpenSocial Demo', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678942573" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderOpenSocialGadget(\r\n { id: ''div-1228678942573'',\r\n   url:''http://www.google.com/friendconnect/gadgets/sample.xml'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'This is a sample OpenSocial application that demonstrates the basic concepts that an OpenSocial developer can use in their application.'),
+(6, 'LameGame demo', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228678995231" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderOpenSocialGadget(\r\n { id: ''div-1228678995231'',\r\n   url:''http://www.google.com/friendconnect/gadgets/lamegame.xml'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'Here is a silly game (lame) where visitors simply click as often as they can to increase their score vs. their friends and other members.'),
+(7, 'Custom Gadget', '<!-- Include the Google Friend Connect javascript library. -->\r\n<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>\r\n\r\n<!-- Define the div tag where the gadget will be inserted. -->\r\n<div id="div-1228679272840" style="width:100%;border:1px solid #cccccc;"></div>\r\n<!-- Render the gadget into a div. -->\r\n<script type="text/javascript">\r\nvar skin = {};\r\nskin[''BORDER_COLOR''] = ''#cccccc'';\r\nskin[''ENDCAP_BG_COLOR''] = ''#e0ecff'';\r\nskin[''ENDCAP_TEXT_COLOR''] = ''#333333'';\r\nskin[''ENDCAP_LINK_COLOR''] = ''#0000cc'';\r\nskin[''ALTERNATE_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_BG_COLOR''] = ''#ffffff'';\r\nskin[''CONTENT_LINK_COLOR''] = ''#0000cc'';\r\nskin[''CONTENT_TEXT_COLOR''] = ''#333333'';\r\nskin[''CONTENT_SECONDARY_LINK_COLOR''] = ''#7777cc'';\r\nskin[''CONTENT_SECONDARY_TEXT_COLOR''] = ''#666666'';\r\nskin[''CONTENT_HEADLINE_COLOR''] = ''#333333'';\r\ngoogle.friendconnect.container.setParentUrl(''/'' /* location of rpc_relay.html and canvas.html */);\r\ngoogle.friendconnect.container.renderOpenSocialGadget(\r\n { id: ''div-1228679272840'',\r\n   url:''{$GADGET_URL}'',\r\n   site: ''{$siteID}''},\r\n  skin);\r\n</script>\r\n', NULL, 'Use this to generate the code snippet that you need to add a custom OpenSocial gadget to your site.');
+
+
+INSERT INTO `wcf1_buddyloo_gadget_variables` (`variableID`, `gadgetID`, `variableName`, `variableType`, `variableDefault`) VALUES
+(1, 3, 'DEFAULT_COMMENT_TEXT', 'text', '- add your comment here -'),
+(2, 3, 'HEADER_TEXT', 'text', 'Comments'),
+(3, 7, 'GADGET_URL', 'text', '');
Index: /buddyloo/fr.xml
===================================================================
--- /buddyloo/fr.xml (revision 590)
+++ /buddyloo/fr.xml (revision 736)
@@ -85,4 +85,10 @@
 		<item name="wcf.buddyloo.social.page.access.2"><![CDATA[Cette page sociale nâest visible que par vos amis.]]></item>
 	</category>
+	<category name="wcf.buddyloo.variables">
+		<!-- this is for the enduser - future version will not need language files //-->
+		<item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item>
+		<item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item>
+		<item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item>
+	</category>
 	<category name="wcf.user.whitelist">
 		<item name="wcf.user.whitelist.add.success"><![CDATA[{if $users|count == 1}Le membre &raquo;{$users|array_shift}&laquo; a Ã©tÃ© informÃ©{else}Les membres {implode from=$users item=user}&raquo;{$user}&laquo;{/implode} ont Ã©tÃ© informÃ©s{/if} de votre demande dâajout Ã  votre liste dâamis.]]></item>
@@ -97,4 +103,6 @@
 	</category>
 	<category name="wcf.acp.option">
+		<item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item>
+		<item name="wcf.acp.option.google_friendconnect.description"><![CDATA[Pleasae register under <a href="http://www.google.com/friendconnect/">http://www.google.com/friendconnect/</a>]]></item>
 		<item name="wcf.acp.option.profile_show_connections"><![CDATA[Afficher les relations amicales]]></item>
 		<item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Les utilisateurs peuvent-ils voir les connexion existant entre chacun d'eux ?]]></item>
@@ -113,4 +121,6 @@
 		<item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Peut voir les sites sociaux Buddyloo]]></item>
 		<item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Est-ce que les utilisateurs de ce groupe sont autorisÃ©s Ã  visualiser les sites sociaux personnels fournis par Buddyloo ?]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Can add custom gadgets to his page]]></item>
+		<item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Should the user be allowed to add custom gadgets to his page?]]></item>
 	</category>
 </language>
Index: /buddyloo/groupoptions.xml
===================================================================
--- /buddyloo/groupoptions.xml (revision 350)
+++ /buddyloo/groupoptions.xml (revision 736)
@@ -12,4 +12,9 @@
 				<categoryname>user.profile</categoryname>
 				<optiontype>boolean</optiontype>
+				<defaultvalue>1</defaultvalue>
+			</option>
+			<option name="user.profile.canCustomGadget">
+				<categoryname>user.profile</categoryname>
+				<optiontype>boolean</optiontype>
 				<defaultvalue>0</defaultvalue>
 			</option>
