Exemple #1
0
 private function templatePage()
 {
     $form = $this->getForm();
     if (false === ($nick = $this->module->getNickname())) {
         $nick = '';
     }
     // Focus input by js
     $focus = GWF_Session::isLoggedIn() ? 'message' : 'yournick';
     GWF_Javascript::focusElementByName($focus);
     $tVars = array('form' => $form->templateX(), 'msgs' => $this->module->getChannelMessages(), 'privmsgs' => $this->module->getPrivateMessages(), 'online' => $this->module->getOnlineUsers(), 'maxmsg_pub' => $this->module->getChanmsgPerPage(), 'maxmsg_priv' => $this->module->getPrivmsgPerPage(), 'nickname' => $nick, 'onlinetime' => $this->module->getOnlineTime(), 'peaktime' => $this->module->getMessagePeak(), 'lagtime' => $this->module->cfgLagPing(), 'href_history' => GWF_WEB_ROOT . 'chat/history', 'href_webchat' => GWF_WEB_ROOT . 'chat', 'href_ircchat' => GWF_WEB_ROOT . 'irc_chat', 'mibbit_url' => $this->module->cfgMibbitURL(), 'mibbit' => $this->module->cfgMibbit(), 'gwf_chat' => $this->module->cfgGWFChat());
     return $this->module->templatePHP('page.php', $tVars);
 }
Exemple #2
0
 private function templateSend($preview = '')
 {
     $form = $this->getForm();
     if ($this->pm !== false) {
         $this->pm->markRead(GWF_Session::getUser());
     }
     if ($this->pm === false) {
         GWF_Javascript::focusElementByName('title');
     } else {
         GWF_Javascript::focusElementByName('message');
     }
     $tVars = array('reply_to' => $this->pm === false ? '' : $this->templatePM($this->pm), 'form' => $form->templateY($this->getSEOTitle()), 'preview' => $preview);
     return $this->module->templatePHP('send.php', $tVars);
 }
Exemple #3
0
<?php

GWF_Javascript::focusElementByName('term');
echo $tVars['form_quick'];
#echo $tVars['form_adv'];
if (count($tVars['result']) > 0) {
    echo $tVars['pagemenu'];
    $headers = array(array($tLang->lang('th_post_date'), 'post_date', 'DESC'), array($tLang->lang('th_user_name'), 'user_name', 'ASC'), array($tLang->lang('th_title')), array($tLang->lang('th_thanks'), 'post_thanks', 'DESC'), array($tLang->lang('th_votes_up'), 'post_votes_up', 'DESC'));
    echo GWF_Table::start();
    echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
    foreach ($tVars['result'] as $post) {
        echo GWF_Table::rowStart();
        $post instanceof GWF_ForumPost;
        $hrefPost = $post->getShowHREF($tVars['term']);
        $hrefProfile = $post->getUser()->getProfileHREF();
        echo GWF_Table::column(GWF_HTML::anchor($hrefPost, $post->displayPostDate()));
        echo GWF_Table::column(GWF_HTML::anchor($hrefProfile, $post->getUser()->displayUsername()));
        echo GWF_Table::column(GWF_HTML::anchor($hrefPost, $post->getVar('post_title')));
        echo GWF_Table::column($post->getVar('post_thanks'), 'gwf_num');
        echo GWF_Table::column($post->getVar('post_votes_up'), 'gwf_num');
        echo GWF_Table::rowEnd();
    }
    echo GWF_Table::end();
    echo $tVars['pagemenu'];
}