Skip to content
Permalink
Browse files

added webchat.tpl and webchat.php for viewing chat/irc embedded in

oc-layout, defined MNU_CHAT in data.sql, disabled template caching, moved webchat
URL to settings file, removed inclusion of not needed
lib2/logic/logpics.inc.php, increased size of chat window and made it
configurable via settings file, updates #196
  • Loading branch information...
bohrsty authored and following5 committed May 25, 2013
1 parent 3084ab3 commit 2d10aa8af3aa08affb5da96c044629ee918797a4
Showing with 53 additions and 1 deletion.
  1. +2 −1 htdocs/doc/sql/static-data/data.sql
  2. +18 −0 htdocs/templates2/ocstyle/webchat.tpl
  3. +33 −0 htdocs/webchat.php
@@ -900,6 +900,7 @@ INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustrin
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('93', 'MNU_ADMIN_RESTORE', 'Vandalism', '1880', 'Vandalism', '1880', '0', 'restorecaches.php', '1', '12', '5', '', '0', NULL);
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('94', 'MNU_START_NEWLOGSREST', 'Without Germany', '121', 'Without Germany', '121', '0', 'newlogsrest.php', '1', '7', '1', '', '1', NULL);
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('95', 'MNU_MYPROFILE_OKAPI', 'OKAPI Applications', '2008', 'OKAPI Apps', '2009', '0', '!okapi/apps/', '1', '9', '9', '', '1', NULL);
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('96', 'MNU_CHAT', 'Chat/IRC', '957', 'Chat/IRC', '957', '0', 'webchat.php', '1', '0', '5', '', '1', NULL);

-- Table sys_trans
SET NAMES 'utf8';
INSERT INTO `watches_waitingtypes` (`id`, `watchtype`) VALUES ('1', 'ownerlog');
INSERT INTO `watches_waitingtypes` (`id`, `watchtype`) VALUES ('2', 'cache_watches');

INSERT INTO `sysconfig` (`name`, `value`) VALUES ('datasql_checksum', 'feeed3f7d3f1d9b890f41e170b2593e4') ON DUPLICATE KEY UPDATE `value`='feeed3f7d3f1d9b890f41e170b2593e4';
INSERT INTO `sysconfig` (`name`, `value`) VALUES ('datasql_checksum', 'feeed3f7d3f1d9b890f41e170b2593e4') ON DUPLICATE KEY UPDATE `value`='feeed3f7d3f1d9b890f41e170b2593e4';
@@ -0,0 +1,18 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ
***************************************************************************}

{* webchat for freenode irc using qwebirc embedded via iframe *}

<div class="content2-container bg-blue02">
<p class="content-title-noshade-size3">
<img src="resource2/{$opt.template.style}/images/misc/32x32-news.png" style="align: left; margin-right: 10px;" width="24" height="24" alt="" />
{t}Chat/IRC{/t}
</p>
</div>
<div style="padding:2px 0 6px 0">
<p><a href="{$chatiframeurl}">{t}To open chat in a new tab/window, rightclick and choose "Open in new tab/window"{/t}</a></p>
<iframe style="margin: 25px auto; display: block; border: 1px grey solid;" src="{$chatiframeurl}" width="{$chatiframewidth}" height="{$chatiframeheight}"></iframe>
</div>
@@ -0,0 +1,33 @@
<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* Display some status information about the server and Opencaching
***************************************************************************/
require('./lib2/web.inc.php');
$sUserCountry = $login->getUserCountry();
$tpl->name = 'webchat';
$tpl->menuitem = MNU_CHAT;
$tpl->caching = false;
$tpl->cache_id = $sUserCountry;
// check loggedin and set username for chat
$chatusername = $translate->t('Guest', '', basename(__FILE__), __LINE__);
if ($login->userid != 0)
$chatusername = urlencode($login->username);
// prepare iframe-URL
$chatiframeurl = str_replace('{chatusername}',$chatusername,$opt['chat']['url']);
// assign to template
$tpl->assign('chatiframeurl',$chatiframeurl);
$tpl->assign('chatiframewidth',$opt['chat']['width']);
$tpl->assign('chatiframeheight',$opt['chat']['height']);
$tpl->display();
?>

0 comments on commit 2d10aa8

Please sign in to comment.
You can’t perform that action at this time.