示例#1
0
文件: _post.php 项目: ratbird/hope
                </a>
                <br>

                <!-- Like -->
                <span class="likes" id="like_<?php 
echo $post['topic_id'];
?>
">
                    <?php 
echo $this->render_partial('index/_like', array('topic_id' => $post['topic_id']));
?>
                </span>
            </dd>

            <? foreach (PluginEngine::sendMessage('PostingApplet', 'getHTML', $post['name_raw'], $post['content_raw'],
                    PluginEngine::getLink('coreforum/index/index/' . $post['topic_id'] .'#'. $post['topic_id']),
                    $post['user_id']) as $applet_data) : ?>
            <dd>
                <?php 
echo $applet_data;
?>
            </dd>
            <? endforeach ?>
        </dl>
        
        <? if ($is_new): ?>
        <span class="new_posting">
            <?php 
echo Icon::create('forum+new', 'attention', ['title' => _("Dieser Beitrag ist seit Ihrem letzten Besuch hinzugekommen.")])->asImg(16);
?>
        </span>
示例#2
0
文件: Router.php 项目: ratbird/hope
 /**
  * Searches and registers available routes.
  */
 private function setupRoutes()
 {
     // A bit ugly, I confess
     static $was_setup = false;
     if ($was_setup) {
         return;
     }
     $was_setup = true;
     // Register default routes
     $routes = words('Blubber Contacts Course Discovery Events Files Forum Messages News Schedule Semester Studip User UserConfig Wiki');
     foreach ($routes as $route) {
         require_once "app/routes/{$route}.php";
         $class = "\\RESTAPI\\Routes\\{$route}";
         $this->registerRoutes(new $class());
     }
     // Register plugin routes
     $router = $this;
     array_walk(array_flatten(\PluginEngine::sendMessage('RESTAPIPlugin', 'getRouteMaps')), function ($route) use($router) {
         $router->registerRoutes($route);
     });
 }
示例#3
0
require_once 'vendor/studip_ws/studip_ws.php';
require_once 'vendor/studip_ws/soap_dispatcher.php';
# requiring phpxmlrpc
require_once 'vendor/phpxmlrpc/xmlrpc.inc';
require_once 'vendor/phpxmlrpc/xmlrpcs.inc';
require_once 'vendor/phpxmlrpc/docxmlrpcs.inc';
require_once 'vendor/phpxmlrpc/jsonrpc.inc';
require_once 'vendor/phpxmlrpc/jsonrpcs.inc';
# requiring xmlrpc_dispatcher
require_once 'vendor/studip_ws/studip_ws.php';
require_once 'vendor/studip_ws/xmlrpc_dispatcher.php';
# requiring jsonrpc_dispatcher
require_once 'vendor/studip_ws/studip_ws.php';
require_once 'vendor/studip_ws/jsonrpc_dispatcher.php';
# requiring all the webservices
require_once 'lib/webservices/services/access_controlled_webservice.php';
require_once 'lib/webservices/services/user_webservice.php';
require_once 'lib/webservices/services/session_webservice.php';
require_once 'lib/webservices/services/contentmodule_webservice.php';
require_once 'lib/webservices/services/seminar_webservice.php';
require_once 'lib/webservices/services/lecture_tree_webservice.php';
require_once 'lib/webservices/services/institute_webservice.php';
// set up dummy user environment (but no session)
$user = new Seminar_User('nobody');
$auth = new Seminar_Default_Auth();
$perm = new Seminar_Perm();
$AVAILABLE_SERVICES = array('UserService', 'SessionService', 'SeminarService', 'ContentmoduleService', 'LectureTreeService', 'InstituteService');
$AVAILABLE_SERVICES = array_merge($AVAILABLE_SERVICES, array_flatten(PluginEngine::sendMessage("WebServicePlugin", "getWebServices")));
if (!get_config('WEBSERVICES_ENABLE')) {
    throw new Exception("Webservices not available");
}