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


PHP TikiLib::tikiUrl方法代码示例

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


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

示例1: __construct

 function __construct($page)
 {
     global $tikilib, $prefs;
     $this->page = $page;
     $details = $tikilib->fetchAll("SELECT lang, lastModif FROM tiki_pages WHERE pageName = ?", $page);
     $detail = end($details);
     $this->lang = empty($detail['lang']) ? $prefs['site_language'] : $detail['lang'];
     $this->lastModif = $detail['lastModif'];
     $this->websiteTitle = $prefs['browsertitle'];
     $this->href = TikiLib::tikiUrl() . 'tiki-index.php?page=' . $page;
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:11,代码来源:Metadata.php

示例2: getTimeStamp

 private function getTimeStamp()
 {
     //May be used soon for encrypting forwardlinks
     if (isset($_REQUEST['action'], $_REQUEST['hash']) && $_REQUEST['action'] == 'timestamp') {
         $client = new Zend_Http_Client(TikiLib::tikiUrl() . 'tiki-timestamp.php', array('timeout' => 60));
         $client->setParameterGet('hash', $_REQUEST['hash']);
         $client->setParameterGet('clienttime', time());
         $response = $client->request();
         echo $response->getBody();
         exit;
     }
 }
开发者ID:hurcane,项目名称:tiki-azure,代码行数:12,代码来源:ForwardLink.php

示例3: direct

    public function direct()
    {
        $headerlib = TikiLib::lib('header');
        //redirect start
        if (isset($_GET['phrase'])) {
            $phrase = !empty($_GET['phrase']) ? $_GET['phrase'] : '';
        }
        //start session if that has not already been done
        if (!isset($_SESSION)) {
            session_start();
        }
        //recover from redirect if it happened
        if (!empty($_SESSION['phrase'])) {
            $phrase = $_SESSION['phrase'];
            unset($_SESSION['phrase']);
            $phraseSanitized = Phraser\Phraser::superSanitize($phrase);
            $headerlib->add_jq_onready(<<<JS
var phraseSanitized = '{$phraseSanitized}';
setTimeout(function() {
    if (!flp.selectAndScrollToFutureLink(phraseSanitized)) {
        flp.selectAndScrollToPastLink(phraseSanitized);
    }
}, 50);
JS
);
        } else {
            if (!empty($phrase)) {
                $revision = FLP\Data::getRevision($phrase);
                //check if this version (latest) is
                if ($this->version != $revision->version) {
                    //prep for redirect
                    $_SESSION['phrase'] = $phrase;
                    header('Location: ' . TikiLib::tikiUrl() . 'tiki-pagehistory.php?page=' . $revision->title . '&preview=' . $revision->version . '&nohistory');
                    exit;
                } else {
                    $phraseSanitized = Phraser\Phraser::superSanitize($phrase);
                    $headerlib->add_jq_onready(<<<JS
var phraseSanitized = '{$phraseSanitized}';
setTimeout(function() {
    if (!flp.selectAndScrollToFutureLink(phraseSanitized)) {
        flp.selectAndScrollToPastLink(phraseSanitized);
    }
}, 50);
JS
);
                }
            }
        }
    }
开发者ID:rjsmelo,项目名称:tiki,代码行数:49,代码来源:WikiEvents.php

示例4: wikiView

 static function wikiView($args)
 {
     if (isset($_REQUEST['protocol'], $_REQUEST['contribution']) && $_REQUEST['protocol'] == 'forwardlink') {
         $me = new self();
         $forwardLink = Feed_ForwardLink::forwardLink($args['object']);
         //here we do the confirmation that another wiki is trying to talk with this one
         $_REQUEST['contribution'] = json_decode($_REQUEST['contribution']);
         $_REQUEST['contribution']->origin = $_SERVER['REMOTE_ADDR'];
         if ($forwardLink->addItem($_REQUEST['contribution']) == true) {
             $me->response = 'success';
         } else {
             $me->response = 'failure';
         }
         echo json_encode($me->feed(TikiLib::tikiUrl() . 'tiki-index.php?page=' . $args['object']));
         exit;
     }
 }
开发者ID:railfuture,项目名称:tiki-website,代码行数:17,代码来源:Receive.php

示例5: goToNewestWikiRevision

    static function goToNewestWikiRevision($version, &$phrase)
    {
        if (!isset($_SESSION)) {
            session_start();
        }
        if (!empty($_SESSION['phrase'])) {
            //recover from redirect if it happened
            $phrase = $_SESSION['phrase'];
            unset($_SESSION['phrase']);
            return;
        }
        if (empty($phrase)) {
            return;
        }
        // if successful, will return an array with page, version, data, date, and phrase
        $newestRevision = self::findWikiRevision($phrase);
        if ($newestRevision == false) {
            //TODO: abstract
            TikiLib::lib("header")->add_jq_onready(<<<JQ
\t\t\t\t\$('<div />')
\t\t\t\t\t.html(
\t\t\t\t\t\ttr('This can happen if the page you are linking to has changed since you obtained the futurelink or if the rights to see it are different from what you have set at the moment.') +
\t\t\t\t\t\t'&nbsp;&nbsp;' +
\t\t\t\t\t\ttr('If you are logged in, try logging out and then recreate the futurelink.')
\t\t\t\t\t)
\t\t\t\t\t.dialog({
\t\t\t\t\t\ttitle: tr('Phrase not found'),
\t\t\t\t\t\tmodal: true
\t\t\t\t\t});
JQ
);
            return;
        }
        if ($version != $newestRevision['version']) {
            $_SESSION['phrase'] = $phrase;
            //prep for redirect if it happens;
            header('Location: ' . TikiLib::tikiUrl() . 'tiki-pagehistory.php?page=' . $newestRevision['page'] . '&preview=' . $newestRevision['version'] . '&nohistory');
            exit;
        }
    }
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:40,代码来源:Search.php

示例6: wikiView

 static function wikiView($args)
 {
     //TODO: abstract
     if (isset($_POST['protocol']) && $_POST['protocol'] == 'futurelink' && isset($_POST['metadata'])) {
         $me = new self($args['object']);
         $futureLink = new FutureLink_FutureUI($args['object']);
         //here we do the confirmation that another wiki is trying to talk with this one
         $metadata = json_decode($_POST['metadata']);
         $metadata->origin = $_POST['REMOTE_ADDR'];
         if ($futureLink->addItem($metadata) == true) {
             $me->response = 'success';
         } else {
             $me->response = 'failure';
         }
         $feed = $me->feed(TikiLib::tikiUrl() . 'tiki-index.php?page=' . $args['object']);
         if ($me->response == 'failure' && $futureLink == true) {
             $feed->reason = $futureLink->verifications;
         }
         echo json_encode($feed);
         exit;
     }
 }
开发者ID:rjsmelo,项目名称:tiki,代码行数:22,代码来源:ReceiveFromPast.php

示例7: __construct

 public function __construct(WikiLingo\Parser &$wikiLingoParser, $bindFLP = true)
 {
     global $prefs, $page;
     $headerlib = TikiLib::lib('header');
     if ($page == null && $bindFLP) {
         throw new \Exception("Page undefined");
     }
     require_once 'lib/wikiLingo_tiki/WikiPluginBridge.php';
     $bridge = self::$bridge = new WikiPluginBridge();
     $events = Type::Events($wikiLingoParser->events);
     $events->bind(new Event\Expression\Plugin\Exists(function (Plugin &$plugin) use($wikiLingoParser, $bridge) {
         if (!$plugin->exists) {
             switch ($plugin->classType) {
                 case "WikiLingo\\Plugin\\Maketoc":
                     if (self::$toc == null) {
                         self::$toc = new WikiLingo\Plugin\Toc();
                     }
                     $plugin->exists = true;
                     $plugin->class = self::$toc;
                     $wikiLingoParser->pluginInstances[$plugin->classType] = self::$toc;
                     break;
                 default:
                     $plugin->exists = true;
                     $plugin->class = $bridge;
                     $wikiLingoParser->pluginInstances[$plugin->classType] = $bridge;
             }
         }
     }));
     if ($bindFLP) {
         //FutureLink-Protocol Events
         FLP\Events::bind(new FLP\Event\MetadataLookup(function ($linkType, &$metadata) use($page, $headerlib) {
             $metadataLookup = new WikiMetadataLookup($page);
             $metadataTemp = $metadataLookup->getPartial();
             $metadataTemp->href = TikiLib::tikiUrl('tiki-index.php') . '?page=' . $page;
             $metadataTemp->text = $metadata->text;
             $metadata = $metadataTemp;
         }));
     }
 }
开发者ID:rjsmelo,项目名称:tiki,代码行数:39,代码来源:WikiLingoEvents.php

示例8: goToNewestWikiRevision

    static function goToNewestWikiRevision($version, $phrase, $page)
    {
        $newestRevision = self::newestWikiRevision($phrase, $page);
        if ($newestRevision < 1) {
            TikiLib::lib("header")->add_jq_onready(<<<JQ
\t\t\t\t\$('<div />')
\t\t\t\t\t.html(
\t\t\t\t\t\ttr('This can happen if the page you are linking to has changed since you obtained the forwardlink or if the page is not viewable by the public.') +
\t\t\t\t\t\t'&nbsp;&nbsp;' +
\t\t\t\t\t\ttr('If you are logged in, try loggin out and then recreate the forwardlink.')
\t\t\t\t\t)
\t\t\t\t\t.dialog({
\t\t\t\t\t\ttitle: tr('Phrase not found'),
\t\t\t\t\t\tmodal: true
\t\t\t\t\t});
JQ
);
            return;
        }
        if ($version != $newestRevision) {
            header('Location: ' . TikiLib::tikiUrl() . 'tiki-pagehistory.php?page=' . $page . '&preview=' . $newestRevision . '&nohistory');
            exit;
        }
    }
开发者ID:railfuture,项目名称:tiki-website,代码行数:24,代码来源:Search.php

示例9: createForwardLinksInterface

    static function createForwardLinksInterface($page, $questions, $date)
    {
        global $headerlib, $user, $prefs;
        $answers = array();
        foreach ($questions as $question) {
            $answers[] = array('question' => strip_tags($question['Value']), 'answer' => '');
        }
        $answers = json_encode($answers);
        $headerlib->add_jsfile('lib/rangy/uncompressed/rangy-core.js')->add_jsfile('lib/rangy/uncompressed/rangy-cssclassapplier.js')->add_jsfile('lib/rangy/uncompressed/rangy-selectionsaverestore.js')->add_jsfile('lib/rangy_tiki/rangy-phraser.js')->add_jsfile('lib/ZeroClipboard.js')->add_jsfile('lib/core/JisonParser/Phraser.js')->add_jsfile('lib/jquery/md5.js');
        $authorDetails = json_encode(end(Tracker_Query::tracker('ForwardLink Author Details')->byName()->excludeDetails()->filter(array('field' => 'User', 'value' => $user))->render(false)->query()));
        $page = urlencode($page);
        $href = TikiLib::tikiUrl() . 'tiki-index.php?page=' . $page;
        $websiteTitle = addslashes(htmlspecialchars($prefs['browsertitle']));
        $headerlib->add_jq_onready(<<<JQ
\t\t\tvar answers = {$answers};

\t\t\t\$('<div />')
\t\t\t\t.appendTo('body')
\t\t\t\t.text(tr('Create ForwardLink'))
\t\t\t\t.css('position', 'fixed')
\t\t\t\t.css('top', '0px')
\t\t\t\t.css('right', '0px')
\t\t\t\t.css('font-size', '10px')
\t\t\t\t.css('z-index', 99999)
\t\t\t\t.fadeTo(0, 0.85)
\t\t\t\t.button()
\t\t\t\t.click(function() {
\t\t\t\t\t\$(this).remove();
\t\t\t\t\t\$.notify(tr('Highlight text to be linked'));

\t\t\t\t\t\$(document).bind('mousedown', function() {
\t\t\t\t\t\tif (me.data('rangyBusy')) return;
\t\t\t\t\t\t\$('div.forwardLinkCreate').remove();
\t\t\t\t\t\t\$('embed[id*="ZeroClipboard"]').parent().remove();
\t\t\t\t\t});

\t\t\t\t\tvar me = \$('#page-data').rangy(function(o) {
\t\t\t\t\t\tif (me.data('rangyBusy')) return;
\t\t\t\t\t\to.text = \$.trim(o.text);

\t\t\t\t\t\tvar forwardLinkCreate = \$('<div>' + tr('Accept TextLink & ForwardLink') + '</div>')
\t\t\t\t\t\t\t.button()
\t\t\t\t\t\t\t.addClass('forwardLinkCreate')
\t\t\t\t\t\t\t.css('position', 'absolute')
\t\t\t\t\t\t\t.css('top', o.y + 'px')
\t\t\t\t\t\t\t.css('left', o.x + 'px')
\t\t\t\t\t\t\t.css('font-size', '10px')
\t\t\t\t\t\t\t.fadeTo(0,0.80)
\t\t\t\t\t\t\t.mousedown(function() {
\t\t\t\t\t\t\t\tvar suggestion = \$.trim(rangy.expandPhrase(o.text, '\\n', me[0]));
\t\t\t\t\t\t\t\tvar buttons = {};

\t\t\t\t\t\t\t\tif (suggestion == o.text) {
\t\t\t\t\t\t\t\t\tgetAnswers();
\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\tbuttons[tr('Ok')] = function() {
\t\t\t\t\t\t\t\t\t\to.text = suggestion;
\t\t\t\t\t\t\t\t\t\tme.box.dialog('close');
\t\t\t\t\t\t\t\t\t\tgetAnswers();
\t\t\t\t\t\t\t\t\t};

\t\t\t\t\t\t\t\t\tbuttons[tr('Cancel')] = function() {
\t\t\t\t\t\t\t\t\t\tme.box.dialog('close');
\t\t\t\t\t\t\t\t\t\tgetAnswers();
\t\t\t\t\t\t\t\t\t};

\t\t\t\t\t\t\t\t\tme.box = \$('<div>' +
\t\t\t\t\t\t\t\t\t\t'<table>' +
\t\t\t\t\t\t\t\t\t\t\t'<tr>' +
\t\t\t\t\t\t\t\t\t\t\t\t'<td>' + tr('You selected:') + '</td>' +
\t\t\t\t\t\t\t\t\t\t\t\t'<td><b>"</b>' + o.text + '<b>"</b></td>' +
\t\t\t\t\t\t\t\t\t\t\t'</tr>' +
\t\t\t\t\t\t\t\t\t\t\t'<tr>' +
\t\t\t\t\t\t\t\t\t\t\t\t'<td>' + tr('Suggested selection:') + '</td>' +
\t\t\t\t\t\t\t\t\t\t\t\t'<td class="ui-state-highlight"><b>"</b>' + suggestion + '<b>"</b></td>' +
\t\t\t\t\t\t\t\t\t\t\t'</tr>' +
\t\t\t\t\t\t\t\t\t\t'</tabl>' +
\t\t\t\t\t\t\t\t\t'</div>')
\t\t\t\t\t\t\t\t\t\t.dialog({
\t\t\t\t\t\t\t\t\t\t\ttitle: tr("Suggestion"),
\t\t\t\t\t\t\t\t\t\t\tbuttons: buttons,
\t\t\t\t\t\t\t\t\t\t\twidth: \$(window).width() / 2,
\t\t\t\t\t\t\t\t\t\t\tmodal: true
\t\t\t\t\t\t\t\t\t\t})
\t\t\t\t\t\t\t\t}

\t\t\t\t\t\t\t\tfunction getAnswers() {
\t\t\t\t\t\t\t\t\tif (!answers.length) {
\t\t\t\t\t\t\t\t\t\treturn acceptPhrase();
\t\t\t\t\t\t\t\t\t}

\t\t\t\t\t\t\t\t\tvar answersDialog = \$('<table width="100%;" />');

\t\t\t\t\t\t\t\t\t\$.each(answers, function() {
\t\t\t\t\t\t\t\t\t\tvar tr = \$('<tr />').appendTo(answersDialog);
\t\t\t\t\t\t\t\t\t\t\$('<td style="font-weight: bold; text-align: left;" />')
\t\t\t\t\t\t\t\t\t\t\t.text(this.question)
\t\t\t\t\t\t\t\t\t\t\t.appendTo(tr);

\t\t\t\t\t\t\t\t\t\t\$('<td style="text-align: right;"><input class="answerValues" style="width: inherit;"/></td>')
//.........这里部分代码省略.........
开发者ID:railfuture,项目名称:tiki-website,代码行数:101,代码来源:ForwardLink.php

示例10: timestamp

 static function timestamp($hash, $clientTime = "", $requester = "")
 {
     $me = new self($requester, 2048);
     $keys = $me->getKeys();
     return (object) array("timestamp" => urlencode($me->encrypt($hash . $clientTime . time())), "authority" => TikiLib::tikiUrl(), "requester" => $requester, "publickey" => $keys->publickey, "href" => TikiLib::tikiUrl() . "tiki-tskeys.php");
 }
开发者ID:rjsmelo,项目名称:tiki,代码行数:6,代码来源:tikisecure.php

示例11: wikiplugin_img


//.........这里部分代码省略.........
            $params['fgalId'] = '';
            $repl .= wikiplugin_img($data, $params);
        }
        if (strpos($repl, $notice) !== false) {
            return $repl;
        } else {
            $repl = "\n\r" . '<br style="clear:both" />' . "\r" . $repl . "\n\r" . '<br style="clear:both" />' . "\r";
            return $repl;
            // return the multiple images
        }
    }
    $repl = '';
    //////////////////////Set src for html///////////////////////////////
    //Set variables for the base path for images in file galleries, image galleries and attachments
    global $base_url;
    $absolute_links = !empty(TikiLib::lib('parser')->option['absolute_links']) ? TikiLib::lib('parser')->option['absolute_links'] : false;
    $imagegalpath = ($absolute_links ? $base_url : '') . 'show_image.php?id=';
    $filegalpath = ($absolute_links ? $base_url : '') . 'tiki-download_file.php?fileId=';
    $attachpath = ($absolute_links ? $base_url : '') . 'tiki-download_wiki_attachment.php?attId=';
    //get random image and treat as file gallery image afterwards
    if (!empty($imgdata['randomGalleryId'])) {
        $filegallib = TikiLib::lib('filegal');
        $dbinfo = $filegallib->get_file(0, $imgdata['randomGalleryId']);
        $imgdata['fileId'] = $dbinfo['fileId'];
        $basepath = $prefs['fgal_use_dir'];
    }
    if (empty($imgdata['src'])) {
        if (!empty($imgdata['id'])) {
            $src = $imagegalpath . $imgdata['id'];
        } elseif (!empty($imgdata['fileId'])) {
            $smarty->loadPlugin('smarty_modifier_sefurl');
            $src = smarty_modifier_sefurl($imgdata['fileId'], 'file');
            if ($absolute_links) {
                $src = TikiLib::tikiUrl($src);
            }
        } else {
            //only attachments left
            $src = $attachpath . $imgdata['attId'];
        }
    } elseif (!empty($imgdata['src']) && $absolute_links && !preg_match('|^[a-zA-Z]+:\\/\\/|', $imgdata['src'])) {
        global $base_host, $url_path;
        $src = $base_host . ($imgdata['src'][0] == '/' ? '' : $url_path) . $imgdata['src'];
    } elseif (!empty($imgdata['src']) && $tikidomain && !preg_match('|^https?:|', $imgdata['src'])) {
        $src = preg_replace("~img/wiki_up/~", "img/wiki_up/{$tikidomain}/", $imgdata['src']);
    } elseif (!empty($imgdata['src'])) {
        $src = $imgdata['src'];
    }
    $browse_full_image = $src;
    $srcIsEditable = false;
    ///////////////////////////Get DB info for image size and metadata/////////////////////////////
    if (!empty($imgdata['height']) || !empty($imgdata['width']) || !empty($imgdata['max']) || !empty($imgdata['desc']) || strpos($imgdata['rel'], 'box') !== false || !empty($imgdata['stylebox']) || !empty($imgdata['styledesc']) || !empty($imgdata['button']) || !empty($imgdata['thumb']) || !empty($imgdata['align']) || !empty($imgdata['metadata']) || !empty($imgdata['fileId'])) {
        //Get ID numbers for images in galleries and attachments included in src as url parameter
        //So we can get db info for these too
        $parsed = parse_url($imgdata['src']);
        if (empty($parsed['host']) || !empty($parsed['host']) && strstr($base_url, $parsed['host'])) {
            if (strlen(strstr($imgdata['src'], $imagegalpath)) > 0) {
                $imgdata['id'] = substr(strstr($imgdata['src'], $imagegalpath), strlen($imagegalpath));
            } elseif (strlen(strstr($imgdata['src'], $filegalpath)) > 0) {
                $imgdata['fileId'] = substr(strstr($imgdata['src'], $filegalpath), strlen($filegalpath));
            } elseif (strlen(strstr($imgdata['src'], $attachpath)) > 0) {
                $imgdata['attId'] = substr(strstr($imgdata['src'], $attachpath), strlen($attachpath));
            }
        }
        $imageObj = '';
        require_once 'lib/images/images.php';
        //Deal with images with info in tiki databases (file and image galleries and attachments)
开发者ID:hurcane,项目名称:tiki-azure,代码行数:67,代码来源:wikiplugin_img.php

示例12: smarty_function_payment

function smarty_function_payment($params, $smarty)
{
    global $prefs, $user, $globalperms;
    $userlib = TikiLib::lib('user');
    $tikilib = TikiLib::lib('tiki');
    $paymentlib = TikiLib::lib('payment');
    $invoice = (int) $params['id'];
    $objectperms = Perms::get('payment', $invoice);
    $info = $paymentlib->get_payment($invoice);
    if ($user && $info['userId'] == $userlib->get_user_id($user)) {
        $theguy = true;
    } else {
        $theguy = false;
    }
    $smarty->assign('ccresult_ok', false);
    // Unpaid payments can be seen by anyone as long as they know the number
    // Just like your bank account, anyone can drop money in it.
    if ($info && $objectperms->payment_view && (($info['state'] == 'outstanding' || $info['state'] == 'overdue') && $prefs['payment_user_only_his_own'] != 'y' || $info['state'] == 'past' && $prefs['payment_user_only_his_own_past'] != 'y' || $theguy)) {
        if ($prefs['payment_system'] == 'cclite' && isset($_POST['cclite_payment_amount']) && $_POST['cclite_payment_amount'] == $info['amount_remaining']) {
            global $cclitelib;
            require_once 'lib/payment/cclitelib.php';
            $access = TikiLib::lib('access');
            $cartlib = TikiLib::lib('cart');
            //$access->check_authenticity( tr('Transfer currency? %0 %1?', $info['amount'], $info['currency'] ));
            // check currency matches
            if (empty($params['registry'])) {
                $params['registry'] = $cclitelib->get_registry();
            }
            if (empty($info['currency'])) {
                $info['currency'] = $cclitelib->get_currency($params['registry']);
            } else {
                if ($info['currency'] != substr($cclitelib->get_currency($params['registry']), 0, 3)) {
                    return tr('Currency in payment (%0) does not match the currency for that registry (%1).', $info['currency'], $cclitelib->get_currency($params['registry']));
                }
            }
            // no notification callback in cclite yet, so have to assume true for now (pending checking in perform_trade)
            $result = $cclitelib->pay_invoice($invoice, $info['amount'], $info['currency'], $params['registry']);
            if ($result) {
                // ccresults are set in smarty by the perform_trade behaviour
                $smarty->assign('ccresult', $result);
                $smarty->assign('ccresult_ok', $result);
            } else {
                $smarty->assign('ccresult', tr('Payment was sent but verification is not currently available (this feature is a work in progress)'));
            }
        } else {
            if ($prefs['payment_system'] == 'tikicredits') {
                require_once 'lib/payment/creditspaylib.php';
                $userpaycredits = new UserPayCredits();
                $userpaycredits->setPrice($info['amount_remaining']);
                $smarty->assign('userpaycredits', $userpaycredits->credits);
            }
        }
        $info['fullview'] = $objectperms->payment_view || $theguy;
        if (!empty($smarty->tpl_vars['returnurl']->value)) {
            $returl = $smarty->tpl_vars['returnurl'];
            $info['returnurl'] = TikiLib::tikiUrl($returl);
        }
        if (!empty($params['returnurl']) && empty($result)) {
            $info['url'] = TikiLib::tikiUrl($params['returnurl']);
            $info['url'] .= (strstr($params['returnurl'], '.php?') || !strstr($params['returnurl'], '.php') ? '&' : '?') . "invoice={$invoice}";
        }
        $smarty->assign('payment_info', $info);
        $smarty->assign('payment_detail', $tikilib->parse_data(htmlspecialchars($info['detail'])));
        $smarty_cache_id = $smarty_compile_id = $prefs['language'] . md5('tiki-payment-single.tpl');
        return $smarty->fetch('tiki-payment-single.tpl', $smarty_cache_id, $smarty_compile_id);
    } else {
        return tra('This invoice does not exist or access to it is restricted.');
    }
}
开发者ID:rjsmelo,项目名称:tiki,代码行数:69,代码来源:function.payment.php

示例13: getJitsiUrl

 public static function getJitsiUrl()
 {
     $url = TikiLib::lib('service')->getUrl(['controller' => 'suite', 'action' => 'jitsi']);
     return TikiLib::tikiUrl($url) . '&username=${username}&password=${password}';
 }
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:5,代码来源:Controller.php

示例14: send_confirm_email

 function send_confirm_email($user, $tpl = 'confirm_user_email')
 {
     global $smarty, $prefs, $tikilib;
     include_once 'lib/webmail/tikimaillib.php';
     $languageEmail = $this->get_user_preference($_REQUEST['username'], 'language', $prefs['site_language']);
     $apass = $this->renew_user_password($user);
     $apass = md5($apass);
     $smarty->assign('mail_apass', $apass);
     $smarty->assign('mail_pass', $_REQUEST['pass']);
     $smarty->assign('mail_ip', $tikilib->get_ip_address());
     $smarty->assign('user', $user);
     $mail = new TikiMail();
     $mail_data = $smarty->fetchLang($languageEmail, "mail/{$tpl}" . '_subject.tpl');
     $mail_data = sprintf($mail_data, $_SERVER['SERVER_NAME']);
     $mail->setSubject($mail_data);
     $foo = parse_url($_SERVER['REQUEST_URI']);
     $mail_machine = TikiLib::tikiUrl('tiki-confirm_user_email.php');
     // for BC
     $smarty->assign('mail_machine', $mail_machine);
     $mail_data = $smarty->fetchLang($languageEmail, "mail/{$tpl}.tpl");
     $mail->setText($mail_data);
     if (!($email = $this->get_user_email($user)) || !$mail->send(array($email))) {
         $smarty->assign('msg', tra("The user email confirmation can't be sent. Contact the administrator"));
         return false;
     } else {
         $smarty->assign('msg', 'It is time to confirm your email. You will receive an mail with the instruction to follow');
         return true;
     }
 }
开发者ID:hurcane,项目名称:tiki-azure,代码行数:29,代码来源:userslib.php

示例15: __construct

 public function __construct($info, $originalValue, $options = array())
 {
     $tikilib = TikiLib::lib('tiki');
     $prefslib = TikiLib::lib('prefs');
     $headerlib = TikiLib::lib('header');
     //TODO: info may have an override, we need to build it in using MYSQL
     $this->info = $info;
     $this->originalValue = $originalValue;
     $this->options = $options;
     $feature_wikilingo = $prefslib->getPreference('feature_wikilingo')['value'];
     if ($feature_wikilingo === 'y' && isset($info['outputType']) && $info['outputType'] == 'wikiLingo') {
         if (self::$init) {
             $scripts = self::$wikiLingoScripts;
             $wikiLingo = self::$wikiLingo;
         } else {
             self::$init = true;
             $scripts = self::$wikiLingoScripts = new WikiLingo\Utilities\Scripts(TikiLib::tikiUrl() . "vendor/wikilingo/wikilingo/");
             $wikiLingo = self::$wikiLingo = new WikiLingo\Parser($scripts);
             require_once 'lib/wikiLingo_tiki/WikiLingoEvents.php';
             new WikiLingoEvents($wikiLingo);
         }
         if (isset($_POST['protocol']) && $_POST['protocol'] === 'futurelink') {
             $this->parsedValue = '';
         } else {
             $this->parsedValue = $wikiLingo->parse($this->originalValue);
             //recover from failure, but DO NOT just output
             if ($this->parsedValue === null) {
                 $possibleCause = '';
                 if (!empty($wikiLingo->pluginStack)) {
                     foreach ($wikiLingo->pluginStack as $pluginName) {
                         $possibleCause .= "<li>" . tr('Unclosed Plugin: ') . $pluginName . "</li>";
                     }
                 }
                 $errors = htmlspecialchars(implode($wikiLingo->lexerErrors + $wikiLingo->parserErrors, "\n"));
                 $this->parsedValue = '<pre><code>' . htmlspecialchars($this->originalValue) . '</code></pre>' . '<div class="ui-state-error">' . tr("wikiLingo markup could not be parsed.") . '<br />' . (!empty($possibleCause) ? "<ul>" . $possibleCause . "</ul>" : '') . tr('Error Details: ') . '<pre><code>' . $errors . '</code></pre>' . '</div>';
             }
             //transfer scripts over to headerlib
             //css is already processed at this point, as it is in the header, at the top, so we expose it here
             $this->parsedValue .= $scripts->renderCss();
             //js
             foreach ($scripts->scripts as $script) {
                 $headerlib->add_js($script);
             }
             //js files
             foreach ($scripts->scriptLocations as $scriptLocation) {
                 $headerlib->add_jsfile($scriptLocation);
             }
         }
     } else {
         $this->parsedValue = $tikilib->parse_data($this->originalValue, $this->options = $options);
     }
 }
开发者ID:ameoba32,项目名称:tiki,代码行数:52,代码来源:wikilib.php


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