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


PHP rcube::Q方法代码示例

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


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

示例1: mailto_callback

 /**
  * Callback function used to build mailto: links around e-mail strings
  *
  * This also adds an onclick-handler to open the Rouncube compose message screen on such links
  *
  * @param array Matches result from preg_replace_callback
  * @return int Index of saved string value
  * @see rcube_string_replacer::mailto_callback()
  */
 public function mailto_callback($matches)
 {
     $href = $matches[1];
     $suffix = $this->parse_url_brackets($href);
     $i = $this->add(html::a(array('href' => 'mailto:' . $href, 'onclick' => "return " . rcmail_output::JS_OBJECT_NAME . ".command('compose','" . rcube::JQ($href) . "',this)"), rcube::Q($href)) . $suffix);
     return $i >= 0 ? $this->get_replacement($i) : '';
 }
开发者ID:noikiy,项目名称:roundcubemail,代码行数:16,代码来源:rcmail_string_replacer.php

示例2: attachment_removelink

 /**
  * Place a link in the messageAttachments (template object) 
  * to trigger the removal of all attachments
  */
 function attachment_removelink($p)
 {
     /* // place links to remove attachment for each attachment
             $links = preg_split('/(<li[^>]*>)/', $p['content'], null, PREG_SPLIT_DELIM_CAPTURE);		
     
             for ($i = 1; $i < count($links); $i+=2) {
                 if (preg_match('/ id="attach([0-9]+)"/', $links[$i], $matches)) {
                     $remove = $this->api->output->button(array('command' => 'plugin.removeattachments.removeone', 
                                                                'prop' => $matches[1], 
                                                                'image' => $this->url(null) . $this->local_skin_path() . '/del.png', 
                                                                'title' => 'removeattachments.removeattachment',
                                                                'style' => 'vertical-align:middle'));
                     $links[$i+1] = str_replace('</li>', '&nbsp;' . $remove . '</li>', $links[$i+1]);
     			}
     		}
     
             $p['content'] = join('', $links);
             */
     // when there are multiple attachments allow delete all
     if (substr_count($p['content'], ' id="attach') > 1) {
         $link = $this->api->output->button(array('type' => 'link', 'command' => 'plugin.removeattachments.removeall', 'content' => rcube::Q($this->gettext('removeattachments.removeall')), 'title' => 'removeattachments.removeall', 'class' => 'button removeattachments'));
         switch (rcmail::get_instance()->config->get('skin')) {
             case 'classic':
                 //$p['content'] = preg_replace('/(<ul[^>]*>)/', '$1' . $link, $p['content']);
                 $p['content'] = str_replace('</ul>', html::tag('li', null, $link) . '</ul>', $p['content']);
                 break;
             default:
                 $p['content'] .= $link;
                 break;
         }
         $this->include_stylesheet($this->local_skin_path() . '/removeattachments.css');
     }
     return $p;
 }
开发者ID:messagerie-melanie2,项目名称:Roundcube-Plugin-Remove-Attachments,代码行数:38,代码来源:removeattachments.php

示例3: html_output

 /**
  * This callback function adds a box below the message content
  * if there is a vcard attachment available
  */
 function html_output($p)
 {
     $attach_script = false;
     foreach ($this->vcard_parts as $part) {
         $vcards = rcube_vcard::import($this->message->get_part_content($part, null, true));
         // successfully parsed vcards?
         if (empty($vcards)) {
             continue;
         }
         // remove part's body
         if (in_array($part, $this->vcard_bodies)) {
             $p['content'] = '';
         }
         foreach ($vcards as $idx => $vcard) {
             // skip invalid vCards
             if (empty($vcard->email) || empty($vcard->email[0])) {
                 continue;
             }
             $display = $vcard->displayname . ' <' . $vcard->email[0] . '>';
             // add box below message body
             $p['content'] .= html::p(array('class' => 'vcardattachment'), html::a(array('href' => "#", 'onclick' => "return plugin_vcard_save_contact('" . rcube::JQ($part . ':' . $idx) . "')", 'title' => $this->gettext('addvcardmsg')), html::span(null, rcube::Q($display))));
         }
         $attach_script = true;
     }
     if ($attach_script) {
         $this->include_script('vcardattach.js');
         $this->include_stylesheet($this->local_skin_path() . '/style.css');
     }
     return $p;
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:34,代码来源:vcard_attachments.php

示例4: render_page

 /**
  * Callback function when HTML page is rendered
  * We'll add an overlay box here.
  */
 function render_page($p)
 {
     if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         $identity = $rcmail->user->get_identity();
         $identities_level = intval($rcmail->config->get('identities_level', 0));
         // compose user-identity dialog
         $table = new html_table(array('cols' => 2));
         $table->add('title', $this->gettext('name'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_name', 'value' => $identity['name'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => rcube_utils::idn_to_utf8($identity['email']), 'disabled' => in_array($identities_level, array(1, 3, 4)))));
         $table->add('title', $this->gettext('organization'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_organization', 'value' => $identity['organization'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('signature'));
         $table->add(null, html::tag('textarea', array('name' => '_signature', 'rows' => '3'), $identity['signature']));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::tag('form', array('id' => 'newuserdialog', 'action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save'))))));
         $title = rcube::JQ($this->gettext('identitydialogtitle'));
         $script = "\n\$('#newuserdialog').show()\n  .dialog({modal:true, resizable:false, closeOnEscape:false, width:450, title:'{$title}'})\n  .submit(function() {\n    var i, request = {}, form = \$(this).serializeArray();\n    for (i in form)\n      request[form[i].name] = form[i].value;\n\n      rcmail.http_post('plugin.newusersave', request, true);\n      return false;\n  });\n\n\$('input[name=_name]').focus();\nrcube_webmail.prototype.new_user_dialog_close = function() { \$('#newuserdialog').dialog('close'); }\n";
         // disable keyboard events for messages list (#1486726)
         $rcmail->output->add_script($script, 'docready');
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:30,代码来源:new_user_dialog.php

示例5: settings_blocks

 function settings_blocks($args)
 {
     if ($args['section'] == 'server') {
         $use_subscriptions = rcmail::get_instance()->config->get('use_subscriptions');
         $field_id = 'rcmfd_use_subscriptions';
         $checkbox = new html_checkbox(array('name' => '_use_subscriptions', 'id' => $field_id, 'value' => 1));
         $args['blocks']['main']['options']['use_subscriptions'] = array('title' => html::label($field_id, rcube::Q($this->gettext('useimapsubscriptions'))), 'content' => $checkbox->show($use_subscriptions ? 1 : 0));
     }
     return $args;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:10,代码来源:subscriptions_option.php

示例6: prefs_list

 function prefs_list($args)
 {
     if ($args['section'] == 'compose') {
         $this->add_texts('localization/');
         $reminder = rcube::get_instance()->config->get('attachment_reminder');
         $field_id = 'rcmfd_attachment_reminder';
         $checkbox = new html_checkbox(array('name' => '_attachment_reminder', 'id' => $field_id, 'value' => 1));
         $args['blocks']['main']['options']['attachment_reminder'] = array('title' => html::label($field_id, rcube::Q($this->gettext('reminderoption'))), 'content' => $checkbox->show($reminder ? 1 : 0));
     }
     return $args;
 }
开发者ID:rcg2015,项目名称:roundcubemail,代码行数:11,代码来源:attachment_reminder.php

示例7: mailto_callback

 /**
  * Callback function used to build mailto: links around e-mail strings
  *
  * This also adds an onclick-handler to open the Rouncube compose message screen on such links
  *
  * @param array Matches result from preg_replace_callback
  * @return int Index of saved string value
  * @see rcube_string_replacer::mailto_callback()
  */
 public function mailto_callback($matches)
 {
     $href = $matches[1];
     $suffix = $this->parse_url_brackets($href);
     $email = $href;
     if (strpos($email, '?')) {
         list($email, ) = explode('?', $email);
     }
     // skip invalid emails
     if (!rcube_utils::check_email($email, false)) {
         return $matches[1];
     }
     $i = $this->add(html::a(array('href' => 'mailto:' . $href, 'onclick' => "return " . rcmail_output::JS_OBJECT_NAME . ".command('compose','" . rcube::JQ($href) . "',this)"), rcube::Q($href)) . $suffix);
     return $i >= 0 ? $this->get_replacement($i) : '';
 }
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:24,代码来源:rcmail_string_replacer.php

示例8: html_output

 /**
  * This callback function adds a box below the message content
  * if there is a vcard attachment available
  */
 function html_output($p)
 {
     $attach_script = false;
     foreach ($this->ics_parts as $part) {
         $icscontent = $this->message->get_part_content($part['part'], null, true);
         $file_name = $part['uid'];
         $file = '../../../cache/import/' . $file_name . '.ics';
         file_put_contents($file, $icscontent);
         // add box below message body
         $p['content'] .= html::p(array('class' => 'icalattachments'), html::a(array('href' => "#", 'class' => rcube::JQ($file_name), 'title' => $this->gettext('addicalinvitemsg')), html::span(null, rcube::Q($this->gettext('addicalinvitemsg')))));
         $attach_script = true;
     }
     if ($attach_script) {
         $this->include_stylesheet($this->local_skin_path() . '/style.css');
     }
     return $p;
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:21,代码来源:ical_attachments.php

示例9: attachment_ziplink

 /**
  * Place a link/button after attachments listing to trigger download
  */
 public function attachment_ziplink($p)
 {
     $rcmail = rcmail::get_instance();
     // only show the link if there is more than the configured number of attachments
     if (substr_count($p['content'], '<li') > $rcmail->config->get('zipdownload_attachments', 1)) {
         $href = $rcmail->url(array('_action' => 'plugin.zipdownload.zip_attachments', '_mbox' => $rcmail->output->env['mailbox'], '_uid' => $rcmail->output->env['uid']));
         $link = html::a(array('href' => $href, 'class' => 'button zipdownload'), rcube::Q($this->gettext('downloadall')));
         // append link to attachments list, slightly different in some skins
         switch (rcmail::get_instance()->config->get('skin')) {
             case 'classic':
                 $p['content'] = str_replace('</ul>', html::tag('li', array('class' => 'zipdownload'), $link) . '</ul>', $p['content']);
                 break;
             default:
                 $p['content'] .= $link;
                 break;
         }
         $this->include_stylesheet($this->local_skin_path() . '/zipdownload.css');
     }
     return $p;
 }
开发者ID:rasky,项目名称:roundcubemail,代码行数:23,代码来源:zipdownload.php

示例10: prefs_list

 /**
  * Handler for user preferences form (preferences_list hook)
  */
 public function prefs_list($args)
 {
     if ($args['section'] != 'mailbox') {
         return $args;
     }
     // Load localization and configuration
     $this->add_texts('localization/');
     // Check that configuration is not disabled
     $dont_override = (array) $this->rc->config->get('dont_override', array());
     $key = 'pref_use_infinite_scroll';
     if (!in_array($key, $dont_override)) {
         $config_key = 'use_infinite_scroll';
         $field_id = "_" . $key;
         $is_checked = $this->rc->config->get($config_key, true);
         $input = new html_checkbox(array('name' => $field_id, 'id' => $field_id, 'value' => 1));
         $content = $input->show($is_checked);
         $args['blocks']['main']['options'][$key] = array('title' => html::label($field_id, rcube::Q($this->gettext($key))), 'content' => $content);
     }
     return $args;
 }
开发者ID:messagerie-melanie2,项目名称:Roundcube-Plugin-Infinite-Scroll,代码行数:23,代码来源:infinitescroll.php

示例11: infohtml

 function infohtml()
 {
     $rcmail = rcmail::get_instance();
     $user = $rcmail->user;
     $identity = $user->get_identity();
     $table = new html_table(array('cols' => 2, 'cellpadding' => 3));
     $table->add('title', 'ID');
     $table->add('', rcube::Q($user->ID));
     $table->add('title', rcube::Q($this->gettext('username')));
     $table->add('', rcube::Q($user->data['username']));
     $table->add('title', rcube::Q($this->gettext('server')));
     $table->add('', rcube::Q($user->data['mail_host']));
     $table->add('title', rcube::Q($this->gettext('created')));
     $table->add('', rcube::Q($user->data['created']));
     $table->add('title', rcube::Q($this->gettext('lastlogin')));
     $table->add('', rcube::Q($user->data['last_login']));
     $table->add('title', rcube::Q($this->gettext('defaultidentity')));
     $table->add('', rcube::Q($identity['name'] . ' <' . $identity['email'] . '>'));
     return html::tag('h4', null, rcube::Q('Infos for ' . $user->get_username())) . $table->show();
 }
开发者ID:hadiroohi,项目名称:roundcubemail,代码行数:20,代码来源:userinfo.php

示例12: prefs_section_link

 /**
  * Adds a link to prefrences section.
  *
  * @param array $args Default hook arguments.
  *
  * @return array
  */
 public function prefs_section_link($args)
 {
     $args['list']['recipienttocontact'] = array('id' => 'recipienttocontact', 'section' => rcube::Q($this->gettext('prefs_title')));
     return $args;
 }
开发者ID:internero,项目名称:Roundcube-Plugin-Recipient-To-Contact,代码行数:12,代码来源:recipient_to_contact.php

示例13: identity_form

 public function identity_form($args)
 {
     $user = $this->get_user_email();
     $origin = array('type' => 'text', 'size' => 40, 'label' => rcube::Q($this->rcmail->gettext('email')), 'disabled' => 'disabled');
     $alias = array('name' => rcube::Q($this->gettext('Alias')), 'content' => array('email' => $args['form']['addressing']['content']['email']));
     unset($args['form']['addressing']['content']['email']);
     //unset($args['form']['addressing']['content']['standard']);
     $args['form'] = $this->array_insert_after('addressing', $args['form'], 'aliasing', $alias);
     $args['form']['addressing']['content'] = $this->array_insert_after('name', $args['form']['addressing']['content'], 'origin', $origin);
     $args['record']['origin'] = rcube_utils::idn_to_utf8($user['email']);
     $args['record']['email'] = !empty($args['record']['email']) ? $args['record']['email'] : rcube_utils::idn_to_utf8($user['email']);
     return $args;
 }
开发者ID:denpamusic,项目名称:rcube_identity_tweaks,代码行数:13,代码来源:swrn_identity_tweaks.php

示例14: mailto_callback

 /**
  * Callback function used to build mailto: links around e-mail strings
  *
  * @param array Matches result from preg_replace_callback
  * @return int Index of saved string value
  */
 public function mailto_callback($matches)
 {
     $href = $matches[1];
     $suffix = $this->parse_url_brackets($href);
     $i = $this->add(html::a('mailto:' . $href, rcube::Q($href)) . $suffix);
     return $i >= 0 ? $this->get_replacement($i) : '';
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:13,代码来源:rcube_string_replacer.php

示例15: attachment_header

 /**
  *
  */
 public function attachment_header($attrib = array())
 {
     $rcmail = rcmail::get_instance();
     $dl_link = strtolower($attrib['downloadlink']) == 'true';
     $dl_url = $this->rc->url(array('_frame' => null, '_download' => 1) + $_GET);
     $table = new html_table(array('cols' => $dl_link ? 3 : 2));
     if (!empty($this->attachment['name'])) {
         $table->add('title', rcube::Q($this->rc->gettext('filename')));
         $table->add('header', rcube::Q($this->attachment['name']));
         if ($dl_link) {
             $table->add('download-link', html::a($dl_url, rcube::Q($this->rc->gettext('download'))));
         }
     }
     if (!empty($this->attachment['mimetype'])) {
         $table->add('title', rcube::Q($this->rc->gettext('type')));
         $table->add('header', rcube::Q($this->attachment['mimetype']));
     }
     if (!empty($this->attachment['size'])) {
         $table->add('title', rcube::Q($this->rc->gettext('filesize')));
         $table->add('header', rcube::Q($this->rc->show_bytes($this->attachment['size'])));
     }
     $this->rc->output->set_env('attachment_download_url', $dl_url);
     return $table->show($attrib);
 }
开发者ID:Fneufneu,项目名称:libcalendaring,代码行数:27,代码来源:libcalendaring.php


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