Changeset 736

Show
Ignore:
Timestamp:
12/07/08 21:56:35 (5 years ago)
Author:
d0nut
Message:

buddyloo now is a full open social container (by using google friend connect)

Location:
buddyloo
Files:
14 modified

Legend:

Unmodified
Added
Removed
  • buddyloo/de-informal.xml

    r534 r736  
    8585                <item name="wcf.buddyloo.social.page.access.2"><![CDATA[Nur deine Freunde haben Zugriff auf diese Seite.]]></item> 
    8686        </category> 
     87        <category name="wcf.buddyloo.variables"> 
     88                <!-- this is for the enduser - future version will not need language files //--> 
     89                <item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item> 
     90                <item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item> 
     91                <item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item> 
     92        </category> 
    8793        <category name="wcf.user.whitelist"> 
    8894                <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> 
     
    97103        </category> 
    98104        <category name="wcf.acp.option"> 
     105                <item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item> 
     106                <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> 
    99107                <item name="wcf.acp.option.profile_show_connections"><![CDATA[Freundschafts-Verbindungen zeigen]]></item> 
    100108                <item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Soll angezeigt werden ÃŒber welche Ecken sich Benutzer kennen?]]></item> 
     
    111119                <item name="wcf.acp.group.option.user.profile.canInvite"><![CDATA[Darf Foren-Einladungen verschicken]]></item> 
    112120                <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> 
    113                 <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten einsehen]]></item> 
    114                 <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> 
     121                <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten benutzen]]></item> 
     122                <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> 
     123                <item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Darf beliebige Gadgets hinzufÃŒgen]]></item> 
     124                <item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Soll der Benutzer beliebige Gadgets hinzufÃŒgen dÃŒrfen?]]></item> 
    115125        </category> 
    116126</language> 
  • buddyloo/de.xml

    r534 r736  
    8585                <item name="wcf.buddyloo.social.page.access.2"><![CDATA[Nur Ihre Freunde haben Zugriff auf diese Seite.]]></item> 
    8686        </category> 
     87        <category name="wcf.buddyloo.variables"> 
     88                <!-- this is for the enduser - future version will not need language files //--> 
     89                <item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item> 
     90                <item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item> 
     91                <item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item> 
     92        </category> 
    8793        <category name="wcf.user.whitelist"> 
    8894                <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> 
     
    97103        </category> 
    98104        <category name="wcf.acp.option"> 
     105                <item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item> 
     106                <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> 
    99107                <item name="wcf.acp.option.profile_show_connections"><![CDATA[Freundschafts-Verbindungen zeigen]]></item> 
    100108                <item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Soll angezeigt werden ÃŒber welche Ecken sich Benutzer kennen?]]></item> 
     
    111119                <item name="wcf.acp.group.option.user.profile.canInvite"><![CDATA[Darf Foren-Einladungen verschicken]]></item> 
    112120                <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> 
    113                 <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten einsehen]]></item> 
    114                 <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> 
     121                <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Darf Buddyloo Social Seiten benutzen]]></item> 
     122                <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> 
     123                <item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Darf beliebige Gadgets hinzufÃŒgen]]></item> 
     124                <item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Soll der Benutzer beliebige Gadgets hinzufÃŒgen dÃŒrfen?]]></item> 
    115125        </category> 
    116126</language> 
  • buddyloo/en.xml

    r534 r736  
    8585                <item name="wcf.buddyloo.social.page.access.2"><![CDATA[This social page is visible just for your friends.]]></item> 
    8686        </category> 
     87        <category name="wcf.buddyloo.variables"> 
     88                <!-- this is for the enduser - future version will not need language files //--> 
     89                <item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item> 
     90                <item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item> 
     91                <item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item> 
     92        </category> 
    8793        <category name="wcf.user.whitelist"> 
    8894                <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> 
     
    97103        </category> 
    98104        <category name="wcf.acp.option"> 
     105                <item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item> 
     106                <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> 
    99107                <item name="wcf.acp.option.profile_show_connections"><![CDATA[Show friendship-connections]]></item> 
    100108                <item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Should users see over which friendship-connections they know eachother.]]></item> 
     
    111119                <item name="wcf.acp.group.option.user.profile.canInvite"><![CDATA[Can send community-invitations]]></item> 
    112120                <item name="wcf.acp.group.option.user.profile.canInvite.description"><![CDATA[Can the user send invitations to allow recipients to register?]]></item> 
    113                 <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Can see Buddyloo Social Sites]]></item> 
    114                 <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> 
     121                <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Can use Buddyloo Social Sites]]></item> 
     122                <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> 
     123                <item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Can add custom gadgets to his page]]></item> 
     124                <item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Should the user be allowed to add custom gadgets to his page?]]></item> 
    115125        </category> 
    116126</language> 
  • buddyloo/files/js/buddylooSocial.js

    r390 r736  
    153153 * 
    154154 */ 
    155 function gadgetConfig(x) { 
     155function getFormData(form, asArray) { 
     156        var ret; 
     157        var add = function(n, v) { 
     158                if(asArray) { 
     159                        if(ret == null) ret = new Array(); 
     160                        ret[n] = escape(v); 
     161                } else { 
     162                        ret = (ret == null ? '' : ret+'&') + n +'='+ escape(v); 
     163                } 
     164        }; 
     165  
     166        for(var i=0; i<form.elements.length; i++) { 
     167                var el = form.elements[i]; 
     168                var type = (el.type || ''); 
     169  
     170                if(type.match(/^(text|hidden|textarea)$/i) || (type.match(/^(radio|checkbox)$/i) && el.checked)) { 
     171                        add(el.name, el.value); 
     172                } else if(el.nodeName.match(/^select$/i)) { 
     173                        for(var j=0; j<el.options.length; j++) { 
     174                                if(el.options[j].selected) { 
     175                                        add(el.name, el.options[j].value); 
     176                                } 
     177                        } 
     178                } else if(el.nodeName.match(/^textarea$/i)) { 
     179                        add(el.name, el.value); 
     180                } 
     181        } 
     182        return ret != null ? ret : (asArray ? new Array() : ''); 
     183} 
     184 
     185/** 
     186 * 
     187 */ 
     188function gadgetConfig(form, boxID, x) { 
     189        var data = getFormData(form, 0); 
    156190        // save config 
    157         $.post('index.php?action=BuddylooSocial&handle=configGadget&userID='+userID+'&socialID='+socialID, 'boxID='+this.parentNode.parentNode.id); 
    158         x.slideToggle(750); 
     191        $.post('index.php?action=BuddylooSocial&handle=configGadgetSave&userID='+userID+'&socialID='+socialID, 'boxID=box'+boxID+'&'+data, function(data) { 
     192                eval(data); 
     193        }); 
     194        // x.slideToggle(750); 
    159195        return false; 
    160196} 
     
    175211                // load custom config 
    176212                $.post('index.php?action=BuddylooSocial&handle=configGadget&userID='+userID+'&socialID='+socialID, 'boxID='+this.parentNode.parentNode.id, function(data) { 
     213                        if(data == '') return; 
    177214                        var form = document.createElement('form'); 
    178215                        form.onsubmit = function() {  
    179                                 return gadgetConfig(x);  
    180                         } 
     216                                return gadgetConfig(this, boxID, x);  
     217                        } 
     218                         
     219                        form.innerHTML = data; 
    181220 
    182221                        var submit = document.createElement('input'); 
  • buddyloo/files/lib/action/BuddylooSocialAction.class.php

    r390 r736  
    145145                                WCF::getDB()->sendQuery($sql); 
    146146                                 
     147                                $sql = 'DELETE FROM     wcf'.WCF_N.'_buddyloo_gadget_variables_value 
     148                                        WHERE           socialID = '.$this->socialID; 
     149                                WCF::getDB()->sendQuery($sql); 
     150                                 
    147151                                // finds the first socialpage to set as new default 
    148152                                $sql = 'SELECT          IF(ISNULL(MIN(socialID)),0,MIN(socialID)) AS socialID 
     
    161165                         
    162166                        case 'addGadget': 
     167                                if($this->gadgetID == 7 && !WCF::getUser()->getPermission('user.profile.canCustomGadget')) return; 
    163168                                $visible = true; 
    164169                 
     
    189194                                $sql = 'DELETE FROM     wcf'.WCF_N.'_buddyloo_gadget_to_social 
    190195                                        WHERE           boxID = '.$this->boxID; 
    191                                 echo $sql; 
    192196                                WCF::getDB()->sendQuery($sql); 
    193197                        break; 
     
    214218                        break; 
    215219                        case 'configGadget': 
    216                                  
     220                        case 'configGadgetSave': 
     221                                $sql = 'SELECT          gs.gadgetID, 
     222                                                        v.variableID, 
     223                                                        v.variableName, 
     224                                                        v.variableType, 
     225                                                        IF(ISNULL(u.userID), v.variableDefault, u.variableValue) AS variableValue 
     226                                        FROM            wcf'.WCF_N.'_buddyloo_gadget_to_social gs 
     227 
     228                                        INNER JOIN      wcf'.WCF_N.'_buddyloo_gadget_variables v 
     229                                        ON              gs.boxID = '.$this->boxID.' 
     230                                        AND             gs.gadgetID = v.gadgetID 
     231 
     232                                        LEFT JOIN       wcf'.WCF_N.'_buddyloo_gadget_variables_value u 
     233                                        ON              u.userID = '.$this->userID.' 
     234                                        AND             v.variableID = u.variableID 
     235 
     236                                        ORDER BY        v.variableName ASC'; 
     237 
     238                                $result = WCF::getDB()->sendQuery($sql); 
     239                                $return = ''; 
     240                                while ($row = WCF::getDB()->fetchArray($result)) { 
     241                                        // TODO build classes for every option text,textarea,radio,checkbox,select,multiselect 
     242                                        // should allow validation, ... 
     243                                        $row['variableName'] = WCF::getLanguage()->get('wcf.buddyloo.variables.'.$row['gadgetID'].'.'.$row['variableName']); 
     244                                        switch($this->handle) { 
     245                                                case 'configGadgetSave': // save 
     246                                                        if($row['variableType'] == 'text') { 
     247                                                                $val = $_POST['buddyloobox'][$this->boxID][$row['variableID']]; 
     248                                                                if(preg_match('/[^\(\)\{\}]+/', $val)) { 
     249                                                                        $sql = 'REPLACE INTO    wcf'.WCF_N.'_buddyloo_gadget_variables_value 
     250                                                                                                (variableID, boxID, userID, variableValue) 
     251                                                                                VALUES          ('.$row['variableID'].', '.$this->boxID.', '.$this->userID.', "'.$val.'")'; 
     252                                                                        WCF::getDB()->sendQuery($sql); 
     253                                                                         
     254                                                                        //TODO translation.. mark as red 
     255                                                                        echo 'alert("saved value for '.$row['variableName'].'");'; 
     256                                                                } 
     257                                                        } 
     258                                                        break; 
     259                                                case 'configGadget': 
     260                                                        //TODO build classes for every option text,textarea,radio,checkbox,select,multiselect 
     261                                                        if($row['variableType'] == 'text') { 
     262                                                                $return .= sprintf('%s: <input type="text" name="buddyloobox[%d][%d]" value="%s" /><br/>',  
     263                                                                        $row['variableName'], $this->boxID, $row['variableID'], $row['variableValue']); 
     264                                                        } 
     265                                                break; 
     266                                        } 
     267                                } 
     268                                echo $return; 
    217269                        break; 
    218270                } 
  • buddyloo/files/lib/data/user/BuddylooSocialData.class.php

    r390 r736  
    106106                $result = WCF::getDB()->sendQuery($sql); 
    107107                while ($row = WCF::getDB()->fetchArray($result)) { 
     108                 
     109                        $replace = array(); 
     110                        $replace['{$userID}'] = $this->userID; 
     111                        $replace['{$siteID}'] = GOOGLE_FRIENDCONNECT; 
     112 
     113                        // replace variables 
     114                        $sql = 'SELECT          v.variableName, 
     115                                                v.variableType, 
     116                                                IF(ISNULL(u.userID), v.variableDefault, u.variableValue) AS variableValue 
     117                                FROM            wcf'.WCF_N.'_buddyloo_gadget_to_social gs 
     118 
     119                                INNER JOIN      wcf'.WCF_N.'_buddyloo_gadget_variables v 
     120                                ON              gs.boxID = '.$row['boxID'].' 
     121                                AND             gs.gadgetID = v.gadgetID 
     122 
     123                                LEFT JOIN       wcf'.WCF_N.'_buddyloo_gadget_variables_value u 
     124                                ON              u.userID = '.$this->userID.' 
     125                                AND             v.variableID = u.variableID'; 
     126                        $result2 = WCF::getDB()->sendQuery($sql); 
     127                        while ($row2 = WCF::getDB()->fetchArray($result2)) { 
     128                                switch($row2['variableType']) { 
     129                                        case 'text': 
     130                                        case 'hidden': 
     131                                                $search = sprintf('{$%s}', $row2['variableName']); 
     132                                                $replace[$search] = addslashes($row2['variableValue']); 
     133                                        break; 
     134                                } 
     135                        } 
     136                 
    108137                        $icol = $row['icolumn']; 
    109138                        $irow = $row['irow']; 
     
    124153                                'img' => $img, 
    125154                                'title' => $row['gadgetTitle'], 
    126                                 'content' => $row['gadgetCode'], 
     155                                'content' => str_replace(array_keys($replace), array_values($replace), $row['gadgetCode']), 
    127156                                'visible' => (boolean)$row['visible'] 
    128157                        ); 
  • buddyloo/files/lib/page/GadgetListPage.class.php

    r534 r736  
    129129                $result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage); 
    130130                while ($row = WCF::getDB()->fetchArray($result)) { 
     131                        if($row['gadgetID'] == 7 && !WCF::getUser()->getPermission('user.profile.canCustomGadget')) $row['used'] = 1; 
     132                 
    131133                        $name = $row['groupName']; 
    132134                        $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>'; 
  • buddyloo/fr.xml

    r590 r736  
    8585                <item name="wcf.buddyloo.social.page.access.2"><![CDATA[Cette page sociale n’est visible que par vos amis.]]></item> 
    8686        </category> 
     87        <category name="wcf.buddyloo.variables"> 
     88                <!-- this is for the enduser - future version will not need language files //--> 
     89                <item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item> 
     90                <item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item> 
     91                <item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item> 
     92        </category> 
    8793        <category name="wcf.user.whitelist"> 
    8894                <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> 
     
    97103        </category> 
    98104        <category name="wcf.acp.option"> 
     105                <item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item> 
     106                <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> 
    99107                <item name="wcf.acp.option.profile_show_connections"><![CDATA[Afficher les relations amicales]]></item> 
    100108                <item name="wcf.acp.option.profile_show_connections.description"><![CDATA[Les utilisateurs peuvent-ils voir les connexion existant entre chacun d'eux ?]]></item> 
     
    113121                <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Peut voir les sites sociaux Buddyloo]]></item> 
    114122                <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> 
     123                <item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Can add custom gadgets to his page]]></item> 
     124                <item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Should the user be allowed to add custom gadgets to his page?]]></item> 
    115125        </category> 
    116126</language> 
  • buddyloo/groupoptions.xml

    r350 r736  
    1212                                <categoryname>user.profile</categoryname> 
    1313                                <optiontype>boolean</optiontype> 
     14                                <defaultvalue>1</defaultvalue> 
     15                        </option> 
     16                        <option name="user.profile.canCustomGadget"> 
     17                                <categoryname>user.profile</categoryname> 
     18                                <optiontype>boolean</optiontype> 
    1419                                <defaultvalue>0</defaultvalue> 
    1520                        </option> 
  • buddyloo/install.sql

    r536 r736  
    3333) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    3434 
    35 --CREATE TABLE `ModulePrefs` ( 
    36 --`title` VARCHAR( 255 ) NOT NULL , 
    37 --`directory_title` VARCHAR( 80 ) NOT NULL , 
    38 --`title_url` VARCHAR( 255 ) NOT NULL , 
    39 --`description` TEXT NOT NULL , 
    40 --`author` VARCHAR( 80 ) NOT NULL , 
    41 --`author_email` VARCHAR( 80 ) NOT NULL , 
    42 --`author_affiliation` VARCHAR( 80 ) NOT NULL , 
    43 --`author_location` VARCHAR( 80 ) NOT NULL , 
    44 --`screenshot` VARCHAR( 255 ) NOT NULL , 
    45 --`thumbnail` VARCHAR( 255 ) NOT NULL , 
    46 --`height` INT UNSIGNED NOT NULL , 
    47 --`width` INT UNSIGNED NOT NULL , 
    48 --`scaling` BOOL NOT NULL , 
    49 --`scrolling` BOOL NOT NULL , 
    50 --`singleton` BOOL NOT NULL , 
    51 --`author_photo` VARCHAR( 255 ) NOT NULL , 
    52 --`author_aboutme` VARCHAR( 255 ) NOT NULL , 
    53 --`author_link` VARCHAR( 255 ) NOT NULL , 
    54 --`author_quote` VARCHAR( 255 ) NOT NULL 
    55 --) ENGINE = MYISAM  
    56  
    57  
    5835DROP TABLE IF EXISTS wcf1_buddyloo_gadget_to_social; 
    5936CREATE TABLE wcf1_buddyloo_gadget_to_social ( 
     
    7451  PRIMARY KEY (userID,socialID) 
    7552) ENGINE=MyISAM DEFAULT CHARSET=utf8;    
     53 
     54DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables; 
     55CREATE TABLE wcf1_buddyloo_gadget_variables ( 
     56  variableID int(10) unsigned NOT NULL auto_increment, 
     57  gadgetID int(10) unsigned NOT NULL, 
     58  variableName varchar(64) NOT NULL, 
     59  variableType ENUM('text','textarea','radio','checkbox','select','multiselect') NOT NULL, 
     60  variableDefault varchar(255) NOT NULL, 
     61  PRIMARY KEY (variableID), 
     62  UNIQUE(gadgetID, variableName) 
     63) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     64 
     65DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables_value; 
     66CREATE TABLE wcf1_buddyloo_gadget_variables_value ( 
     67  variableID int(10) unsigned NOT NULL, 
     68  boxID int(10) unsigned NOT NULL, 
     69  userID int(10) unsigned NOT NULL, 
     70  variableValue varchar(255) NOT NULL, 
     71  PRIMARY KEY (variableID, boxID, userID) 
     72) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     73 
     74INSERT INTO `wcf1_buddyloo_gadget` (`gadgetID`, `gadgetTitle`, `gadgetCode`, `gadgetImage`, `gadgetDescription`) VALUES 
     75(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.'), 
     76(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.'), 
     77(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.'), 
     78(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.'), 
     79(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.'), 
     80(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.'), 
     81(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.'); 
     82 
     83 
     84INSERT INTO `wcf1_buddyloo_gadget_variables` (`variableID`, `gadgetID`, `variableName`, `variableType`, `variableDefault`) VALUES 
     85(1, 3, 'DEFAULT_COMMENT_TEXT', 'text', '- add your comment here -'), 
     86(2, 3, 'HEADER_TEXT', 'text', 'Comments'), 
     87(3, 7, 'GADGET_URL', 'text', ''); 
  • buddyloo/options.xml

    r270 r736  
    44        <import> 
    55                <options> 
     6                        <option name="google_friendconnect"> 
     7                                <categoryname>general.page</categoryname> 
     8                                <optiontype>text</optiontype> 
     9                                <defaultvalue></defaultvalue> 
     10                        </option> 
    611                        <option name="profile_show_connections"> 
    712                                <categoryname>user.profile</categoryname> 
  • buddyloo/package.xml

    r674 r736  
    77                <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> 
    88                <packagedescription language="fr"><![CDATA[SystÚme d’amitié pour le WCF. Les demandes d’amitié peuvent être acceptées ou refusées.]]></packagedescription> 
    9                 <version>0.9.6</version> 
     9                <version>0.9.7</version> 
    1010                <date>DATE</date> 
    1111                <plugin>com.woltlab.wcf</plugin> 
     
    1515        <authorinformation> 
    1616                <author>Torben Brodt</author> 
    17                 <authorurl>http://www.easy-coding.de/trac/wcf</authorurl> 
     17                <authorurl>http://trac.easy-coding.de/trac/wcf</authorurl> 
    1818        </authorinformation> 
    1919 
     
    4545        </instructions> 
    4646         
    47         <instructions type="update" fromversion="0.9.5 pl 2"> 
     47        <instructions type="update" fromversion="0.9.6"> 
    4848                <files>files.tar</files> 
    49                 <languages languagecode="tr">tr.xml</languages> 
    50         </instructions> 
    51          
    52         <instructions type="update" fromversion="0.9.5 pl 1"> 
    53                 <!--<packageinstallationplugins>pip.tar</packageinstallationplugins>//--> 
    54                 <files>files.tar</files> 
    55                 <templates>templates.tar</templates> 
    56                 <languages languagecode="de">de.xml</languages> 
    57                 <languages languagecode="de-informal">de-informal.xml</languages> 
    58                 <languages languagecode="en">en.xml</languages> 
    59                 <languages languagecode="fr">fr.xml</languages> 
    60                 <languages languagecode="tr">tr.xml</languages> 
    61         </instructions> 
    62          
    63         <instructions type="update" fromversion="0.9.5"> 
    64                 <!--<packageinstallationplugins>pip.tar</packageinstallationplugins>//--> 
    65                 <files>files.tar</files> 
    66                 <templates>templates.tar</templates> 
     49                <sql>update.sql</sql> 
     50                <options>options.xml</options> 
     51                <groupoptions>groupoptions.xml</groupoptions> 
    6752                <languages languagecode="de">de.xml</languages> 
    6853                <languages languagecode="de-informal">de-informal.xml</languages> 
  • buddyloo/tr.xml

    r674 r736  
    7676                <item name="wcf.buddyloo.subject"><![CDATA[{$author} Sizin arkadaþýnýz olmak istiyor]]></item> 
    7777        </category> 
     78        <category name="wcf.buddyloo.variables"> 
     79                <!-- this is for the enduser - future version will not need language files //--> 
     80                <item name="wcf.buddyloo.variables.3.HEADER_TEXT"><![CDATA[Start with this text in the comments area]]></item> 
     81                <item name="wcf.buddyloo.variables.3.DEFAULT_COMMENT_TEXT"><![CDATA[Comments header]]></item> 
     82                <item name="wcf.buddyloo.variables.7.GADGET_URL"><![CDATA[Gadget URL]]></item> 
     83        </category> 
    7884        <category name="wcf.user.whitelist"> 
    7985                <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> 
     
    8894        </category> 
    8995        <category name="wcf.acp.option"> 
     96                <item name="wcf.acp.option.google_friendconnect"><![CDATA[Google Friend Connect Site]]></item> 
     97                <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> 
    9098                <item name="wcf.acp.option.profile_show_connections"><![CDATA[Arkadaþ davet baðlantýlarý görüntülensin]]></item> 
    9199                <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> 
     
    104112                <item name="wcf.acp.group.option.user.profile.canSocial"><![CDATA[Sosyal arkadaþlýk sitelerine bakýlabilir.]]></item> 
    105113                <item name="wcf.acp.group.option.user.profile.canSocial.description"><![CDATA[Üyelerin sosyal - toplumsal sitelere bakabilmelerine izin verebilirsiniz.]]></item> 
     114                <item name="wcf.acp.group.option.user.profile.canCustomGadget"><![CDATA[Can add custom gadgets to his page]]></item> 
     115                <item name="wcf.acp.group.option.user.profile.canCustomGadget.description"><![CDATA[Should the user be allowed to add custom gadgets to his page?]]></item> 
    106116        </category> 
    107117</language> 
  • buddyloo/update.sql

    r390 r736  
    1 ALTER TABLE wcf1_user ADD socialID int(10) UNSIGNED NOT NULL DEFAULT '0'; 
    2  
    3 CREATE TABLE IF NOT EXISTS wcf1_buddyloo_social ( 
    4   socialID int(10) unsigned NOT NULL auto_increment, 
    5   socialTitle varchar(80) NOT NULL, 
    6   socialAccess tinyint(1) unsigned NOT NULL DEFAULT 0, 
    7   PRIMARY KEY (socialID) 
     1DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables; 
     2CREATE TABLE wcf1_buddyloo_gadget_variables ( 
     3  variableID int(10) unsigned NOT NULL auto_increment, 
     4  gadgetID int(10) unsigned NOT NULL, 
     5  variableName varchar(64) NOT NULL, 
     6  variableType ENUM('text','textarea','radio','checkbox','select','multiselect') NOT NULL, 
     7  variableDefault varchar(255) NOT NULL, 
     8  PRIMARY KEY (variableID), 
     9  UNIQUE(gadgetID, variableName) 
    810) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    911 
    10 CREATE TABLE IF NOT EXISTS wcf1_buddyloo_gadget ( 
    11   gadgetID int(10) unsigned NOT NULL auto_increment, 
    12   gadgetTitle varchar(80) NOT NULL, 
    13   gadgetCode MEDIUMTEXT NOT NULL, 
    14   gadgetImage BLOB NULL DEFAULT NULL, 
    15   gadgetDescription TEXT NOT NULL, 
    16   PRIMARY KEY (gadgetID) 
     12DROP TABLE IF EXISTS wcf1_buddyloo_gadget_variables_value; 
     13CREATE TABLE wcf1_buddyloo_gadget_variables_value ( 
     14  variableID int(10) unsigned NOT NULL, 
     15  boxID int(10) unsigned NOT NULL, 
     16  userID int(10) unsigned NOT NULL, 
     17  variableValue varchar(255) NOT NULL, 
     18  PRIMARY KEY (variableID, boxID, userID) 
    1719) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    1820 
    19 CREATE TABLE IF NOT EXISTS wcf1_buddyloo_gadget_to_social ( 
    20   boxID int(10) unsigned NOT NULL auto_increment, 
    21   socialID int(10) unsigned NOT NULL, 
    22   gadgetID int(10) unsigned NOT NULL, 
    23   icolumn tinyint(1) unsigned NOT NULL, 
    24   irow tinyint(1) unsigned NOT NULL, 
    25   visible tinyint(1) unsigned NOT NULL DEFAULT 1, 
    26   PRIMARY KEY (boxID) 
    27 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     21INSERT INTO `wcf1_buddyloo_gadget` (`gadgetID`, `gadgetTitle`, `gadgetCode`, `gadgetImage`, `gadgetDescription`) VALUES 
     22(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.'), 
     23(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.'), 
     24(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.'), 
     25(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.'), 
     26(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.'), 
     27(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.'), 
     28(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.'); 
    2829 
    29 CREATE TABLE IF NOT EXISTS wcf1_buddyloo_user_to_social ( 
    30   userID int(10) unsigned NOT NULL, 
    31   socialID int(10) unsigned NOT NULL, 
    32   icolumn tinyint(1) unsigned NOT NULL, 
    33   PRIMARY KEY (userID,socialID) 
    34 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     30 
     31INSERT INTO `wcf1_buddyloo_gadget_variables` (`variableID`, `gadgetID`, `variableName`, `variableType`, `variableDefault`) VALUES 
     32(1, 3, 'DEFAULT_COMMENT_TEXT', 'text', '- add your comment here -'), 
     33(2, 3, 'HEADER_TEXT', 'text', 'Comments'), 
     34(3, 7, 'GADGET_URL', 'text', '');