Changeset 363
- Timestamp:
- 03/30/08 15:23:31 (5 years ago)
- Location:
- buddyloo
- Files:
-
- 10 added
- 12 modified
-
de-informal.xml (modified) (4 diffs)
-
de.xml (modified) (3 diffs)
-
en.xml (modified) (3 diffs)
-
files/icon/buddylooSocialL.png (added)
-
files/icon/buddylooSocialM.png (modified) (previous)
-
files/icon/buddylooSocialS.png (added)
-
files/icon/socialAddM.png (added)
-
files/icon/socialClose.png (added)
-
files/icon/socialColumnAdd.png (added)
-
files/js/buddylooSocial.js (modified) (6 diffs)
-
files/lib/action/BuddylooGadgetAddAction.class.php (added)
-
files/lib/action/BuddylooSocialAction.class.php (modified) (4 diffs)
-
files/lib/action/BuddylooSocialAddAction.class.php (added)
-
files/lib/data/user/BuddylooSocialData.class.php (modified) (3 diffs)
-
files/lib/form/GadgetSearchForm.class.php (added)
-
files/lib/page/GadgetListPage.class.php (added)
-
files/lib/page/SocialPage.class.php (modified) (5 diffs)
-
fr.xml (modified) (3 diffs)
-
install.sql (modified) (3 diffs)
-
templates/buddylooGadgets.tpl (added)
-
templates/buddylooSocial.tpl (modified) (4 diffs)
-
update.sql (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
buddyloo/de-informal.xml
r350 r363 7 7 </category> 8 8 <category name="wcf.buddyloo"> 9 <!-- email invitation system //--> 9 10 <item name="wcf.buddyloo.invitation.register.description"><![CDATA[Du kannst dich nur anmelden, wenn du mit der angegebenen E-Mail Adresse von einem anderen Mitglied eingeladen wurdest.]]></item> 10 11 <item name="wcf.buddyloo.invitation.emails"><![CDATA[E-Mail Adresse(n)]]></item> 11 12 <item name="wcf.buddyloo.invitation.emails.description"><![CDATA[Bitte gib die E-Mail Adressen der EmpfÀnger ein, an die du eine Foren-Einladung schicken möchten. Mehrere E-Mail Adressen werden mit je einem Komma voneinander getrennt.]]></item> 12 13 <item name="wcf.buddyloo.invitation.body"><![CDATA[Nachricht]]></item> 13 <item name="wcf.buddyloo.invitation.body.description"><![CDATA[ Sie könnendem EmpfÀnger der Nachricht noch einen persönlichen Text mitteilen.]]></item>14 <item name="wcf.buddyloo.invitation.body.description"><![CDATA[Du kannst dem EmpfÀnger der Nachricht noch einen persönlichen Text mitteilen.]]></item> 14 15 <item name="wcf.buddyloo.invitation.notValid"><![CDATA[Du hast eine ungÃŒltige E-Mail-Adresse eingegeben: {$email}]]></item> 15 16 <item name="wcf.buddyloo.invitation.duplicate"><![CDATA[Die E-Mail Adresse {$email} wird bereits von einem Mitglied genutzt.]]></item> … … 18 19 <item name="wcf.buddyloo.invitation.remove.success"><![CDATA[Einladung an {$changedEmails} erfolgreich zurÃŒckgenommen.]]></item> 19 20 <item name="wcf.buddyloo.invitation.add.success"><![CDATA[Einladung an {$changedEmails} erfolgreich verschickt.]]></item> 21 22 <!-- bidirectional buddy system //--> 20 23 <item name="wcf.buddyloo.in.invitations"><![CDATA[Eingehende Freundschaftseinladungen]]></item> 21 24 <item name="wcf.buddyloo.in.accept"><![CDATA[Annehmen]]></item> … … 47 50 {$notice} 48 51 49 Sie gelangen zur Registrierung indem sie folgenen Link aufrufen: {$pageurl}index.php?page=Register52 Sie gelangen zur Registrierung indem Sie folgenen Link aufrufen: {$pageurl}index.php?page=Register 50 53 51 54 Folgende Nachricht hat {$author} als Einladung geschrieben: … … 58 61 <item name="wcf.buddyloo.invitation.register_invitation"><![CDATA[Wir nehmen Neumitglieder nur ÃŒber Einladungen auf. Daher mÃŒssen Sie auch diese E-Mail zur Registrierung verwenden.]]></item> 59 62 <item name="wcf.buddyloo.social.title"><![CDATA[Buddyloo]]></item> 63 64 <!-- gadgets //--> 65 <item name="wcf.buddyloo.gadgets"><![CDATA[Gadgets]]></item> 66 <item name="wcf.buddyloo.gadgets.description"><![CDATA[Gadgets sind Mini-Applikationen, die du deiner Social Page hinzufÃŒgen kannst.]]></item> 67 <item name="wcf.buddyloo.gadgets.add"><![CDATA[Gadget hinzufÃŒgen]]></item> 68 <item name="wcf.buddyloo.gadgets.gadgetID"><![CDATA[#]]></item> 69 <item name="wcf.buddyloo.gadgets.gadgetTitle"><![CDATA[Gadget]]></item> 70 <item name="wcf.buddyloo.gadgets.users"><![CDATA[Nutzer]]></item> 71 <item name="wcf.buddyloo.gadgets.all"><![CDATA[Alle Gadgets]]></item> 72 <item name="wcf.buddyloo.gadgets.search"><![CDATA[Gadgetsuche]]></item> 73 <item name="wcf.buddyloo.gadgets.search.query"><![CDATA[Gadget suchen]]></item> 74 <item name="wcf.buddyloo.gadgets.empty"><![CDATA[Keine Gadgets gefunden]]></item> 75 76 <!-- social pages //--> 77 <item name="wcf.buddyloo.social.column.add"><![CDATA[Spalte hinzufÃŒgen]]></item> 78 <item name="wcf.buddyloo.social.page.add"><![CDATA[Page hinzufÃŒgen]]></item> 79 <item name="wcf.buddyloo.social.page.rename"><![CDATA[Bitte gib den neuen Namen der Social Page ein]]></item> 80 <item name="wcf.buddyloo.social.page.delete"><![CDATA[Willst du die Social Page wirklich löschen?]]></item> 60 81 </category> 61 82 <category name="wcf.user.whitelist"> -
buddyloo/de.xml
r350 r363 7 7 </category> 8 8 <category name="wcf.buddyloo"> 9 <!-- email invitation system //--> 9 10 <item name="wcf.buddyloo.invitation.register.description"><![CDATA[Sie können Sich nur anmelden, wenn Sie mit der angegebenen E-Mail Adresse von einem anderen Mitglied eingeladen wurden.]]></item> 10 11 <item name="wcf.buddyloo.invitation.emails"><![CDATA[E-Mail Adresse(n)]]></item> … … 18 19 <item name="wcf.buddyloo.invitation.remove.success"><![CDATA[Einladung an {$changedEmails} erfolgreich zurÃŒckgenommen.]]></item> 19 20 <item name="wcf.buddyloo.invitation.add.success"><![CDATA[Einladung an {$changedEmails} erfolgreich verschickt.]]></item> 21 22 <!-- bidirectional buddy system //--> 20 23 <item name="wcf.buddyloo.in.invitations"><![CDATA[Eingehende Freundschaftseinladungen]]></item> 21 24 <item name="wcf.buddyloo.in.accept"><![CDATA[Annehmen]]></item> … … 58 61 <item name="wcf.buddyloo.invitation.register_invitation"><![CDATA[Wir nehmen Neumitglieder nur ÃŒber Einladungen auf. Daher mÃŒssen Sie auch diese E-Mail zur Registrierung verwenden.]]></item> 59 62 <item name="wcf.buddyloo.social.title"><![CDATA[Buddyloo]]></item> 63 64 <!-- gadgets //--> 65 <item name="wcf.buddyloo.gadgets"><![CDATA[Gadgets]]></item> 66 <item name="wcf.buddyloo.gadgets.description"><![CDATA[Gadgets sind Mini-Applikationen, die Sie Ihrer Social Page hinzufÃŒgen können.]]></item> 67 <item name="wcf.buddyloo.gadgets.add"><![CDATA[Gadget hinzufÃŒgen]]></item> 68 <item name="wcf.buddyloo.gadgets.gadgetID"><![CDATA[#]]></item> 69 <item name="wcf.buddyloo.gadgets.gadgetTitle"><![CDATA[Gadget]]></item> 70 <item name="wcf.buddyloo.gadgets.users"><![CDATA[Nutzer]]></item> 71 <item name="wcf.buddyloo.gadgets.all"><![CDATA[Alle Gadgets]]></item> 72 <item name="wcf.buddyloo.gadgets.search"><![CDATA[Gadgetsuche]]></item> 73 <item name="wcf.buddyloo.gadgets.search.query"><![CDATA[Gadget suchen]]></item> 74 <item name="wcf.buddyloo.gadgets.empty"><![CDATA[Keine Gadgets gefunden]]></item> 75 76 <!-- social pages //--> 77 <item name="wcf.buddyloo.social.column.add"><![CDATA[Spalte hinzufÃŒgen]]></item> 78 <item name="wcf.buddyloo.social.page.add"><![CDATA[Page hinzufÃŒgen]]></item> 79 <item name="wcf.buddyloo.social.page.rename"><![CDATA[Bitte geben Sie den neuen Namen der Social Page ein]]></item> 80 <item name="wcf.buddyloo.social.page.delete"><![CDATA[Wollen Sie Sie die Social Page wirklich löschen?]]></item> 60 81 </category> 61 82 <category name="wcf.user.whitelist"> -
buddyloo/en.xml
r350 r363 7 7 </category> 8 8 <category name="wcf.buddyloo"> 9 <!-- email invitation system //--> 9 10 <item name="wcf.buddyloo.invitation.register.description"><![CDATA[You will just be allowed to register, when you were previously invited with your email by another user.]]></item> 10 11 <item name="wcf.buddyloo.invitation.emails"><![CDATA[E-Mail addresse(s)]]></item> … … 18 19 <item name="wcf.buddyloo.invitation.remove.success"><![CDATA[Invitations to {$changedEmails} successfully removed.]]></item> 19 20 <item name="wcf.buddyloo.invitation.add.success"><![CDATA[Invitations to {$changedEmails} successfully sent.]]></item> 21 22 <!-- bidirectional buddy system //--> 20 23 <item name="wcf.buddyloo.in.invitations"><![CDATA[Incoming Friendship-Invitations]]></item> 21 24 <item name="wcf.buddyloo.in.accept"><![CDATA[Accept]]></item> … … 58 61 <item name="wcf.buddyloo.invitation.register_invitation"><![CDATA[New registrations are just possible after being invited from one of our members. That's why you have to use this email for your registration.]]></item> 59 62 <item name="wcf.buddyloo.social.title"><![CDATA[Buddyloo]]></item> 63 64 <!-- gadgets //--> 65 <item name="wcf.buddyloo.gadgets"><![CDATA[Gadgets]]></item> 66 <item name="wcf.buddyloo.gadgets.description"><![CDATA[Gadgets are mini-applications, you can add to your social pages.]]></item> 67 <item name="wcf.buddyloo.gadgets.add"><![CDATA[Add Gadget]]></item> 68 <item name="wcf.buddyloo.gadgets.gadgetID"><![CDATA[#]]></item> 69 <item name="wcf.buddyloo.gadgets.gadgetTitle"><![CDATA[Gadget]]></item> 70 <item name="wcf.buddyloo.gadgets.users"><![CDATA[User]]></item> 71 <item name="wcf.buddyloo.gadgets.all"><![CDATA[All Gadgets]]></item> 72 <item name="wcf.buddyloo.gadgets.search"><![CDATA[Gadgetsearch]]></item> 73 <item name="wcf.buddyloo.gadgets.search.query"><![CDATA[search gadget]]></item> 74 <item name="wcf.buddyloo.gadgets.empty"><![CDATA[No gadgets found]]></item> 75 76 <!-- social pages //--> 77 <item name="wcf.buddyloo.social.column.add"><![CDATA[Spalte hinzufÃŒgen]]></item> 78 <item name="wcf.buddyloo.social.page.add"><![CDATA[Page hinzufÃŒgen]]></item> 79 <item name="wcf.buddyloo.social.page.rename"><![CDATA[Please enter the new title of the social page]]></item> 80 <item name="wcf.buddyloo.social.page.delete"><![CDATA[Do you really want to delete this social page?]]></item> 60 81 </category> 61 82 <category name="wcf.user.whitelist"> -
buddyloo/files/js/buddylooSocial.js
r350 r363 1 1 /** 2 * 2 * new page 3 3 * @param socialID 4 4 * @param socialName … … 7 7 function buddylooAddSocial(socialID, socialName, active) { 8 8 $('.tabMenu ul').append('<li '+(active?'class="activeTabMenu"':'')+'>'+ 9 '<a href="index.php?page=Social&userID= 1&socialID='+socialID+'">'+9 '<a href="index.php?page=Social&userID='+userID+'&socialID='+socialID+'">'+ 10 10 '<img alt="" src="wcf/icon/buddylooSocialM.png"/> <span>'+socialName+'</span></a></li>'); 11 11 return false; … … 15 15 * 16 16 */ 17 function buddylooEditSocial(old) { 18 var input = prompt(language['wcf.buddyloo.social.page.rename'], old); 19 if (input != "" && input != old) { 20 $.post('index.php?action=BuddylooSocial&userID='+userID+'&socialID='+socialID, 'gadgetTitle='+input); 21 } 22 } 23 24 /** 25 * 26 */ 27 function buddylooDeleteSocial() { 28 var input = confirm(language['wcf.buddyloo.social.page.delete']); 29 if (input) { 30 $.post('index.php?action=BuddylooSocial&userID='+userID+'&socialID='+socialID, 'removeSocialID='+socialID); 31 } 32 } 33 34 /** 35 * new column 36 */ 17 37 function buddylooAddColumn() { 38 var columns = $('#socialPage').children('div.groupWrapper'); 39 var newid = parseInt($('#socialPage').children('div.groupWrapper:last-child').attr('id').substr(4))+1; 40 var newsize = columns.size()+1; 41 var width = ((100.0/newsize)-1)+'%'; 42 columns.css('width', width); 43 $('#socialPage').append('<div id="sort'+newid+'" class="groupWrapper" style="width:'+width+'"></div>'); 44 buddylooInit(); 18 45 return false; 46 } 47 48 /** 49 * searchs and removes empty columns 50 */ 51 function checkEmpty() { 52 var i=0, j=0; 53 for(var key in $.SortSerialize().o) { 54 if($.SortSerialize().o[key].length == 0) { 55 $('#'+key).remove(); 56 j++; 57 } else { 58 i++; 59 } 60 } 61 if(j>0) { 62 var width = ((100.0/i)-1)+'%'; 63 $('#socialPage').children('div.groupWrapper').css('width', width); 64 } 65 } 66 67 /** 68 * inits sortable object 69 */ 70 function buddylooInit() { 71 $('div.groupWrapper').Sortable( 72 { 73 accept: 'groupItem', 74 helperclass: 'sortHelper', 75 activeclass : 'sortableactive', 76 hoverclass : 'sortablehover', 77 handle: 'div.itemHeader', 78 tolerance: 'intersect', 79 onChange : function(ser) 80 { 81 var serial = $.SortSerialize(); 82 $.post('index.php?action=BuddylooSocial&userID='+userID+'&socialID='+socialID, serial.hash); 83 checkEmpty(); 84 85 }, 86 onStart : function() 87 { 88 $.iAutoscroller.start(this, document.getElementsByTagName('body')); 89 }, 90 onStop : function() 91 { 92 $.iAutoscroller.stop(); 93 } 94 } 95 ); 19 96 } 20 97 … … 25 102 $('img.closeEl').bind('click', closeContent); 26 103 $('img.minimizeEl').bind('click', minimizeContent); 27 $('div.groupWrapper').Sortable( 28 { 29 accept: 'groupItem', 30 helperclass: 'sortHelper', 31 activeclass : 'sortableactive', 32 hoverclass : 'sortablehover', 33 handle: 'div.itemHeader', 34 tolerance: 'intersect', 35 onChange : function(ser) 36 { 37 var serial = $.SortSerialize(); 38 $.post('index.php?action=BuddylooSocial', serial.hash); 39 }, 40 onStart : function() 41 { 42 $.iAutoscroller.start(this, document.getElementsByTagName('body')); 43 }, 44 onStop : function() 45 { 46 $.iAutoscroller.stop(); 47 } 48 } 49 ); 104 buddylooInit(); 50 105 } 51 106 ); … … 56 111 var minimizeContent = function(e) { 57 112 var targetContent = $('div.itemContent', this.parentNode.parentNode); 58 if (targetContent.css('display') == 'none') { 113 var nonvisible = targetContent.css('display') == 'none'; 114 $.post('index.php?action=BuddylooSocial&userID='+userID+'&socialID='+socialID, 'gadgetID='+this.parentNode.parentNode.id+'&visible='+(nonvisible?1:0)); 115 if (nonvisible) { 59 116 targetContent.slideDown(300); 60 117 this.src = RELATIVE_WCF_DIR + 'icon/minusS.png'; … … 70 127 */ 71 128 var closeContent = function(e) { 72 $(this.parentNode.parentNode).css('display', 'none'); 129 $.post('index.php?action=BuddylooSocial&userID='+userID+'&socialID='+socialID, 'gadgetID='+this.parentNode.parentNode.id); 130 $(this.parentNode.parentNode).remove(); 131 checkEmpty(); 73 132 return false; 74 133 } -
buddyloo/files/lib/action/BuddylooSocialAction.class.php
r350 r363 4 4 5 5 /** 6 * handles box actions 6 * handles box actions (asynchronous calls) 7 7 * 8 8 * @author Torben Brodt … … 12 12 class BuddylooSocialAction extends AbstractAction { 13 13 public $colums = array(); 14 public $userID = 0; 15 public $socialID = 0; 16 public $gadgetID = 0; 17 public $visible = -1; 18 19 /** 20 * 21 */ 22 public function getPermission() { 23 return WCF::getUser()->userID == $this->userID; 24 } 14 25 15 26 /** … … 19 30 parent::readParameters(); 20 31 21 foreach($_POST as $col) { 22 $this->columns[] = $col; 32 if (isset($_REQUEST['socialID'])) $this->socialID = intval($_REQUEST['socialID']); 33 if (isset($_REQUEST['userID'])) $this->userID = intval($_REQUEST['userID']); 34 35 // remove or hide 36 if (isset($_REQUEST['gadgetID'])) { 37 if(preg_match('/^box(\d+)$/', $_REQUEST['gadgetID'], $res)) { 38 $this->gadgetID = intval($res[1]); 39 } 40 if (isset($_REQUEST['visible'])) $this->visible = intval($_REQUEST['visible']); 41 } 42 43 foreach($_POST as $key => $col) { 44 if(preg_match('/^sort(\d+)$/', $key, $res)) { 45 $column = $res[1]; 46 foreach($col as $gadget) { 47 if(preg_match('/^box(\d+)$/', $gadget, $res)) { 48 $this->columns[$column][] = $res[1]; 49 } 50 } 51 } 23 52 } 24 53 } … … 31 60 parent::execute(); 32 61 33 // save status 34 $sql = "UPDATE wcf".WCF_N." 35 SET "; 62 // check global permission 63 if (!WCF::getUser()->getPermission('user.profile.canSocial') || !$this->getPermission()) { 64 require_once(WCF_DIR.'lib/system/exception/PermissionDeniedException.class.php'); 65 throw new PermissionDeniedException(); 66 } 67 68 // check users settings 69 //TODO 70 71 72 if($this->gadgetID > 0 && $this->visible == -1) { // delete action 73 $sql = 'DELETE FROM wcf'.WCF_N.'_buddyloo_social_to_gadget 74 WHERE socialID = '.$this->socialID.' 75 AND gadgetID = '.$this->gadgetID; 76 WCF::getDB()->sendQuery($sql); 77 78 } else if($this->gadgetID > 0) { // hide or show action 79 $sql = 'UPDATE wcf'.WCF_N.'_buddyloo_social_to_gadget 80 SET visible = '.$this->visible.' 81 WHERE socialID = '.$this->socialID.' 82 AND gadgetID = '.$this->gadgetID; 83 WCF::getDB()->sendQuery($sql); 84 85 } else { // move action 86 $i=0; 87 88 $sql = 'REPLACE INTO wcf'.WCF_N.'_buddyloo_social_to_gadget 89 (socialID, gadgetID, icolumn, irow, visible) 90 VALUES '; 91 foreach($this->columns as $key => $col) { 92 $j=1; 93 foreach($col as $gadgetID) { 94 if($i++>0) $sql .= ','; 95 $sql .= sprintf('(%d, %d, %d, %d, %d)', $this->socialID, $gadgetID, $key, $j++, 1); 96 } 97 } 98 99 if($i>0) WCF::getDB()->sendQuery($sql); 100 } 36 101 37 102 // call executed event -
buddyloo/files/lib/data/user/BuddylooSocialData.class.php
r350 r363 42 42 */ 43 43 public function fetchColumns() { 44 $sql = 'SELECT 3 AS countColumns, 44 $sql = 'SELECT ( 45 SELECT COUNT(*) 46 FROM ( 47 SELECT COUNT(*) 48 FROM wcf'.WCF_N.'_buddyloo_social_to_gadget 49 WHERE socialID = '.$this->socialID.' 50 GROUP BY icolumn 51 ) A 52 ) AS countColumns, 45 53 sg.icolumn, 46 54 sg.irow, … … 58 66 ON sg.gadgetID = g.gadgetID 59 67 WHERE us.userID = '.$this->userID.' 60 AND us.socialID = 168 AND us.socialID = '.$this->socialID.' 61 69 ORDER BY icolumn ASC, 62 70 irow ASC'; … … 66 74 $irow = $row['irow']; 67 75 $img = $row['noimage'] ? RELATIVE_WCF_DIR.'icon/buddylooSocialM.png' : 'index.php?page=GadgetImage&gadgetID='.$row['gadgetID']; 68 $columns[$icol] = 1; 76 $columns[$icol] = 1; // there's always one item 69 77 70 78 if(!isset($this->columns[$icol])) { 71 79 $this->columns[$icol] = array( 72 80 'id' => $icol, 73 'width' => 100.0/$row['countColumns'],81 'width' => ((100.0/$row['countColumns'])-1).'%', 74 82 'boxes' => array() 75 83 ); -
buddyloo/files/lib/page/SocialPage.class.php
r350 r363 25 25 parent::readParameters(); 26 26 if (isset($_REQUEST['userID'])) $this->userID = intval($_REQUEST['userID']); 27 if (isset($_REQUEST['socialID'])) $this->socialID = intval($_REQUEST['socialID']);28 27 29 28 require_once(WCF_DIR.'lib/data/user/UserProfile.class.php'); … … 34 33 throw new IllegalLinkException(); 35 34 } 35 36 if($this->user->socialID == 0) { 37 $sql = 'INSERT INTO wcf'.WCF_N.'_buddyloo_social 38 (socialTitle) 39 VALUES ("'.WCF::getLanguage()->get('wcf.user.profile.menu.link.social').'"); '; 40 WCF::getDB()->sendQuery($sql); 41 $this->socialID = WCF::getDB()->getInsertID(); 42 43 $sql = 'INSERT INTO wcf'.WCF_N.'_buddyloo_user_to_social 44 (userID, socialID, icolumn) 45 VALUES ('.$this->userID.', '.$this->socialID.', 1);'; 46 WCF::getDB()->sendQuery($sql); 47 48 $sql = 'UPDATE wcf'.WCF_N.'_user 49 SET socialID = '.$this->socialID.' 50 WHERE userID = '.$this->userID; 51 WCF::getDB()->sendQuery($sql); 52 } else { 53 $this->socialID = $this->user->socialID; 54 } 55 56 if (isset($_REQUEST['socialID'])) $this->socialID = intval($_REQUEST['socialID']); 57 36 58 } 37 59 … … 63 85 FROM wcf'.WCF_N.'_buddyloo_user_to_social us 64 86 NATURAL JOIN wcf'.WCF_N.'_buddyloo_social s 87 JOIN wcf'.WCF_N.'_user u 88 ON us.userID = u.userID 65 89 WHERE us.userID = '.WCF::getUser()->userID.' 90 AND u.socialID != s.socialID 66 91 ORDER BY icolumn ASC'; 67 92 $result = WCF::getDB()->sendQuery($sql); 68 93 while ($row = WCF::getDB()->fetchArray($result)) { 69 $this->socialPages[ ] = $row;94 $this->socialPages[$row['socialID']] = $row; 70 95 } 71 96 } … … 80 105 'user' => $this->user, 81 106 'socialID' => $this->socialID, 107 'socialTitle' => isset($this->socialPages[$this->socialID]) ? StringUtil::encodeHTML($this->socialPages[$this->socialID]['socialTitle']) : '', 82 108 'socialPages' => $this->socialPages, 83 109 'social' => $this->social, … … 94 120 require_once(WCF_DIR.'lib/page/util/menu/UserProfileMenu.class.php'); 95 121 UserProfileMenu::getInstance()->userID = $this->userID; 96 UserProfileMenu::getInstance()->setActiveMenuItem('wcf.user.profile.menu.link.social'); 122 123 if($this->socialID == $this->user->socialID || $this->user->socialID == 0) { 124 UserProfileMenu::getInstance()->setActiveMenuItem('wcf.user.profile.menu.link.social'); 125 } 97 126 98 127 // check global permission -
buddyloo/fr.xml
r350 r363 7 7 </category> 8 8 <category name="wcf.buddyloo"> 9 <!-- email invitation system //--> 9 10 <item name="wcf.buddyloo.invitation.register.description"><![CDATA[Vous serez autorisé à vous enregistrer, car une invitation a été envoyée à votre adresse e-mail par un autre utilisateur]]></item> 10 11 <item name="wcf.buddyloo.invitation.emails"><![CDATA[Adresse(s) e-mail]]></item> … … 18 19 <item name="wcf.buddyloo.invitation.remove.success"><![CDATA[Lâinvitation de {$changedEmails} a bien été annulée]]></item> 19 20 <item name="wcf.buddyloo.invitation.add.success"><![CDATA[Lâinvitation pour {$changedEmails} a bien été envoyée]]></item> 21 22 <!-- bidirectional buddy system //--> 20 23 <item name="wcf.buddyloo.in.invitations"><![CDATA[Demandes dâajout à la liste dâamis entrantes]]></item> 21 24 <item name="wcf.buddyloo.in.accept"><![CDATA[Accepter]]></item> … … 58 61 <item name="wcf.buddyloo.invitation.register_invitation"><![CDATA[De nouvelles inscriptions ne sont possible seulement aprÚs avoir été invité par un de nos membres. Câest la raison pour laquelle vous devez utiliser cette e-mail pour votre inscription.]]></item> 59 62 <item name="wcf.buddyloo.social.title"><![CDATA[Buddyloo]]></item> 63 64 <!-- gadgets //--> 65 <item name="wcf.buddyloo.gadgets"><![CDATA[TODO]]></item> 66 <item name="wcf.buddyloo.gadgets.description"><![CDATA[TODO]]></item> 67 <item name="wcf.buddyloo.gadgets.add"><![CDATA[TODO]]></item> 68 <item name="wcf.buddyloo.gadgets.gadgetID"><![CDATA[#]]></item> 69 <item name="wcf.buddyloo.gadgets.gadgetTitle"><![CDATA[TODO]]></item> 70 <item name="wcf.buddyloo.gadgets.users"><![CDATA[TODO]]></item> 71 <item name="wcf.buddyloo.gadgets.all"><![CDATA[TODO]]></item> 72 <item name="wcf.buddyloo.gadgets.search"><![CDATA[TODO]]></item> 73 <item name="wcf.buddyloo.gadgets.search.query"><![CDATA[TODO]]></item> 74 <item name="wcf.buddyloo.gadgets.empty"><![CDATA[TODO]]></item> 75 76 <!-- social pages //--> 77 <item name="wcf.buddyloo.social.column.add"><![CDATA[TODO]]></item> 78 <item name="wcf.buddyloo.social.page.add"><![CDATA[TODO]]></item> 79 <item name="wcf.buddyloo.social.page.rename"><![CDATA[TODO]]></item> 80 <item name="wcf.buddyloo.social.page.delete"><![CDATA[TODO]]></item> 60 81 </category> 61 82 <category name="wcf.user.whitelist"> -
buddyloo/install.sql
r350 r363 1 ALTER TABLE wcf1_user ADD socialID int(10) UNSIGNED NOT NULL DEFAULT '0'; 2 1 3 CREATE TABLE IF NOT EXISTS wcf1_buddyloo ( 2 4 userID int(10) unsigned NOT NULL, … … 22 24 gadgetCode MEDIUMTEXT NOT NULL, 23 25 gadgetImage BLOB, 26 gadgetDescription TEXT NOT NULL, 24 27 PRIMARY KEY (gadgetID) 25 28 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; … … 39 42 icolumn tinyint(1) unsigned NOT NULL, 40 43 PRIMARY KEY (userID,socialID) 41 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 42 43 INSERT INTO wcf1_buddyloo_gadget (gadgetTitle, gadgetCode) VALUES 44 ('Gadget #1', 'Hello World<br/>Hello World<br/>Hello World'), 45 ('Gadget #2', 'Hello World<br/>Hello World<br/>Hello World'), 46 ('Gadget #3', 'Hello World<br/>Hello World<br/>Hello World'), 47 ('Gadget #4', 'Hello World<br/>Hello World<br/>Hello World'), 48 ('Gadget #5', 'Hello World<br/>Hello World<br/>Hello World'), 49 ('Gadget #6', 'Hello World<br/>Hello World<br/>Hello World'), 50 ('Gadget #7', 'Hello World<br/>Hello World<br/>Hello World'), 51 ('Gadget #8', 'Hello World<br/>Hello World<br/>Hello World'), 52 ('Gadget #9', 'Hello World<br/>Hello World<br/>Hello World'), 53 ('Gadget #10', 'Hello World<br/>Hello World<br/>Hello World') 54 ; 55 56 INSERT INTO wcf1_buddyloo_social_to_gadget (socialID, gadgetID, icolumn, irow, visible) VALUES 57 (1,1,1,1,1), 58 (1,2,1,2,1), 59 (1,3,1,3,1), 60 (1,4,2,1,1), 61 (1,5,2,2,1), 62 (1,6,2,3,1), 63 (1,7,3,1,0), 64 (1,8,3,2,0), 65 (1,9,3,3,1), 66 (1,10,3,4,1), 67 (2,1,1,1,1), 68 (2,2,1,2,1), 69 (2,3,1,3,1), 70 (2,4,2,1,1), 71 (2,5,2,2,1), 72 (2,6,2,3,1), 73 (2,7,3,1,0), 74 (2,8,3,2,0), 75 (2,9,3,3,1), 76 (2,10,3,4,1) 77 ; 78 79 INSERT INTO wcf1_buddyloo_social (socialTitle) VALUES 80 ('Eintrag 1'), 81 ('Eintrag 2') 82 ; 83 84 INSERT INTO wcf1_buddyloo_user_to_social VALUES 85 (1,1,1), 86 (1,2,2) 87 ; 44 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -
buddyloo/templates/buddylooSocial.tpl
r350 r363 10 10 <script type="text/javascript"> 11 11 //<![CDATA[ 12 var socialID = {$socialID}; 13 var userID = {$user->userID}; 12 14 onloadEvents.push(function () { 13 15 {foreach from=$socialPages item=$page} … … 15 17 {/foreach} 16 18 }); 19 language['wcf.buddyloo.social.page.rename'] = '{lang}wcf.buddyloo.social.page.rename{/lang}'; 20 language['wcf.buddyloo.social.page.delete'] = '{lang}wcf.buddyloo.social.page.delete{/lang}'; 17 21 //]]> 18 22 </script> 19 <style type="text/css"> 20 //<![CDATA[ 23 {if $social->getPermission()}<style type="text/css"> 21 24 .groupItem .itemHeader { 22 25 cursor:move; 23 26 } 24 //]]> 25 </style> 27 </style>{/if} 26 28 {/if} 27 29 </head> … … 36 38 37 39 <div id="main"> 38 <div style="float:right"> 39 <a href="#" onclick="return buddylooAddSocial();">add social page</a> 40 <a href="#" onclick="return buddylooAddColumn();">add column</a> 40 <div class="largeButtons"> 41 <ul> 42 43 <li><a href="index.php?action=BuddylooSocialAdd&userID={@$user->userID}&socialID={$socialID}"><img src="{@RELATIVE_WCF_DIR}icon/buddylooSocialM.png" alt="" /> <span>{lang}wcf.buddyloo.social.page.add{/lang}</span></a></li> 44 <li><a href="#" onclick="return buddylooAddColumn();"><img src="{@RELATIVE_WCF_DIR}icon/socialColumnAdd.png" alt="" /> <span>{lang}wcf.buddyloo.social.column.add{/lang}</span></a></li> 45 <li><a href="index.php?page=GadgetList&userID={@$user->userID}&socialID={$socialID}"><img src="{@RELATIVE_WCF_DIR}icon/socialAddM.png" alt="" /> <span>{lang}wcf.buddyloo.gadgets.add{/lang}</span></a></li> 46 </ul> 41 47 </div> 42 48 … … 48 54 <p class="error" id="socialError" style="display:none"></p> 49 55 <p class="warning" id="socialWarning" style="display:none"></p> 56 {if $social->getPermission()}<div style="float:right;"> 57 <a href="#" onclick="return buddylooEditSocial('{$socialTitle}')"><img src="wcf/icon/editS.png"/></a> 58 <a href="#" onclick="return buddylooDeleteSocial()"><img src="wcf/icon/deleteS.png"/></a> 59 </div> 60 {/if} 50 61 {/capture} 51 62 52 63 {include file="userProfileHeader"} 53 64 54 65 <div class="border {if $this|method_exists:'getUserProfileMenu' && $this->getUserProfileMenu()->getMenuItems('')|count > 1}tabMenuContent{else}content{/if}"> 55 <div class="container-1 profileDisplay" >66 <div class="container-1 profileDisplay" id="socialPage"> 56 67 {foreach from=$social->getColumns() item=column} 57 68 <div id="sort{$column.id}" class="groupWrapper" style="width:{$column.width}"> -
buddyloo/update.sql
r350 r363 1 ALTER TABLE wcf1_user ADD socialID int(10) UNSIGNED NOT NULL DEFAULT '0'; 2 1 3 CREATE TABLE IF NOT EXISTS wcf1_buddyloo_social ( 2 4 socialID int(10) unsigned NOT NULL auto_increment, … … 10 12 gadgetCode MEDIUMTEXT NOT NULL, 11 13 gadgetImage BLOB NOT NULL, 14 gadgetDescription TEXT NOT NULL, 12 15 PRIMARY KEY (gadgetID) 13 16 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
