This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
This is a sample application designed to demonstrate how to add an additional custom field to a backend editor. | |
The example provided adds a "Dress Code" field to the existing event editor in LiveWhale. To add a custom field to the news editor, for example, follow the same example but change all references from events to news below. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<xphp content="true"> | |
<if var="profiles_edit_link"/> | |
<content> | |
<div class="profiles_edit_link"> | |
<xphp var="profiles_edit_link" inner="true"/> | |
</div> | |
</content> | |
</xphp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.4.0 | |
(function() { | |
var PreProcessor; | |
PreProcessor = (function() { | |
/* | |
from: https://github.com/sockjs/sockjs-node/commit/e0e7113f0f8bd8e5fea25e1eb2a8b1fe1413da2c | |
from: https://github.com/sockjs/sockjs-client/blob/a571c94e051de7af489b4fc541194956e1d171fe/lib/utils.js | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_LW->REGISTERED_APPS['community_public_group'] = array( // configure this application module | |
'title' => 'Community Public Group', | |
'handlers' => array( | |
'onLoad', | |
'onLoginSuccess', | |
'onLoginFailure', | |
'onSubnavs', | |
'onManagerQuery', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_LW->REGISTERED_APPS['short_summary']=array( | |
'title'=>'Short Summary', | |
'handlers'=>array('onWidgetFormat'), | |
); | |
class LiveWhaleApplicationShortSummary { | |
public function onWidgetFormat($type, $handler, $variables) { // alter widget variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_LW->REGISTERED_APPS['time_formatter']=array( | |
'title'=>'Time Formatter', | |
'handlers'=>array('onWidgetFormat'), | |
); | |
class LiveWhaleApplicationTimeFormatter { | |
public function onWidgetFormat($type, $handler, $variables) { // alter widget variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban configuration file | |
# | |
# Intended to assist in protecting LiveWhale from malicious use | |
# of injection and vulnerabilty scanners such as: | |
# | |
# Acunetix Web Vulnerabilty Scanner | |
# Unknown Scanner (dubbed KIDC below) | |
# Unknown Scanner (dubbed RIPE below) | |
# | |
# Note: if you use penetration software for testing, add the server ip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ref: http://www.phpied.com/image-fun-with-php-part-2/ | |
// ref: http://www.php.net/manual/en/function.imagefilter.php | |
require('./image.php'); | |
$value = (int) $_GET['value']; | |
$image = imagecreatefromjpeg($imagefile); | |
header("Content-type: image/jpeg"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_LW->REGISTERED_APPS['private_things_stay_private']=array( // register this application | |
'title' => 'Private Things Stay Private', | |
'handlers' => array('onLoad', 'onWidgetLoad'), | |
); | |
class LiveWhaleApplicationPrivateThingsStayPrivate { | |
protected $private_allowed = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Hide Comments | |
This application hides the Comments checkbox on all editors in | |
the LiveWhale backend management interface, except for admins. */ | |
$_LW->REGISTERED_APPS['hide_comments']=array( // register this application | |
'title'=>'Hide Comments', // the module name | |
'handlers'=>array('onOutput') |