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


PHP IPSLib::shareLinks方法代码示例

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


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

示例1: showEvent

 function showEvent($event, $member, $typeInfo, $like = '')
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_calendar', $this->_funcHooks['showEvent'])) {
         $count_3e157d388f6c8ef468328c880d269e05 = is_array($this->functionData['showEvent']) ? count($this->functionData['showEvent']) : 0;
         $this->functionData['showEvent'][$count_3e157d388f6c8ef468328c880d269e05]['event'] = $event;
         $this->functionData['showEvent'][$count_3e157d388f6c8ef468328c880d269e05]['member'] = $member;
         $this->functionData['showEvent'][$count_3e157d388f6c8ef468328c880d269e05]['typeInfo'] = $typeInfo;
         $this->functionData['showEvent'][$count_3e157d388f6c8ef468328c880d269e05]['like'] = $like;
     }
     $IPBHTML .= "" . (!$this->settings['disable_lightbox'] ? "\n\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'include_lightbox') ? $this->registry->getClass('output')->getTemplate('global')->include_lightbox() : '') . "\n" : "") . "\n" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'include_highlighter') ? $this->registry->getClass('output')->getTemplate('global')->include_highlighter(1) : '') . "\n" . $this->registry->getClass('output')->addJSModule("rating", "0") . "\n" . $this->registry->getClass('output')->addJSModule("calendar", "0") . "\n<div class='right'>\n\t{$event['_like_strip']}\n</div>\n<div itemscope itemtype=\"http://schema.org/Event\">\n<img src='{$member['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_medium left' />\n<div class='ipsBox_withphoto'>\n\t<span class='rating ipsType_smaller'>" . ($event['_can_rate'] ? "<strong>{$this->lang->words['js_rate_event']}</strong>&nbsp;&nbsp;" : "") . "\n\t\t" . ($event['_can_rate'] ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=rating&amp;event_id={$event['event_id']}&amp;rating=1&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='event_rate_1' title='{$this->lang->words['eve_js_1star']}'>" : "") . "" . ($event['event_rating_avg'] >= 1 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($event['_can_rate'] ? "</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=rating&amp;event_id={$event['event_id']}&amp;rating=2&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='event_rate_2' title='{$this->lang->words['eve_js_2star']}'>" : "") . "" . ($event['event_rating_avg'] >= 2 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($event['_can_rate'] ? "</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=rating&amp;event_id={$event['event_id']}&amp;rating=3&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='event_rate_3' title='{$this->lang->words['eve_js_3star']}'>" : "") . "" . ($event['event_rating_avg'] >= 3 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($event['_can_rate'] ? "</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=rating&amp;event_id={$event['event_id']}&amp;rating=4&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='event_rate_4' title='{$this->lang->words['eve_js_4star']}'>" : "") . "" . ($event['event_rating_avg'] >= 4 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($event['_can_rate'] ? "</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=rating&amp;event_id={$event['event_id']}&amp;rating=5&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='event_rate_5' title='{$this->lang->words['eve_js_5star']}'>" : "") . "" . ($event['event_rating_avg'] >= 5 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($event['_can_rate'] ? "</a>" : "") . "\n\t\t<span id='rating_text'>\n\t\t\t" . ($event['event_rating_hits'] > 0 ? "<span id='rating_hits'>{$event['event_rating_hits']} {$this->lang->words['event_rates']}</span>" : "") . "\n\t\t</span>\n\t\t" . ($event['_can_rate'] ? "<script type='text/javascript'>\n\t\t\t//<![CDATA[\n\t\t\t\trating = new ipb.rating( 'event_rate_', { \n\t\t\t\t\t\t\t\t\turl: ipb.vars['base_url'] + 'app=calendar&module=ajax&section=rating&event_id={$event['event_id']}&md5check=' + ipb.vars['secure_hash'],\n\t\t\t\t\t\t\t\t\tcur_rating: {$event['event_rating_avg']},\n\t\t\t\t\t\t\t\t\trated: " . ($event['_rating_value'] != -1 ? "1" : "0") . ",\n\t\t\t\t\t\t\t\t\tallow_rate: {$event['_can_rate']},\n\t\t\t\t\t\t\t\t\tmulti_rate: 1,\n\t\t\t\t\t\t\t\t\tshow_rate_text: true\n\t\t\t\t\t\t\t\t  } );\n\t\t\t//]]>\n\t\t\t</script>" : "") . "\n\t</span>\n\t<h1 itemprop=\"name\" class='ipsType_pagetitle calendar_title clearfix'>{$this->lang->words['event_prefix']} {$event['event_title']}</h1>\n\t" . (method_exists($this->registry->getClass('output')->getTemplate('calendar'), 'calendarJump') ? $this->registry->getClass('output')->getTemplate('calendar')->calendarJump($typeInfo['calendars'], $typeInfo['calendar'], $typeInfo['chosen_date']) : '') . "\n\t<div class='ipsType_pagedesc clear'>\n\t\t{$this->lang->words['added_by']} " . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($member) : '') . ", " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($event['event_saved'], "DATE", 0)) . "\n\t</div>\n</div>\n<br /><br />\n<h2 class='maintitle'>\n\t{$this->lang->words['taking_place']}\n\t<meta itemprop=\"startDate\" content=\"" . date('c', $event['_start_time']) . "\">\n\t<abbr class=\"dtstart\" title=\"" . date('c', $event['_start_time']) . "\">{$event['_start_date']}" . (!$typeInfo['ends'] ? " {$event['_event_time']}" : "") . "</abbr> \n\t" . ($typeInfo['ends'] ? "<abbr class=\"dtend\" title=\"" . date('c', $event['_end_time']) . "\">{$typeInfo['ends']}</abbr>" : "") . "\n\t" . (($event['_event_etime'] and $typeInfo['ends']) ? "{$event['_event_time']} - {$event['_event_etime']}" : "" . ($event['_event_etime'] ? "- <abbr class=\"dtend\" title=\"" . date('c', $event['_end_time']) . "\">{$event['_event_etime']}</abbr>" : "") . "") . "\n\t({$typeInfo['type']})</strong>\n</h2>\n<div class='ipsBox " . ($event['event_rsvp'] ? "ipsLayout ipsLayout_withright ipsLayout_largeright" : "") . " clearfix'>\n\t<div class='ipsBox_container " . ($event['event_rsvp'] ? "ipsLayout_content" : "") . " clearfix'>\n\t\t<div class='post_block no_sidebar vcalendar clearfix " . ($event['event_approved'] == 0 ? "moderated" : "") . "' id='event_id_{$event['event_id']}'>\n\t\t\t<div class='post_wrap vevent'>\n\t\t\t\t" . ($member['member_id'] ? "\n\t\t\t\t\t<h3 class='row2'>\n\t\t\t\t" : "\n\t\t\t\t\t<h3 class='guest row2'>\n\t\t\t\t") . "\n\t\t\t\t<span class='post_id right desc'><a itemprop=\"url\" href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=view&amp;do=showevent&amp;event_id={$event['event_id']}", "public", ''), "{$event['event_title_seo']}", "cal_event") . "' rel='bookmark url' title='{$this->lang->words['link_to_event']} {$event['event_title']}'>{$this->lang->words['permalink_link']}</a></span>\n\t\t\t\t\t" . ($member['member_id'] ? "\n\t\t\t\t\t\t<span class=\"author vcard\">" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($member) : '') . "</span>\n\t\t\t\t\t" : "\n\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($member) : '') . "\n\t\t\t\t\t") . "\n\t\t\t\t</h3>\n\t\t\t\t<div class='post_body'>\n\t\t\t\t\t<div itemprop=\"description\" class='post entry-content description'>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{$event['event_content']}\n\t\t\t\t\t\t{$event['event_attach_content']}\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- Reputation: -->\n\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global_other'), 'repButtons') ? $this->registry->getClass('output')->getTemplate('global_other')->repButtons($member, array_merge(array('primaryId' => $event['event_id'], 'domLikeStripId' => 'like_event_' . $event['event_id'], 'domCountId' => 'rep_event_' . $event['event_id'], 'app' => 'calendar', 'type' => 'event_id', 'likeFormatted' => $event['like']['formatted']), $event)) : '') . "\n\t\t\t\t</div>\n\t\t\t\t<ul class='post_controls'>\n\t\t\t\t\t" . ($event['_canReport'] ? "\n\t\t\t\t\t\t<li class='report'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=reports&amp;rcom=calendar&amp;event_id={$event['event_id']}", "public", ''), "", "") . "' title='{$this->lang->words['report_event']}'>{$this->lang->words['report']}</a></li>\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t" . (($this->memberData['g_is_supmod'] or $this->memberData['member_id'] == $event['event_member_id']) ? "\n\t\t\t\t\t\t<li class='post_del'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=moderate&amp;do=delete&amp;md5check={$this->member->form_hash}&amp;event_id={$event['event_id']}&amp;cal_id={$event['event_calendar_id']}", "public", ''), "", "") . "' title='{$this->lang->words['calendar_delete_title']}' data-confirmaction=\"true\">{$this->lang->words['calendar_delete_button']}</a></li>\n\t\t\t\t\t\t<li class='post_edit'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=post&amp;do=edit&amp;cal_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}", "public", ''), "", "") . "' title='{$this->lang->words['calendar_edit_title']}'>{$this->lang->words['calendar_edit_button']}</a></li>\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t" . ($this->memberData['g_is_supmod'] ? "" . ($event['event_approved'] ? "\n\t\t\t\t\t\t\t<li class='post_unapprove'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=moderate&amp;do=calendarEventApprove&amp;modfilter={$this->request['modfilter']}&amp;approve=0&amp;md5check={$this->member->form_hash}&amp;cal_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}", "public", ''), "", "") . "\" title='{$this->lang->words['unapprove_event']}'>{$this->lang->words['unapprove_event']}</a></li>\n\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t<li class='post_approve'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=moderate&amp;do=calendarEventApprove&amp;modfilter={$this->request['modfilter']}&amp;approve=1&amp;md5check={$this->member->form_hash}&amp;cal_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}", "public", ''), "", "") . "\" title='{$this->lang->words['approve_event']}'>{$this->lang->words['approve_event']}</a></li>\n\t\t\t\t\t\t") . "" : "") . "\n\t\t\t\t</ul>\n\t\t\t</div>\t\t\t\n\t\t</div>\n\t</div>\n\t" . ($event['event_rsvp'] ? "<div class='ipsBox_container ipsLayout_right'>\n\t\t\t<div id='event_rsvp' class='ipsPad'>\n\t\t\t\t<h3 class='ipsType_subtitle'>{$this->lang->words['rsvp_title_header']}</h3>\n\t\t\t\t<span class='desc'>\n\t\t\t\t\t{$this->lang->words['event_poster_want_rsvp']}\n\t\t\t\t</span>\n\t\t\t\n\t\t\t\t" . (($event['_can_rsvp'] or !$event['_have_rsvp']) ? "<br /><br />\n\t\t\t\t\t" . ($event['_can_rsvp'] ? "\n\t\t\t\t\t\t<a id='rsvp_button' rel='event_id_{$event['event_id']}' href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=calendar&amp;module=calendar&amp;section=view&amp;do=showevent&amp;event_id={$event['event_id']}&amp;_rsvp=1", "public", ''), "{$event['event_title_seo']}", "cal_event") . "' title='{$this->lang->words['click_to_rsvp']}' class='ipsButton'>{$this->lang->words['rsvp_button']}</a>\n\t\t\t\t\t" : "" . (!$event['_have_rsvp'] ? "\n\t\t\t\t\t\t\t<span class='desc lighter'>{$this->lang->words['noperm_rsvp']}</span>\n\t\t\t\t\t\t" : "") . "") . "" : "") . "\n\t\t\t\t\n\t\t\t\t<br /><br />\n\t\t\t\t" . ($event['_rsvp_count'] > count($event['_rsvp_attendees_short']) ? "\n\t\t\t\t\t<a href='#' id='see_all_attendees' class='right ipsButton_secondary'>{$this->lang->words['rsvp_seeall']}</a>\n\t\t\t\t" : "") . "\n\t\t\t\t<h3 class='ipsType_subtitle'>" . sprintf($this->lang->words['rsvp_whois_attending'], $event['_rsvp_count']) . "</h3>\n\t\t\t\t" . (count($event['_rsvp_attendees_short']) ? "\n\t\t\t\t\t<ul id='attendee_list' class='ipsList_withminiphoto'>\n\t\t\t\t\t" . $this->__f__94352d016332588774a37f4d0e1e4848($event, $member, $typeInfo, $like) . "\t\t\t\t\t</ul>\n\t\t\t\t" : "\n\t\t\t\t\t<p id='no_attendees' class='desc'>{$this->lang->words['no_rsvp_yet']}</p>\n\t\t\t\t") . "\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t" . ($event['_rsvp_count'] > count($event['_rsvp_attendees_short']) ? "\n\t\t\t<div id='see_all_attendees_popup' style='display: none'>\n\t\t\t\t<h3>" . sprintf($this->lang->words['rsvp_whois_attending'], $event['_rsvp_count']) . "</h3>\n\t\t\t\t<div class='fixed_inner'>\n\t\t\t\t\t<ul id='attendee_list' class='ipsPad ipsList_withminiphoto'>\n\t\t\t\t\t" . $this->__f__951f916ed90a58dee66a75345b4c0990($event, $member, $typeInfo, $like) . "\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\$('see_all_attendees').on('click', function(e){\n\t\t\t\t\tEvent.stop(e);\n\t\t\t\t\tnew ipb.Popup( 'see_all', { \ttype: 'pane',\n\t\t\t\t\t\t\t\t\tinitial: \$('see_all_attendees_popup').show(),\n\t\t\t\t\t\t\t\t\thideAtStart: false,\n\t\t\t\t\t\t\t\t\tstem: false,\n\t\t\t\t\t\t\t\t\thideClose: false,\n\t\t\t\t\t\t\t\t\tw: '350px',\n\t\t\t\t\t\t\t\t\th: 300\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t});\n\t\t\t</script>\n\t\t" : "") . "" : "") . "\n</div>\n</div>\n<div>\n\t" . ($this->settings['sl_enable'] ? "\n\t\t<br />\n\t\t<div class='left'>\n\t\t\t" . IPSLib::shareLinks($event['event_title']) . "\n\t\t</div>\n\t" : "") . "\n</div>\n<br class='clear' /><br />";
     return $IPBHTML;
 }
开发者ID:mover5,项目名称:imobackup,代码行数:13,代码来源:skin_calendar.php

示例2: _postShareModal

 /**
  * The pop-up modal yodal
  * 
  */
 protected function _postShareModal()
 {
     $pid = intval($this->request['p']);
     $tid = intval($this->request['t']);
     $topic = $this->registry->topics->getTopicById($tid);
     $post = $this->registry->topics->getPostById($pid);
     $this->registry->getClass('topics')->getPosts(array('topicId' => $tid, 'limit' => 1, 'skipForumCheck' => true, 'pidIsLess' => $pid, 'onlyViewable' => true, 'onlyVisible' => true, 'notIgnored' => true, 'parse' => false, 'getCount' => true, 'sortKey' => 'date', 'sortOrder' => 'asc'));
     $post['post_count'] = $this->registry->getClass('topics')->getPostsCount() + 1;
     if (!$topic['tid']) {
         return $this->returnJsonArray(array('status' => 'fail'));
     }
     /* Check permission */
     if (!$this->registry->getClass('class_forums')->forumsCheckAccess($topic['forum_id'], 0, 'topic', $topic, TRUE)) {
         return $this->returnHtml($this->lang->words['no_permission']);
     }
     $url = $this->registry->output->buildSEOUrl('showtopic=' . $tid . '&p=' . $pid, 'public', $topic['title_seo'], 'showtopic');
     $forum = $this->registry->getClass('class_forums')->getForumById($topic['forum_id']);
     /* still 'ere? */
     $shareLinks = (!$forum['disable_sharelinks'] and $this->settings['sl_enable']) ? IPSLib::shareLinks($topic['title'], array('url' => $url, 'cssClass' => 'topic_share left')) : "";
     return $this->returnHtml($this->registry->output->getTemplate('topic')->ajaxSharePost($topic, $post, $url, $shareLinks));
 }
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:25,代码来源:topics.php


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