Changeset 6446


Ignore:
Timestamp:
Apr 11, 2008, 11:12:38 AM (17 years ago)
Author:
aramis
Message:

'A' Orca for groups fix

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/groups/orca/layout/uni/xsl/breadcrumbs.xsl

    r6178 r6446  
    1212 
    1313        <img src="{/root/urls/img}a.gif" />  
    14         <a href="../../groups_home.php">Groups</a> 
     14        <a href="../../grp.php">Groups</a> 
    1515 
    1616        <xsl:if test="string-length($link1)"> 
  • TabularUnified trunk/groups/orca/layout/uni/xsl/forum_posts.xsl

    r6322 r6446  
    1414    <xsl:call-template name="breadcrumbs"> 
    1515        <xsl:with-param name="link1"> 
    16             <a href="../../group.php?ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a> 
     16            <a href="../../grp.php?action=group&amp;ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a> 
    1717        </xsl:with-param> 
    1818        <xsl:with-param name="link2"> 
  • TabularUnified trunk/groups/orca/layout/uni/xsl/forum_topics.xsl

    r6322 r6446  
    1111    <xsl:call-template name="breadcrumbs"> 
    1212        <xsl:with-param name="link1"> 
    13             <a href="../../group.php?ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a> 
     13            <a href="../../grp.php?action=group&amp;ID={forum/id}"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a> 
    1414        </xsl:with-param> 
    1515    </xsl:call-template> 
  • TabularUnified trunk/groups/orca/xml/orca.php

    r6412 r6446  
    6060            require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' ); 
    6161            require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );             
    62             require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' ); 
    6362        } 
    6463        else 
     
    6766            global $dir; 
    6867            $orca_integration_xml = ''; 
    69             require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' ); 
    70         } 
    71  
    72         $oGroups = new BxDolGroups(false); 
     68        } 
    7369 
    7470        $_COOKIE['memberID'] = $orca_integration_vars['memberID']; 
     
    201197            case 'user_perm':                
    202198 
    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 
    211209                $read_public  = 1; 
    212210                $post_public  = $isGroupMember  || $isAdmin ? 1 : 0; 
    213211                $edit_public  = $isGroupCreator || $isAdmin ? 1 : 0; 
    214212                $del_public   = $isGroupCreator || $isAdmin ? 1 : 0; 
    215                  
     213 
    216214                $read_private = $isGroupMember  || $isAdmin ? 1 : 0; 
    217215                $post_private = $isGroupMember  || $isAdmin ? 1 : 0; 
    218216                $edit_private = $isGroupCreator || $isAdmin ? 1 : 0; 
    219217                $del_private  = $isGroupCreator || $isAdmin ? 1 : 0; 
    220                  
     218 
    221219                $edit_own     = $isGroupMember  || $isAdmin ? 1 : 0; 
    222220                $del_own      = $isGroupMember  || $isAdmin ? 1 : 0; 
    223                  
     221 
    224222                $search = 0; 
    225                 $sticky = $isGroupMember || $isAdmin ? 1 : 0; 
     223                $sticky = $isGroupMember || $isAdmin ? 1 : 0; 
    226224 
    227225                $orca_integration_xml .= <<<EOF 
  • TabularUnified trunk/inc/classes/BxDolGroups.php

    r6412 r6446  
    414414        global $site; 
    415415 
     416        $sForumUri = db_arr("SELECT `forum_uri` FROM `grp_forum` WHERE `forum_id` = '$groupID' LIMIT 1"); 
     417        $sForumUri = $sForumUri['forum_uri']; 
     418 
    416419        $ret = file_get_contents( "{$site['groups']}orca/?action=group_last_topics&forum={$groupID}&virtID={$memberID}&virtPass={$_COOKIE['memberPassword']}&trans=1" ); 
    417420 
     
    422425 
    423426        if ( $this->isGroupMember( $memberID, $groupID ) ) 
    424             $caption_item .= "<a href=\"{$site['groups']}orca/?action=goto&amp;forum_id={$groupID}#action=goto&amp;new_topic={$groupID}\">{$sPostNewTopic}</a> | "; 
    425         $caption_item .= "<a href=\"{$site['groups']}orca/?action=goto&amp;forum_id={$groupID}\">{$sViewAllForum}</a>"; 
     427            $caption_item .= "<a href=\"{$site['groups']}orca/forum/{$sForumUri}-0.htm#action=goto&amp;new_topic={$sForumUri}\">{$sPostNewTopic}</a> | "; 
     428        $caption_item .= "<a href=\"{$site['groups']}orca/forum/{$sForumUri}-0.htm\">{$sViewAllForum}</a>"; 
    426429        $caption_item .= '</div>'; 
    427430 
     
    431434    function PCGroupActions($arrGroup, $groupID, $memberID) { 
    432435        global $site; 
    433         //global $dirGroups; 
    434436        global $logged; 
    435437 
     
    449451 
    450452                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}" ); 
    452454                else 
    453455                    $sRetHtml .= $this->genGroupActionBtn( 'Resign group', "group_actions.php?a=resign&amp;ID={$groupID}", true ); 
     
    501503        if ( $arrGroup = $this->getGroupInfo( $groupID ) ) { 
    502504            $arrGroup['Name_html'] = htmlspecialchars_adv( $arrGroup['Name'] ); 
    503              
     505 
    504506            if ( (int)$arrGroup['hidden_group'] and !isGroupMember( $memberID, $groupID ) and !$logged['admin'] ) 
    505507                $sMainCode = _t( "_You cannot view gallery while not a group member" ); 
     
    524526    function PCGenGroupGallery($memberID, $groupID, $arrGroup) { 
    525527        global $site; 
    526         //global $bcd; 
    527         $bcd = getParam('breadCrampDivider'); 
    528528 
    529529        $sUploadedByC = _t('_Uploaded by'); 
     
    531531        $sDelImgC = _t('_Delete image'); 
    532532        $sUploadImageC = _t('_Upload image'); 
     533 
     534        $bcd = getParam('breadCrampDivider'); 
    533535 
    534536        $breadCrumbs = <<<EOJ 
     
    545547 
    546548        $query = " 
    547             SELECT 
    548                 `GroupsGallery`.*, 
    549                 `NickName` 
     549            SELECT `GroupsGallery`.*, `Profiles`.`NickName` 
    550550            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}' 
    554553            ORDER BY `GroupsGallery`.`ID` 
    555             "; 
     554        "; 
    556555 
    557556        $resPics = db_res( $query ); 
    558557 
    559558        $sRetHtml = <<<EOF 
    560     {$breadCrumbs} 
     559{$breadCrumbs} 
    561560<div class="group_gallery_wrapper"> 
    562561    <div class="clear_both"></div> 
     
    573572      title="{$sUploadedByC} {$sGalNick}" onclick="window.open(this.href, '_blank', 'width={$iNewJSW},height={$iNewJSH}');return false;"> 
    574573        <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="" /> 
    576575    </a> 
    577576EOF; 
     
    633632 
    634633                if( empty( $arrErr ) ) { 
    635  
    636634                    $this->saveGroup( $arrUpdGroupFields, $groupID ); 
    637635                    Header( "Location: {$site['url']}{$this->sCurrFile}?action=group&ID={$groupID}" ); 
     
    645643 
    646644        $res = $this->genGroupEditForm( $arrGroupFields, $arrErr, false, $groupID ); 
    647  
    648645        return $res; 
    649646    } 
     
    664661 
    665662            if( empty( $arrErr ) ) { 
    666                 //var_dump($arrNewGroup); 
    667663                $arrNewGroup['creatorID'] = array('Name' => 'creatorID','Type' => 'text','Value' => $memberID); 
    668664                $arrNewGroup['Uri'] = array('Name' => 'Uri','Type' => 'text', 
Note: See TracChangeset for help on using the changeset viewer.
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
Fork me on GitHub