Exemplo n.º 1
0
 function getBasicFileInfoForm(&$aInfo, $sUrlPref = '')
 {
     $aForm = array('date' => array('type' => 'value', 'value' => getLocaleDate($aInfo['medDate'], BX_DOL_LOCALE_DATE_SHORT) . ' (' . defineTimeInterval($aInfo['medDate']) . ')', 'caption' => _t('_Date')));
     if (!empty($aInfo['Categories'])) {
         $aForm['category'] = array('type' => 'value', 'value' => getLinkSet($aInfo['Categories'], $sUrlPref . 'browse/category/', CATEGORIES_DIVIDER), 'caption' => _t('_Category'));
     }
     if (!empty($aInfo['medTags'])) {
         $aForm['tags'] = array('type' => 'value', 'value' => getLinkSet($aInfo['medTags'], $sUrlPref . 'browse/tag/'), 'caption' => _t('_Tags'));
     }
     return $aForm;
 }
Exemplo n.º 2
0
 function getBasicFileInfoForm(&$aInfo, $sUrlPref = '')
 {
     $aForm = array('title' => array('type' => 'value', 'value' => $aInfo['medTitle'], 'caption' => _t('_Title')), 'album' => array('type' => 'value', 'value' => '<a href = "' . $sUrlPref . 'browse/album/' . $aInfo['albumUri'] . '/owner/' . $aInfo['NickName'] . '">' . $aInfo['albumCaption'] . '</a>', 'caption' => _t('_sys_album')), 'desc' => array('type' => 'value', 'value' => process_text_withlinks_output($aInfo['medDesc']), 'caption' => _t('_Description')), 'category' => array('type' => 'value', 'value' => getLinkSet($aInfo['Categories'], $sUrlPref . 'browse/category/', CATEGORIES_DIVIDER), 'caption' => _t('_Category')), 'tags' => array('type' => 'value', 'value' => getLinkSet($aInfo['medTags'], $sUrlPref . 'browse/tag/'), 'caption' => _t('_Tags')), 'url' => array('type' => 'text', 'value' => $sUrlPref . 'view/' . $aInfo['medUri'], 'attrs' => array('onclick' => 'this.focus(); this.select();', 'readonly' => 'readonly'), 'caption' => _t('_URL')));
     return $aForm;
 }
Exemplo n.º 3
0
 /**
  * Function will generate information about the poll's onwer;
  *
  * @param  : $iPollOwner (integer) - poll's owner id;
  * @param  : $aPollInfo (array) - poll's information;
  * @return : (text) - Html presentation data;
  */
 function getOwnerBlock($iPollOwner, $aPollInfo)
 {
     $aMemberInfo = getProfileInfo($iPollOwner);
     $sThumbImg = get_member_thumbnail($aMemberInfo['ID'], 'none', true);
     $aTemplateKeys = array('author_unit' => $sThumbImg, 'author_username' => $aMemberInfo['NickName'], 'author_url' => getProfileLink($aMemberInfo['ID']), 'date' => getLocaleDate($aPollInfo['poll_date'], BX_DOL_LOCALE_DATE_SHORT), 'date_ago' => defineTimeInterval($aPollInfo['poll_date'], false), 'tags' => getLinkSet($aPollInfo['poll_tags'], $this->getModulePath() . '&action=tag&tag=', BX_DOL_TAGS_DIVIDER), 'fields' => null, 'cats' => getLinkSet($aPollInfo['poll_categories'], $this->getModulePath() . '&action=category&category=', CATEGORIES_DIVIDER));
     $sOutpuCode = $this->_oTemplate->parseHtmlByName($this->aUsedTemplates['poll_owner'], $aTemplateKeys);
     return array($sOutpuCode);
 }
Exemplo n.º 4
0
function plugin_cmd_getlink($key, $page, $flag)
{
    global $_LANG, $_LINK;
    $links = getLinkSet($page);
    if ($flag['icon'] === true) {
        $icon = $flag['name'] === true ? '<span class="pkwk-icon icon-' . $key . '"></span>' : '<span class="pkwk-icon icon-' . $key . '" title="' . $_LANG['skin'][$key] . '"></span>';
    } else {
        $icon = '';
    }
    $link = $flag['name'] === true ? '<a href="' . $links[$key] . '" rel="nofollow" >' . $icon . $_LANG['skin'][$key] . '</a>' : '<a href="' . $links[$key] . '" rel="nofollow" >' . $icon . '</a>';
    if ($flag['inline'] === true) {
        return $link;
    } else {
        return '<li>' . $link . '</li>';
    }
}