当前位置: 首页>>代码示例>>PHP>>正文


PHP BxTemplVotingView::getBigVoting方法代码示例

本文整理汇总了PHP中BxTemplVotingView::getBigVoting方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplVotingView::getBigVoting方法的具体用法?PHP BxTemplVotingView::getBigVoting怎么用?PHP BxTemplVotingView::getBigVoting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BxTemplVotingView的用法示例。


在下文中一共展示了BxTemplVotingView::getBigVoting方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: blockHon

 function blockHon($aData)
 {
     $oVoting = new BxTemplVotingView('bx_sites', $aData['id']);
     $aResult = $this->_getUnit($aData, 'file');
     $aResult['rate'] = $oVoting->getBigVoting();
     $aResult['next_url'] = $_SERVER['REQUEST_URI'];
     return $this->parseHtmlByName('block_hon.html', $aResult);
 }
开发者ID:boonex,项目名称:dolphin.pro,代码行数:8,代码来源:BxSitesTemplate.php

示例2: getViewFile

 function getViewFile(&$aInfo)
 {
     $oVotingView = new BxTemplVotingView('bx_' . $this->_oConfig->getUri(), $aInfo['medID']);
     $iWidth = (int) $this->_oConfig->getGlParam('file_width');
     if ($aInfo['prevItem'] > 0) {
         $aPrev = $this->_oDb->getFileInfo(array('fileId' => $aInfo['prevItem']), true, array('medUri', 'medTitle'));
     }
     if ($aInfo['nextItem'] > 0) {
         $aNext = $this->_oDb->getFileInfo(array('fileId' => $aInfo['nextItem']), true, array('medUri', 'medTitle'));
     }
     $aUnit = array('file' => $this->getFileConcept($aInfo['medID'], array('ext' => $aInfo['medExt'], 'source' => $aInfo['medSource'])), 'width_ext' => $iWidth + 2, 'width' => $iWidth, 'fileUrl' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aInfo['medUri'], 'fileTitle' => $aInfo['medTitle'], 'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $aInfo['Rate']) : '', 'favInfo' => isset($aInfo['favCount']) ? $aInfo['favCount'] : '', 'viewInfo' => $aInfo['medViews'], 'albumUri' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'browse/album/' . $aInfo['albumUri'] . '/owner/' . $aInfo['NickName'], 'albumCaption' => $aInfo['albumCaption'], 'bx_if:prev' => array('condition' => $aInfo['prevItem'] > 0, 'content' => array('linkPrev' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aPrev['medUri'], 'titlePrev' => $aPrev['medTitle'], 'percent' => $aInfo['nextItem'] > 0 ? 50 : 100)), 'bx_if:next' => array('condition' => $aInfo['nextItem'] > 0, 'content' => array('linkNext' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aNext['medUri'], 'titleNext' => $aNext['medTitle'], 'percent' => $aInfo['prevItem'] > 0 ? 50 : 100)));
     return $this->parseHtmlByName('view_unit.html', $aUnit);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:13,代码来源:BxVideosTemplate.php

示例3: getMediaPage

    function getMediaPage($iMediaID = 0)
    {
        global $votes_pic;
        $ret = '';
        //$ret .= $this -> getJSCode();
        if (0 < $this->iMediaCount) {
            $iMediaID = 0 < $iMediaID ? $iMediaID : $this->aMedia['0']['PrimPhoto'];
            $aCurPhoto = $this->getElementArrayByID($iMediaID);
            if (empty($aCurPhoto)) {
                $sPhotoUrl = getTemplateIcon($this->sSexPic);
            } else {
                $ret .= '<div class="mediaTitle" id="sTitleDiv">';
                $ret .= stripcslashes(process_line_output($aCurPhoto['med_title']));
                $ret .= '</div>';
                $iPhotoID = $aCurPhoto['med_id'];
                $sPhotoUrl = $this->sMediaUrl . 'photo_' . $aCurPhoto['med_file'];
                $iPhotoRating = $this->getRating($aCurPhoto['med_rating_sum'], $aCurPhoto['med_rating_count']);
            }
        } else {
            $sPhotoUrl = getTemplateIcon($this->sSexPic);
        }
        $ret .= $this->getJSCode($aCurPhoto);
        $ret .= '<div class="photoBlock" id="photoKeeper">';
        $style = '
				width:' . $this->aMediaConfig['size']['photoWidth'] . 'px;' . 'height:' . $this->aMediaConfig['size']['photoHeight'] . 'px;' . 'background-image:url(' . $sPhotoUrl . ');';
        $ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '" class="photo" alt="" id="temPhotoID" />';
        //$ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '"                                          class="photo" alt="" onload="return setImage();" id="temPhotoID" />';
        $ret .= '</div>';
        $sJsArray = '';
        $iPhotosCount = 0;
        $sIconsList = $this->_getIconsList($sJsArray, $iPhotosCount);
        $oVotingView = new BxTemplVotingView('media', (int) $aCurPhoto['med_id']);
        //if( $iPhotosCount && getParam('votes_pic') == 'on' && $oVotingView->isEnabled())
        if ($iPhotosCount && $votes_pic && $oVotingView->isEnabled()) {
            $ret .= '<div class="votingBlock">' . $oVotingView->getBigVoting() . '</div>';
        }
        $ret .= '<div class="iconBlock">';
        $ret .= $sIconsList;
        $ret .= '</div>';
        $ret .= '<script type="text/javascript">' . $sJsArray . '</script>';
        return $ret;
    }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:42,代码来源:profilePhotos.php

示例4: checkAction

 function getBlockCode_RateObject()
 {
     $sMainPrefix = $this->oConfig->getMainPrefix();
     $this->oMedia->oModule->_defineActions();
     $aCheck = checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'));
     if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
         $sCode = MsgBox(_t('_' . $sMainPrefix . '_forbidden'));
     } else {
         $aData = $this->getRateObject();
         if (count($aData) > 0) {
             $oVotingView = new BxTemplVotingView($this->sType, $aData[0]['id']);
             $aUnit = array('url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'rate', 'fileBody' => $this->getRateFile($aData), 'ratePart' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting() : '', 'fileTitle' => $aData[0]['title'], 'fileUri' => $this->oMedia->getCurrentUrl('file', $aData[0]['id'], $aData[0]['uri']), 'fileWhen' => defineTimeInterval($aData[0]['date']), 'fileFrom' => getNickName($aData[0]['ownerId']), 'fileFromLink' => getProfileLink($aData[0]['ownerId']));
             $sCode = $this->oMedia->oTemplate->parseHtmlByName('rate_object.html', $aUnit);
             checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'), true);
         } else {
             $sCode = MsgBox(_t('_' . $sMainPrefix . '_no_file_for_rate'));
         }
     }
     return array($sCode, array(), array(), false);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:20,代码来源:BxDolFilesRate.php

示例5: checkAction

 function getBlockCode_RateObject()
 {
     $this->oMedia->oModule->_defineActions();
     $aCheck = checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'));
     if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
         $sCode = MsgBox(_t('_' . $this->sType . '_forbidden'));
     } else {
         $aData = $this->getRateObject();
         if (count($aData) > 0) {
             $oFile =& $this->oMedia->oModule;
             $oFile->_oTemplate->addCss('rate_object.css');
             $iInfoWidth = (int) getParam($this->sType . '_file_width');
             $oVotingView = new BxTemplVotingView($this->sType, $aData[0]['id']);
             $aUnit = array('url' => BX_DOL_URL_ROOT . $oFile->_oConfig->getBaseUri() . 'rate', 'fileBody' => $this->oMedia->oTemplate->getFileConcept($aData[0]['id']), 'ratePart' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting() : '', 'fileTitle' => $aData[0]['title'], 'fileUri' => $this->oMedia->getCurrentUrl('file', $aData[0]['id'], $aData[0]['uri']), 'fileWhen' => defineTimeInterval($aData[0]['date']), 'fileFrom' => $aData[0]['ownerName'], 'fileFromLink' => getProfileLink($aData[0]['ownerId']), 'infoWidth' => $iInfoWidth > 0 ? $iInfoWidth + 2 : '');
             $sCode = $this->oMedia->oTemplate->parseHtmlByName('rate_object.html', $aUnit);
             checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'), true);
         } else {
             $sCode = MsgBox(_t('_bx_sounds_no_file_for_rate'));
         }
     }
     return $sCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:22,代码来源:BxSoundsRate.php

示例6: getRateBlock

 function getRateBlock()
 {
     if ($this->iPostViewType != 3 || !$this->iViewingPostID) {
         return false;
     }
     bx_import('BxTemplVotingView');
     $bPossibleToRate = $this->oPrivacy->check('rate', $this->iViewingPostID, $this->_iVisitorID);
     $oVotingView = new BxTemplVotingView($this->_oConfig->getRateSystemName(), $this->iViewingPostID);
     if ($oVotingView && $oVotingView->isEnabled() && $bPossibleToRate) {
         $sVotePostRating = $oVotingView->getBigVoting(1);
     } else {
         $sVotePostRating = $oVotingView->getBigVoting(0);
     }
     $aVars = array('content' => $sVotePostRating);
     return $this->_oTemplate->parseHtmlByName('default_padding.html', $aVars);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:16,代码来源:BxBlogsModule.php

示例7: BxTemplVotingView

 function getBlockCode_ViewFile()
 {
     $oVotingView = new BxTemplVotingView($this->oConfig->getMainPrefix(), $this->aFileInfo['medID']);
     $iWidth = (int) $this->oConfig->getGlParam('file_width');
     if ($this->aFileInfo['prevItem'] > 0) {
         $aPrev = $this->oDb->getFileInfo(array('fileId' => $this->aFileInfo['prevItem']), true, array('medUri', 'medTitle'));
     }
     if ($this->aFileInfo['nextItem'] > 0) {
         $aNext = $this->oDb->getFileInfo(array('fileId' => $this->aFileInfo['nextItem']), true, array('medUri', 'medTitle'));
     }
     $aUnit = array('pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'), 'width' => $iWidth, 'fileTitle' => $this->aFileInfo['medTitle'], 'fileDescription' => $this->aFileInfo['medDesc'], 'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $this->aFileInfo['Rate']) : '', 'favInfo' => $this->oDb->getFavoritesCount($this->aFileInfo['medID']), 'viewInfo' => $this->aFileInfo['medViews'], 'albumUri' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'browse/album/' . $this->aFileInfo['albumUri'] . '/owner/' . $this->aFileInfo['NickName'], 'albumCaption' => $this->aFileInfo['albumCaption'], 'bx_if:prev' => array('condition' => $this->aFileInfo['prevItem'] > 0, 'content' => array('linkPrev' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aPrev['medUri'], 'titlePrev' => $aPrev['medTitle'], 'percent' => $this->aFileInfo['nextItem'] > 0 ? 50 : 100)), 'bx_if:next' => array('condition' => $this->aFileInfo['nextItem'] > 0, 'content' => array('linkNext' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aNext['medUri'], 'titleNext' => $aNext['medTitle'], 'percent' => $this->aFileInfo['prevItem'] > 0 ? 50 : 100)));
     $sCode = $this->oTemplate->parseHtmlByName('view_unit.html', $aUnit);
     return array($sCode, array(), array(), false);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:14,代码来源:BxPhotosPageView.php

示例8: getRate

 function getRate($iFile)
 {
     $iFile = (int) $iFile;
     $sCode = '<center>' . _t('_rating not enabled') . '</center>';
     $oVotingView = new BxTemplVotingView($this->_oConfig->getMainPrefix(), $iFile);
     if ($oVotingView->isEnabled()) {
         $sCode = $oVotingView->getBigVoting();
     }
     return $sCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:10,代码来源:BxDolFilesTemplate.php

示例9: ActionPrintAdvertisement


//.........这里部分代码省略.........
            $sCommentsSectContent .= $this->oCmtsView->getExtraJs();
            $sCommentsSectContent .= !$this->oCmtsView->isEnabled() ? '' : $this->oCmtsView->getCommentsFirst();
            $this->sTACommentsContent = $sCommentsSectContent;
            $sCommSect = DesignBoxContent($aCaptions['Comments'], $sCommentsSectContent, 1);
            $sUserOtherListing = $this->getMemberAds($aSqlResStr['IDProfile'], 2, $iAdvertisementID);
            $sDataTimeFormatted = getLocaleDate($aSqlResStr['DateTime_UTS']);
            $iViews = (int) $aSqlResStr['Views'];
            $sOwnerThumb = get_member_thumbnail($aSqlResStr['IDProfile'], 'none', true);
            $sAdsMessage = process_html_output($aSqlResStr['Message']);
            $sCategLink = $this->bUseFriendlyLinks ? BX_DOL_URL_ROOT . 'ads/cat/' . $aSqlResStr['CEntryUri'] : "{$this->sCurrBrowsedFile}?bClassifiedID={$aSqlResStr['CatID']}";
            $sSCategLink = $this->bUseFriendlyLinks ? BX_DOL_URL_ROOT . 'ads/subcat/' . $aSqlResStr['SEntryUri'] : "{$this->sCurrBrowsedFile}?bSubClassifiedID={$aSqlResStr['SubID']}";
            $aSubjVariables = array('author_unit' => $sOwnerThumb, 'date' => $sDataTimeFormatted, 'date_ago' => $sTimeAgo, 'cats' => $this->_oTemplate->parseHtmlByTemplateName('category', array('cat_link' => $sCategLink, 'sub_cat_link' => $sSCategLink, 'cat_name' => $aSqlResStr['Name'], 'sub_cat_name' => $aSqlResStr['NameSub'])), 'tags' => $sTags, 'fields' => '');
            $sSubjectSectContent = $this->_oTemplate->parseHtmlByName('entry_view_block_info.html', $aSubjVariables);
            $sSubjectSect = DesignBoxContent(_t('_Info'), $sSubjectSectContent, 1);
            $this->sTAInfoContent = $sSubjectSectContent;
            $sDescriptionContent = '<div class="dbContent bx-def-bc-margin bx-def-font-large">' . $sAdsMessage . '</div>';
            $sDescriptionSect = DesignBoxContent(_t('_Description'), $sDescriptionContent, 1);
            $this->sTADescription = $sDescriptionContent;
            //adding form
            $aForm = array('form_attrs' => array('name' => 'custom_values_form', 'action' => $oAds->sCurrBrowsedFile), 'inputs' => array('Country' => array('type' => 'value', 'name' => 'Country', 'caption' => _t('_Country'), 'value' => $sCountryName . $sCountryPic), 'City' => array('type' => 'value', 'name' => 'City', 'caption' => _t('_City'), 'value' => $aSqlResStr['City'])));
            if ($aSqlResStr['CustomFieldName1'] && $aSqlResStr['CustomFieldValue1']) {
                $aForm['inputs']['Custom1'] = array('type' => 'value', 'name' => 'Custom1', 'caption' => $aSqlResStr['CustomFieldName1'], 'value' => $aSqlResStr['Unit1'] . $aSqlResStr['CustomFieldValue1']);
            }
            if ($aSqlResStr['CustomFieldName2'] && $aSqlResStr['CustomFieldValue2']) {
                $aForm['inputs']['Custom2'] = array('type' => 'value', 'name' => 'Custom2', 'caption' => $aSqlResStr['CustomFieldName2'], 'value' => $aSqlResStr['Unit2'] . $aSqlResStr['CustomFieldValue2']);
            }
            $oForm = new BxTemplFormView($aForm);
            $sOtherInfoContent = $oForm->getCode();
            $sOtherInfoSect = DesignBoxContent(_t('_bx_ads_Custom_Values'), $sOtherInfoContent, 1);
            $this->sTAOtherInfo = $sOtherInfoContent;
            $bPossibleToRate = $this->oPrivacy->check('rate', $iAdvertisementID, $this->_iVisitorID);
            $oVotingView = new BxTemplVotingView('ads', $iAdvertisementID);
            $iVote = $oVotingView && $oVotingView->isEnabled() && $bPossibleToRate ? 1 : 0;
            $sVotePostRating = $oVotingView->getBigVoting($iVote);
            $sRatingSect = DesignBoxContent(_t('_Rate'), $sVotePostRating, 1);
            $this->sTARateContent = '<div class="bx-def-bc-margin">' . $sVotePostRating . '</div>';
            $sOtherListingContent = <<<EOF
<div class="dbContent">
    {$sUserOtherListing}
</div>
EOF;
            $sSPaginateActions = <<<EOF
<div class="paginate bx-def-padding-left bx-def-padding-right">
    <div class="view_all">
        <a href="{$this->sCurrBrowsedFile}" onclick="document.forms['UsersOtherListingForm'].submit(); return false;">{$sUserOtherListC}</a>
        <form action="{$this->sCurrBrowsedFile}" name="UsersOtherListingForm" method="post">
            <input type="hidden" name="UsersOtherListing" value="1" />
            <input type="hidden" name="IDProfile" value="{$aSqlResStr['IDProfile']}" />
        </form>
    </div>
    <div class="pages_section"></div>
</div>
EOF;
            $sOtherListingSect = DesignBoxContent($sUserOtherListC, $sOtherListingContent . $sSPaginateActions, 1);
            $this->sTAOtherListingContent = $sOtherListingContent . $sSPaginateActions;
            $sHomeLink = $this->bUseFriendlyLinks ? BX_DOL_URL_ROOT . 'ads/' : "{$this->sCurrBrowsedFile}?Browse=1";
            $sBrowseAllAds = _t('_bx_ads_Browse_All_Ads');
            $sBreadCrumbs = <<<EOF
<div class="breadcrumbs">
<a href="{$sHomeLink}">{$sBrowseAllAds}</a>
/
<a href="{$sCategLink}">{$aSqlResStr['Name']}</a>
/
<a href="{$sSCategLink}">{$aSqlResStr['NameSub']}</a>
</div>
EOF;
开发者ID:newton27,项目名称:dolphin.pro,代码行数:67,代码来源:BxAdsModule.php

示例10: showRateSection

 function showRateSection($iFile)
 {
     $sCode = '<center>' . _t('_Gallery video rating is not enabled') . '</center>';
     $oVotingView = new BxTemplVotingView('g' . $this->sType, (int) $iFile);
     if ($oVotingView->isEnabled()) {
         $sCode = $oVotingView->getBigVoting();
     }
     return $sCode;
 }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:9,代码来源:BxDolSharedMedia.php

示例11: BxTemplVotingView

 function getBlockCode_ViewFile()
 {
     $oVotingView = new BxTemplVotingView('bx_files', $this->aFileInfo['medID']);
     if ($this->aFileInfo['prevItem'] > 0) {
         $aPrev = $this->oDb->getFileInfo(array('fileId' => $this->aFileInfo['prevItem']), true, array('medUri', 'medTitle'));
     }
     if ($this->aFileInfo['nextItem'] > 0) {
         $aNext = $this->oDb->getFileInfo(array('fileId' => $this->aFileInfo['nextItem']), true, array('medUri', 'medTitle'));
     }
     //icon
     $sIcon = $this->oDb->getTypeIcon($this->aFileInfo['Type']);
     if (!$sIcon) {
         $sIcon = 'default.png';
     }
     $aUnit = array('pic' => $this->oTemplate->getIconUrl($sIcon), 'fileTitle' => $this->aFileInfo['medTitle'], 'fileSize' => (int) $this->aFileInfo['medSize'] > 0 ? _t_format_size((int) $this->aFileInfo['medSize']) : 0, 'fileExt' => $this->aFileInfo['medExt'], 'fileDescription' => $this->aFileInfo['medDesc'], 'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $this->aFileInfo['Rate']) : '', 'favInfo' => $this->oDb->getFavoritesCount($this->aFileInfo['medID']), 'viewInfo' => $this->aFileInfo['medViews'], 'albumUri' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'browse/album/' . $this->aFileInfo['albumUri'] . '/owner/' . $this->aFileInfo['NickName'], 'albumCaption' => $this->aFileInfo['albumCaption'], 'bx_if:prev' => array('condition' => $this->aFileInfo['prevItem'] > 0, 'content' => array('linkPrev' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aPrev['medUri'], 'titlePrev' => $aPrev['medTitle'], 'percent' => $this->aFileInfo['nextItem'] > 0 ? 50 : 100)), 'bx_if:next' => array('condition' => $this->aFileInfo['nextItem'] > 0, 'content' => array('linkNext' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aNext['medUri'], 'titleNext' => $aNext['medTitle'], 'percent' => $this->aFileInfo['prevItem'] > 0 ? 50 : 100)));
     $sCode = $this->oTemplate->parseHtmlByName('view_unit.html', $aUnit);
     return array($sCode, array(), array(), false);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:18,代码来源:BxFilesPageView.php

示例12: array

 function getBlockCode_ViewImage()
 {
     $aFile = BxDolService::call('photos', 'get_photo_array', array($this->_aSite['photo'], 'file'), 'Search');
     $sImage = $aFile['no_image'] ? '' : $aFile['file'];
     $sVote = '';
     $sSiteUrl = $this->_aSite['url'];
     if (strncasecmp($sSiteUrl, 'http://', 7) != 0) {
         $sSiteUrl = 'http://' . $sSiteUrl;
     }
     if ($this->_oConfig->isVotesAllowed() && $this->_oSites->oPrivacy->check('rate', $this->_aSite['id'], $this->_oSites->iOwnerId)) {
         bx_import('BxTemplVotingView');
         $oVotingView = new BxTemplVotingView('bx_sites', $this->_aSite['id']);
         if ($oVotingView->isEnabled()) {
             $sVote = $oVotingView->getBigVoting();
         }
     }
     return $this->_oTemplate->parseHtmlByName('view_image.html', array('title' => $this->_aSite['title'], 'site_url' => $sSiteUrl, 'site_url_view' => $this->_aSite['url'], 'image' => $sImage ? $sImage : $this->_oTemplate->getIconUrl('no-photo-110.png'), 'image_fave' => $this->_oTemplate->getIconUrl('action_fave.png'), 'image_view' => $this->_oTemplate->getIconUrl('eye.png'), 'vote' => $sVote, 'view_count' => $this->_aSite['views']));
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:18,代码来源:BxSitesPageView.php

示例13: PageCompPageMainCode

function PageCompPageMainCode()
{
    global $site;
    global $oTemplConfig;
    $aPhoto = getVotingItem();
    $check_res = checkAction($_COOKIE['memberID'], ACTION_ID_RATE_PHOTOS);
    if ($check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
        $ret = '
			<table width="100%" cellpadding="4" cellspacing="4" border="0">
				<tr>
					<td align="center">' . $check_res[CHECK_ACTION_MESSAGE] . '</td>
				</tr>
			</table>';
        return $ret;
    }
    $ret = '';
    if ($_GET['prev_id']) {
        $ret .= showPreviousRated((int) $_GET['prev_id']);
    }
    if ($oTemplConfig->customize['rate']['showSexSelector']) {
        $ret .= '<div class="rate_sex_form">';
        $ret .= '<form method="post" name="FormVote" action="' . $_SERVER['PHP_SELF'] . '">';
        $ret .= '<span>';
        $ret .= _t("_Show me");
        $ret .= '</span>';
        $ret .= '<span>';
        $ret .= '<select name="showme" onchange="document.forms[\'FormVote\'].submit()">' . "\n";
        $selected_all = $_REQUEST['showme'] == 'all' || strlen(trim($_REQUEST['showme'])) == 0 ? ' selected="selected" ' : '';
        $ret .= '<option value="all"' . $selected_all . '>' . _t("_all") . '</option>';
        $arr = db_arr("SELECT `extra` FROM `ProfilesDesc` WHERE `name` = 'Sex'");
        $vals = preg_split("/[,\\']+/", $arr[0], -1, PREG_SPLIT_NO_EMPTY);
        foreach ($vals as $v) {
            if (strlen(trim($v)) <= 0) {
                continue;
            }
            $ret .= "<option value=\"{$v}\" " . ($_REQUEST['showme'] == $v ? 'selected="selected"' : '') . ">" . _t("_{$v}") . "</option>\n";
        }
        $ret .= '</select>';
        $ret .= '</span>';
        $ret .= '</form>';
        $ret .= '</div>';
    }
    if (empty($aPhoto)) {
        $ret .= _t_action('_there_is_no_photo_that_you_can_rate');
    } else {
        if ($oTemplConfig->customize['rate']['showProfileInfo']) {
            $ret .= '<div class="clear_both"></div>';
            $ret .= ProfileDetails($aPhoto['med_prof_id']);
            $ret .= '<div class="clear_both"></div>';
        }
        $ret .= getRatingPhoto($aPhoto);
        $oVotingView = new BxTemplVotingView('media', (int) $aPhoto['med_id']);
        if ($oVotingView->isEnabled()) {
            $sUrlAdd = '';
            if ($_REQUEST['showme']) {
                $sUrlAdd .= 'showme=' . $_REQUEST['showme'] . '&';
            }
            $ret .= "\r\n\t\t\t\t<script>\r\n\t\t\t\t\tBxDolVoting.prototype.onvote = function (fRate, iCount)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdocument.location = '{$site['url']}rate.php?{$sUrlAdd}prev_id=' + this._iObjId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tBxDolVoting.prototype.onvotefail = function ()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdocument.location = '{$site['url']}rate.php?{$sUrlAdd}prev_id=' + this._iObjId;\r\n\t\t\t\t\t}\r\n\t\t\t\t</script>";
            $ret .= '<div style="margin-left:225px">' . $oVotingView->getBigVoting() . '</div>';
        }
    }
    return $ret;
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:63,代码来源:rate.php

示例14: array

 function getBlockCode_ViewImage()
 {
     $sSiteUrl = $this->_aSite['url'];
     $aFile = BxDolService::call('photos', 'get_photo_array', array($this->_aSite['photo'], 'file'), 'Search');
     $sImage = $aFile['no_image'] ? '' : $aFile['file'];
     // BEGIN STW INTEGRATION
     if (getParam('bx_sites_account_type') != 'No Automated Screenshots') {
         if ($sImage == '') {
             $aSTWOptions = array();
             bx_sites_import('STW');
             $sThumbHTML = getThumbnailHTML($sSiteUrl, $aSTWOptions, false, false);
         }
     }
     // END STW INTEGRATION
     $sVote = '';
     if (strncasecmp($sSiteUrl, 'http://', 7) !== 0 && strncasecmp($sSiteUrl, 'https://', 8) !== 0) {
         $sSiteUrl = 'http://' . $sSiteUrl;
     }
     if ($this->_oConfig->isVotesAllowed() && $this->_oSites->oPrivacy->check('rate', $this->_aSite['id'], $this->_oSites->iOwnerId)) {
         bx_import('BxTemplVotingView');
         $oVotingView = new BxTemplVotingView('bx_sites', $this->_aSite['id']);
         if ($oVotingView->isEnabled()) {
             $sVote = $oVotingView->getBigVoting();
         }
     }
     $sContent = $this->_oTemplate->parseHtmlByName('view_image.html', array('title' => $this->_aSite['title'], 'site_url' => $sSiteUrl, 'site_url_view' => $this->_aSite['url'], 'bx_if:is_image' => array('condition' => $sThumbHTML == false, 'content' => array('image' => $sImage ? $sImage : $this->_oTemplate->getImageUrl('no-image-thumb.png'))), 'bx_if:is_thumbhtml' => array('condition' => $sThumbHTML != '', 'content' => array('thumbhtml' => $sThumbHTML)), 'vote' => $sVote, 'view_count' => $this->_aSite['views']));
     return array($sContent, array(), array(), false);
 }
开发者ID:boonex,项目名称:dolphin.pro,代码行数:28,代码来源:BxSitesPageView.php

示例15: PageCompRate

function PageCompRate()
{
    global $iFile;
    $sCode = '<center>' . _t('_Gallery video rating is not enabled') . '</center>';
    $oVotingView = new BxTemplVotingView('gvideo', (int) $iFile);
    if ($oVotingView->isEnabled()) {
        $sCode = $oVotingView->getBigVoting();
    }
    return $sCode;
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:10,代码来源:viewVideo.php


注:本文中的BxTemplVotingView::getBigVoting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。