Changeset 6446
- Timestamp:
- Apr 11, 2008, 11:12:38 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/groups/orca/layout/uni/xsl/breadcrumbs.xsl ¶
r6178 r6446 12 12 13 13 <img src="{/root/urls/img}a.gif" /> 14 <a href="../../gr oups_home.php">Groups</a>14 <a href="../../grp.php">Groups</a> 15 15 16 16 <xsl:if test="string-length($link1)"> -
TabularUnified trunk/groups/orca/layout/uni/xsl/forum_posts.xsl ¶
r6322 r6446 14 14 <xsl:call-template name="breadcrumbs"> 15 15 <xsl:with-param name="link1"> 16 <a href="../../gr oup.php?ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a>16 <a href="../../grp.php?action=group&ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a> 17 17 </xsl:with-param> 18 18 <xsl:with-param name="link2"> -
TabularUnified trunk/groups/orca/layout/uni/xsl/forum_topics.xsl ¶
r6322 r6446 11 11 <xsl:call-template name="breadcrumbs"> 12 12 <xsl:with-param name="link1"> 13 <a href="../../gr oup.php?ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a>13 <a href="../../grp.php?action=group&ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a> 14 14 </xsl:with-param> 15 15 </xsl:call-template> -
TabularUnified trunk/groups/orca/xml/orca.php ¶
r6412 r6446 60 60 require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' ); 61 61 require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' ); 62 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' );63 62 } 64 63 else … … 67 66 global $dir; 68 67 $orca_integration_xml = ''; 69 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' ); 70 } 71 72 $oGroups = new BxDolGroups(false); 68 } 73 69 74 70 $_COOKIE['memberID'] = $orca_integration_vars['memberID']; … … 201 197 case 'user_perm': 202 198 203 $forum_id = (int)$orca_integration_vars['forum_id']; 204 $user_id = getID( $user ); 205 206 $arrGroup = $oGroups->getGroupInfo ($forum_id); 207 $isGroupMember = $oGroups->isGroupMember ($user_id, $forum_id) ? 1 : 0; 208 $isGroupCreator = $arrGroup['creatorID'] == $user_id ? 1 : 0; 209 $isAdmin = isOrcaAdmin ($user) ? 1 : 0; 210 199 $forum_id = (int)$orca_integration_vars['forum_id']; 200 $user_id = getID( $user ); 201 202 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' ); 203 $oGroups = new BxDolGroups(false); 204 $arrGroup = $oGroups->getGroupInfo ($forum_id); 205 $isGroupMember = $oGroups->isGroupMember ($user_id, $forum_id) ? 1 : 0; 206 $isGroupCreator = $arrGroup['creatorID'] == $user_id ? 1 : 0; 207 $isAdmin = isOrcaAdmin ($user) ? 1 : 0; 208 211 209 $read_public = 1; 212 210 $post_public = $isGroupMember || $isAdmin ? 1 : 0; 213 211 $edit_public = $isGroupCreator || $isAdmin ? 1 : 0; 214 212 $del_public = $isGroupCreator || $isAdmin ? 1 : 0; 215 213 216 214 $read_private = $isGroupMember || $isAdmin ? 1 : 0; 217 215 $post_private = $isGroupMember || $isAdmin ? 1 : 0; 218 216 $edit_private = $isGroupCreator || $isAdmin ? 1 : 0; 219 217 $del_private = $isGroupCreator || $isAdmin ? 1 : 0; 220 218 221 219 $edit_own = $isGroupMember || $isAdmin ? 1 : 0; 222 220 $del_own = $isGroupMember || $isAdmin ? 1 : 0; 223 221 224 222 $search = 0; 225 223 $sticky = $isGroupMember || $isAdmin ? 1 : 0; 226 224 227 225 $orca_integration_xml .= <<<EOF -
TabularUnified trunk/inc/classes/BxDolGroups.php ¶
r6412 r6446 414 414 global $site; 415 415 416 $sForumUri = db_arr("SELECT `forum_uri` FROM `grp_forum` WHERE `forum_id` = '$groupID' LIMIT 1"); 417 $sForumUri = $sForumUri['forum_uri']; 418 416 419 $ret = file_get_contents( "{$site['groups']}orca/?action=group_last_topics&forum={$groupID}&virtID={$memberID}&virtPass={$_COOKIE['memberPassword']}&trans=1" ); 417 420 … … 422 425 423 426 if ( $this->isGroupMember( $memberID, $groupID ) ) 424 $caption_item .= "<a href=\"{$site['groups']}orca/ ?action=goto&forum_id={$groupID}#action=goto&new_topic={$groupID}\">{$sPostNewTopic}</a> | ";425 $caption_item .= "<a href=\"{$site['groups']}orca/ ?action=goto&forum_id={$groupID}\">{$sViewAllForum}</a>";427 $caption_item .= "<a href=\"{$site['groups']}orca/forum/{$sForumUri}-0.htm#action=goto&new_topic={$sForumUri}\">{$sPostNewTopic}</a> | "; 428 $caption_item .= "<a href=\"{$site['groups']}orca/forum/{$sForumUri}-0.htm\">{$sViewAllForum}</a>"; 426 429 $caption_item .= '</div>'; 427 430 … … 431 434 function PCGroupActions($arrGroup, $groupID, $memberID) { 432 435 global $site; 433 //global $dirGroups;434 436 global $logged; 435 437 … … 449 451 450 452 if ( $arrGroup['creatorID'] == $memberID ) 451 $sRetHtml .= $this->genGroupActionBtn( 'Edit group', " grp.php?action=edit&ID={$groupID}" );453 $sRetHtml .= $this->genGroupActionBtn( 'Edit group', "{$this->sCurrFile}?action=edit&ID={$groupID}" ); 452 454 else 453 455 $sRetHtml .= $this->genGroupActionBtn( 'Resign group', "group_actions.php?a=resign&ID={$groupID}", true ); … … 501 503 if ( $arrGroup = $this->getGroupInfo( $groupID ) ) { 502 504 $arrGroup['Name_html'] = htmlspecialchars_adv( $arrGroup['Name'] ); 503 505 504 506 if ( (int)$arrGroup['hidden_group'] and !isGroupMember( $memberID, $groupID ) and !$logged['admin'] ) 505 507 $sMainCode = _t( "_You cannot view gallery while not a group member" ); … … 524 526 function PCGenGroupGallery($memberID, $groupID, $arrGroup) { 525 527 global $site; 526 //global $bcd;527 $bcd = getParam('breadCrampDivider');528 528 529 529 $sUploadedByC = _t('_Uploaded by'); … … 531 531 $sDelImgC = _t('_Delete image'); 532 532 $sUploadImageC = _t('_Upload image'); 533 534 $bcd = getParam('breadCrampDivider'); 533 535 534 536 $breadCrumbs = <<<EOJ … … 545 547 546 548 $query = " 547 SELECT 548 `GroupsGallery`.*, 549 `NickName` 549 SELECT `GroupsGallery`.*, `Profiles`.`NickName` 550 550 FROM `GroupsGallery` 551 LEFT JOIN `Profiles` 552 ON ( `by`=`Profiles`.`ID` ) 553 WHERE `groupID`={$groupID} 551 LEFT JOIN `Profiles` ON `GroupsGallery`.`by`=`Profiles`.`ID` 552 WHERE `GroupsGallery`.`groupID`='{$groupID}' 554 553 ORDER BY `GroupsGallery`.`ID` 555 554 "; 556 555 557 556 $resPics = db_res( $query ); 558 557 559 558 $sRetHtml = <<<EOF 560 559 {$breadCrumbs} 561 560 <div class="group_gallery_wrapper"> 562 561 <div class="clear_both"></div> … … 573 572 title="{$sUploadedByC} {$sGalNick}" onclick="window.open(this.href, '_blank', 'width={$iNewJSW},height={$iNewJSH}');return false;"> 574 573 <img src="{$site['groups_gallery']}{$arrPic['groupID']}_{$arrPic['ID']}_{$arrPic['seed']}_.{$arrPic['ext']}" 575 width="{$arrPic['width_']}" height="{$arrPic['height_']}" />574 style="width:{$arrPic['width_']}px;height:{$arrPic['height_']}px" alt="" /> 576 575 </a> 577 576 EOF; … … 633 632 634 633 if( empty( $arrErr ) ) { 635 636 634 $this->saveGroup( $arrUpdGroupFields, $groupID ); 637 635 Header( "Location: {$site['url']}{$this->sCurrFile}?action=group&ID={$groupID}" ); … … 645 643 646 644 $res = $this->genGroupEditForm( $arrGroupFields, $arrErr, false, $groupID ); 647 648 645 return $res; 649 646 } … … 664 661 665 662 if( empty( $arrErr ) ) { 666 //var_dump($arrNewGroup);667 663 $arrNewGroup['creatorID'] = array('Name' => 'creatorID','Type' => 'text','Value' => $memberID); 668 664 $arrNewGroup['Uri'] = array('Name' => 'Uri','Type' => 'text',
Note: See TracChangeset
for help on using the changeset viewer.