Skip to content

Instantly share code, notes, and snippets.

@MaleXachi
Last active August 27, 2017 04:21
Show Gist options
  • Save MaleXachi/5484781 to your computer and use it in GitHub Desktop.
Save MaleXachi/5484781 to your computer and use it in GitHub Desktop.
This is a method to create a config with lightIRC using PHP. You can use this script for your own website to give you users a method to create a config file with Config Generator. If you like this and you have a github account, please click on star. Feel free to post a comment.
<!DOCTYPE html>
<html>
<head>
<title>lightIRC Config Generator - By MaleXachi</title>
<meta charset='utf-8'>
<?php
header("Expires: Mon, 26 Jul 1990 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script>
$("'[placeholder]'").parents("'form'").submit(function(){$(this).find("'[placeholder]'").each(function(){var input=$(this);if(input.val()==input.attr("'placeholder'"))input.val("''")})});
</script>
<style>
body{font-family: Verdana;padding-bottom: 10px;font-size: 12px;color: #787878;margin: 10px auto 0;width: 950px;}
div#wrapper{width: 920px;}
h2{padding: 0px;margin: 0px;}
p.InfoMessage{margin: 0;padding: 0;font-size: 11px;}
td.form1{font-weight: bold;padding: 12px 0 5px 10px;text-align: right;vertical-align: top;}
td.form2{padding: 10px 0 5px 10px;}
.w150{width: 150px;}
.placeholder{color: #aaa;}
</style>
</head>
<body>
<div id="wrapper">
<?php
/* (c) MaleXachi 29-04-2013 - lightIRC Config Generator */
// Create an Array with Key for Params - If there is new Param in the future, please add that here also!
$P = array(
'ParamsHost' => null,
'ParamsPort' => null,
'ParamsPolicyPort' => null,
'ParamsCharset' => null,
'ParamsNick' => null,
'ParamsNickAlternate' => null,
'ParamsStyleURL' => null,
'ParamsStyle' => null,
'ParamsLanguage' => null,
'ParamsRememberNickname' => null,
'ParamsNickPrefix' => null,
'ParamsNickPostfix' => null,
'ParamsShowNickPrefixes' => null,
'ParamsShowNickPrefixIcons' => null,
'ParamsPassword' => null,
'ParamsIdent' => null,
'ParamsRealname' => null,
'ParamsLanguagePath' => null,
'ParamsEmoticonPath' => null,
'ParamsIconPath' => null,
'ParamsQuitMessage' => null,
'ParamsEnableQueries' => null,
'ParamsAutojoin' => null,
'ParamsPerform' => null,
'ParamsBlockedCommands' => null,
'ParamsLoopServerCommands' => null,
'ParamsAutoReconnect' => null,
'ParamsShowSecurityError' => null,
'ParamsCustomSecurityErrorMessage' => null,
'ParamsTargetFrame' => null,
'ParamsDefaultBanmask' => null,
'ParamsPerformContinousWhoRequests' => null,
'ParamsWebcam' => null,
'ParamsRtmp' => null,
'ParamsWebcamPreviewBox' => null,
'ParamsWebcamPrivateOnly' => null,
'ParamsWebcamPublicOnly' => null,
'ParamsWebcamVideoOnly' => null,
'ParamsWebcamAudioOnly' => null,
'ParamsWebcamChannelBlacklist' => null,
'ParamsWebcamChannelWhitelist' => null,
'ParamsNavigationPosition' => null,
'ParamsShowNavigation' => null,
'ParamsIdentifyPassword' => null,
'ParamsIdentifyMessage' => null,
'ParamsIdentifyCommand' => null,
'ParamsShowRegisterNicknameButton' => null,
'ParamsRegisterNicknameServiceName' => null,
'ParamsRegisterNicknameCommand' => null,
'ParamsShowRegisterChannelButton' => null,
'ParamsRegisterChannelServiceName' => null,
'ParamsRegisterChannelCommand' => null,
'ParamsSoundAlerts' => null,
'ParamsSoundOnNewChannelMessage' => null,
'ParamsShowTimestamps' => null,
'ParamsTimestampFormat' => null,
'ParamsShowJoinPartMessages' => null,
'ParamsShowNewQueriesInBackground' => null,
'ParamsFontSize' => null,
'ParamsShowServerWindow' => null,
'ParamsShowNickSelection' => null,
'ParamsShowIdentifySelection' => null,
'ParamsShowServerPasswordSelection' => null,
'ParamsShowChannelCentral' => null,
'ParamsShowMenuButton' => null,
'ParamsShowListButton' => null,
'ParamsShowNickChangeButton' => null,
'ParamsShowOptionsButton' => null,
'ParamsShowChannelCentralButton' => null,
'ParamsShowJoinChannelButton' => null,
'ParamsShowPartChannelButton' => null,
'ParamsShowRegisterChannelButton' => null,
'ParamsShowRegisterNicknameButton' => null,
'ParamsShowEmoticonsButton' => null,
'ParamsEmoticonList' => null,
'ParamsShowRichTextControls' => null,
'ParamsShowSubmitButton' => null,
'ParamsShowChannelHeader' => null,
'ParamsChannelHeader' => null,
'ParamsShowInfoMessages' => null,
'ParamsShowVerboseUserInformation' => null,
'ParamsUserListWidth' => null,
'ParamsUseUserListIcons' => null,
'ParamsUserListCustomIcons' => null,
'ParamsUserListCustomFormatting' => null,
'ParamsContextMenuInternalEvent' => null,
'ParamsContextMenuExternalEvent' => null,
'ParamsUserListStrictAlphabeticalSort' => null,
'FunctionSendCommand' => null,
'FunctionSendMessageToActiveWindow' => null,
'FunctionSetTextInputContent' => null,
'FunctionOnChatAreaClick' => null,
'FunctionOnContextMenuSelect' => null,
'FunctionOnServerCommand' => null,
'FileExt' => null,
);
if(isset($_POST['generate'])) {
// Retrieve Values from $_POST and store it in $ParamsPostText and strip_tags to secure $_POST
foreach ($P as $ParamsPostTextKey => $ParamsPostTextValue)
$P[$ParamsPostTextKey] = strip_tags($_POST[$ParamsPostTextKey]);
// Security For Some Params - Like $_POST of Selectboxes - If there is new values for some params or you want to add more values, please add that here also!
switch($P['ParamsStyle']){case 'lightblue': case 'blue': case 'black': case 'background': case 'darkorange': case 'green': case 'yellow': break; default: $P['ParamsStyle'] = 'lightblue';}
switch($P['ParamsRememberNickname']){case 'true': case 'false': break; default: $P['ParamsRememberNickname'] = 'false';}
switch($P['ParamsNickPrefix']){case '<': case '(': case '-': case '|': break; default: $P['ParamsNickPrefix'] = '';}
switch($P['ParamsNickPostfix']){case '>': case ')': case '-': case '|': break; default: $P['ParamsNickPostfix'] = '';}
switch($P['ParamsShowNickPrefixes']){case 'true': case 'false': break; default: $P['ParamsShowNickPrefixes'] = 'true';}
switch($P['ParamsShowNickPrefixIcons']){case 'false': case 'true': break; default: $P['ParamsShowNickPrefixIcons'] = 'false';}
switch($P['ParamsEnableQueries']){case 'true': case 'false': break; default: $P['ParamsEnableQueries'] = 'true';}
switch($P['ParamsLoopServerCommands']){case 'false': case 'true': break; default: $P['ParamsLoopServerCommands'] = 'false';}
switch($P['ParamsAutoReconnect']){case 'true': case 'false': break; default: $P['ParamsAutoReconnect'] = 'true';}
switch($P['ParamsShowSecurityError']){case 'true': case 'false': break; default: $P['ParamsShowSecurityError'] = 'true';}
switch($P['ParamsTargetFrame']){case '_blank': case '_self': case '_parent': case '_top': break; default: $P['ParamsTargetFrame'] = '_blank';}
switch($P['ParamsDefaultBanmask']){case '*!%ident%@*': case '*!%nick%@*': case '*!%host%@*': break; default: $P['ParamsDefaultBanmask'] = '';}
switch($P['ParamsPerformContinousWhoRequests']){case 'false': case 'true': break; default: $P['ParamsPerformContinousWhoRequests'] = 'false';}
switch($P['ParamsWebcam']){case 'false': case 'true': break; default: $P['ParamsWebcam'] = 'false';}
switch($P['ParamsWebcamPreviewBox']){case 'true': case 'false': break; default: $P['ParamsWebcamPreviewBox'] = 'true';}
switch($P['ParamsWebcamPrivateOnly']){case 'false': case 'true': break; default: $P['ParamsWebcamPrivateOnly'] = 'false';}
switch($P['ParamsWebcamPublicOnly']){case 'false': case 'true': break; default: $P['ParamsWebcamPublicOnly'] = 'false';}
switch($P['ParamsWebcamVideoOnly']){case 'false': case 'true': break; default: $P['ParamsWebcamVideoOnly'] = 'false';}
switch($P['ParamsWebcamAudioOnly']){case 'false': case 'true': break; default: $P['ParamsWebcamAudioOnly'] = 'false';}
switch($P['ParamsNavigationPosition']){case 'bottom': case 'top': case 'left': case 'right': break; default: $P['ParamsNavigationPosition'] = 'bottom';}
switch($P['ParamsShowNavigation']){case 'true': case 'false': break; default: $P['ParamsShowNavigation'] = 'true';}
switch($P['ParamsIdentifyPassword']){case 'false': case 'true': break; default: $P['ParamsIdentifyPassword'] = '';}
switch($P['ParamsShowRegisterNicknameButton']){case 'false': case 'true': break; default: $P['ParamsShowRegisterNicknameButton'] = 'false';}
switch($P['ParamsShowRegisterChannelButton']){case 'false': case 'true': break; default: $P['ParamsShowRegisterChannelButton'] = 'false';}
switch($P['ParamsSoundAlerts']){case 'true': case 'false': break; default: $P['ParamsSoundAlerts'] = 'true';}
switch($P['ParamsSoundOnNewChannelMessage']){case 'false': case 'true': break; default: $P['ParamsSoundOnNewChannelMessage'] = 'false';}
switch($P['ParamsShowTimestamps']){case 'true': case 'false': break; default: $P['ParamsShowTimestamps'] = 'true';}
switch($P['ParamsTimestampFormat']){case '[hh:mm:ss]': case '[ss:mm:hh]': case '[mm:hh:ss]': case '[hh:mm]': case '[mm:hh]': case '[hh:ss]': case '[ss:hh]': case '[hh]': case '[mm]': case '[ss]': break; default: $P['ParamsTimestampFormat'] = '[hh:mm:ss]';}
switch($P['ParamsShowJoinPartMessages']){case 'true': case 'false': break; default: $P['ParamsShowJoinPartMessages'] = 'true';}
switch($P['ParamsShowNewQueriesInBackground']){case 'false': case 'true': break; default: $P['ParamsShowNewQueriesInBackground'] = 'false';}
switch($P['ParamsFontSize']){case '10': case '11': case '12': case '13': case '14': case '15': case '16': case '17': case '18': case '19': case '20': case '21': case '22': case '23': case '24': break; default: $P['ParamsFontSize'] = '12';}
switch($P['ParamsShowServerWindow']){case 'true': case 'false': break; default: $P['ParamsShowServerWindow'] = 'true';}
switch($P['ParamsShowNickSelection']){case 'false': case 'true': break; default: $P['ParamsShowNickSelection'] = 'false';}
switch($P['ParamsShowIdentifySelection']){case 'false': case 'true': break; default: $P['ParamsShowIdentifySelection'] = 'false';}
switch($P['ParamsShowServerPasswordSelection']){case 'false': case 'true': break; default: $P['ParamsShowServerPasswordSelection'] = 'false';}
switch($P['ParamsShowChannelCentral']){case 'true': case 'false': break; default: $P['ParamsShowChannelCentral'] = 'true';}
switch($P['ParamsShowMenuButton']){case 'true': case 'false': break; default: $P['ParamsShowMenuButton'] = 'true';}
switch($P['ParamsShowListButton']){case 'true': case 'false': break; default: $P['ParamsShowListButton'] = 'true';}
switch($P['ParamsShowNickChangeButton']){case 'true': case 'false': break; default: $P['ParamsShowNickChangeButton'] = 'true';}
switch($P['ParamsShowOptionsButton']){case 'true': case 'false': break; default: $P['ParamsShowOptionsButton'] = 'true';}
switch($P['ParamsShowChannelCentralButton']){case 'true': case 'false': break; default: $P['ParamsShowChannelCentralButton'] = 'true';}
switch($P['ParamsShowJoinChannelButton']){case 'true': case 'false': break; default: $P['ParamsShowJoinChannelButton'] = 'true';}
switch($P['ParamsShowPartChannelButton']){case 'true': case 'false': break; default: $P['ParamsShowPartChannelButton'] = 'true';}
switch($P['ParamsShowRegisterChannelButton']){case 'false': case 'true': break; default: $P['ParamsShowRegisterChannelButton'] = 'false';}
switch($P['ParamsShowRegisterNicknameButton']){case 'false': case 'true': break; default: $P['ParamsShowRegisterNicknameButton'] = 'false';}
switch($P['ParamsShowEmoticonsButton']){case 'true': case 'false': break; default: $P['ParamsShowEmoticonsButton'] = 'true';}
switch($P['ParamsShowRichTextControls']){case 'true': case 'false': break; default: $P['ParamsShowRichTextControls'] = 'true';}
switch($P['ParamsShowSubmitButton']){case 'true': case 'false': break; default: $P['ParamsShowSubmitButton'] = 'true';}
switch($P['ParamsShowChannelHeader']){case 'true': case 'false': break; default: $P['ParamsShowChannelHeader'] = 'true';}
switch($P['ParamsShowInfoMessages']){case 'true': case 'false': break; default: $P['ParamsShowInfoMessages'] = 'true';}
switch($P['ParamsShowVerboseUserInformation']){case 'false': case 'true': break; default: $P['ParamsShowVerboseUserInformation'] = 'false';}
switch($P['ParamsUserListWidth']){case '200': case '190': case '180': case '170': case '160': case '150': case '140': case '130': case '120': case '110': case '100': case '0': break; default: $P['ParamsUserListWidth'] = '150';}
switch($P['ParamsUseUserListIcons']){case 'false': case 'true': break; default: $P['ParamsUseUserListIcons'] = 'false';}
switch($P['FileExt']){case '.js': case '.php': break; default: $P['FileExt'] = '.js';}
switch($P['ParamsUserListStrictAlphabeticalSort']){case 'false': case 'true': break; default: $P['ParamsUserListStrictAlphabeticalSort'] = 'false';}
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript" src="config<?php echo $_POST['FileExt']; ?>"></script>
<div id="lightIRC" style="height:100%; text-align:center;">
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<script type="text/javascript">
swfobject.embedSWF("lightIRC.swf", "lightIRC", "100%", "500", "10.0.0", "expressInstall.swf", params);
</script>
<?php
// Let's say which Params is added for checking...
echo "<h2>Your Params:</h2><br />" .
'<a href="' . 'config' . $P['FileExt'] . '">Download config' . $P['FileExt'] . '</a> - <a href="config-generator.php">Back To Generator</a><br />' .
'<strong>Server:</strong> ' . $P['ParamsHost'] . '<br />' .
'<strong>Port:</strong> ' . $P['ParamsPort'] . '<br />' .
'<strong>Policy Port:</strong> ' . $P['ParamsPolicyPort'] . '<br />' .
'<strong>Charset:</strong> ' . $P['ParamsCharset'] . '<br />' .
'<strong>Language:</strong> ' . $P['ParamsLanguage'] . '<br />' .
'<strong>Nick:</strong> ' . $P['ParamsNick'] . '<br />' .
'<strong>Nick Alternate:</strong> ' . $P['ParamsNickAlternate'] . '<br />' .
'<strong>Remember Nickname:</strong> ' . $P['ParamsRememberNickname'] . '<br />' .
'<strong>Nick Prefix:</strong> ' . $P['ParamsNickPrefix'] . '<br />' .
'<strong>Nick Postfix:</strong> ' . $P['ParamsNickPostfix'] . '<br />' .
'<strong>Show Nick Prefixes:</strong> ' . $P['ParamsShowNickPrefixes'] . '<br />' .
'<strong>Show Nick Prefix Icons:</strong> ' . $P['ParamsShowNickPrefixIcons'] . '<br />' .
'<strong>Server Password:</strong> ' . $P['ParamsPassword'] . '<br />' .
'<strong>Ident:</strong> ' . $P['ParamsIdent'] . '<br />' .
'<strong>Realname:</strong> ' . $P['ParamsRealname'] . '<br />' .
'<strong>Quit Message:</strong> ' . $P['ParamsQuitMessage'] . '<br />' .
'<strong>Language Path:</strong> ' . $P['ParamsLanguagePath'] . '<br />' .
'<strong>Emoticon Path:</strong> ' . $P['ParamsEmoticonPath'] . '<br />' .
'<strong>Icon Path:</strong> ' . $P['ParamsIconPath'] . '<br />' .
'<strong>Css Color:</strong> ' . $P['ParamsStyleURL'] . $P['ParamsStyle'] . '.css<br />' .
'<strong>Enable Queries:</strong> ' . $P['ParamsEnableQueries'] . '<br />' .
'<strong>Autojoin:</strong> ' . $P['ParamsAutojoin'] . '<br />' .
'<strong>Perform:</strong> ' . $P['ParamsPerform'] . '<br />' .
'<strong>Blocked Commands:</strong> ' . $P['ParamsBlockedCommands'] . '<br />' .
'<strong>Loop Server Commands:</strong> ' . $P['ParamsLoopServerCommands'] . '<br />' .
'<strong>Auto Reconnect:</strong> ' . $P['ParamsAutoReconnect'] . '<br />' .
'<strong>Show Security Error:</strong> ' . $P['ParamsShowSecurityError'] . '<br />' .
'<strong>Custom Security Error Message:</strong> ' . $P['ParamsCustomSecurityErrorMessage'] . '<br />' .
'<strong>Targetframe:</strong> ' . $P['ParamsTargetFrame'] . '<br />' .
'<strong>Default Banmask:</strong> ' . $P['ParamsDefaultBanmask'] . '<br />' .
'<strong>Perform Continous Who Requests:</strong> ' . $P['ParamsPerformContinousWhoRequests'] . '<br />' .
'<strong>Webcam:</strong> ' . $P['ParamsWebcam'] . '<br />' .
'<strong>Webcam Preview Box:</strong> ' . $P['ParamsWebcamPreviewBox'] . '<br />' .
'<strong>WebCam Private Only:</strong> ' . $P['ParamsWebcamPrivateOnly'] . '<br />' .
'<strong>Webcam Public Only:</strong> ' . $P['ParamsWebcamPublicOnly'] . '<br />' .
'<strong>Webcam Video Only:</strong> ' . $P['ParamsWebcamVideoOnly'] . '<br />' .
'<strong>Webcam Audio Only:</strong> ' . $P['ParamsWebcamAudioOnly'] . '<br />' .
'<strong>Rtmp:</strong> ' . $P['ParamsRtmp'] . '<br />' .
'<strong>Webcam Channel Blacklist:</strong> ' . $P['ParamsWebcamChannelBlacklist'] . '<br />' .
'<strong>Webcam Channel Whitelist:</strong> ' . $P['ParamsWebcamChannelWhitelist'] . '<br />' .
'<strong>Navigation Position:</strong> ' . $P['ParamsNavigationPosition'] . '<br />' .
'<strong>Show Navigation:</strong> ' . $P['ParamsShowNavigation'] . '<br />' .
'<strong>Identify Password:</strong> ' . $P['ParamsIdentifyPassword'] . '<br />' .
'<strong>Identify Message:</strong> ' . $P['ParamsIdentifyMessage'] . '<br />' .
'<strong>Identify Command:</strong> ' . $P['ParamsIdentifyCommand'] . '<br />' .
'<strong>Show Register Nickname Button:</strong> ' . $P['ParamsShowRegisterNicknameButton'] . '<br />' .
'<strong>Show Register Nickname Servicename:</strong> ' . $P['ParamsRegisterNicknameServiceName'] . '<br />' .
'<strong>Register Nickname Command:</strong> ' . $P['ParamsRegisterNicknameCommand'] . '<br />' .
'<strong>Show Register Channel Button:</strong> ' . $P['ParamsShowRegisterChannelButton'] . '<br />' .
'<strong>Register Channel Servicename:</strong> ' . $P['ParamsRegisterChannelServiceName'] . '<br />' .
'<strong>Register Channel Command:</strong> ' . $P['ParamsRegisterChannelCommand'] . '<br />' .
'<strong>Sound Alerts:</strong> ' . $P['ParamsSoundAlerts'] . '<br />' .
'<strong>Sound On New Channel Message:</strong> ' . $P['ParamsSoundOnNewChannelMessage'] . '<br />' .
'<strong>Show Timestamps:</strong> ' . $P['ParamsShowTimestamps'] . '<br />' .
'<strong>Timestamp Format:</strong> ' . $P['ParamsTimestampFormat'] . '<br />' .
'<strong>SHow Join Part Messages:</strong> ' . $P['ParamsShowJoinPartMessages'] . '<br />' .
'<strong>Show New Queries In Background:</strong> ' . $P['ParamsShowNewQueriesInBackground'] . '<br />' .
'<strong>Fontsize:</strong> ' . $P['ParamsFontSize'] . '<br />' .
'<strong>SHow Server Window:</strong> ' . $P['ParamsShowServerWindow'] . '<br />' .
'<strong>Show Nick Selection:</strong> ' . $P['ParamsShowNickSelection'] . '<br />' .
'<strong>Show Identify Selection:</strong> ' . $P['ParamsShowIdentifySelection'] . '<br />' .
'<strong>Show Server Password Selection:</strong> ' . $P['ParamsShowServerPasswordSelection'] . '<br />' .
'<strong>Show Channel Central:</strong> ' . $P['ParamsShowChannelCentral'] . '<br />' .
'<strong>Show Menu Button:</strong> ' . $P['ParamsShowMenuButton'] . '<br />' .
'<strong>Show List Button:</strong> ' . $P['ParamsShowListButton'] . '<br />' .
'<strong>Show Nick Change Button:</strong> ' . $P['ParamsShowNickChangeButton'] . '<br />' .
'<strong>Show Options Button:</strong> ' . $P['ParamsShowOptionsButton'] . '<br />' .
'<strong>Show Channel Central Button:</strong> ' . $P['ParamsShowChannelCentralButton'] . '<br />' .
'<strong>Show Join Channel Button:</strong> ' . $P['ParamsShowJoinChannelButton'] . '<br />' .
'<strong>Show Part Channel Button:</strong> ' . $P['ParamsShowPartChannelButton'] . '<br />' .
'<strong>Show Register Channel Button:</strong> ' . $P['ParamsShowRegisterChannelButton'] . '<br />' .
'<strong>Show Register Nickname Button:</strong> ' . $P['ParamsShowRegisterNicknameButton'] . '<br />' .
'<strong>Show Emoticons Button:</strong> ' . $P['ParamsShowEmoticonsButton'] . '<br />' .
'<strong>Emoticon List:</strong> ' . $P['ParamsEmoticonList'] . '<br />' .
'<strong>Show Richtext Controls:</strong> ' . $P['ParamsShowRichTextControls'] . '<br />' .
'<strong>Show Submit Button:</strong> ' . $P['ParamsShowSubmitButton'] . '<br />' .
'<strong>Show Channel Header:</strong> ' . $P['ParamsShowChannelHeader'] . '<br />' .
'<strong>Channel Header:</strong> ' . $P['ParamsChannelHeader'] . '<br />' .
'<strong>Show Infor Messages:</strong> ' . $P['ParamsShowInfoMessages'] . '<br />' .
'<strong>Show Verbose User Information:</strong> ' . $P['ParamsShowVerboseUserInformation'] . '<br />' .
'<strong>Use User List Icons:</strong> ' . $P['ParamsUserListWidth'] . '<br />' .
'<strong>Use User List Icons:</strong> ' . $P['ParamsUseUserListIcons'] . '<br />' .
'<strong>User List Custom icons:</strong> ' . $P['ParamsUserListCustomIcons'] . '<br />' .
'<strong>User List Custom icons:</strong> ' . $P['ParamsUserListStrictAlphabeticalSort'] . '<br />' .
'<strong>User List Custom Formatting:</strong> ' . $P['ParamsUserListCustomFormatting'] . '<br />' .
'<strong>Context Menu Internal Event:</strong> ' . $P['ParamsContextMenuInternalEvent'] . '<br />' .
'<strong>Context Menu External Event:</strong> ' . $P['ParamsContextMenuExternalEvent'] . '<br />' .
'<strong>Config:</strong> ' . 'config' . $P['FileExt'];
// Let's Create Config File...
$fileLocation = getenv("DOCUMENT_ROOT") . "/config" . $P['FileExt']; // Default: Document Root - You can change it, if you want to forward to other folder, example: $fileLocation = "http://www.yourdomain.com/chat/config" . $P['FileExt'];
$file = fopen($fileLocation,"w");
$CreateParamsConfig = '
/*
* Generated - lightIRC Config Generator by MaleXachi
* lightIRC configuration
* www.lightIRC.com
*
* You can add or change these parameters to customize lightIRC.
* Please see the full parameters list at http://redmine.lightirc.com/projects/lightirc/wiki/Customization_parameters
*
*/
var params = {};
/* Change these parameters */
params.host = "'.$P['ParamsHost'].'";
params.port = '.$P['ParamsPort'].';
params.policyPort = '.$P['ParamsPolicyPort'].';
params.charset = "'.$P['ParamsCharset'].'";
params.language = "'.$P['ParamsLanguage'].'";
params.styleURL = "'.$P['ParamsStyleURL'] . $P['ParamsStyle'].'.css";
params.nick = "'.$P['ParamsNick'].'";
params.nickAlternate = "'.$P['ParamsNickAlternate'].'";
params.rememberNickname = '.$P['ParamsRememberNickname'].';
params.nickPrefix = "'.$P['ParamsNickPrefix'].'";
params.nickPostfix = "'.$P['ParamsNickPostfix'].'";
params.showNickPrefixes = '.$P['ParamsShowNickPrefixes'].';
params.showNickPrefixIcons = '.$P['ParamsShowNickPrefixIcons'].';
params.ident = "'.$P['ParamsIdent'].'";
params.realname = "'.$P['ParamsRealname'].'";
params.password = "'.$P['ParamsPassword'].'";
params.quitMessage = "'.$P['ParamsQuitMessage'].'";
params.languagePath = "'.$P['ParamsLanguagePath'].'";
params.emoticonPath = "'.$P['ParamsEmoticonPath'].'";
params.iconPath = "'.$P['ParamsIconPath'].'";
params.enableQueries = '.$P['ParamsEnableQueries'].';
params.autojoin = "'.$P['ParamsAutojoin'].'";
params.perform = "'.$P['ParamsPerform'].'";
params.blockedCommands = "'.$P['ParamsBlockedCommands'].'";
params.loopServerCommands = '.$P['ParamsLoopServerCommands'].'
params.autoReconnect = '.$P['ParamsAutoReconnect'].';
params.showSecurityError = '.$P['ParamsShowSecurityError'].';
params.customShowSecurityErrorMessage = "'.$P['ParamsCustomSecurityErrorMessage'].'";
params.targetFrame = "'.$P['ParamsTargetFrame'].'";
params.defaultBanmask = "'.$P['ParamsDefaultBanmask'].'";
params.performContinousWhoRequests = '.$P['ParamsPerformContinousWhoRequests'].';
params.webcam = '.$P['ParamsWebcam'].';
params.rtmp = "'.$P['ParamsRtmp'].'";
params.webcamPreviewBox = '.$P['ParamsWebcamPreviewBox'].';
params.webcamPrivateOnly = '.$P['ParamsWebcamPrivateOnly'].';
params.webcamPublicOnly = '.$P['ParamsWebcamPublicOnly'].';
params.webcamVideoOnly = '.$P['ParamsWebcamVideoOnly'].';
params.webcamAudioOnly = '.$P['ParamsWebcamAudioOnly'].';
params.webcamChannelBlacklist = "'.$P['ParamsWebcamChannelBlacklist'].'";
params.webcamChannelWhitelist = "'.$P['ParamsWebcamChannelWhitelist'].'";
params.navigationPosition = "'.$P['ParamsNavigationPosition'].'";
params.showNavigation = '.$P['ParamsShowNavigation'].';
params.identifyPassword = "'.$P['ParamsIdentifyPassword'].'";
params.identifyMessage = "'.$P['ParamsIdentifyMessage'].'";
params.identifyCommand = "'.$P['ParamsIdentifyCommand'].'";
params.showRegisterNicknameButton = '.$P['ParamsShowRegisterNicknameButton'].';
params.registerNicknameServiceName = "'.$P['ParamsRegisterNicknameServiceName'].'";
params.registerNicknameCommand = "'.$P['ParamsRegisterNicknameCommand'].'";
params.showRegisterChannelButton = '.$P['ParamsShowRegisterChannelButton'].';
params.registerChannelServiceName = "'.$P['ParamsRegisterChannelServiceName'].'";
params.registerChannelCommand = "'.$P['ParamsRegisterChannelCommand'].'";
params.soundAlerts = '.$P['ParamsSoundAlerts'].';
params.soundOnNewChannelMessage = '.$P['ParamsSoundOnNewChannelMessage'].';
params.showTimestamps = '.$P['ParamsShowTimestamps'].';
params.timestampFormat = "'.$P['ParamsTimestampFormat'].'";
params.showJoinPartMessages = '.$P['ParamsShowJoinPartMessages'].';
params.showNewQueriesInBackground = '.$P['ParamsShowNewQueriesInBackground'].';
params.fontSize = "'.$P['ParamsFontSize'].'";
params.showServerWindow = '.$P['ParamsShowServerWindow'].';
params.showNickSelection = '.$P['ParamsShowNickSelection'].';
params.showIdentifySelection = '.$P['ParamsShowIdentifySelection'].';
params.showServerPasswordSelection = '.$P['ParamsShowServerPasswordSelection'].';
params.showChannelCentral = '.$P['ParamsShowChannelCentral'].';
params.showMenuButton = '.$P['ParamsShowMenuButton'].';
params.showListButton = '.$P['ParamsShowListButton'].';
params.showNickChangeButton = '.$P['ParamsShowNickChangeButton'].';
params.showOptionsButton = '.$P['ParamsShowOptionsButton'].';
params.showChannelCentralButton = '.$P['ParamsShowChannelCentralButton'].';
params.showJoinChannelButton = '.$P['ParamsShowJoinChannelButton'].';
params.showPartChannelButton = '.$P['ParamsShowPartChannelButton'].';
params.showRegisterChannelButton = '.$P['ParamsShowRegisterChannelButton'].';
params.showRegisterNicknameButton = '.$P['ParamsShowRegisterNicknameButton'].';
params.showEmoticonsButton = '.$P['ParamsShowEmoticonsButton'].';
params.emoticonList = "'.$P['ParamsEmoticonList'].'";
params.showRichTextControls = '.$P['ParamsShowRichTextControls'].';
params.showSubmitButton = '.$P['ParamsShowSubmitButton'].';
params.showChannelHeader = '.$P['ParamsShowChannelHeader'].';
params.channelHeader = "'.$P['ParamsChannelHeader'].'";
params.showInfoMessages = '.$P['ParamsShowInfoMessages'].';
params.showVerboseUserInformation = '.$P['ParamsShowVerboseUserInformation'].';
params.userListWidth = "'.$P['ParamsUserListWidth'].'";
params.useUserListIcons = '.$P['ParamsUseUserListIcons'].';
params.userListCustomIcons = "'.$P['ParamsUserListCustomIcons'].'";
params.userListCustomFormatting = "'.$P['ParamsUserListCustomFormatting'].'";
params.userListStrictAlphabeticalSort = '.$P['ParamsUserListStrictAlphabeticalSort'].';
params.contextMenuInternalEvent = "'.$P['ParamsContextMenuInternalEvent'].'";
params.contextMenuExternalEvent = "'.$P['ParamsContextMenuExternalEvent'].'";
/* Use this method to send a command to lightIRC with JavaScript */
'.$P['FunctionSendCommand'].'
/* Use this method to send a message to the active chatwindow */
'.$P['FunctionSendMessageToActiveWindow'].'
/* Use this method to set a random text input content in the active window */
'.$P['FunctionSetTextInputContent'].'
/* This method gets called if you click on a nick in the chat area */
'.$P['FunctionOnChatAreaClick'].'
/* This method gets called if you use the parameter contextMenuExternalEvent */
'.$P['FunctionOnContextMenuSelect'].'
/* This method gets called if you use the parameter loopServerCommands */
'.$P['FunctionOnServerCommand'].'
/* This loop escapes % signs in parameters. You should not change it */
for(var key in params) {
params[key] = params[key].toString().replace(/%/g, "%25");
}
';
fwrite($file,$CreateParamsConfig);
fclose($file);
} else {
// Extra Options For Some Params - You can add more values in the future, like for Port, PolicyPort, Charset, Style, Etc...
$SelectedPort = array('6667', '6669', '7000', '7001');
$SelectedPolicyPort = array('843', '8002');
$SelectedCharset = array('utf-8', 'iso-8859-1');
$SelectedStyle = array('lightblue', 'blue', 'black', 'background', 'darkorange', 'green', 'yellow' );
$SelectedNickPrefix = array('', '<', '(', '-', '|');
$SelectedNickPostfix = array('', '>', ')', '-', '|');
$SelectedLanguage = array('en', 'bd', 'bg', 'br', 'cz', 'da', 'de', 'el', 'ar', 'es', 'et', 'fi', 'fr', 'hu', 'hr', 'id', 'it', 'ja', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sl', 'sq', 'sr_cyr', 'sr_lat', 'sv', 'th', 'tr', 'uk');
$SelectedTargetFrame = array('_blank', '_self', '_parent', '_top');
$SelectedDefaultBanmask = array('', '*!%ident%@*', '*!%nick%@*', '*!%host%@*');
$SelectedNavigationPosition = array('bottom', 'top', 'left', 'right');
$SelectedFileExt = array('.js', '.php');
$SelectedTimestampFormat = array('[hh:mm:ss]', '[ss:mm:hh]', '[mm:hh:ss]', '[hh:mm]', '[mm:hh]', '[hh:ss]', '[ss:hh]', '[hh]', '[mm]', '[ss]');
$SelectedFontSize = array('12', '10', '11', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24');
$SelectedUserListWidth = array('150', '200', '190', '180', '170', '160', '140', '130', '120', '110', '100', '0 - Hide');
?>
<div style="text-align: center;"><img src="http://redmine.lightirc.com/attachments/download/3" style="border: 1px solid #787878;" alt="lightIRC Parameters Image"></div>
<form class="" action="config-generator.php" method="post">
<table cellspacing="0" cellpadding="0">
<tr>
<td class="form1">Host:</td>
<td class="form2"><input type="text" name="ParamsHost" class="w150" placeholder="irc.example.com" required><p class="InfoMessage">Server IP/hostname.</p></td>
</tr>
<tr>
<td class="form1">Port:</td>
<td class="form2"><select class="w150" name="ParamsPort">
<?php
foreach($SelectedPort as $SelectedPort)
{
echo '<option>' . $SelectedPort . '</option>';
}
?>
</select>
<p class="InfoMessage">Server port.</p></td>
</tr>
<tr>
<td class="form1">Server Password:</td>
<td class="form2"><input type="password" class="w150" name="ParamsPassword"><p class="InfoMessage">Server password (only needed on very few servers).</p></td>
</tr>
<tr>
<td class="form1">Policy Port:</td>
<td class="form2"><select class="w150" name="ParamsPolicyPort">
<?php
foreach($SelectedPolicyPort as $SelectedPolicyPort)
{
echo '<option>' . $SelectedPolicyPort . '</option>';
}
?>
</select>
<p class="InfoMessage">Defines the port where Flash Player should look for the policy daemon.</p></td>
</tr>
<tr>
<td class="form1">Charset:</td>
<td class="form2"><select class="w150" name="ParamsCharset">
<?php
foreach($SelectedCharset as $SelectedCharset)
{
echo '<option>' . $SelectedCharset . '</option>';
}
?>
</select>
<p class="InfoMessage">The encoding for ingoing/outgoing messages. If you have trouble with utf-8, try the charset of your country (e.g. iso-8859-1).</p></td>
</tr>
<tr>
<td class="form1">Language:</td>
<td class="form2"><select class="w150" name="ParamsLanguage">
<?php
foreach($SelectedLanguage as $SelectedLanguage)
{
echo '<option>' . $SelectedLanguage . '</option>';
}
?>
</select>
<p class="InfoMessage">Language for the user interface. Currently available translations: bd Bengali, bg Bulgarian, br Brazilian Portuguese, cz Czech, da Danish, de German, el Greek, en English, es Spanish, et Estonian, fr French, hu Hungarian, it Italian, ja Japanese, nl Dutch, pl Polish, ro Romanian, ru Russian, sl Slovenian, sq Albanian, sr_cyr Serbian Cyrillic, sr_lat Serbian Latin, sv Swedish, th Thai, tr Turkish, uk Ukrainian.</p></td>
</tr>
<tr>
<td class="form1">Css Path:</td>
<td class="form2"><input type="text" name="ParamsStyleURL" class="w150" placeholder="css/"><p class="InfoMessage">Path to your Css folder of lightIRC.</p></td>
</tr>
<tr>
<td class="form1">Style:</td>
<td class="form2"><select class="w150" name="ParamsStyle">
<?php
foreach($SelectedStyle as $SelectedStyle)
{
echo '<option>' . $SelectedStyle . '</option>';
}
?>
</select>
<p class="InfoMessage">Choose a style.</p></td>
</tr>
<tr>
<td class="form1">Nick:</td>
<td class="form2"><input type="text" class="w150" name="ParamsNick" placeholder="lightIRC_%" required><p class="InfoMessage">The username to connect with. It is also a prefilled value for the nickselect box. Add "%" and lightIRC inserts a random number to prevent doubles (e.g.: "%nick%" -> nick123").</p></td>
</tr>
<tr>
<td class="form1">Nick Alternate:</td>
<td class="form2"><input type="text" class="w150" name="ParamsNickAlternate" placeholder="lightIRC_%_"><p class="InfoMessage">Alternative nick. Gets used if "nick" is occupied.</p></td>
</tr>
<tr>
<td class="form1">Remember Nickname:</td>
<td class="form2"><select class="w150" name="ParamsRememberNickname">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Stores a selected/changed nickname in a local cookie and uses it everytime the user comes back.</p></td>
</tr>
<tr>
<td class="form1">Nick Prefix:</td>
<td class="form2"><select class="w150" name="ParamsNickPrefix">
<?php
foreach($SelectedNickPrefix as $SelectedNickPrefix)
{
echo '<option>' . $SelectedNickPrefix . '</option>';
}
?>
</select>
<p class="InfoMessage">Setting for a string which should be displayed in front of a nick in the chat area.</p></td>
</tr>
<tr>
<td class="form1">Nick Postfix:</td>
<td class="form2"><select class="w150" name="ParamsNickPostfix">
<?php
foreach($SelectedNickPostfix as $SelectedNickPostfix)
{
echo '<option>' . $SelectedNickPostfix . '</option>';
}
?>
</select>
<p class="InfoMessage">Setting for a string which should be displayed behind of a nick in the chat area.</p></td>
</tr>
<tr>
<td class="form1">Show Nick Prefixes:</td>
<td class="form2"><select class="w150" name="ParamsShowNickPrefixes">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Indicates whether a nick in the chat area is displayed like this: @nick or +nick.</p></td>
</tr>
<tr>
<td class="form1">Show Nick Prefix Icons:</td>
<td class="form2"><select class="w150" name="ParamsShowNickPrefixIcons">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Whether user icons should be shown in the chat area.</p></td>
</tr>
<tr>
<td class="form1">Ident:</td>
<td class="form2"><input type="text" class="w150" name="ParamsIdent" placeholder="lightIRC"><p class="InfoMessage">Ident for the user. If you don't set a value, lightIRC sets a random string as the ident. This ident gets saved and will be used everytime the user comes back.</p></td>
</tr>
<tr>
<td class="form1">Realname:</td>
<td class="form2"><input type="text" class="w150" name="ParamsRealname" placeholder="lightIRC.com"><p class="InfoMessage">Real name (GECOS) for the user.</p></td>
</tr>
<tr>
<td class="form1">Quit Message:</td>
<td class="form2"><input type="text" class="w150" name="ParamsQuitMessage" placeholder="See You later"><p class="InfoMessage">Quit message for the user. Please note that the quit message gets only sent if the user types /quit in the chat. If he closes the lightIRC window, the server defines the quit message (connection reset by peer, ping timeout, ...)</p></td>
</tr>
<tr>
<td class="form1">Language Path:</td>
<td class="form2"><input type="text" class="w150" name="ParamsLanguagePath" placeholder="language/"><p class="InfoMessage">Where to look for the lightIRC translation files.</p></td>
</tr>
<tr>
<td class="form1">Emoticon Path:</td>
<td class="form2"><input type="text" class="w150" name="ParamsEmoticonPath" placeholder="emoticons/"><p class="InfoMessage">Relative or absolute path to the emoticons folder.</p></td>
</tr>
<tr>
<td class="form1">Icon Path:</td>
<td class="form2"><input type="text" class="w150" name="ParamsIconPath" placeholder="icons/"><p class="InfoMessage">Relative or absolute path to the icons folder (if useUserListIcons is enabled).</p></td>
</tr>
<tr>
<td class="form1">Enable Queries:</td>
<td class="form2"><select class="w150" name="ParamsEnableQueries">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Set this to false to remove support to start queries, that is double clicking a user name and selecting the query from the context menu will not work. However, the user is still able to receive queries or to write private messages with /q, /query or /msg.</p></td>
</tr>
<tr>
<td class="form1">Autojoin:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsAutojoin" placeholder="#channel1,#channel2,#channel3,etc..."></textarea><p class="InfoMessage">Comma-separated list of channels to join after a connection is established. E.g.: #lightIRC,#help.</p></td>
</tr>
<tr>
<td class="form1">Perform:</td>
<td class="form2"><input type="text" class="w150" name="ParamsPerform" placeholder="/mode %nick% +x"><p class="InfoMessage">Comma-separated list of commands to be executed after connecting. E.g.: /mode $me +x,/join #channel key $me and %nick% get replaced by the current nick. %pass% gets replaced by the entered identifyPassword or the correspondent parameter.</p></td>
</tr>
<tr>
<td class="form1">Blocked Commands:</td>
<td class="form2"><input type="text" class="w150" name="ParamsBlockedCommands" placeholder="nick,j,join"><p class="InfoMessage">Comma-separated list of commands which cannot be entered by the user. If you set it to "nick,j,join", the user cannot change the nick and is not able to join channels. However, he can still use the lightIRC popups to change his nick or join from the channels list. (You can hide those popups separately).</p></td>
</tr>
<tr>
<td class="form1">Loop Server Commands:</td>
<td class="form2"><select class="w150" name="ParamsLoopServerCommands">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">This is an advanced setting. If you set it to true, <strong>all</strong> messages from the IRC server are sent to the JavaScript method onServerCommand(command) (see config.js) before lightIRC processes them. lightIRC uses the return value from that method. You can check the server response for specific events and build your own system behind lightIRC in JavaScript. If you return null or an empty string from the function, lightIRC won't notice that new data from the server has been received.</p></td>
</tr>
<tr>
<td class="form1">Auto Reconnect:</td>
<td class="form2"><select class="w150" name="ParamsAutoReconnect">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Reconnect if the connection to the server gets interrupted. You typically don't want to change this setting.</p></td>
</tr>
<tr>
<td class="form1">Show Security Error:</td>
<td class="form2"><select class="w150" name="ParamsShowSecurityError">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Hides the security error message when set to false. You typically don't want to change this setting. The security error tells you that the policy daemon is not running or your policyPort setting is not correct.</p></td>
</tr>
<tr>
<td class="form1">Custom Show Security Error Message:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsCustomSecurityErrorMessage" placeholder="Whoops... There is an error, please refresh the page!"></textarea><p class="InfoMessage">You can set a custom security error message instead of the default one.</p></td>
</tr>
<tr>
<td class="form1">Targetframe:</td>
<td class="form2"><select class="w150" name="ParamsTargetFrame">
<?php
foreach($SelectedTargetFrame as $SelectedTargetFrame)
{
echo '<option>' . $SelectedTargetFrame . '</option>';
}
?>
</select>
<p class="InfoMessage">Lets you specify the target frame for clicked URLs in the chat area.</p></td>
</tr>
<tr>
<td class="form1">Default Banmask:</td>
<td class="form2"><select class="w150" name="ParamsDefaultBanmask">
<?php
foreach($SelectedDefaultBanmask as $SelectedDefaultBanmask)
{
echo '<option>' . $SelectedDefaultBanmask . '</option>';
}
?>
</select>
<p class="InfoMessage">Setting for a string which should be displayed in front of a nick in the chat area.</p></td>
</tr>
<tr>
<td class="form1">Perform Continous Who Requests:</td>
<td class="form2"><select class="w150" name="ParamsPerformContinousWhoRequests">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Whether lightIRC should perform a WHO request for every user in a channel. This is necessary if you want to use ident or realname of your users for userListCustomFormatting or a JavaScript method like onContextMenuSelect or onChatAreaClick. Please note that this setting can cause performance and stability problems when used in large channels (> 100 users).</p></td>
</tr>
<tr>
<td class="form1">Webcam:</td>
<td class="form2"><select class="w150" name="ParamsWebcam">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Enables the webcam module using a streaming server backend. The module must be purchased. <a href="http://www.lightirc.com/webcam.html" target="_blank">More information</a></p></td>
</tr>
<tr>
<td class="form1">Rtmp:</td>
<td class="form2"><input type="text" class="w150" name="ParamsRtmp" placeholder="my.server.com or IP"><p class="InfoMessage">IP/host of the Red5/Wowza streaming server.</p></td>
</tr>
<tr>
<td class="form1">Webcam Preview Box:</td>
<td class="form2"><select class="w150" name="ParamsWebcamPreviewBox">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">If the webcam controls should appear as a small box above the user list.</p></td>
</tr>
<tr>
<td class="form1">Webcam Private Only:</td>
<td class="form2"><select class="w150" name="ParamsWebcamPrivateOnly">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">If users can only broadcast in private mode (not public).</p></td>
</tr>
<tr>
<td class="form1">Webcam Public Only:</td>
<td class="form2"><select class="w150" name="ParamsWebcamPublicOnly">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">If users can only broadcast in public mode (not private).</p></td>
</tr>
<tr>
<td class="form1">Webcam Video Only:</td>
<td class="form2"><select class="w150" name="ParamsWebcamVideoOnly">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">If users can only broadcast their cameras (no audio).</p></td>
</tr>
<tr>
<td class="form1">Webcam Audio Only:</td>
<td class="form2"><select class="w150" name="ParamsWebcamAudioOnly">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">If users can only broadcast their microphones (no video).</p></td>
</tr>
<tr>
<td class="form1">Webcam Channel Blacklist:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsWebcamChannelBlacklist" placeholder="#channel1,#channel2,#channel3,etc..."></textarea><p class="InfoMessage">Comma-separated list of channels where the webcam module does not work (icons don't show up in the user list).</p></td>
</tr>
<tr>
<td class="form1">Webcam Channel Whitelist:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsWebcamChannelWhitelist" placeholder="#channel1,#channel2,#channel3,etc..."></textarea><p class="InfoMessage">Comma-separated list of channels where you want the webcam module to work. If you set something here, the webcam module won't work in all other channels! If you wan't to restrict the webcam usage, you should use either the blacklist or the whitelist setting.</p></td>
</tr>
<tr>
<td class="form1">Navigation Position:</td>
<td class="form2"><select class="w150" name="ParamsNavigationPosition">
<?php
foreach($SelectedNavigationPosition as $SelectedNavigationPosition)
{
echo '<option>' . $SelectedNavigationPosition . '</option>';
}
?>
</select>
<p class="InfoMessage">Position of the navigation container (where channel and query buttons appear). Valid values: left, right, top, bottom.</p></td>
</tr>
<tr>
<td class="form1">Show Navigation:</td>
<td class="form2"><select class="w150" name="ParamsShowNavigation">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Hides the navigation container when set to false. You are not able to switch between channels and queries then.</p></td>
</tr>
<tr>
<td class="form1">Identify Password:</td>
<td class="form2"><select class="w150" name="ParamsIdentifyPassword">
<option value=""></option>
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Identifies the user to NickServ with the given password. Sends the value of identifyCommand to the server. This parameter is not that useful. You should rather set appropriate values for identifyMessage and identifyCommand to let the user identify himself inside of lightIRC.</p></td>
</tr>
<tr>
<td class="form1">Identify Message:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsIdentifyMessage" placeholder="NickServ:This nickname is registered"></textarea><p class="InfoMessage">The default value means lightIRC searches the string "This nickname is registered" within all notices from NickServ. If it finds that message, a window to enter a password pops up.</p></td>
</tr>
<tr>
<td class="form1">Identify Command:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsIdentifyCommand" placeholder="/msg NickServ identify %pass%"></textarea><p class="InfoMessage">This is the services command lightIRC sends when a user submits the identify popup. %nick% and %pass% get replaced automatically.</p></td>
</tr>
<tr>
<td class="form1">Show Register Nickname Button:</td>
<td class="form2"><select class="w150" name="ParamsShowRegisterNicknameButton">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Shows a button to register a nickname.</p></td>
</tr>
<tr>
<td class="form1">Register Nickname Service Name:</td>
<td class="form2"><input type="text" class="w150" name="ParamsRegisterNicknameServiceName" placeholder="NickServ"><p class="InfoMessage">Set this to the NickServ equivalent of your server. Responses of this service get parsed and are shown inside of the register nickname popup.</p></td>
</tr>
<tr>
<td class="form1">Register Nickname Command:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsRegisterNicknameCommand" placeholder="/msg NickServ register %password% %mail%"></textarea><p class="InfoMessage">lightIRC sends this command when the user hits the submit button of the register nickname window. %password% and %mail% get replaced by the entered values. %nick% gets replaced by the current nick.</p></td>
</tr>
<tr>
<td class="form1">Show Register Channel Button:</td>
<td class="form2"><select class="w150" name="ParamsShowRegisterChannelButton">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Shows a button to register a channel.</p></td>
</tr>
<tr>
<td class="form1">Register Channel Service Name:</td>
<td class="form2"><input type="text" class="w150" name="ParamsRegisterChannelServiceName" placeholder="ChanServ"><p class="InfoMessage">Set this to the ChanServ equivalent of your server. Responses of this service get parsed and are shown inside of the register channel popup.</p></td>
</tr>
<tr>
<td class="form1">Register Channel Command:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsRegisterChannelCommand" placeholder="/msg ChanServ register %channel% %password% %description%"></textarea><p class="InfoMessage">lightIRC sends this command when the user hits the submit button of the register channel window. %channel%, %password% and %description% get replaced by the entered values.</p></td>
</tr>
<tr>
<td class="form1">Sound Alerts:</td>
<td class="form2"><select class="w150" name="ParamsSoundAlerts">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Indicates whether a sounds are on (they are played on highlight or on new private message).</p></td>
</tr>
<tr>
<td class="form1">Sound On New Channel Message:</td>
<td class="form2"><select class="w150" name="ParamsSoundOnNewChannelMessage">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Indicates whether a sound should be played when a new channel message is received.</p></td>
</tr>
<tr>
<td class="form1">Show Timestamps:</td>
<td class="form2"><select class="w150" name="ParamsShowTimestamps">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Show a timestamp in front of all received messages and commands.</p></td>
</tr>
<tr>
<td class="form1">Timestamp Format:</td>
<td class="form2"><select class="w150" name="ParamsTimestampFormat">
<?php
foreach($SelectedTimestampFormat as $SelectedTimestampFormat)
{
echo '<option>' . $SelectedTimestampFormat . '</option>';
}
?>
</select>
<p class="InfoMessage">Server port.</p></td>
</tr>
<tr>
<td class="form1">Show Join/Part Messages:</td>
<td class="form2"><select class="w150" name="ParamsShowJoinPartMessages">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Show join, part and quit messages.</p></td>
</tr>
<tr>
<td class="form1">Show New Queries In Background:</td>
<td class="form2"><select class="w150" name="ParamsShowNewQueriesInBackground">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Opens new queries in background when set to true. When keeping the default mode, a new query window gains focus upon receiving a private message.</p></td>
</tr>
<tr>
<td class="form1">Fontsize:</td>
<td class="form2"><select class="w150" name="ParamsFontSize">
<?php
foreach($SelectedFontSize as $SelectedFontSize)
{
echo '<option>' . $SelectedFontSize . '</option>';
}
?>
</select>
<p class="InfoMessage">How large should fonts in text input and chat area be displayed?</p></td>
</tr>
<tr>
<td class="form1">Show Server Window:</td>
<td class="form2"><select class="w150" name="ParamsShowServerWindow">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Whether the server window (and button) should be shown. If you set the value to false, a popup appears when you start lightIRC. It contains a connecting message and stays open until the connection to the IRC server is established.</p></td>
</tr>
<tr>
<td class="form1">Show Nick Selection:</td>
<td class="form2"><select class="w150" name="ParamsShowNickSelection">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Indicates whether a popup to enter a nickname should be displayed before connecting.</p></td>
</tr>
<tr>
<td class="form1">Show Identify Selection:</td>
<td class="form2"><select class="w150" name="ParamsShowIdentifySelection">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Adds a password field to the nick selection box. Identifies the user to a nickname service. Uses the identifyCommand value.</p></td>
</tr>
<tr>
<td class="form1">Show Server Password Selection:</td>
<td class="form2"><select class="w150" name="ParamsShowServerPasswordSelection">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Indicates whether a popup to enter a server password should be shown before connecting.</p></td>
</tr>
<tr>
<td class="form1">Show Channel Central:</td>
<td class="form2"><select class="w150" name="ParamsShowChannelCentral">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">You can open the channel central in three ways. By clicking the button in the menu (showListButton), selecting the item in the channel button context menu or double-clicking the channel window. This parameter can disable the latter.</p></td>
</tr>
<tr>
<td class="form1">Show Menu Button:</td>
<td class="form2"><select class="w150" name="ParamsShowMenuButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows the menu button. The menu gets disabled if you set this value to false. You don't need to disable the following menu buttons then.</p></td>
</tr>
<tr>
<td class="form1">Show List Button:</td>
<td class="form2"><select class="w150" name="ParamsShowListButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows button to list all channels on the network.</p></td>
</tr>
<tr>
<td class="form1">Show Nick Change Button:</td>
<td class="form2"><select class="w150" name="ParamsShowNickChangeButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows button to change the nickname.</p></td>
</tr>
<tr>
<td class="form1">Show Options Button:</td>
<td class="form2"><select class="w150" name="ParamsShowOptionsButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows the options button to adjust different settings.</p></td>
</tr>
<tr>
<td class="form1">Show Channel Central Button:</td>
<td class="form2"><select class="w150" name="ParamsShowChannelCentralButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">The channel central gives users the possibility to manage channel modes, bans and the topic.</p></td>
</tr>
<tr>
<td class="form1">Show Join Channel Button:</td>
<td class="form2"><select class="w150" name="ParamsShowJoinChannelButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows a button to join a channel.</p></td>
</tr>
<tr>
<td class="form1">Show Part Channel Button:</td>
<td class="form2"><select class="w150" name="ParamsShowPartChannelButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows the part/leave channel button.</p></td>
</tr>
<tr>
<td class="form1">Show Register Channel Button:</td>
<td class="form2"><select class="w150" name="ParamsShowRegisterChannelButton">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Shows a button to register a channel.</p></td>
</tr>
<tr>
<td class="form1">Show Register Nickname Button:</td>
<td class="form2"><select class="w150" name="ParamsShowRegisterNicknameButton">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Shows a button to register a nickname.</p></td>
</tr>
<tr>
<td class="form1">Show Emoticons Button:</td>
<td class="form2"><select class="w150" name="ParamsShowEmoticonsButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows a button to select an emoticon.</p></td>
</tr>
<tr>
<td class="form1">Emoticon List:</td>
<td class="form2"><textarea rows="5" cols="60" name="ParamsEmoticonList" placeholder=":)->smile.gif,;)->wink.gif,:D->biggrin.gif,:P->tongue.gif,:(->sad.gif,:$->blushing.gif,:O->ohmy.gif,(H)->cool.gif,:|->mellow.gif,Oo->blink.gif,:'(->crying.gif,:S->unsure.gif,:[->mad.gif"></textarea>
<p class="InfoMessage">List of emoticons in the following format: code->file,code->file. You can add more emoticons by adjusting this parameter. The emoticons will be displayed in the emoticon select popup as well. If you want to disable the emoticons, pass an empty string as the value.</p></td>
</tr>
<tr>
<td class="form1">Show RichText Controls:</td>
<td class="form2"><select class="w150" name="ParamsShowRichTextControls">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows buttons for text formatting (bold, underline, color).</p></td>
</tr>
<tr>
<td class="form1">Show Submit Button:</td>
<td class="form2"><select class="w150" name="ParamsShowSubmitButton">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Shows a button to submit a message. Even if you can submit a message by pressing enter, a chat novice would prefer to have a button to click.</p></td>
</tr>
<tr>
<td class="form1">Show Channel Header:</td>
<td class="form2"><select class="w150" name="ParamsShowChannelHeader">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Indicates whether the channel header should be shown. This is the place where channel name and topic appear (by default above the chat area and user list).</p></td>
</tr>
<tr>
<td class="form1">Channel Header:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsChannelHeader" placeholder="%channel% [%users%] [%mode%] %topic%"></textarea><p class="InfoMessage">Adjust this message to have a custom format for the channel header. %channel%, %users%, %mode% and %topic% get replaced automatically. E.g.: You are now talking in %channel% with %users%. The mode is: %mode%. The topic is: %topic%</p></td>
</tr>
<tr>
<td class="form1">Show Info Messages:</td>
<td class="form2"><select class="w150" name="ParamsShowInfoMessages">
<option value="true">true</option>
<option value="false">false</option>
</select>
<p class="InfoMessage">Setting this value to false hides all messages that are no real messages and no join, part or quit messages from channels and queries. That includes mode changes, nick changes, topic, ignores, kicks and so on.</p></td>
</tr>
<tr>
<td class="form1">Show Verbose User Information:</td>
<td class="form2"><select class="w150" name="ParamsShowVerboseUserInformation">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Adds ident and host information for joins, parts and quits.</p></td>
</tr>
<tr>
<td class="form1">User List Width:</td>
<td class="form2"><select class="w150" name="ParamsUserListWidth">
<?php
foreach($SelectedUserListWidth as $SelectedUserListWidth)
{
echo '<option>' . $SelectedUserListWidth . '</option>';
}
?>
</select>
<p class="InfoMessage">Any value >= 100 or 0 (hides the user list).</p></td>
</tr>
<tr>
<td class="form1">Use User List Icons:</td>
<td class="form2"><select class="w150" name="ParamsUseUserListIcons">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage">Show icons in the user list instead of user prefixes (like @%+)</p></td>
</tr>
<tr>
<td class="form1">User List Custom Icons:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsUserListCustomIcons" placeholder="http://www.lightirc.com/?getImage=%nick%&prefix=%prefix%"></textarea><p class="InfoMessage">This is an advanced setting. You can define an URL to a script, which outputs an image (not only the URL to an image!). If you pass a value like http://www.lightirc.com/?getImage=%nick%&prefix=%prefix%, lightIRC will show this image in the user list next to the specific user name. You should make sure that the image has correct dimensions (like 20x20px) and that your script always points to working images. prefix is being replaced by q/a/o/h/v or an empty string.</p></td>
</tr>
<tr>
<td class="form1">User List Custom Formatting:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsUserListCustomFormatting" placeholder="(nick/ident/host/realname/mode)=(regular expression):(style name)"></textarea><p class="InfoMessage">Syntax: (nick/ident/host/realname/mode)=(regular expression):(style name) - You separate multiple settings with commas. Please set performContinousWhoRequests to true if you want to use ident/host/realname in the regular expression. Fore more in-depth information see the special <a href="http://redmine.lightirc.com/projects/lightirc/wiki/Custom_user_list_appearance" target="_blank">wiki article</a>.</p></td>
</tr>
<tr>
<td class="form1">User List Strict Alphabetical Sort:</td>
<td class="form2"><select class="w150" name="ParamsUserListStrictAlphabeticalSort">
<option value="false">false</option>
<option value="true">true</option>
</select>
<p class="InfoMessage"></p></td>
</tr>
<tr>
<td class="form1">Context Menu Internal Event:</td>
<td class="form2"><textarea rows="2" cols="40" name="ParamsContextMenuInternalEvent" placeholder="/kick %nick% %channel% Kick!"></textarea><p class="InfoMessage">Set a value to add a new item to the context menu. Syntax: Name of the item:command to send E.g.: Kick a user with default error message:/kick %nick% %channel% Kick! %nick% and %channel% get replaced automatically.</p></td>
</tr>
<tr>
<td class="form1">Context Menu External Event:</td>
<td class="form2"><input type="text" class="w150" name="ParamsContextMenuExternalEvent" placeholder="Open Profile"><p class="InfoMessage">Set a value to add new items with the given names to the context menu (e.g.: Open profile,Send mail). The JavaScript method onContextMenuSelect(type, nick) (see config.js) gets called when the context menu item is selected. The type value includes the selected item (e.g.: Open Profile). As an example, you could open up a new window in your JavaScript code pointing the user to a profile.</p></td>
</tr>
<tr>
<td class="form1">Function 1:</td>
<td class="form2"><textarea rows="5" cols="60" name="FunctionSendCommand">
function sendCommand(command) {
swfobject.getObjectById('lightIRC').sendCommand(command);
}
</textarea><p class="InfoMessage">Use this method to send a command to lightIRC with JavaScript. Leave it, if you don't have knowledge about this or you don't want to change.</p></td>
</tr>
<tr>
<td class="form1">Function 2:</td>
<td class="form2"><textarea rows="5" cols="60" name="FunctionSendMessageToActiveWindow">
function sendMessageToActiveWindow(message) {
swfobject.getObjectById('lightIRC').sendMessageToActiveWindow(message);
}
</textarea><p class="InfoMessage">Use this method to send a message to the active chatwindow. Leave it, if you don't have knowledge about this or you don't want to change.</p></td>
</tr>
<tr>
<td class="form1">Function 3:</td>
<td class="form2"><textarea rows="5" cols="60" name="FunctionSetTextInputContent">
function setTextInputContent(content) {
swfobject.getObjectById('lightIRC').setTextInputContent(content);
}
</textarea><p class="InfoMessage">Use this method to set a random text input content in the active window. Leave it, if you don't have knowledge about this or you don't want to change.</p></td>
</tr>
<tr>
<td class="form1">Function 4:</td>
<td class="form2"><textarea rows="5" cols="60" name="FunctionOnChatAreaClick">
function onChatAreaClick(nick, ident, realname) {
//alert("onChatAreaClick: "+nick);
}
</textarea><p class="InfoMessage">This method gets called if you click on a nick in the chat area.</p></td>
</tr>
<tr>
<td class="form1">Function 4:</td>
<td class="form2"><textarea rows="5" cols="60" name="FunctionOnContextMenuSelect">
function onContextMenuSelect(type, nick, ident, realname) {
alert("onContextMenuSelect: "+nick+" for type "+type);
}
</textarea><p class="InfoMessage">This method gets called if you use the parameter contextMenuExternalEvent.</p></td>
</tr>
<tr>
<td class="form1">Function 5:</td>
<td class="form2"><textarea rows="5" cols="60" name="FunctionOnServerCommand">
function onServerCommand(command) {
return command;
}
window.onbeforeunload = function() {
swfobject.getObjectById('lightIRC').sendQuit();
}
</textarea><p class="InfoMessage">This method gets called if you use the parameter loopServerCommands.</p></td>
</tr>
<tr>
<td class="form1">File:</td>
<td class="form2"><select class="w150" name="FileExt">
<?php
foreach($SelectedFileExt as $SelectedFileExt)
{
echo '<option>' . $SelectedFileExt . '</option>';
}
?>
</select>
<p class="InfoMessage">What for Extension do you want to have your Config?</p></td>
</tr>
<tr><td class="form1"></td><td class="form2"><input type="submit" class="w150" name="generate" value="Generate!"></td></tr>
</table>
</form>
<?php
}
echo "<!-- (c) MaleXachi 29-04-2013 - lightIRC Config Generator -->";
?>
</div>
</body>
</html>
Create Two Files: config.js and config.php - Leave both blank!
@sagargulati
Copy link

Also can you make lightirc.com/start.php file for us?

@MaleXachi
Copy link
Author

@sagargulati, Sorry for late reply, but that depends what you mean with start.php.

Please use @ and my nickname when you post a comment, because otherwise i cant see if there is new comment.

@MaleXachi
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment