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


PHP action_icon函数代码示例

本文整理汇总了PHP中action_icon函数的典型用法代码示例。如果您正苦于以下问题:PHP action_icon函数的具体用法?PHP action_icon怎么用?PHP action_icon使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: cat_line

/**
 * Generate category line when it has children
 *
 * @param Chapter generic category we want to display
 * @param int level of the category in the recursive tree
 * @return string HTML
 */
function cat_line($Chapter, $level)
{
    global $line_class, $result_fadeout, $permission_to_edit, $current_User, $Settings;
    global $GenericCategoryCache;
    $line_class = $line_class == 'even' ? 'odd' : 'even';
    $r = '<tr id="tr-' . $Chapter->ID . '"class="' . $line_class . (isset($result_fadeout[$GenericCategoryCache->dbIDname]) && in_array($Chapter->ID, $result_fadeout[$GenericCategoryCache->dbIDname]) ? ' fadeout-ffff00' : '') . '">
					<td class="firstcol shrinkwrap">' . $Chapter->ID . '
				</td>';
    if ($permission_to_edit) {
        // We have permission permission to edit:
        $edit_url = regenerate_url('action,' . $Chapter->dbIDname, $Chapter->dbIDname . '=' . $Chapter->ID . '&amp;action=edit');
        $r .= '<td>
						<strong style="padding-left: ' . $level . 'em;"><a href="' . $edit_url . '" title="' . T_('Edit...') . '">' . $Chapter->dget('name') . '</a></strong>
					 </td>';
    } else {
        $r .= '<td>
						 <strong style="padding-left: ' . $level . 'em;">' . $Chapter->dget('name') . '</strong>
					 </td>';
    }
    $r .= '<td>' . $Chapter->dget('urlname') . '</td>';
    $r .= '<td class="lastcol shrinkwrap">';
    if ($permission_to_edit) {
        // We have permission permission to edit, so display action column:
        $r .= action_icon(T_('New...'), 'new', regenerate_url('action,cat_ID,cat_parent_ID', 'cat_parent_ID=' . $Chapter->ID . '&amp;action=new')) . action_icon(T_('Edit...'), 'edit', $edit_url);
        if ($Settings->get('allow_moving_chapters')) {
            // If moving cats between blogs is allowed:
            $r .= action_icon(T_('Move to a different blog...'), 'file_move', regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&amp;action=move'), T_('Move'));
        }
        $r .= action_icon(T_('Delete...'), 'delete', regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&amp;action=delete'));
    }
    $r .= '</td>';
    $r .= '</tr>';
    return $r;
}
开发者ID:LFSF,项目名称:oras,代码行数:41,代码来源:_chapter_list.view.php

示例2: antispam_ipranges_actions

 /**
  * Get actions links for IP range
  *
  * @param integer IP range ID
  * @param string Current tab value
  * @return string HTML links to edit and delete IP range
  */
 function antispam_ipranges_actions($aipr_ID, $tab_param)
 {
     global $admin_url;
     // A link to edit IP range
     $r = action_icon(T_('Edit this IP range...'), 'properties', $admin_url . '?ctrl=antispam' . $tab_param . '&amp;tab3=ipranges&amp;iprange_ID=' . $aipr_ID . '&amp;action=iprange_edit');
     // A link to delete IP range
     $r .= action_icon(T_('Delete this IP range!'), 'delete', regenerate_url('iprange_ID,action', 'iprange_ID=' . $aipr_ID . '&amp;action=iprange_delete&amp;' . url_crumb('iprange')));
     return $r;
 }
开发者ID:Edind304,项目名称:b2evolution,代码行数:16,代码来源:_antispam_ipranges.view.php

示例3: get_actions_for_itemtype

/**
 * Callback to build possible actions depending on item type id
 *
 */
function get_actions_for_itemtype($id)
{
    global $reserved_ids;
    $action = action_icon(T_('Duplicate this item type...'), 'copy', regenerate_url('action', 'ptyp_ID=' . $id . '&amp;action=new'));
    if ($id < $reserved_ids[0] || $id > $reserved_ids[1]) {
        // not reserved id
        $action = action_icon(T_('Edit this item type...'), 'edit', regenerate_url('action', 'ptyp_ID=' . $id . '&amp;action=edit')) . $action . action_icon(T_('Delete this item type!'), 'delete', regenerate_url('action', 'ptyp_ID=' . $id . '&amp;action=delete&amp;' . url_crumb('itemtype') . ''));
    }
    return $action;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:14,代码来源:_itemtypes.view.php

示例4: edit_actions

 function edit_actions($ID)
 {
     global $locked_IDs, $GenericElementCache;
     $r = action_icon(T_('Duplicate...'), 'copy', regenerate_url('action,' . $GenericElementCache->dbIDname, $GenericElementCache->dbIDname . '=' . $ID . '&amp;action=copy'));
     if (empty($locked_IDs) || !in_array($ID, $locked_IDs)) {
         // This element is NOT locked:
         $r = action_icon(T_('Edit...'), 'edit', regenerate_url('action,' . $GenericElementCache->dbIDname, $GenericElementCache->dbIDname . '=' . $ID . '&amp;action=edit')) . $r . action_icon(T_('Delete!'), 'delete', regenerate_url('action,' . $GenericElementCache->dbIDname, $GenericElementCache->dbIDname . '=' . $ID . '&amp;action=delete'));
     }
     return $r;
 }
开发者ID:LFSF,项目名称:oras,代码行数:10,代码来源:_generic_list.inc.php

示例5: file_actions

function file_actions($link_ID)
{
    global $current_File, $edited_Item, $current_User;
    $title = T_('Locate this file!');
    $r = $current_File->get_linkedit_link('&amp;fm_mode=link_item&amp;item_ID=' . $edited_Item->ID, get_icon('locate', 'imgtag', array('title' => $title)), $title);
    if ($current_User->check_perm('item', 'edit', false, $edited_Item)) {
        // Check that we have permission to edit item:
        $r .= action_icon(T_('Delete this link!'), 'unlink', regenerate_url('action', 'link_ID=' . $link_ID . '&amp;action=unlink'));
    }
    return $r;
}
开发者ID:LFSF,项目名称:oras,代码行数:11,代码来源:_file_links.view.php

示例6: tagitem_edit_actions

 function tagitem_edit_actions($Item)
 {
     global $current_User, $edited_ItemTag;
     // Display the edit icon if current user has the rights:
     $r = $Item->get_edit_link(array('before' => '', 'after' => ' ', 'text' => get_icon('edit'), 'title' => '#', 'class' => ''));
     if ($current_User->check_perm('item_post!CURSTATUS', 'edit', false, $Item)) {
         // Display the unlink icon if current user has the rights:
         $r .= action_icon(T_('Unlink this tag from post!'), 'unlink', regenerate_url('tag_ID,action,tag_filter', 'tag_ID=' . $edited_ItemTag->ID . '&amp;item_ID=' . $Item->ID . '&amp;action=unlink&amp;' . url_crumb('tag')), NULL, NULL, NULL, array('onclick' => 'return confirm(\'' . format_to_output(sprintf(TS_('Are you sure you want to remove the tag "%s" from "%s"?'), $edited_ItemTag->dget('name'), $Item->dget('title')) . '\');', 'htmlattr')));
     }
     return $r;
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_itemtag.form.php

示例7: get_actions_for_itemtype

/**
 * Callback to build possible actions depending on post type id
 *
 */
function get_actions_for_itemtype($id)
{
    global $default_ids;
    $action = action_icon(T_('Duplicate this Post Type...'), 'copy', regenerate_url('action', 'ityp_ID=' . $id . '&amp;action=new'));
    if (!ItemType::is_reserved($id)) {
        // Edit all post types except of not reserved post type
        $action = action_icon(T_('Edit this Post Type...'), 'edit', regenerate_url('action', 'ityp_ID=' . $id . '&amp;action=edit')) . $action;
    }
    if (!ItemType::is_special($id) && !in_array($id, $default_ids)) {
        // Delete only the not reserved and not default post types
        $action .= action_icon(T_('Delete this Post Type!'), 'delete', regenerate_url('action', 'ityp_ID=' . $id . '&amp;action=delete&amp;' . url_crumb('itemtype') . ''));
    }
    return $action;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:18,代码来源:_itemtypes.view.php

示例8: curr_td_actions

function curr_td_actions($curr_enabled, $curr_ID)
{
    global $dispatcher;
    $r = '';
    if ($curr_enabled == true) {
        $r .= action_icon(T_('Disable the currency!'), 'deactivate', regenerate_url('action', 'action=disable_currency&amp;curr_ID=' . $curr_ID . '&amp;' . url_crumb('currency')));
    } else {
        $r .= action_icon(T_('Enable the currency!'), 'activate', regenerate_url('action', 'action=enable_currency&amp;curr_ID=' . $curr_ID . '&amp;' . url_crumb('currency')));
    }
    $r .= action_icon(T_('Edit this currency...'), 'edit', regenerate_url('action', 'curr_ID=' . $curr_ID . '&amp;action=edit'));
    $r .= action_icon(T_('Duplicate this currency...'), 'copy', regenerate_url('action', 'curr_ID=' . $curr_ID . '&amp;action=new'));
    $r .= action_icon(T_('Delete this currency!'), 'delete', regenerate_url('action', 'curr_ID=' . $curr_ID . '&amp;action=delete&amp;' . url_crumb('currency')));
    return $r;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:14,代码来源:_currency_list.view.php

示例9: grp_actions

function grp_actions(&$row)
{
    global $usedgroups, $Settings, $current_User;
    $r = '';
    if ($current_User->check_perm('users', 'edit', false)) {
        $r = action_icon(T_('Edit this group...'), 'edit', regenerate_url('ctrl,action', 'ctrl=groups&amp;action=edit&amp;grp_ID=' . $row->grp_ID));
        $r .= action_icon(T_('Duplicate this group...'), 'copy', regenerate_url('ctrl,action', 'ctrl=groups&amp;action=new&amp;grp_ID=' . $row->grp_ID));
        if ($row->grp_ID != 1 && $row->grp_ID != $Settings->get('newusers_grp_ID') && !in_array($row->grp_ID, $usedgroups)) {
            // delete
            $r .= action_icon(T_('Delete this group!'), 'delete', regenerate_url('ctrl,action', 'ctrl=groups&amp;action=delete&amp;grp_ID=' . $row->grp_ID . '&amp;' . url_crumb('group')));
        } else {
            $r .= get_icon('delete', 'noimg');
        }
    }
    return $r;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:16,代码来源:_group.view.php

示例10: cat_line

/**
 * Generate category line when it has children
 *
 * @param GenericCategory generic category we want to display
 * @param int level of the category in the recursive tree
 * @return string HTML
 */
function cat_line($GenericCategory, $level)
{
    global $line_class, $result_fadeout, $permission_to_edit, $current_User;
    $line_class = $line_class == 'even' ? 'odd' : 'even';
    $r = '<tr id="tr-' . $GenericCategory->ID . '"class="' . $line_class . (in_array($GenericCategory->ID, $result_fadeout) ? ' fadeout-ffff00' : '') . '">
					<td class="firstcol shrinkwrap">' . $GenericCategory->ID . '
					</td>';
    if ($permission_to_edit) {
        // We have permission permission to edit, so display action column:
        $edit_url = regenerate_url('action,' . $GenericCategory->dbIDname, $GenericCategory->dbIDname . '=' . $GenericCategory->ID . '&amp;action=edit');
        $r .= '<td>
						<label style="padding-left: ' . $level . 'em;"><a href="' . $edit_url . '" title="' . T_('Edit...') . '">' . $GenericCategory->name . '</a></label>
					 </td>
					 <td class="lastcol shrinkwrap">' . action_icon(T_('New...'), 'new', regenerate_url('action,' . $GenericCategory->dbIDname . ',' . $GenericCategory->dbprefix . 'parent_ID', $GenericCategory->dbprefix . 'parent_ID=' . $GenericCategory->ID . '&amp;action=new')) . action_icon(T_('Edit...'), 'edit', $edit_url) . action_icon(T_('Delete...'), 'delete', regenerate_url('action,' . $GenericCategory->dbIDname, $GenericCategory->dbIDname . '=' . $GenericCategory->ID . '&amp;action=delete&amp;' . url_crumb('element'))) . '
					 </td>';
    } else {
        $r .= '<td class="lastcol">
						 <label style="padding-left: ' . $level . 'em;">' . $GenericCategory->name . '</label>
					 </td>';
    }
    $r .= '</tr>';
    return $r;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:30,代码来源:_generic_recursive_list.inc.php

示例11: is_create_action

// Determine if we are creating or updating...
$creating = is_create_action($action);
$Form = new Form(NULL, 'form');
$close_url = get_chapter_redirect_url(get_param('redirect_page'), $edited_Chapter->parent_ID, $edited_Chapter->ID);
$Form->global_icon(T_('Cancel editing!'), 'close', $close_url);
$Form->begin_form('fform', $creating ? T_('New category') : T_('Category'));
$Form->add_crumb('element');
$Form->hidden('action', $creating ? 'create' : 'update');
$Form->hiddens_by_key(get_memorized('action'));
$Form->begin_fieldset(T_('Properties'));
// We're essentially double checking here...
$edited_Blog =& $edited_Chapter->get_Blog();
$move = '';
if ($Settings->get('allow_moving_chapters') && !$creating) {
    // If moving cats between blogs is allowed:
    $move = ' ' . action_icon(T_('Move to a different blog...'), 'file_move', regenerate_url('action,cat_ID', 'cat_ID=' . $edited_Chapter->ID . '&amp;action=move'), T_('Move'));
}
$Form->info(T_('Blog'), $edited_Blog->get_maxlen_name() . $move);
$Form->select_input_options('cat_parent_ID', $GenericCategoryCache->recurse_select($edited_Chapter->parent_ID, $subset_ID, true, NULL, 0, array($edited_Chapter->ID)), T_('Parent category'));
$Form->text_input('cat_name', $edited_Chapter->name, 40, T_('Name'), '', array('required' => true, 'maxlength' => 255));
$Form->text_input('cat_urlname', $edited_Chapter->urlname, 40, T_('URL "slug"'), T_('Used for clean URLs. Must be unique.'), array('maxlength' => 255));
$Form->text_input('cat_description', $edited_Chapter->description, 40, T_('Description'), T_('May be used as a title tag and/or meta description.'), array('maxlength' => 255));
if ($Settings->get('chapter_ordering') == 'manual') {
    $Form->text_input('cat_order', $edited_Chapter->order, 5, T_('Order'), T_('For manual ordering of the categories.'), array('maxlength' => 11));
}
$Form->checkbox_input('cat_meta', $edited_Chapter->meta, T_('Meta category'), array('note' => T_('If you check this box you will not be able to put any posts into this category.')));
$Form->checkbox_input('cat_lock', $edited_Chapter->lock, T_('Locked category'), array('note' => T_('Check this to lock all posts under this category. (Note: for posts with multiple categories, the post is only locked if *all* its categories are locked.)')));
$Form->end_fieldset();
if ($creating) {
    $Form->end_form(array(array('submit', 'submit', T_('Record'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
} else {
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_chapter.form.php

示例12: file_actions

 function file_actions($link_ID)
 {
     /**
      * @var File
      */
     global $current_File;
     global $edited_Item, $current_User;
     $r = '';
     if (isset($current_File)) {
         $title = T_('Locate this file!');
         $r = $current_File->get_linkedit_link($edited_Item->ID, get_icon('locate', 'imgtag', array('title' => $title)), $title) . ' ';
     }
     if ($current_User->check_perm('item', 'edit', false, $edited_Item)) {
         // Check that we have permission to edit item:
         $r .= action_icon(T_('Delete this link!'), 'unlink', regenerate_url('p,itm_ID,action', "link_ID={$link_ID}&amp;action=unlink"));
     }
     return $r;
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:18,代码来源:_item_links.inc.php

示例13: rgn_td_actions

function rgn_td_actions($rgn_enabled, $rgn_ID)
{
    global $dispatcher;
    $r = '';
    if ($rgn_enabled == true) {
        $r .= action_icon(T_('Disable the region!'), 'deactivate', regenerate_url('action', 'action=disable_region&amp;rgn_ID=' . $rgn_ID . '&amp;' . url_crumb('region')));
    } else {
        $r .= action_icon(T_('Enable the region!'), 'activate', regenerate_url('action', 'action=enable_region&amp;rgn_ID=' . $rgn_ID . '&amp;' . url_crumb('region')));
    }
    $r .= action_icon(T_('Edit this region...'), 'edit', regenerate_url('action', 'rgn_ID=' . $rgn_ID . '&amp;action=edit'));
    $r .= action_icon(T_('Duplicate this region...'), 'copy', regenerate_url('action', 'rgn_ID=' . $rgn_ID . '&amp;action=new'));
    $r .= action_icon(T_('Delete this region!'), 'delete', regenerate_url('action', 'rgn_ID=' . $rgn_ID . '&amp;action=delete&amp;' . url_crumb('region')));
    return $r;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:14,代码来源:_region_list.view.php

示例14: content

 /**
  * Template function: display content of comment
  *
  * @param string Output format, see {@link format_to_output()}
  * @param boolean Add ban url action icon after each url or not
  * @param boolean show comment attachments
  * @param array attachment display params
  */
 function content($format = 'htmlbody', $ban_urls = false, $show_attachments = true, $params = array())
 {
     global $current_User;
     global $Plugins;
     // Make sure we are not missing any param:
     $params = array_merge(array('before_image' => '<div class="image_block">', 'before_image_legend' => '<div class="image_legend">', 'after_image_legend' => '</div>', 'after_image' => '</div>', 'image_size' => 'fit-400x320', 'image_text' => '', 'attachments_mode' => 'read', 'attachments_view_text' => ''), $params);
     $attachments = array();
     if ($show_attachments) {
         if (empty($this->ID) && isset($this->checked_attachments)) {
             // PREVIEW
             $attachment_ids = explode(',', $this->checked_attachments);
             $FileCache =& get_FileCache();
             foreach ($attachment_ids as $ID) {
                 $File = $FileCache->get_by_ID($ID, false, false);
                 if ($File != NULL) {
                     $attachments[] = $File;
                 }
             }
         } else {
             // Get links
             $LinkCache =& get_LinkCache();
             $commentLinks = $LinkCache->get_by_comment_ID($this->ID);
             if (!empty($commentLinks)) {
                 foreach ($commentLinks as $Link) {
                     $File = $Link->get_File();
                     $attachments[] = $File;
                 }
             }
         }
     }
     $images_is_attached = false;
     foreach ($attachments as $index => $attachment) {
         $r = '';
         $params['File'] = $attachment;
         $params['data'] =& $r;
         if (count($Plugins->trigger_event_first_true('RenderCommentAttachment', $params)) != 0) {
             echo $r;
             unset($attachments[$index]);
             continue;
         }
         if ($attachment->is_image()) {
             if ($params['attachments_mode'] == 'view') {
                 // Only preview attachments
                 $image_link_rel = '';
                 $image_link_to = '';
             } else {
                 // Read attachments
                 $image_link_rel = 'lightbox[c' . $this->ID . ']';
                 $image_link_to = 'original';
             }
             echo $attachment->get_tag($params['before_image'], $params['before_image_legend'], $params['after_image_legend'], $params['after_image'], $params['image_size'], $image_link_to, T_('Posted by ') . $this->get_author_name(), $image_link_rel);
             unset($attachments[$index]);
             $images_is_attached = true;
         }
     }
     if ($images_is_attached && $params['image_text'] != '') {
         // Display info text below pictures
         echo $params['image_text'];
     }
     if ($ban_urls) {
         // add ban icons if user has edit permission for this comment
         $ban_urls = $current_User->check_perm('comment!CURSTATUS', 'edit', false, $this);
     }
     if ($ban_urls) {
         // ban urls and user has permission
         echo add_ban_icons($this->get_content($format));
     } else {
         // don't ban urls
         echo $this->get_content($format);
     }
     if (isset($attachments)) {
         // show not image attachments
         $after_docs = '';
         if (count($attachments) > 0) {
             echo '<br /><b>' . T_('Attachments:') . '</b>';
             echo '<ul class="bFiles">';
             $after_docs = '</ul>';
         }
         foreach ($attachments as $doc_File) {
             if ($params['attachments_mode'] == 'view') {
                 // Only preview attachments
                 $attachment_download_link = '';
                 $attachment_name = $doc_File->get_type();
             } else {
                 // Read attachments
                 $attachment_download_link = action_icon(T_('Download file'), 'download', $doc_File->get_url(), '', 5) . ' ';
                 $attachment_name = $doc_File->get_view_link($doc_File->get_name());
             }
             echo '<li>';
             echo $attachment_download_link;
             echo $attachment_name;
             echo ' (' . bytesreadable($doc_File->get_size()) . ')';
//.........这里部分代码省略.........
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:101,代码来源:_comment.class.php

示例15: get_manual_link

/**
 * Generate a link to a online help resource.
 * testing the concept of online help (aka webhelp).
 * this function should be relocated somewhere better if it is taken onboard by the project
 *
 * @todo replace [?] with icon,
 * @todo write url suffix dynamically based on topic and language
 *
 * QUESTION: launch new window with javascript maybe?
 * @param string Topic
 *        The topic should be in a format like [\w]+(/[\w]+)*, e.g features/online_help.
 * @param string link text, leave it NULL to get link with manual icon
 * @return string
 */
function get_manual_link($topic, $link_text = NULL)
{
    global $Settings, $current_locale, $app_shortname, $app_version;
    if ($Settings->get('webhelp_enabled')) {
        // $manual_url = 'http://manual.b2evolution.net/redirect/'.str_replace(' ','_',strtolower($topic)).'?lang='.$current_locale.'&amp;app='.$app_shortname.'&amp;version='.$app_version;
        // fp> TODO: this below is a temmporary hack while we work on the new manual:
        $manual_url = 'http://b2evolution.net/man/' . str_replace('_', '-', strtolower($topic));
        if ($link_text == NULL) {
            $webhelp_link = action_icon(T_('Open relevant page in online manual'), 'manual', $manual_url, T_('Manual'), 5, 1, array('target' => '_blank', 'style' => 'vertical-align:top'));
        } else {
            $webhelp_link = '<a href="' . $manual_url . '" target = "_blank">' . $link_text . '</a>';
        }
        return ' ' . $webhelp_link;
    } else {
        return '';
    }
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_misc.funcs.php


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