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


PHP PHPWS_Text::shortenUrl方法代码示例

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


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

示例1: getTpl

 /**
  * Returns an associative array for the branch list page
  */
 public function getTpl()
 {
     $tpl['URL'] = $this->getUrl();
     $links[] = PHPWS_Text::secureLink(Icon::show('edit'), 'branch', array('command' => 'edit_branch', 'branch_id' => $this->id));
     $js['question'] = dgettext('branch', 'Removing this branch will make it inaccessible.\\nThe database and files will remain behind.\\nIf you are sure you want to remove the branch, type the branch name:');
     $js['address'] = sprintf('index.php?module=branch&command=remove_branch&branch_id=%s&authkey=%s', $this->id, Current_User::getAuthKey());
     $js['value_name'] = 'branch_name';
     $js['link'] = Icon::show('delete');
     $links[] = javascript('prompt', $js);
     $tpl['DIRECTORY'] = sprintf('<abbr title="%s">%s</abbr>', $this->directory, PHPWS_Text::shortenUrl($this->directory));
     $tpl['ACTION'] = implode(' ', $links);
     return $tpl;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:16,代码来源:Branch.php

示例2: managerTpl

 /**
  * Template sent to File Manager for media selection.
  */
 public function managerTpl($fmanager)
 {
     $tpl['ICON'] = $this->getManagerIcon($fmanager);
     $title_len = strlen($this->title);
     if ($title_len > 20) {
         $file_name = sprintf('<abbr title="%s">%s</abbr>', $this->file_name, PHPWS_Text::shortenUrl($this->file_name, 20));
     } else {
         $file_name =& $this->file_name;
     }
     $tpl['TITLE'] = $this->getTitle(true);
     $filename_len = strlen($this->file_name);
     if ($filename_len > 20) {
         $file_name = sprintf('<abbr title="%s">%s</abbr>', $this->file_name, PHPWS_Text::shortenUrl($this->file_name, 20));
     } else {
         $file_name =& $this->file_name;
     }
     if (!$this->embedded) {
         $tpl['INFO'] = sprintf('%s<br>%s', $file_name, $this->getSize(true));
     }
     if (Current_User::allow('filecabinet', 'edit_folders', $this->folder_id, 'folder')) {
         if (!$this->embedded) {
             $links[] = $this->editLink(true);
         }
         $links[] = $this->deleteLink(true);
         $tpl['LINKS'] = implode(' ', $links);
     }
     return $tpl;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:31,代码来源:Multimedia.php


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