Compare commits

...

3 Commits

Author SHA1 Message Date
Sven Slootweg 93244cab30 Basic page design 12 years ago
Sven Slootweg 2a85e4b65f Add header background image 12 years ago
Sven Slootweg 3af01bbd4b Remove all the old code 12 years ago

@ -1,169 +0,0 @@
<component lightWeight="true">
<attach event="onpropertychange" onevent="checkPropertyChange()" />
<attach event="ondetach" onevent="restore()" />
<script>
//<![CDATA[
var doc = element.document;
function init() {
updateBorderBoxWidth();
updateBorderBoxHeight();
}
function restore() {
element.runtimeStyle.width = "";
element.runtimeStyle.height = "";
}
/* border width getters */
function getBorderWidth(sSide) {
if (element.currentStyle["border" + sSide + "Style"] == "none")
return 0;
var n = parseInt(element.currentStyle["border" + sSide + "Width"]);
return n || 0;
}
function getBorderLeftWidth() { return getBorderWidth("Left"); }
function getBorderRightWidth() { return getBorderWidth("Right"); }
function getBorderTopWidth() { return getBorderWidth("Top"); }
function getBorderBottomWidth() { return getBorderWidth("Bottom"); }
/* end border width getters */
/* padding getters */
function getPadding(sSide) {
var n = parseInt(element.currentStyle["padding" + sSide]);
return n || 0;
}
function getPaddingLeft() { return getPadding("Left"); }
function getPaddingRight() { return getPadding("Right"); }
function getPaddingTop() { return getPadding("Top"); }
function getPaddingBottom() { return getPadding("Bottom"); }
/* end padding getters */
function getBoxSizing() {
var s = element.style;
var cs = element.currentStyle
if (typeof s.boxSizing != "undefined" && s.boxSizing != "")
return s.boxSizing;
if (typeof s["box-sizing"] != "undefined" && s["box-sizing"] != "")
return s["box-sizing"];
if (typeof cs.boxSizing != "undefined" && cs.boxSizing != "")
return cs.boxSizing;
if (typeof cs["box-sizing"] != "undefined" && cs["box-sizing"] != "")
return cs["box-sizing"];
return getDocumentBoxSizing();
}
function getDocumentBoxSizing() {
if (doc.compatMode == null || doc.compatMode == "BackCompat")
return "border-box";
return "content-box"
}
/* width and height setters */
function setBorderBoxWidth(n) {
element.runtimeStyle.width = Math.max(0, n - getBorderLeftWidth() -
getPaddingLeft() - getPaddingRight() - getBorderRightWidth()) + "px";
}
function setBorderBoxHeight(n) {
element.runtimeStyle.height = Math.max(0, n - getBorderTopWidth() -
getPaddingTop() - getPaddingBottom() - getBorderBottomWidth()) + "px";
}
function setContentBoxWidth(n) {
element.runtimeStyle.width = Math.max(0, n + getBorderLeftWidth() +
getPaddingLeft() + getPaddingRight() + getBorderRightWidth()) + "px";
}
function setContentBoxHeight(n) {
element.runtimeStyle.height = Math.max(0, n + getBorderTopWidth() +
getPaddingTop() + getPaddingBottom() + getBorderBottomWidth()) + "px";
}
/* end width and height setters */
function updateBorderBoxWidth() {
element.runtimeStyle.width = "";
if (getDocumentBoxSizing() == getBoxSizing()) return;
if (element.currentStyle.width == 'auto') return;
var csw = getPixelValue(element, element.currentStyle.width);
if (getBoxSizing() == "border-box")
setBorderBoxWidth(csw);
else
setContentBoxWidth(csw);
}
function updateBorderBoxHeight() {
element.runtimeStyle.height = "";
if (getDocumentBoxSizing() == getBoxSizing()) return;
if (element.currentStyle.height == 'auto') return;
var csh = getPixelValue(element, element.currentStyle.height);
if (getBoxSizing() == "border-box")
setBorderBoxHeight(csh);
else
setContentBoxHeight(csh);
}
function checkPropertyChange() {
var pn = event.propertyName;
var undef;
if (pn == "style.boxSizing" && element.style.boxSizing == "") {
element.style.removeAttribute("boxSizing");
element.runtimeStyle.boxSizing = undef;
}
switch (pn) {
case "style.width":
case "style.borderLeftWidth":
case "style.borderLeftStyle":
case "style.borderRightWidth":
case "style.borderRightStyle":
case "style.paddingLeft":
case "style.paddingRight":
updateBorderBoxWidth();
break;
case "style.height":
case "style.borderTopWidth":
case "style.borderTopStyle":
case "style.borderBottomWidth":
case "style.borderBottomStyle":
case "style.paddingTop":
case "style.paddingBottom":
updateBorderBoxHeight();
break;
case "className":
case "style.boxSizing":
updateBorderBoxWidth();
updateBorderBoxHeight();
break;
}
}
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
// Dean Edwards
var PIXEL = /^\d+(px)?$/i;
function getPixelValue(element, value) {
if (PIXEL.test(value)) return parseInt(value);
var style = element.style.left;
var runtimeStyle = element.runtimeStyle.left;
element.runtimeStyle.left = element.currentStyle.left;
element.style.left = value || 0;
value = element.style.pixelLeft;
element.style.left = style;
element.runtimeStyle.left = runtimeStyle;
return value;
};
init();
//]]>
</script>
</component>

@ -1,197 +0,0 @@
<?php
/* This file processes external URLs, showing them in a frameset.
* It does not have to be included. */
if(isset($_INCLUDED))
{
// Output frameset.
if(!is_numeric($var_id))
{
die();
}
$_ANONNEWS = true;
require("include/base.php");
$id = mysql_real_escape_string($var_id);
$query = "SELECT Name, Url FROM $var_table WHERE `Id` = '$id'";
if(!$result = mysql_query_cached($query))
{
header("Location: /");
die();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>AnonNews - <?php echo(utf8entities(stripslashes($result->data[0]['Name']))); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<frameset framespacing="0" rows="40,*" frameborder="0" noresize>
<frame name="top" src="/external.php?table=<?php echo($var_table); ?>&id=<?php echo(utf8entities($var_id)); ?>" target="top">
<frame name="main" src="<?php echo(utf8entities(stripslashes($result->data[0]['Url']))); ?>" target="main">
</frameset>
</html>
<?php
}
else
{
if(empty($_GET['id']) || !is_numeric($_GET['id']) || empty($_GET['table']))
{
die();
}
$_ANONNEWS = true;
require("include/base.php");
if($_GET['table'] == "ext")
{
$table = "ext";
$var_section = "external-news";
}
elseif($_GET['table'] == "sites")
{
$table = "sites";
$var_section = "related-sites";
}
else
{
die();
}
$id = mysql_real_escape_string($_GET['id']);
$query = "SELECT Id, Name, Url, CommentCount FROM $table WHERE `Id` = '$id'";
if(!$result = mysql_query_cached($query))
{
die("The article you requested could not be found. <a href=\"/\">Click here to go back to the front page.</a>");
}
?>
<!doctype html>
<html>
<head>
<title><?php echo(utf8entities(stripslashes($result->data[0]['Name']))); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body,html
{
background-color: #EBEBEB;
font-family: Verdana, Arial;
margin: 0px;
padding: 0px;
}
h1
{
font-size: 24px;
margin: 5px;
float: left;
}
div.border
{
height: 2px;
background-color: black;
position: absolute;
bottom: 0px;
left: 0px;
right: 0px;
}
a
{
text-decoration: none;
color: black;
}
a.button, div.button
{
display: block;
float: right;
height: 13px;
font-size: 13px;
padding-top: 10px;
padding-bottom: 15px;
padding-left: 15px;
padding-right: 15px;
border-left: 1px solid black;
text-decoration: none;
color: black;
}
a.button:hover
{
background-color: #E1E1E1;
}
a.comments
{
font-weight: bold;
}
a.down
{
color: red;
}
a.up
{
color: green;
}
a.down, a.up
{
padding-top: 5px;
padding-bottom: 20px;
}
span.icon
{
font-size: 150%;
vertical-align: -15%;
}
.votestate
{
float: right;
padding: 11px;
padding-top: 8px;
border-left: 1px solid black;
}
</style>
<script type="text/javascript" src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpraHNjaHNuaGtwc3NhaHh2aHVvNnFjb2xleTp5M2N2Mm1rYXZ2eWVsZ3A1cGx3ejR0NG9rZnJpbjRiYWx1dG9paHc0ZGFsZnVjZmI0amlhOjM6Njo5MTU1Ng==/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="/script2.js"></script>
<script type="text/javascript">
function clearButtons(text)
{
$('#voting').html("<div class='button'><strong>" + text + "</strong></div>");
}
</script>
</head>
<body>
<h1><a href="/" target="_top">AnonNews</a></h1>
<a href="/" target="_top" class="button home">back to homepage</a>
<?php
echo("<a href=\"/{$var_section}/item/{$result->data[0]['Id']}/comments\" target=\"_blank\" class=\"button comments\">{$result->data[0]['CommentCount']} comments</a>");
if($table == "ext")
{
echo("<span id=\"voting\" class=\"votebuttons{$result->data[0]['Id']}\">
<a href=\"process.vote.php?id={$result->data[0]['Id']}&vote=up&nojs=true&frame=true&token={$_SESSION['vote_token']}\" target=\"_blank\" onclick=\"return voteUp({$result->data[0]['Id']}, '{$_SESSION['vote_token']}');\" class=\"button up\"><span class=\"icon\">+</span> vote up</a>
<a href=\"process.vote.php?id={$result->data[0]['Id']}&vote=down&nojs=true&frame=true&token={$_SESSION['vote_token']}\" target=\"_blank\" onclick=\"return voteDown({$result->data[0]['Id']}, '{$_SESSION['vote_token']}');\" class=\"button down\"><span class=\"icon\">-</span> vote down</a>
</span>");
}
echo("<a href=\"" . utf8entities(stripslashes($result->data[0]['Url'])) . "\" target=\"_blank\" class=\"button comments\">Doesn't work?</a>");
?>
<div class="border"></div>
</body>
</html>
<?php
}
?>

@ -1,143 +0,0 @@
<?php
if(!isset($_ANONNEWS))
{
die("You are not supposed to be here.");
}
session_set_cookie_params(0);
session_start();
require("config.php");
if(!@mysql_connect($mysql_host,$mysql_user,$mysql_pass))
{
die("An error occurred: Could not connect to database server. Please notify the site administrator.");
}
if(!@mysql_select_db($mysql_db))
{
die("An error occurred: Could not select database. Please notify the site administrator.");
}
require("include.constants.php");
require("comment.class");
require("functions.php");
require("include.template.php");
require("include.ip.php");
require("include.blacklist.php");
require("include.utf8.php");
require("include.string.php");
require("include.filter.php");
require("include.tahoe.php");
require("include.curl.php");
require("include.memcache.php");
require("include.render.php");
$referer = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : "/";
$tahoe_gateway = $tahoe_gateway_clearnet;
if(!isset($_SESSION['vote_token']))
{
$_SESSION['vote_token'] = random_string(20);
}
if(isset($_GET['setlang']))
{
$_SESSION['curlang'] = $_GET['setlang'];
}
if(!isset($_SESSION['curlang']))
{
$curlang = "en";
}
else
{
$curlang = $_SESSION['curlang'];
}
include("language/en.lang");
@include("language/".$langfiles[$curlang]);
require_once('recaptchalib.php');
$publickey = "6Lfscb8SAAAAADYzomjqiMyOdCo-Tmt0kmN66KOM";
$privatekey = "6Lfscb8SAAAAAM_59mhDJnu13xlNWNW5tt2tMvK0";
if(!isset($_SESSION['auth']))
{
$ismod = false;
}
else
{
// check credentials
$user = $_SESSION['user'];
$pass = $_SESSION['hash'];
$res = mysql_query("SELECT * FROM mods WHERE `Username`='$user' AND `Hash`='$pass'");
if(mysql_num_rows($res)==0)
{
//print_r($_SESSION);
session_destroy();
die("Either your login details changed, your session died, or you tried breaking into the system. Reload the page and, unless it's the latter, try again.");
}
else
{
$ismod = true;
}
}
// define where the flags are stored
$flagurl['en'] = "{$tahoe_gateway}/download/VVJJOkNISzpjYXlqdGp6dDI2Ym1zZnNyZnptd2JubGtxeTo3dWgyaGVoZjdza25rZ3k2dXZkb2Y1cjZibDZ4aHU2NHV6cG5iNXBzM3d3ZWd6YXg2N29xOjM6NjoyNjA=/en.gif";
$flagurl['de'] = "{$tahoe_gateway}/download/VVJJOkNISzp6czZ4cDZzZW0zdHE3ZHdhZWdsYmlncGZrZTpydm1tc2xlcHl5dWR1NXdvdWxrN2RlbTU1N3ZucXpldzY0NG5paWFpdWIyNWhjczJsamVxOjM6NjozNjI=/de.gif";
$flagurl['nl'] = "{$tahoe_gateway}/download/VVJJOkNISzpuNmVmcWJ6aWtuc3VxeXd3emtseDJ1bjZ3YTpwMzNvcW14eHk2bHljMmpkcXJyeG50bXlieW5od280cnFtbWFrZTd4cHNqMjRrb3VxY2VxOjM6NjozNjA=/nl.gif";
$flagurl['fr'] = "{$tahoe_gateway}/download/VVJJOkNISzozMnhvbzVha2I0Y2xrZGcybnB1ejV4MmozaTpzbm83bzM3aWE3cGpwZXZvcnVweXVvdW9iY2pzZ3I1YnJ6bzRubG5kcDRuYW90N2ZmejVhOjM6NjozNjY=/fr.gif";
$flagurl['it'] = "{$tahoe_gateway}/download/VVJJOkNISzo0b2JzZ2FsbWJtdHFtaDVlcGYydnNrcWtrcTptaTZpamI1aXBuM3drZWZ0YzVnenZydmJheHAzYnFxeHY1Y2F6dnI2cmwyaXl6cGNxYXhhOjM6NjozNjY=/it.gif";
$flagurl['es'] = "{$tahoe_gateway}/download/VVJJOkNISzpoMjVtNHd3NXF4anNvM2Jwem50cDd1MzUyNDp5bnl6aGltZGE3aTR2b2ltY2V0cG9yc2h3bGxreWx5d3o1ZGdzaGo2dzJrenBmcm9senRxOjM6NjozNjA=/es.gif";
$flagurl['no'] = "{$tahoe_gateway}/download/VVJJOkNISzprNHQ0YjRnNW1teGNtdHV2djZkZDNkY25kNDp3aml2NWhnYXdldzZheDV4ZWxyYmlwZ2Z0Y3JqY2hpYTM3dTVybmFiMmt5Y3RxcWh2a2RxOjM6NjozNzY=/no.gif";
$flagurl['se'] = "{$tahoe_gateway}/download/VVJJOkNISzp4aDQ0Zjd6c2E0Y2Q0ZTY3Nm9uc2pxdG43cTo0bmxybGJpMmRpN2tmaWticXd3eDR2bnhoNnFxZzZrNXg3eXc0aDJsY3lsbmpsdG5sNGJxOjM6NjozNjc=/se.gif";
$flagurl['fi'] = "{$tahoe_gateway}/download/VVJJOkNISzprbG9maGF1ancyZmtxM251eWtnanR5eGV5YTp5eWtkczJ5d3VncXpvaGpkNmV6cnJkNm42b3A2MnpoZ3FqdnprN3R3cnA2cHZ0dGZmZ2phOjM6NjozNzE=/fi.gif";
$flagurl['kr'] = "{$tahoe_gateway}/download/VVJJOkNISzp1Ym1mbnRubGIyYXVlbjRlYXE0dHVkbWVjNDp6bmx5emNkN2N1eTI1NnZmZXp5eHBuZm1idW8ybmFrNHRhNG53eXk0cHVodmRqMnY0ZTJhOjM6NjozODU=/kr.gif";
$flagurl['ru'] = "{$tahoe_gateway}/download/VVJJOkNISzpiNHpvcW5qdnAzdjdwNGJ5cWU1ZDVpcW0zbTpnNmtieHZ6aTdvenFnamppMmVkaWJ5emI0YWRxNGtyZWgyanZmNzIyejRlaHNiN2tibHNhOjM6NjozNjE=/ru.gif";
$flagurl['mk'] = "{$tahoe_gateway}/download/VVJJOkNISzp2YW1xN3E2NW9zcWp0NXBwdHkzc3N4ZWh2dTpjaHJybnBoYnhucWlvc3BmdGl1aTJqYnV1aHNwem92Y3hmY3Nwb3Z0N2szbDVibWtpZWthOjM6NjozODI=/mk.gif";
$flagurl['pl'] = "{$tahoe_gateway}/download/VVJJOkNISzo2Nm13cGxsams2NXpseDd3a3lzZnpza3c1YToyYmEyZGR1NXh2dTRnczRkZXVjN2x2YmYyZ2xycmJwNG94NXQ3aW9mZzZyNGljbWxhcGNxOjM6NjozNjA=/pl.gif";
$flagurl['ba'] = "{$tahoe_gateway}/download/VVJJOkNISzpkcnUzbTZvc2JqYW50b2NvNDdyaGhqZ2FxNDpxdWF2cGpobWNwbDV5ZnpqazRveHkzcnFreTNqdHlkcWFjcHc0M2ZhMmFmM2ppYmR0NHdxOjM6NjozNjM=/ba.gif";
$flagurl['si'] = "{$tahoe_gateway}/download/VVJJOkNISzpycmptNXBmeXZ4N3p3cHR1YXU1b2Npc2xscTpiaHFuamp6N2ltaWVqYXg3ZXl6ZmF2bjRtbWc1bnR4eHF3NTRqamdhaWdnb2xwcGZiNXVxOjM6NjozNjI=/si.gif";
$languages = array(
"en" => "English",
"fr" => "French",
"de" => "German",
"nl" => "Dutch",
"es" => "Spanish",
"it" => "Italian",
"ar" => "Arabic",
"tr" => "Turkish",
"ba" => "Bosnian",
"rs" => "Serbian",
"pl" => "Polish",
"hr" => "Croatian",
"00" => "Other"
);
if(!isset($parts[0]) || $parts[0] !== "localize")
{
$target_uri = $_SERVER['REQUEST_URI'];
}
else
{
$target_uri = preg_replace("/localize\/[a-z]{1,3}\/?/", "", $_SERVER['REQUEST_URI']);
}
// generate the list of flags
$flaglist = "";
foreach($langfiles as $key => $value)
{
$flaglist .= "<a href=\"/localize/$key{$target_uri}\" style=\"border: 0px;\"><img src=\"{$flagurl[$key]}\" style=\"border: 0px; padding-right: 4px;\"></a>";
//$flaglist .= "<a href=\"?setlang=$key\" style=\"border: 0px;\"><img src=\"/flags/$key.gif\" style=\"border: 0px; padding-right: 4px;\"></a>";
}
?>

@ -1,77 +0,0 @@
<?php
class Comment
{
public $id = 0;
public $body = "";
public $message = "";
public $author = "";
public $date = "";
public $level = 0;
public $itemid = 0;
public $section = "";
public $children = array();
public $linecount = 0;
public function __construct($mid,$level)
{
$this->id = $mid;
$res = mysql_query("SELECT * FROM comments WHERE `Id`='$mid'");
$row = mysql_fetch_array($res);
$this->body = nl2br(trim(htmlentities(stripslashes($row['Body']))));
$this->author = strip_tags(stripslashes($row['Name']));
$this->date = strip_tags(stripslashes($row['Posted']));
$this->section = strip_tags(stripslashes($row['Section']));
$this->itemid = strip_tags(stripslashes($row['ItemId']));
$this->linecount = strip_tags(stripslashes($row['LineCount']));
$this->level = $level;
$res = mysql_query("SELECT * FROM comments WHERE `ParentId`='$mid' AND `Visible`='1' ORDER BY `Posted` ASC");
while($row=mysql_fetch_array($res))
{
$this->children[] = new Comment($row['Id'],$level+1);
}
}
public function draw()
{
global $lang;
echo("<a name=\"comment-{$this->id}\"></a>");
if($this->linecount == 1)
{
echo("<div class=\"comment small\" style=\"margin-left: ".(35*$this->level)."px;\">
<span class=\"smallcomment\"><strong>{$this->author}</strong> {$this->body}</span>
<a class=\"hidden small\" href=\"#\" onclick=\"$('reply{$this->id}').style.display='block'; return false;\">Reply</a>
<a class=\"hidden small\" href=\"".curPageURL()."#comment-{$this->id}\">Permalink</a>
<div class=\"hiddenreply\" id=\"reply{$this->id}\">
<form method=\"POST\" action=\"?p=comments&c={$this->section}&i={$this->itemid}&pid={$this->id}\">
<strong>{$lang[37]}:</strong> <input type=\"text\" name=\"author\" value=\"Anonymous\"><button class=\"hiddenreply\" name=\"submit\" type=\"submit\">{$lang[39]}</button><br>
<strong>{$lang[38]}:</strong><br><textarea name=\"body\" class=\"reply\"></textarea>
</form>
</div>
</div>");
}
else
{
echo("<div class=\"comment\" style=\"margin-left: ".(35*$this->level)."px;\">
<strong class=\"hidden\">{$this->author} - <i>{$this->date}</i></strong>
{$this->body}
<!-- replybox -->
<div class=\"commentlinks\">
<a class=\"hidden\" href=\"#\" onclick=\"$('reply{$this->id}').style.display='block'; return false;\">Reply</a>
<a class=\"hidden small\" href=\"".curPageURL()."#comment-{$this->id}\">Permalink</a>
</div>
<div class=\"hiddenreply\" id=\"reply{$this->id}\">
<form method=\"POST\" action=\"?p=comments&c={$this->section}&i={$this->itemid}&pid={$this->id}\">
<strong>{$lang[37]}:</strong> <input type=\"text\" name=\"author\" value=\"Anonymous\"><button class=\"hiddenreply\" name=\"submit\" type=\"submit\">{$lang[39]}</button><br>
<strong>{$lang[38]}:</strong><br><textarea name=\"body\" class=\"reply\"></textarea>
</form>
</div>
</div>");
}
foreach($this->children as $child)
{
$child->draw();
}
}
}
?>

@ -1,70 +0,0 @@
<?php
$mysql_host = "localhost";
$mysql_user = "anonnews";
$mysql_pass = "";
$mysql_db = "anonnews";
/* Please note that all the URLs in the following section should be
* WITHOUT a trailing slash! */
$i2p_enabled = true;
$tahoe_server = "http://localhost:3456";
$tahoe_gateway_clearnet = "http://tahoe-gateway.cryto.net:3719";
$tahoe_gateway_i2p = "http://cryto-gateway.i2p";
/* This is an array of 'banners' that is seen on the frontpage. */
$site_messages_enabled = true;
$site_messages = array(
'/forum' => '<span class="strong">New: AnonNews Forum.</span> Discuss Anonymous and related subjects. Click here to visit the forum.',
'/static/mods' => '<span class="strong">AnonNews is looking for moderators.</span> Click here for more information.',
'/static/anon' => '<span class="strong">AnonNews is not just for AnonOps.</span> Anything Anonymous-related can be posted. Click for more info.'
);
/* These are the reCAPTCHA settings. You will need to get an API key at
* https://www.google.com/recaptcha/admin/create */
$recaptcha_pubkey = "";
$recaptcha_privkey = "";
/* These are the memcache settings. You will need to have memcache set
* up on your server to use these. Compression requires zlib. */
$memcache_enabled = true; // Whether to user memcache.
$memcache_server = "localhost"; // The hostname of the memcached
$memcache_port = 11211; // The port number of memcached
$memcache_compressed = true; // Whether to compress memcache objects
/* Proxy ranges can be set if you have a custom reverse proxy setup, If
* a request originates from any of these ranges, the getIp() function
* will return the actual (forwarded) IP. The request IP is checked to
* avoid header spoofing to bypass filters. Local IP ranges (such as
* 127.0.0.1/8) and CloudFlare ranges are already implented and do not
* have to be added here (although CloudFlare ranges may change in the
* future). The ranges are in CIDR notation.
* Example range definition:
* $proxy_ranges = array(
* '204.93.240.0/24',
* '204.93.177.0/24'
* );
* */
$proxy_ranges = array();
/* Language detection requires PEAR:Text_LanguageDetect to be installed
* (http://pear.php.net/package/Text_LanguageDetect). */
$detect_language = true;
/* The directory where pre-rendered objects are stored. This directory
* must be writable by PHP. */
$render_dir = "render";
/* The 'recent submissions' timespan in days. */
$recent_days = 14;
/* The static pages. */
$static_pages = array(
"irc" => "irc.static.php",
"moderation" => "moderation.static.php",
"mods" => "mods.static.php",
"donate" => "donate.static.php",
"faq" => "faq.static.php",
"anon" => "anon.static.php",
"forumrules" => "forumrules.static.php"
);
?>

@ -1,39 +0,0 @@
<?php
if(!isset($_ANONNEWS))
{
die("You are not supposed to be here.");
}
$langfiles['en']="en.lang"; // English
$langfiles['de']="de.lang"; // German
$langfiles['fr']="fr.lang"; // French
$langfiles['nl']="nl.lang"; // Dutch
$langfiles['it']="it.lang"; // Italian
$langfiles['es']="es.lang"; // Spanish
$langfiles['no']="no.lang"; // Norwegian
$langfiles['se']="se.lang"; // Swedish
$langfiles['fi']="fi.lang"; // Finnish
$langfiles['kr']="kr.lang"; // Korean
$langfiles['ru']="ru.lang"; // Russian
$langfiles['mk']="mk.lang"; // Macedonian
$langfiles['ba']="bs.lang"; // Bosnian
$langfiles['pl']="pl.lang"; // Polish
$langfiles['si']="si.lang"; // Slovenian
/*function curPageURL() {
$pageURL = 'http';
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}*/
?>

@ -1,138 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to the blacklist. */
function spam_score($url, $title = "", $check_ip = true)
{
$score = 0;
if($check_ip)
{
/* Check DNSBLs */
if(check_blacklisted())
{
/* If a user is blacklisted in a DNSBL, his submission will be
* held for manual review. We do not want to assign any further
* spam points to this submission to avoid him accidentally
* getting blocked, so we return with a score of 5. */
return 5;
}
/* Check internal banlist */
if(check_banlist())
{
return 10;
}
}
if(!preg_match("/^https?:\/\/([^\/:]*?\.[^\/:]*)(\/|:[0-9]{1,5}|$)/", $url, $matches))
{
return 10;
}
$domain = $matches[1];
if(preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $domain))
{
$localhost = false;
$localhost = $localhost || ip_in_range($domain, "10.0.0.0/8");
$localhost = $localhost || ip_in_range($domain, "127.0.0.1/8");
$localhost = $localhost || ip_in_range($domain, "172.16.0.0/12");
$localhost = $localhost || ip_in_range($domain, "192.168.0.0/16");
if($localhost)
{
// Adding entries that point to localhost is not allowed.
return 10;
}
}
$domain_parts = explode(".", $domain);
$top_domain = $domain_parts[count($domain_parts) - 2] . "." . $domain_parts[count($domain_parts) - 1];
if($result = mysql_query_cached("SELECT * FROM blacklist"))
{
$blacklist = $result->data;
}
else
{
return $score;
}
$banned_domains = array();
$banned_parts = array();
$banned_ips = array();
$banned_titles = array();
foreach($blacklist as $element)
{
if($element['Type'] == "0")
{
$banned_ips[] = $element['Value'];
}
elseif($element['Type'] == "1")
{
$banned_parts[] = $element['Value'];
}
elseif($element['Type'] == "2")
{
$banned_domains[] = $element['Value'];
}
elseif($element['Type'] == "3")
{
$banned_titles[] = $element['Value'];
}
}
$ipList = explode(",", get_ip());
foreach($ipList as $ip)
{
if(in_array($ip, $banned_ips))
{
$score += 5;
}
}
if(count($domain_parts) >= 3)
{
$sub_domain = $domain_parts[count($domain_parts) - 3] . "." . $domain_parts[count($domain_parts) - 2] . "." . $domain_parts[count($domain_parts) - 1];
}
else
{
$sub_domain = $top_domain;
}
foreach($banned_domains as $part)
{
if(strtolower($part) == strtolower($top_domain) || strtolower($part) == strtolower($sub_domain))
{
$score += 10;
}
elseif(strpos($url, $part) !== false)
{
$score += 5;
}
}
foreach($banned_parts as $part)
{
if(strpos(strtolower($url), strtolower($part)) !== false)
{
$score += 3;
}
}
if(!empty($title))
{
foreach($banned_titles as $part)
{
if(strpos(strtolower($title), strtolower($part)) !== false)
{
$score += 3;
}
}
}
return $score;
}
?>

@ -1,25 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This include takes care of defining constants. */
define("ANONNEWS_ERROR_BANNED", 1 );
define("ANONNEWS_ERROR_EMPTY_TITLE", 2 );
define("ANONNEWS_ERROR_EMPTY_BODY", 3 );
define("ANONNEWS_ERROR_EMPTY_URL", 4 );
define("ANONNEWS_ERROR_INCORRECT_FORMAT", 5 );
define("ANONNEWS_ERROR_TOO_LARGE", 6 );
define("ANONNEWS_ERROR_UPLOAD_ERR", 7 );
define("ANONNEWS_ERROR_SHORTENER_DETECTED", 8 );
define("ANONNEWS_ERROR_URL_BLACKLISTED", 9 );
define("ANONNEWS_ERROR_DATABASE_ERROR", 10 );
define("ANONNEWS_ERROR_INCORRECT_CAPTCHA", 11 );
define("ANONNEWS_ERROR_NO_RECORDS_FOUND", 12 );
define("ANONNEWS_ERROR_NONEXISTENT_URL", 13 );
define("ANONNEWS_ERROR_MALFORMED_DATA", 14 );
define("ANONNEWS_ERROR_SPAM", 15 );
define("ANONNEWS_ERROR_COMMENT_BODY", 16 );
define("ANONNEWS_ERROR_COMMENT_NAME", 17 );
define("ANONNEWS_ERROR_POST_BODY", 18 );
define("ANONNEWS_ERROR_POST_TOPIC", 19 );
define("ANONNEWS_ERROR_NOT_FOUND", 404 );
?>

@ -1,125 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to cURL. */
function curl_put($url, $localfile)
{
$fp = fopen ($localfile, "r");
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PUT, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_INFILE, $fp);
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($localfile));
$http_result = curl_exec($ch);
$error = curl_error($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
fclose($fp);
if ($error != false || $http_code != 200)
{
return false;
}
else
{
return $http_result;
}
}
function curl_head($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($ch, CURLOPT_USERAGENT, 'AnonNews/2.0 Link Validator - http://www.anonnews.org/');
$return_object->result = curl_exec($ch);
$error = curl_error($ch);
if(empty($error))
{
//if(preg_match("HTTP\/[0-9]\.[0-9] ([0-9]{3})", $return_object->result, $matches))
//if(preg_match("\H", $return_object->result, $matches))
//if(preg_match("/HTTP\/[0-9]\.[0-9] ([0-9]{3}) (.*?)\n/", $return_object->result, $matches))
//{
//$return_object->regex = $matches;
$return_object->code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$return_object->error = "none";
/*}
else
{
$return_object->regex = $matches;
$return_object->code = 999;
$return_object->error = "Could not find a HTTP status code.";
}*/
}
else
{
$return_object->code = 998;
$return_object->error = $error;
}
return $return_object;
}
function curl_get($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($ch, CURLOPT_USERAGENT, 'AnonNews/2.0 Link Validator (Title Fetcher) - http://www.anonnews.org/');
$return_object->result = curl_exec($ch);
$error = curl_error($ch);
if(empty($error))
{
$return_object->code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$return_object->error = "none";
}
else
{
$return_object->code = 998;
$return_object->error = $error;
}
return $return_object;
}
function curl_post($url, $variables)
{
if(is_array($variables))
{
foreach($variables as $key => $value)
{
$variables[$key] = urlencode($value);
$variable_strings[] = "{$key}={$value}";
}
$post_string = implode("&", $variable_strings);
}
else
{
$post_string = "";
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, count($variables));
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
$result = curl_exec($ch);
$error = curl_error($ch);
if(empty($error))
{
return $result;
}
else
{
return false;
}
curl_close($ch);
}
?>

@ -1,68 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to filters that are applied to page content. */
function strip_tags_attributes($string, $allowtags = NULL, $allowattributes = NULL)
{
/* Thanks to nauthiz693@gmail.com (http://www.php.net/manual/en/function.strip-tags.php#91498) */
$string = strip_tags($string,$allowtags);
if (!is_null($allowattributes))
{
if(!is_array($allowattributes))
{
$allowattributes = explode(",",$allowattributes);
}
if(is_array($allowattributes))
{
$allowattributes = implode(")(?<!",$allowattributes);
}
if (strlen($allowattributes) > 0)
{
$allowattributes = "(?<!".$allowattributes.")";
}
$string = preg_replace_callback("/<[^>]*>/i",create_function(
'$matches',
'return preg_replace("/ [^ =]*'.$allowattributes.'=(\"[^\"]*\"|\'[^\']*\')/i", "", $matches[0]);'
),$string);
}
return $string;
}
function filter_extended($input)
{
return strip_tags_attributes($input,
"<a><b><i><u><span><div><p><img><br><hr><font><ul><li><ol><dt><dd><h1><h2><h3><h4><h5><h6><h7><del><map><area><strong><em><big><small><sub><sup><ins><pre><blockquote><cite><q><center><table><tr><td><th>",
"href,src,alt,class,style,align,valign,color,face,size,width,height,shape,coords,target,border,cellpadding,cellspacing,colspan,rowspan");
}
function filter_basic($input)
{
return strip_tags_attributes($input,
"<b><i><u><span><p><font><ul><li><ol><dt><dd><del><strong><big><small><sub><sup><ins><pre><blockquote><cite><q><center><table><tr><td><th>",
"href,src,alt,class,style,align,valign,color,face,size,width,height,border,cellpadding,cellspacing,colspan,rowspan");
}
/*function parse_youtube($input)
{
return preg_replace("/\s*[a-zA-Z\/\/:\.]*youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i",
"<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/$1&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param>
<embed src=\"http://www.youtube.com/v/$1&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>",$input);
}*/
function youtubify($input)
{
$video_width = 900;
$video_height = 506;
$input = preg_replace("/<a[^>]+href=[\"']https?:\/\/([a-z\-0-9]+\.)youtube\.com\/watch\?[^'\" ]*v=([a-z0-9\-_]+)[^'\" ]*['\"][^>]*>[^<]*<\/a>/i",
"<br><iframe width=\"{$video_width}\" height=\"{$video_height}\" src=\"http://www.youtube.com/embed/$2\" frameborder=\"0\" allowfullscreen></iframe><br>", $input);
$input = preg_replace("/https?:\/\/([a-z\-0-9]+\.)youtube\.com\/watch\?[^'\" ]*v=([a-z0-9\-_]+)[^<)\]! ]*/i",
"<br><iframe width=\"{$video_width}\" height=\"{$video_height}\" src=\"http://www.youtube.com/embed/$2\" frameborder=\"0\" allowfullscreen></iframe><br>", $input);
return $input;
}
?>

@ -1,138 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to IP addresses. */
function ip_in_range($ip, $range)
{
/* Thanks to Ian B (http://www.php.net/manual/en/function.ip2long.php#71939) */
$ip = str_replace("::ffff:", "", $ip);
list($base, $bits) = explode('/', $range);
list($a, $b, $c, $d) = explode('.', $base);
$i = ($a << 24) + ($b << 16) + ($c << 8) + $d;
$mask = $bits == 0 ? 0 : (~0 << (32 - $bits));
$low = $i & $mask;
$high = $i | (~$mask & 0xFFFFFFFF);
list($a, $b, $c, $d) = explode('.', $ip);
$check = ($a << 24) + ($b << 16) + ($c << 8) + $d;
if ($check >= $low && $check <= $high)
{
return true;
}
else
{
return false;
}
}
function is_reverse_proxied()
{
$reverseProxied = false;
// TODO multiple ips!
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']) || !empty($_SERVER['HTTP_FORWARDED_FOR']) || !empty($_SERVER['HTTP_CLIENT_IP']) || !empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
{
$ip = $_SERVER['REMOTE_ADDR'];
// First check for requests that originate from localhost
$reverseProxied = $reverseProxied || ip_in_range($ip, "10.0.0.0/8");
$reverseProxied = $reverseProxied || ip_in_range($ip, "127.0.0.1/8");
$reverseProxied = $reverseProxied || ip_in_range($ip, "172.16.0.0/12");
$reverseProxied = $reverseProxied || ip_in_range($ip, "192.168.0.0/16");
// Then check for CloudFlare
$reverseProxied = $reverseProxied || ip_in_range($ip, "204.93.240.0/24");
$reverseProxied = $reverseProxied || ip_in_range($ip, "204.93.177.0/24");
$reverseProxied = $reverseProxied || ip_in_range($ip, "199.27.128.0/21");
$reverseProxied = $reverseProxied || ip_in_range($ip, "173.245.48.0/20");
$reverseProxied = $reverseProxied || ip_in_range($ip, "103.22.200.0/22");
$reverseProxied = $reverseProxied || ip_in_range($ip, "141.101.64.0/18");
if(!empty($proxy_ranges))
{
foreach($proxy_ranges as $proxy_range)
{
$reverseProxied = $reverseProxied || ip_in_range($ip, $proxy_range);
}
}
}
return $reverseProxied;
}
function get_ip()
{
if(is_reverse_proxied())
{
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$result = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
elseif(!empty($_SERVER['HTTP_FORWARDED_FOR']))
{
$result = $_SERVER['HTTP_FORWARDED_FOR'];
}
elseif(!empty($_SERVER['HTTP_CLIENT_IP']))
{
$result = $_SERVER['HTTP_CLIENT_IP'];
}
elseif(!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
{
$result = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
}
else
{
$result = $_SERVER['REMOTE_ADDR'];
}
}
else
{
$result = $_SERVER['REMOTE_ADDR'];
}
return $result;
}
function check_banlist()
{
global $bannedIps;
$ipList = explode(",", get_ip());
foreach($ipList as $ip)
{
if(isset($bannedIps[trim($ip)]))
{
return true; // Banned.
}
}
return false; // Not banned.
}
function check_blacklisted($ip = null)
{
/* Thanks to Rene Moser (http://www.renemoser.net/) */
if($ip == null)
{
$ip = get_ip();
}
$dns_black_lists = file('dnsbl/dnsbl.txt', FILE_IGNORE_NEW_LINES);
$rev_ip = implode(array_reverse(explode('.', $ip)), '.');
$response = array();
foreach ($dns_black_lists as $dns_black_list)
{
$response = (gethostbynamel($rev_ip . '.' . $dns_black_list));
if (!empty($response))
{
return true;
}
}
return false;
}
function ip_hash($ip)
{
$ip = str_replace("::ffff:", "", $ip);
list($a, $b, $c, $d) = explode(".", $ip);
$e = ($d < 128) ? 0 : 128;
return sha1("{$a}.{$b}.{$c}.{$e}");
}
?>

@ -1,141 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to memcached. */
if($memcache_enabled)
{
$memcache = new Memcache;
$memcache_established = $memcache->connect($memcache_server, $memcache_port);
if($memcache_established !== false)
{
$memcache_connected = true;
}
else
{
$memcache_connected = false;
}
}
function mc_get($key)
{
global $memcache_enabled, $memcache_connected, $memcache;
if($memcache_enabled === false || $memcache_connected === false)
{
return false;
}
else
{
$get_result = $memcache->get($key);
if($get_result !== false)
{
return $get_result;
}
else
{
return false;
}
}
}
function mc_set($key, $value, $expiry)
{
global $memcache_enabled, $memcache_connected, $memcache_compressed, $memcache;
if($memcache_enabled === false || $memcache_connected === false)
{
return false;
}
else
{
if($memcache_compressed === true)
{
$flag = MEMCACHE_COMPRESSED;
}
else
{
$flag = false;
}
$set_result = $memcache->set($key, $value, $flag, $expiry);
return $set_result;
}
}
function mc_delete($key)
{
global $memcache_enabled, $memcache_connected, $memcache;
if($memcache_enabled === false || $memcache_connected === false)
{
return false;
}
else
{
return $memcache->delete($key);
}
}
function mysql_query_cached($query, $expiry = 60)
{
if($res = mc_get(md5($query) . md5($query . "x")))
{
$return_object->source = "memcache";
$return_object->data = $res;
return $return_object;
}
else
{
if($res = mysql_query($query))
{
$found = false;
while($row = mysql_fetch_assoc($res))
{
$return_object->data[] = $row;
$found = true;
}
if($found === true)
{
$return_object->source = "database";
mc_set(md5($query) . md5($query . "x"), $return_object->data, $expiry);
return $return_object;
}
else
{
return false;
}
}
else
{
return false;
}
}
}
function file_get_contents_cached($path, $expiry = 3600)
{
if($res = mc_get(md5($path) . md5($path . "x")))
{
$return_object->source = "memcache";
$return_object->data = $res;
return $return_object;
}
else
{
if($result = file_get_contents($path))
{
$return_object->source = "disk";
$return_object->data = $result;
mc_set(md5($path) . md5($path . "x"), $return_object->data, $expiry);
return $return_object;
}
else
{
return false;
}
}
}
?>

@ -1,277 +0,0 @@
<?php
/*
* This is a PHP library that handles calling reCAPTCHA.
* - Documentation and latest version
* http://recaptcha.net/plugins/php/
* - Get a reCAPTCHA API Key
* https://www.google.com/recaptcha/admin/create
* - Discussion group
* http://groups.google.com/group/recaptcha
*
* Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
* AUTHORS:
* Mike Crawford
* Ben Maurer
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* The reCAPTCHA server URL's
*/
define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
/**
* Encodes the given data into a query string format
* @param $data - array of string elements to be encoded
* @return string - encoded request
*/
function _recaptcha_qsencode ($data) {
$req = "";
foreach ( $data as $key => $value )
$req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
// Cut the last '&'
$req=substr($req,0,strlen($req)-1);
return $req;
}
/**
* Submits an HTTP POST to a reCAPTCHA server
* @param string $host
* @param string $path
* @param array $data
* @param int port
* @return array response
*/
function _recaptcha_http_post($host, $path, $data, $port = 80) {
$req = _recaptcha_qsencode ($data);
$http_request = "POST $path HTTP/1.0\r\n";
$http_request .= "Host: $host\r\n";
$http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
$http_request .= "Content-Length: " . strlen($req) . "\r\n";
$http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
$http_request .= "\r\n";
$http_request .= $req;
$response = '';
if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
die ('Could not open socket');
}
fwrite($fs, $http_request);
while ( !feof($fs) )
$response .= fgets($fs, 1160); // One TCP-IP packet
fclose($fs);
$response = explode("\r\n\r\n", $response, 2);
return $response;
}
/**
* Gets the challenge HTML (javascript and non-javascript version).
* This is called from the browser, and the resulting reCAPTCHA HTML widget
* is embedded within the HTML form it was called from.
* @param string $pubkey A public key for reCAPTCHA
* @param string $error The error given by reCAPTCHA (optional, default is null)
* @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
* @return string - The HTML to be embedded in the user's form.
*/
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
{
if ($pubkey == null || $pubkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}
if ($use_ssl) {
$server = RECAPTCHA_API_SECURE_SERVER;
} else {
$server = RECAPTCHA_API_SERVER;
}
$errorpart = "";
if ($error) {
$errorpart = "&amp;error=" . $error;
}
return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
<noscript>
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>';
}
/**
* A ReCaptchaResponse is returned from recaptcha_check_answer()
*/
class ReCaptchaResponse {
var $is_valid;
var $error;
}
/**
* Calls an HTTP POST function to verify if the user's guess was correct
* @param string $privkey
* @param string $remoteip
* @param string $challenge
* @param string $response
* @param array $extra_params an array of extra variables to post to the server
* @return ReCaptchaResponse
*/
function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
{
if ($privkey == null || $privkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}
if ($remoteip == null || $remoteip == '') {
die ("For security reasons, you must pass the remote ip to reCAPTCHA");
}
//discard spam submissions
if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
$recaptcha_response = new ReCaptchaResponse();
$recaptcha_response->is_valid = false;
$recaptcha_response->error = 'incorrect-captcha-sol';
return $recaptcha_response;
}
$response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
array (
'privatekey' => $privkey,
'remoteip' => $remoteip,
'challenge' => $challenge,
'response' => $response
) + $extra_params
);
$answers = explode ("\n", $response [1]);
$recaptcha_response = new ReCaptchaResponse();
if (trim ($answers [0]) == 'true') {
$recaptcha_response->is_valid = true;
}
else {
$recaptcha_response->is_valid = false;
$recaptcha_response->error = $answers [1];
}
return $recaptcha_response;
}
/**
* gets a URL where the user can sign up for reCAPTCHA. If your application
* has a configuration page where you enter a key, you should provide a link
* using this function.
* @param string $domain The domain where the page is hosted
* @param string $appname The name of your application
*/
function recaptcha_get_signup_url ($domain = null, $appname = null) {
return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
}
function _recaptcha_aes_pad($val) {
$block_size = 16;
$numpad = $block_size - (strlen ($val) % $block_size);
return str_pad($val, strlen ($val) + $numpad, chr($numpad));
}
/* Mailhide related code */
function _recaptcha_aes_encrypt($val,$ky) {
if (! function_exists ("mcrypt_encrypt")) {
die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
}
$mode=MCRYPT_MODE_CBC;
$enc=MCRYPT_RIJNDAEL_128;
$val=_recaptcha_aes_pad($val);
return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
}
function _recaptcha_mailhide_urlbase64 ($x) {
return strtr(base64_encode ($x), '+/', '-_');
}
/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
function recaptcha_mailhide_url($pubkey, $privkey, $email) {
if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
"you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
}
$ky = pack('H*', $privkey);
$cryptmail = _recaptcha_aes_encrypt ($email, $ky);
return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
}
/**
* gets the parts of the email to expose to the user.
* eg, given johndoe@example,com return ["john", "example.com"].
* the email is then displayed as john...@example.com
*/
function _recaptcha_mailhide_email_parts ($email) {
$arr = preg_split("/@/", $email );
if (strlen ($arr[0]) <= 4) {
$arr[0] = substr ($arr[0], 0, 1);
} else if (strlen ($arr[0]) <= 6) {
$arr[0] = substr ($arr[0], 0, 3);
} else {
$arr[0] = substr ($arr[0], 0, 4);
}
return $arr;
}
/**
* Gets html to display an email address given a public an private key.
* to get a key, go to:
*
* http://www.google.com/recaptcha/mailhide/apikey
*/
function recaptcha_mailhide_html($pubkey, $privkey, $email) {
$emailparts = _recaptcha_mailhide_email_parts ($email);
$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
"' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
}
?>

@ -1,187 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This include contains functions to deal with pre-rendered content. */
function render_comments($table, $id)
{
/* This function will not use memcache for the MySQL queries, as
* the data returned would be stale - which would obviously be a bad
* idea in a function that's going to either be used to force-update
* the render cache (in which case stale data defeats the point) or
* as first generation (in which case there is no data in memcache
* anyway). */
global $render_dir;
if($table == "ext")
{
$section = "external-news";
}
elseif($table == "sites")
{
$section = "related-sites";
}
else
{
$section = "press";
}
$query = "SELECT * FROM {$table} WHERE `Id`='{$id}'";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
$output = "";
$res = mysql_query("SELECT * FROM comments WHERE `ItemId` = '{$id}' AND `Section` = '{$table}' AND `Visible` = '1' ORDER BY `Posted` ASC");
if(mysql_num_rows($res) > 0)
{
while($row = mysql_fetch_array($res))
{
$obj->id = $row['Id'];
$obj->itemid = $row['ItemId'];
$obj->name = $row['Name'];
$obj->body = $row['Body'];
$obj->parentid = $row['ParentId'];
$obj->postdate = $row['Posted'];
$obj->linecount = $row['LineCount'];
$obj->children = array();
$dataset[$obj->id] = clone $obj;
}
foreach($dataset as $element)
{
if($element->parentid == 0)
{
$top[] = $element;
}
else
{
if(isset($dataset[$element->parentid]))
{
$dataset[$element->parentid]->children[] = $element;
}
}
}
foreach($top as $comment)
{
$output .= print_comment($comment, $table);
$output .= "<div class=\"c-spacer\"></div>";
}
}
else
{
$output = "No comments have been posted on this entry yet.";
}
$output .= "
<hr>
<div class=\"c-comment\">
<div class=\"c-reply-header\">
Post a new comment
</div>
<form method=\"post\" action=\"/{$section}/item/{$id}/comments/post/\">
<input type=\"text\" name=\"name\" value=\"Anonymous\" class=\"c-inline\">
<textarea name=\"body\" class=\"c-inline\"></textarea>
<div class=\"button\">
<button type=\"submit\" name=\"submit\">Post comment</button>
</div>
</form>
</div>
";
$path = "{$render_dir}/c-{$table}-{$id}.render";
file_put_contents($path, $output);
mc_delete(md5($path) . md5($path . "x"));
return $output;
}
else
{
return false;
}
}
function print_comment($comment, $table)
{
$output = "";
if($table == "ext")
{
$sect = "external-news";
}
elseif($table == "sites")
{
$sect = "related-sites";
}
else
{
$sect = "press";
}
$c_name = utf8entities(stripslashes($comment->name));
$c_date = utf8entities($comment->postdate);
$c_body = nl2br(utf8entities(stripslashes($comment->body)), false);
if($comment->linecount == 1)
{
$output .= "
<div>
<div class=\"c-small\">
<a name=\"c-{$comment->id}\"></a>
<div class=\"c-small-actions\">
<a class=\"c-actions-button\" alt=\"Respond to this comment\" href=\"/{$sect}/item/{$comment->itemid}/comments/post/{$comment->id}/\" onclick=\"return replyToComment(this);\">Reply</a>
<a class=\"c-actions-button\" alt=\"Permalink to this comment\" href=\"/{$sect}/item/{$comment->itemid}/comments/#c-{$comment->id}\">Perma</a>
</div>
<div class=\"c-small-inner\">
<strong>{$c_name}</strong>&nbsp;&nbsp;
{$c_body}
</div>
<div class=\"clear\"></div>
</div>
";
}
else
{
$output .= "
<div>
<div class=\"c-outer\">
<a name=\"c-{$comment->id}\"></a>
<div class=\"c-meta\">
<span class=\"c-meta-name\">{$c_name}</span>
<span class=\"c-meta-date\">{$c_date}</span>
<div class=\"clear\"></div>
</div>
<div class=\"c-actions\">
<a class=\"c-actions-button\" alt=\"Respond to this comment\" href=\"/{$sect}/item/{$comment->itemid}/comments/post/{$comment->id}/\" onclick=\"return replyToComment(this);\">Reply</a>
<a class=\"c-actions-button\" alt=\"Permalink to this comment\" href=\"/{$sect}/item/{$comment->itemid}/comments/#c-{$comment->id}\">Perma</a>
</div>
<div class=\"c-body\">
{$c_body}
</div>
</div>
";
}
$output .= "
<div class=\"c-reply\">
{$comment->id}
</div>
</div>
<div class=\"c-children\">
";
foreach($comment->children as $child)
{
$output .= print_comment($child, $table);
}
$output .= "</div>";
return $output;
}
?>

@ -1,151 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to string handling. */
function ends_with($haystack, $needle)
{
if(substr($haystack, strlen($haystack) - strlen($needle), strlen($needle)) == $needle)
{
return true;
}
else
{
return false;
}
}
function split_if_present($haystack, $needle)
{
if(strpos($haystack, $needle) !== false)
{
return explode($needle, $haystack);
}
else
{
return false;
}
}
function suggest_title($title)
{
if(($parts = split_if_present($title, " | ")) ||
($parts = split_if_present($title, "&raquo;")) ||
($parts = split_if_present($title, " : ")) ||
($parts = split_if_present($title, " &gt; ")) ||
($parts = split_if_present($title, " / ")) ||
($parts = split_if_present($title, " - ")))
{
$maxlen = 0;
$highest = 0;
for($i = 0; $i < count($parts); $i++)
{
$len = strlen($parts[$i]);
if($len > $maxlen)
{
$maxlen = $len;
$highest = $i;
}
}
return trim($parts[$highest]);
}
else
{
return $title;
}
}
function split_lines($input)
{
return explode("\n", str_replace("\r", "", $input));
}
function utf8_entities_if_needed($input)
{
if(strpos($input, ">") !== false || strpos($input, "<") !== false)
{
return utf8entities($input);
}
else
{
return $input;
}
}
function arraytolower($array)
{
//return unserialize(strtolower(serialize($array)));
return $array;
}
function clean_tag($tag)
{
return preg_replace("/[^a-zA-Z0-9']/", "", normalize_chars($tag));
}
/* Thanks to highstrike at gmail dot com (http://www.php.net/manual/en/function.substr.php#80247) */
function cut_text($value, $length)
{
if(is_array($value)) list($string, $match_to) = $value;
else { $string = $value; $match_to = $value{0}; }
$match_start = stristr($string, $match_to);
$match_compute = strlen($string) - strlen($match_start);
if (strlen($string) > $length)
{
if ($match_compute < ($length - strlen($match_to)))
{
$pre_string = substr($string, 0, $length);
$pos_end = strrpos($pre_string, " ");
if($pos_end === false) $string = $pre_string."...";
else $string = substr($pre_string, 0, $pos_end)."...";
}
else if ($match_compute > (strlen($string) - ($length - strlen($match_to))))
{
$pre_string = substr($string, (strlen($string) - ($length - strlen($match_to))));
$pos_start = strpos($pre_string, " ");
$string = "...".substr($pre_string, $pos_start);
if($pos_start === false) $string = "...".$pre_string;
else $string = "...".substr($pre_string, $pos_start);
}
else
{
$pre_string = substr($string, ($match_compute - round(($length / 3))), $length);
$pos_start = strpos($pre_string, " "); $pos_end = strrpos($pre_string, " ");
$string = "...".substr($pre_string, $pos_start, $pos_end)."...";
if($pos_start === false && $pos_end === false) $string = "...".$pre_string."...";
else $string = "...".substr($pre_string, $pos_start, $pos_end)."...";
}
$match_start = stristr($string, $match_to);
$match_compute = strlen($string) - strlen($match_start);
}
return $string;
}
function normalize_chars($str)
{
$charmap = array(
'Š'=>'S', 'š'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A',
'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I',
'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U',
'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a',
'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i',
'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u',
'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'ƒ'=>'f', 'č'=>'c'
);
return strtr($str, $charmap);
}
function random_string($length)
{
$output = "";
for ($i = 0; $i < $length; $i++)
{
$output .= substr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", mt_rand(0, 61), 1);
}
return $output;
}
?>

@ -1,12 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to storage of uploaded files on Tahoe-LAFS. */
function urlsafe_b64encode($string)
{
$string = base64_encode($string);
$string = str_replace(array('+','/','='),array('-','_','='), $string);
return $string;
}
?>

@ -1,100 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains template functions for site elements. */
function template_item($title, $section, $id, $comments, $highlight = false, $upvotes = 0, $rank = 0)
{
global $lang;
$var_highlight = ($highlight === true) ? " highlighted" : "";
$var_target = ($section == "external-news") ? " target=\"_blank\"" : "";
$output = "<div class=\"item{$var_highlight}\">
<a href=\"/{$section}/item/{$id}/\" class=\"name\"{$var_target}>{$title}</a>
<span class=\"votes\">";
if($section == "external-news")
{
$output .= "<span class=\"votebuttons{$id}\">
<a rel=\"nofollow\" href=\"/process.vote.php?id={$id}&vote=down&nojs=true&token={$_SESSION['vote_token']}\" onclick=\"return voteDown({$id}, '{$_SESSION['vote_token']}');\" class=\"minus\">-</a>
<a rel=\"nofollow\" href=\"/process.vote.php?id={$id}&vote=up&nojs=true&token={$_SESSION['vote_token']}\" onclick=\"return voteUp({$id}, '{$_SESSION['vote_token']}');\" class=\"plus\">+</a>
</span>
<span class=\"votecount votecount{$id}\" id=\"vote{$id}\">{$rank}</span>";
}
$output .= "<a class=\"comments\" href=\"/{$section}/item/{$id}/comments/\" target=\"_blank\">
<span class=\"count\">{$comments}</span>
<span class=\"under\">{$lang[35]}</span>
</a>";
if($section == "press")
{
$output .= "<div class=\"upvotes\">+{$upvotes}</div>";
}
$output .= "</span>
<div class=\"clear\"></div>
</div>";
return $output;
}
function template_post($post)
{
$first = ($post['ParentId'] == 0) ? " forum-post-first" : "";
$user = utf8entities(stripslashes($post['Name']));
$body = nl2br(utf8entities(stripslashes($post['Body'])));
$date = date("F j, Y <b\\r>H:i:s", strtotime($post['Posted']));
$output = "
<a name=\"p-{$post['Id']}\"></a>
<div class=\"forum-post{$first}\">
<div class=\"forum-post-meta\">
<div class=\"forum-post-user\">
{$user}
</div>
<div class=\"forum-post-date\">
{$date}
</div>
</div>
<div class=\"forum-post-body\">
{$body}
</div>
<div class=\"clear\"></div>
</div>
";
return $output;
}
function template_captcha()
{
global $recaptcha_pubkey;
return "
<div id=\"divrecaptcha\" style=\"display:none;\">
<div id=\"recaptcha_image\"></div>
<div id=\"recaptcha_arrow\">&gt;</div>
<input type=\"text\" name=\"recaptcha_response_field\" id=\"recaptcha_response_field\">
<div class=\"clear\"></div>
<div id=\"recaptcha_links\">
<a href=\"#\" onclick=\"Recaptcha.reload(); return false;\">Get another Captcha</a>
<a href=\"#\" onclick=\"Recaptcha.switch_type('audio'); return false;\" class=\"recaptcha_only_if_image\">Get Audio Captcha</a>
<a href=\"#\" onclick=\"Recaptcha.switch_type('image'); return false;\" class=\"recaptcha_only_if_audio\">Get Text Captcha</a>
<a href=\"#\" onclick=\"Recaptcha.showhelp(); return false;\">Help</a>
<a href=\"http://www.google.com/recaptcha\" target=\"_blank\">Captcha by reCAPTCHA</a>.
</div>
<!-- <p>
<span class=\"recaptcha_only_if_image\">Enter the words shown above separated by space</span>
<span class=\"recaptcha_only_if_audio\">Enter the numbers you hear</span>
</p> -->
</div>
" . recaptcha_get_html($recaptcha_pubkey);
}
?>

@ -1,53 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } // Protect against direct access.
/* This include contains functions related to UTF8 handling. */
function utf8entities($utf8)
{
// Credits to silverbeat@gmx.at (http://www.php.net/manual/en/function.htmlentities.php#96648)
$encodeTags = true;
$result = '';
for ($i = 0; $i < strlen($utf8); $i++)
{
$char = $utf8[$i];
$ascii = ord($char);
if ($ascii < 128)
{
$result .= ($encodeTags) ? htmlentities($char) : $char;
}
else if ($ascii < 192)
{
// Do nothing.
}
else if ($ascii < 224)
{
$result .= htmlentities(substr($utf8, $i, 2), ENT_QUOTES, 'UTF-8');
$i++;
}
else if ($ascii < 240)
{
$ascii1 = ord($utf8[$i+1]);
$ascii2 = ord($utf8[$i+2]);
$unicode = (15 & $ascii) * 4096 +
(63 & $ascii1) * 64 +
(63 & $ascii2);
$result .= "&#$unicode;";
$i += 2;
}
else if ($ascii < 248)
{
$ascii1 = ord($utf8[$i+1]);
$ascii2 = ord($utf8[$i+2]);
$ascii3 = ord($utf8[$i+3]);
$unicode = (15 & $ascii) * 262144 +
(63 & $ascii1) * 4096 +
(63 & $ascii2) * 64 +
(63 & $ascii3);
$result .= "&#$unicode;";
$i += 3;
}
}
return $result;
}
?>

@ -1,140 +1,28 @@
<?php
/* This page handles the backwards compatibility with the old-style URLs (with parameters).
* The new-style (pretty) URLs are handled by rewrite.php. */
if(empty($_SERVER['QUERY_STRING']))
{
require("rewrite.php");
}
else
{
$_INCLUDED = true;
$var_include = "internal.php";
$var_subpage = "";
$var_id = "";
if(isset($_GET['p']))
{
if($_GET['p'] == "press")
{
$var_section = "press";
$var_table = "press";
if(isset($_GET['a']))
{
$var_page = $_GET['a'];
}
else
{
$var_page = "list";
if(isset($_GET['s']))
{
$var_id = $_GET['s'];
}
}
if(isset($_GET['i']))
{
$var_id = $_GET['i'];
}
}
elseif($_GET['p'] == "ext")
{
$var_section = "external-news";
$var_table = "ext";
if(isset($_GET['a']))
{
$var_page = $_GET['a'];
}
else
{
$var_page = "list";
if(isset($_GET['s']))
{
$var_id = $_GET['s'];
}
}
if(isset($_GET['i']))
{
$var_id = $_GET['i'];
}
}
elseif($_GET['p'] == "sites")
{
$var_section = "related-sites";
$var_table = "sites";
if(isset($_GET['a']))
{
$var_page = $_GET['a'];
}
else
{
$var_page = "list";
if(isset($_GET['s']))
{
$var_id = $_GET['s'];
}
}
if(isset($_GET['i']))
{
$var_id = $_GET['i'];
}
}
elseif($_GET['p'] == "comments")
{
if(isset($_GET['c']) && isset($_GET['i']))
{
if($_GET['c'] == "press")
{
$var_section = "press";
$var_table = "press";
$var_page = "item";
$var_subpage = "comments";
$var_id = $_GET['i'];
}
else
if($_GET['c'] == "ext")
{
$var_section = "external-news";
$var_table = "ext";
$var_page = "item";
$var_subpage = "comments";
$var_id = $_GET['i'];
}
else
if($_GET['c'] == "sites")
{
$var_section = "related-sites";
$var_table = "sites";
$var_page = "item";
$var_subpage = "comments";
$var_id = $_GET['i'];
}
else
{
$var_include = "rewrite.php";
}
}
else
{
$var_include = "rewrite.php";
}
}
else
{
$var_include = "rewrite.php";
}
}
else
{
$var_include = "rewrite.php";
}
require($var_include);
}
?>
<!doctype html>
<html>
<head>
<title>AnonNews.org</title>
<link href='http://fonts.googleapis.com/css?family=Istok+Web:400,700,400italic' rel='stylesheet' type='text/css'>
<link href="static/style.css" rel="stylesheet">
</head>
<body>
<div class="page-header">
<h1><strong>AnonNews.org</strong> Everything Anonymous</h1>
<nav>
<a href="/popular" class="active">Most popular</a>
<a href="/recent">Most recent</a>
<a href="/trash">Trashbin</a>
<a href="/forum" class="section">Forums</a>
<a href="/faq" class="section">FAQ</a>
<a href="/donate" class="section" id="button_donate">Donate</a>
<a href="/submit" class="submit">Submit a press release or article</a>
<div class="clear-left"></div>
</nav>
</div>
<div class="license">
<p>Header background image by <a href="http://www.flickr.com/photos/seier/4338268272/">seier+seier</a> used under a Creative Commons Attribution license.</p>
<p>All content on this website, including design and written material, is automatically licensed under a Creative Commons Attribution license. You are free to redistribute and/or remix it, but you have to credit the author, or, if the author is unknown ("Anonymous"), place a backlink to the corresponding page on AnonNews and attribute it to "Anonymous".</p>
</div>
</body>
</html>

@ -1,218 +0,0 @@
<?php
/* This file processes the actual pageloads, based on variables that are set by either rewrite.php or index.php.
* It should only be allowed to run if it is included by either. */
$timing_start = microtime(true);
if(!isset($_INCLUDED))
{
die("Direct access to this page is not permitted.");
}
if(!isset($var_table))
{
$var_table = "";
}
if(!isset($var_id))
{
$var_id = "";
}
$_ANONNEWS = true;
require("include/base.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>AnonNews.org : <?php echo($lang[0]); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/style.css">
<!--[if lt IE 8]><style>.bb {behavior:url("boxsizing.htc");}</style><![endif]-->
<script type="text/javascript" src="/jquery.js"></script>
<script type="text/javascript">
var var_section = "<?php echo($var_section); ?>";
var var_id = "<?php echo($var_id); ?>";
</script>
<script src="/script.2.0.js"></script>
<script type="text/javascript" >
var RecaptchaOptions = {
theme : 'custom',
lang: 'en',
custom_theme_widget: 'divrecaptcha'
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
</head>
<body>
<!-- <Obvioustroll>joepie is a huuuge faggot -->
<div id="header_top">
<span style="float: right;" id="ad_inline">
<div class="header-button" style="font-size: 13px;">
<!-- Site language: <?php echo($flaglist); ?><br>
<div style="height: 6px; font-size: 1px; line-height: 1px;"></div>
Only show submissions in <select>
<option value="en">English</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="nl">Dutch</option>
<option value="es">Spanish</option>
<option value="it">Italian</option>
<option value="ar">Arabic</option>
<option value="tr">Turkish</option>
<option value="ba">Bosnian</option>
<option value="rs">Serbian</option>
<option value="pl">Polish</option>
</select>
<input type="checkbox" id="c_english" style="margin-left: 10px;"><label for="c_english">Also English</label><br>
<div style="height: 6px; font-size: 1px; line-height: 1px;"></div>
Tags: anonops metalgear libya italy backtrace &nbsp;&nbsp;more &gt;&gt; -->
<strong>AnonNews 2.0 is finally there!</strong> Press release submission <br>
is open again, as are comments - and we now have forums!<br>
Other interface languages and language/tag filtering coming soon, as well <br>
as RSS feeds.
</div>
</span>
<h1><a href="/"><span class="strong">AnonNews</span> - <?php echo($lang[0]); ?></a></h1>
<div style="z-index: 999;">
<a class="header-button" href="/static/faq">FAQ</a>
<a class="header-button" href="/static/irc">IRC</a>
<a class="header-button" href="/forum" target="_blank">Forum</a>
<a class="header-button" href="/static/donate" style="padding: 4px; padding-bottom: 1px;"><img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpuZmpiZmJhcXV0dDQyanRlcXJld2xhYzZkZTp6a3FqaTNhd291Z2JvbHJkYTM3bnFlcmc1bmQ0ZG0yYXEyc2J3eWR5cTZkYTR2ZWFqZ2xhOjM6NjoyNjIy/bitcoin.png" style="border: 0px solid black;"></a>
<div class="header-button" style="padding: 7px; padding-top: 9px;">
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.anonnews.org/"></a>
</div>
<div class="header-button" style="padding: 6px;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display: inline;">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="T425GCPN4A7GE">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."><img alt="" border="0" src="https://www.paypal.com/nl_NL/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
<div class="clear"></div>
</div>
</div>
<div class="topbar">
<strong>AnonNews is an independent and <a href="/static/moderation">uncensored (but moderated)</a> news platform for Anonymous.</strong> Anyone is welcome to post a submission, and can do so by clicking the "Add" button for a category.<br>
<strong>If you need help or have questions regarding AnonNews,</strong> please <a href="/static/irc">join our IRC channel.</a>
</div>
<?php
//$ismod=true;
if($ismod && (!isset($_GET['p']) || $_GET['p']!="mod"))
{
$res = mysql_query("SELECT COUNT(*) FROM ext WHERE `Approved`='0' AND `Deleted`='0'");
$row = mysql_fetch_array($res);
$total = $row['COUNT(*)'];
$res = mysql_query("SELECT COUNT(*) FROM press WHERE `Approved`='0' AND `Deleted`='0'");
$row = mysql_fetch_array($res);
$total += $row['COUNT(*)'];
$res = mysql_query("SELECT COUNT(*) FROM sites WHERE `Approved`='0' AND `Deleted`='0'");
$row = mysql_fetch_array($res);
$total += $row['COUNT(*)'];
if($total>0)
{
echo("<div class=\"item\" style=\"background-color: #FFAA99; padding: 4px;\"><a href=\"?p=mod\"><strong>There are $total unmoderated item(s)!</strong> Click here to start moderating.</a></div>");
}
}
?>
<div class="body-main">
<?php
///// START REQUEST HANDLING /////
if($var_section == "static")
{
// Handle static pages.
if(isset($static_pages[$var_table]))
{
require("static/{$static_pages[$var_table]}");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
elseif($var_section == "radio")
{
require("static/radio.static.php");
}
elseif($var_section == "error")
{
require("module.error.php");
}
elseif($var_section == "press")
{
require("module.press.php");
}
elseif($var_section == "external-news")
{
require("module.ext.php");
}
elseif($var_section == "related-sites")
{
require("module.sites.php");
}
elseif($var_section == "forum")
{
require("module.forum.php");
}
elseif($var_section == "home")
{
require("module.home.php");
}
elseif($var_section == "moderation")
{
require("module.moderation.php");
}
////// END REQUEST HANDLING //////
?>
</div>
<div style="height: 30px; border-bottom: 1px solid black; margin-bottom: 10px;"></div>
<div style="text-align: center;">
<span style="overflow: hidden; border: 1px solid black; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; padding: 4px; padding-left: 0px; font-family: Arial; font-size: 12px; font-weight: bold; background-color: white;">
<span style="padding: 4px; padding-left: 8px; background-color: #E98A0A; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; color: white;">
<a href="http://www.bitcoin.org/" style="text-decoration: none; color: white; border: none;">
<span style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; font-weight: normal; color: white; font-size: 15px; background-color: white; color: #E98A0A; padding: 1px 5px; padding-top: 0px;">&#3647;</span>
Donate using Bitcoin!
</a>
</span>
<span style="padding: 5px;">
1PPVupRRz7tHvfvJWEDBnDr7bFVFFYLu6G
</span>
</span>
</div>
<div style="height: 15px;"></div>
<div class="cc-notice">
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons Attribution" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" /></a>
All content on this website is automatically licensed under a Creative Commons Attribution license. You are free to redistribute and/or remix it, but you have to credit the author, or, if the author is unknown ("Anonymous"), place a backlink to the corresponding page on AnonNews and attribute it to "Anonymous".
<div class="clear"></div>
</div>
<div style="height: 15px;"></div>
<div class="source-notice">
<a href="http://www.cryto.net/projects/anonnews2">Download the AnonNews 2.0 source code</a> / <a href="/moderation">Moderation panel</a>
</div>
<div style="height: 40px;"></div>
</body>
</html>
<?php
echo("<!-- page generated in " . (round(microtime(true) - $timing_start, 6)) . " seconds. -->");
?>

File diff suppressed because one or more lines are too long

@ -1,33 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module handles all comments. */
$var_id = (is_numeric($var_id)) ? $var_id : 0;
$error = false;
if(!$output = file_get_contents_cached("{$render_dir}/c-{$var_table}-{$var_id}.render"))
{
if(!$res = render_comments($var_table, $var_id))
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
$error = true;
}
else
{
$output->source = "render";
$output->data = $res;
}
}
if($error === false)
{
if($var_section == "press")
{
echo("<div class=\"form-notice\" style=\"width: 100%;\"><strong>Note:</strong> To be able to upvote a press release, you need to leave a comment that is 2 or more lines, and 100 or more characters.</div>");
}
echo($output->data);
}
?>

@ -1,179 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module handles the posting of comments. */
$var_id = (is_numeric($var_id)) ? $var_id : 0;
$parent = (isset($parts[$var_start + 5]) && is_numeric($parts[$var_start + 5])) ? $parts[$var_start + 5] : 0;
if(!isset($_POST['submit']))
{
// User does not have javascript, give him a comment form.
if($parent == 0 || $result = mysql_query_cached("SELECT * FROM comments WHERE `Id`='{$parent}' AND `ItemId`='{$var_id}'"))
{
if($result = mysql_query_cached("SELECT Name FROM {$var_table} WHERE `Id`='{$var_id}'"))
{
echo("
<div class=\"c-comment\">
<div class=\"c-reply-header\">
Post a new comment
</div>
<form method=\"post\" action=\"/{$var_section}/item/{$var_id}/comments/post/{$parent}/\">
<input type=\"text\" name=\"name\" value=\"Anonymous\" class=\"c-inline\">
<textarea name=\"body\" class=\"c-inline\"></textarea>
<div class=\"button\">
<button type=\"submit\" name=\"submit\">Post comment</button>
</div>
</form>
</div>
");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
else
{
// Process a new comment
$validated = false;
$error = false;
if(isset($_POST['validate']))
{
$posted = false;
}
else
{
$posted = true;
}
if($posted === true)
{
if(!empty($_POST['name']) || isset($_POST['validate']))
{
if(!empty($_POST['body']) || isset($_POST['validate']))
{
$name = mysql_real_escape_string($_POST['name']);
$body = mysql_real_escape_string($_POST['body']);
$linecount = count(explode("\n", $_POST['body']));
$query = "INSERT INTO comments (`Section`, `ItemId`, `ParentId`, `Name`, `Body`, `Visible`, `LineCount`) VALUES ('{$var_table}', '{$var_id}', '{$parent}', '{$name}', '{$body}', '0', '{$linecount}')";
if(mysql_query($query))
{
$comment_id = mysql_insert_id();
if(!isset($_POST['validate']))
{
echo("<strong>Your comment was successfully submitted.</strong> To verify that you are human and not a spambot, complete the following captcha to make your comment visible.<br><br>");
}
}
else
{
$error = true;
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
}
else
{
$error = true;
$var_code = ANONNEWS_ERROR_COMMENT_BODY;
require("module.error.php");
}
}
else
{
$error = true;
$var_code = ANONNEWS_ERROR_COMMENT_NAME;
require("module.error.php");
}
}
if($posted === false)
{
if(isset($_POST['commentid']) && is_numeric($var_id))
{
$recaptcha = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
$comment_id = is_numeric($_POST['commentid']) ? $_POST['commentid'] : 0;
if($result = mysql_query_cached("SELECT * FROM comments WHERE `Id`='{$comment_id}'"))
{
$linecount = count(explode("\n", $result->data[0]['Body']));
$charcount = strlen($result->data[0]['Body']);
if($recaptcha->is_valid)
{
mysql_query("UPDATE comments SET `Visible`='1' WHERE `Id`='{$comment_id}'");
$res = mysql_query("SELECT COUNT(*) FROM comments WHERE `Section`='{$var_table}' AND `ItemId`='{$var_id}' AND `Visible`='1'");
$row = mysql_fetch_array($res);
$total = $row['COUNT(*)'];
mysql_query("UPDATE {$var_table} SET `CommentCount`='{$total}' WHERE `Id`='{$var_id}'");
if($var_section == "press" && $linecount >= 2 && $charcount >= 100 && isset($_POST['upvote']) && $_POST['upvote'] == "true")
{
$res = mysql_query("SELECT Upvotes FROM press WHERE `Id`='{$var_id}'");
if(mysql_num_rows($res) > 0)
{
$row = mysql_fetch_array($res);
$total = $row['Upvotes'] + 1;
mysql_query("UPDATE press SET `Upvotes`='{$total}' WHERE `Id`='{$var_id}'");
}
}
echo("<strong>Your comment is now visible.</strong>
<p><a href=\"/{$var_section}/item/{$var_id}/comments/#c-{$comment_id}\" class=\"page-button\"><< back to thread</a></p>");
render_comments($var_table, $var_id);
$validated = true;
}
else
{
echo("<strong>The captcha you entered was incorrect.</strong> Try again.<br><br>");
}
}
}
else
{
$error = true;
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
if($error === false && ($posted === true || $validated === false))
{
if($result = mysql_query_cached("SELECT * FROM comments WHERE `Id`='{$comment_id}'"))
{
$linecount = count(explode("\n", $result->data[0]['Body']));
$charcount = strlen($result->data[0]['Body']);
echo("
<form method=\"post\" action=\"/{$var_section}/item/{$var_id}/comments/post/{$parent}/\">
<input type=\"hidden\" name=\"commentid\" value=\"{$comment_id}\">
<input type=\"hidden\" name=\"validate\" value=\"true\">
" . template_captcha());
if($var_section == "press" && $linecount >= 2 && $charcount >= 100)
{
echo("<br><input type=\"checkbox\" name=\"upvote\" value=\"true\"> Upvote this press release<br><br>");
}
echo("<button type=\"submit\" name=\"submit\">Verify</button>
</form>
");
}
}
}
?>

@ -1,136 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* Custom error codes:
* ANONNEWS_ERROR_BANNED - Banned from submission
* ANONNEWS_ERROR_EMPTY_TITLE - Empty title
* ANONNEWS_ERROR_EMPTY_BODY - Empty body
* ANONNEWS_ERROR_EMPTY_URL - Empty URL
* ANONNEWS_ERROR_INCORRECT_FORMAT - Incorrect format for uploaded file
* ANONNEWS_ERROR_TOO_LARGE - Uploaded file too large
* ANONNEWS_ERROR_UPLOAD_ERR - Unknown upload error
* ANONNEWS_ERROR_SHORTENER_DETECTED - URL shortener detected
* ANONNEWS_ERROR_URL_BLACKLISTED - URL blacklisted
* ANONNEWS_ERROR_SPAM - Spam detected
* ANONNEWS_ERROR_DATABASE_ERROR - Database error
* ANONNEWS_ERROR_INCORRECT_CAPTCHA - Incorrect CAPTCHA entered
* ANONNEWS_ERROR_NO_RECORDS_FOUND - No records found
* ANONNEWS_ERROR_NONEXISTENT_URL - URL does not exist
* ANONNEWS_ERROR_MALFORMED_DATA - Malformed data was received
* ANONNEWS_ERROR_COMMENT_BODY - Comment body was not entered
* ANONNEWS_ERROR_COMMENT_NAME - Comment name was not entered
* ANONNEWS_ERROR_POST_TOPIC - Forum post topic was not entered
* ANONNEWS_ERROR_POST_BODY - Forum post body was not entered
*/
if($var_code == ANONNEWS_ERROR_BANNED)
{
$var_header = "Error: You are banned from submission.";
$var_message = "Your IP address was banned for spam or other abuse in the past, and you cannot make any submissions to AnonNews.
If you believe this is in error, contact an administrator on IRC. Otherwise, <a href=\"/\">click here</a> to go back to the homepage.";
}
elseif($var_code == ANONNEWS_ERROR_EMPTY_TITLE)
{
$var_header = "Error: Empty title field.";
$var_message = "The title field cannot be empty. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_EMPTY_BODY)
{
$var_header = "Error: Empty press release text.";
$var_message = "The press release text cannot be empty. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_EMPTY_URL)
{
$var_header = "Error: Empty URL field.";
$var_message = "The URL field cannot be empty. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_INCORRECT_FORMAT)
{
$var_header = "Error: File format not allowed.";
$var_message = "The file you uploaded is in a format that is not allowed. Only PNG, GIF, and JPG files are allowed. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_TOO_LARGE)
{
$var_header = "Error: File too large.";
$var_message = "The file you uploaded is too large. The maximum filesize is approximately 20 megabytes. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_UPLOAD_ERR)
{
$var_header = "Error: Unknown uploading error.";
$var_message = "The upload did not succeed, but it's not clear why. Go back and try again - if the error persists, contact an administrator on IRC.";
}
elseif($var_code == ANONNEWS_ERROR_SHORTENER_DETECTED)
{
$var_header = "Error: URL shortener / redirector detected.";
$var_message = "You cannot submit shortened or redirected URLs to AnonNews. Go back and try again with the real URL.";
}
elseif($var_code == ANONNEWS_ERROR_URL_BLACKLISTED)
{
$var_header = "Error: URL blacklisted.";
$var_message = "The URL you tried to submit is blacklisted or detected as a link shortener / redirector. Please only submit full-length URLs that directly lead to the intended page.
If you believe this is in error, contact an administrator on IRC.";
}
elseif($var_code == ANONNEWS_ERROR_SPAM)
{
$var_header = "Error: Spam detected.";
$var_message = "The spam filter has flagged your submission as spam. You will not be able to submit it to AnonNews. If you believe this is in error, contact an administrator on IRC.";
}
elseif($var_code == ANONNEWS_ERROR_DATABASE_ERROR)
{
$var_header = "Error: Database Error.";
$var_message = "A database error occurred. Go back and try again. If this error persists, contact an administrator on IRC.";
}
elseif($var_code == ANONNEWS_ERROR_INCORRECT_CAPTCHA)
{
$var_header = "Error: Incorrect CAPTCHA entered.";
$var_message = "You did not enter the correct CAPTCHA. Go back and enter the characters in the CAPTCHA image into the input field, to verify you are not a bot.";
}
elseif($var_code == ANONNEWS_ERROR_NO_RECORDS_FOUND)
{
$var_header = "Error: No records found in database.";
$var_message = "There are no records to display. Possibly nothing has been submitted yet.";
}
elseif($var_code == ANONNEWS_ERROR_NONEXISTENT_URL)
{
$var_header = "Error: URL does not exist.";
$var_message = "The URL you tried to submit can not be retrieved. Either the site is unreachable, or the specific page you linked to does not exist. If you believe this is in error, contact an administrator on IRC.";
}
elseif($var_code == ANONNEWS_ERROR_MALFORMED_DATA)
{
$var_header = "Error: Malformed data was received.";
$var_message = "Retrieving the URL you tried to submit, resulted in a malformed response. Please contact an administrator on IRC.";
}
elseif($var_code == ANONNEWS_ERROR_COMMENT_BODY)
{
$var_header = "Error: No comment entered.";
$var_message = "You did not enter a comment. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_COMMENT_NAME)
{
$var_header = "Error: No name entered.";
$var_message = "You did not enter a name. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_POST_TOPIC)
{
$var_header = "Error: No topic entered.";
$var_message = "You did not enter a topic. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_POST_BODY)
{
$var_header = "Error: No message body entered.";
$var_message = "You did not enter a message body. Go back and try again.";
}
elseif($var_code == ANONNEWS_ERROR_NOT_FOUND)
{
$var_header = "404 Error: Requested resource could not be found";
$var_message = "The requested resource could not be located. If you followed a valid link, contact an administrator on IRC. Otherwise, <a href=\"/\">click here</a> to go back to the homepage.";
}
else
{
$var_header = "Unknown error";
$var_message = "An unknown error occurred. If you followed a valid link, contact an administrator on IRC. Otherwise, <a href=\"/\">click here</a> to go back to the homepage.";
}
echo("<h3>$var_header</h3> $var_message");
?>

@ -1,315 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module allows a user to submit a new external news item. */
if(check_banlist() == false)
{
if(empty($var_id))
{
// Stage 0: The page with guidelines.
?>
<h2>Read these guidelines. Not reading them may get you banned.</h2>
<p><strong>While no censorship based on opinion, views, etc. takes place on AnonNews, there are several guidelines in place to keep content on the site relevant.</strong>
Read these guidelines completely before submitting an external news item. Not reading them may get you banned.</p>
<p><strong>Anonymous is not your personal army.</strong> Don't post anything asking anons to undertake some sort of action.</p>
<p><strong>This is a news section.</strong> Only post actual news articles. No blog posts, no signup pages, no forums, no press releases, no dox, no satire, and so on. If it's on pastebin, it doesn't belong here. If it's on YouTube, it doesn't belong here-
unless it's an actual recording of a news channel. If you have anything that may be of interest to anons like satire or blog posts, post them on <a href="/forum">the forum.</a></p>
<p><strong>AnonNews is about Anonymous.</strong> While you may think your local political party, a phone tapping scandal, or anything else is important, this is not the place for it. Any submission has to be specifically about
Anonymous. Other topics that may be of interest to other anons can be discussed on the <a href="/forum">forum</a>.</p>
<p><strong>Give your submissions correct titles.</strong> After entering a URL, a title will be suggested. Usually the suggested title is correct, but make that you check it. <strong>Do not enter a personal comment as title.</strong>
This is not Reddit. The article title should be the actual title of the article (optionally with the site name attached).</p>
<p><strong>On the IP retention policy: we normally do not store IP addresses of anyone submitting content to AnonNews (feel free to use TOR or a proxy to be completely sure). If you hit a spam filter,
however (there is almost zero chance for a false positive), your IP may be recorded and banned. If an IP is incorrectly recorded (a false positive) it will be reviewed and removed from the log within 24 hours, without exception.</strong></p>
<p><form method="GET" action="/external-news/add/form/">
If you have read the guidelines, <button name="submit" type="submit">click here to submit your external news item.</button>
</form></p>
<?php
}
else
{
if($var_id == "form")
{
// Stage 1: Entering the URL.
?>
<h2>Submit an external news article</h2>
<form method="POST" action="/external-news/add/check/" class="submission">
<h3>First of all, enter a URL. After the URL has been checked and found to be valid, you will be able to enter the rest.</h3>
<h4>Article URL</h4>
<input type="text" name="url" id="input_url" class="empty" value="http://">
<script type="text/javascript">
$(function(){
$('#input_url').focus(function(){
if($('#input_url').val() == "http://")
{
$('#input_url').val("");
}
$('#input_url').removeClass("empty");
});
$('#input_url').blur(function(){
if($('#input_url').val() == "")
{
$('#input_url').val("http://");
$('#input_url').addClass("empty");
}
});
});
</script>
<div class="submit">
<button type="submit" name="submit" onclick="$('#submit_loader').css({'display':'block'}); $(this).css({'display':'none'}); return true;">Submit URL &gt;&gt;</button>
</div>
<div class="submit-loader" id="submit_loader">
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpuMzRqdGlhb3gycGxxbnZjZm5hM3k1NzdyYTpsbDRvNzc1Z2FsYjVmdzVqd3Q2ems0aGQ0bGd2ZXMzZHl1YXRkZHVwa2p0YXFnbmdtMmlxOjM6NjoxMDgxOQ==/loader-wide.gif"><br>
<strong>Scanning URL... (this may take a while!)</strong>
</div>
</form>
<?php
}
elseif($var_id == "check")
{
echo("<!-- Live debugging: check -->");
// Stage 2: Verifying that the URL is indeed valid. If it is valid, suggest a title and allow the user to enter more details
if(spam_score($_POST['url'], "", false) < 10)
{
$request = curl_head($_POST['url']);
if($request->code == 999)
{
$var_code = ANONNEWS_ERROR_MALFORMED_DATA;
require("module.error.php");
}
elseif($request->code == 300 || $request->code == 301 || $request->code == 302)
{
$var_code = ANONNEWS_ERROR_SHORTENER_DETECTED;
require("module.error.php");
}
elseif($request->code == 200)
{
$request = curl_get($_POST['url']);
if(!preg_match("/<title>?(.*?)<\/title>/i", $request->result, $matches))
{
$title = "";
$title_desc = "No article title could be suggested. Please enter one yourself.";
}
else
{
$title = $matches[1];
$title_desc = "The below suggestion was made based on the full page title (<em>$title</em>). Make sure it's correct before submitting.";
$title_suggestion = utf8_entities_if_needed(suggest_title($title));
$raw_suggestion = html_entity_decode($title_suggestion, ENT_QUOTES, "UTF-8");
// Load noise dictionary, for tag generation
$noise = split_lines(file_get_contents_cached("english.dic")->data);
$noise = arraytolower($noise);
foreach(explode(" ", $raw_suggestion) as $tag)
{
$tag = trim(clean_tag($tag));
if(strlen(trim($tag)) > 1 && in_array(strtolower(trim($tag)), $noise) === false)
{
$tag_list[] = strtolower($tag);
}
}
$tag_list = array_unique($tag_list);
$tags_suggestion = utf8_entities_if_needed(implode(", ", $tag_list));
}
if($detect_language)
{
require_once("Text/LanguageDetect.php");
$detector = new Text_LanguageDetect;
$detected_language = $detector->detectSimple(strip_tags($request->result));
}
else
{
$detected_language = "English";
}
?>
<h2>Submit an external news article</h2>
<form method="POST" action="/external-news/add/submit/" class="submission">
<input type="hidden" name="url" value="<?php echo(utf8entities($_POST['url'])); ?>">
<h4>Article Title</h4>
<div class="form-notice">
<?php echo($title_desc); ?>
</div>
<input type="text" name="title" value="<?php echo($title_suggestion); ?>">
<h4>Tags (optional)</h4>
<div class="form-notice">
Enter comma-separated tags here, that indicate what the press release is about. This will make it easier to find on the site.
</div>
<input type="text" name="tags" id="input_tags" value="<?php echo($tags_suggestion); ?>">
<h4>Article Language</h4>
<select name="language">
<?php
foreach($languages as $iso => $lang)
{
$sel = (strtolower($lang) == strtolower($detected_language)) ? " selected" : "";
echo("<option value=\"{$iso}\"{$sel}>{$lang}</option>");
}
?>
</select>
<div class="note">
Detected language: <?php echo($detected_language); ?>
</div>
<h4>Complete the CAPTCHA</h4>
<?php echo(template_captcha()); ?>
<div class="submit">
<button type="submit" name="submit" onclick="$('#submit_loader').css({'display':'block'}); $(this).css({'display':'none'}); return true;">Submit external news item &gt;&gt;</button>
</div>
<div class="submit-loader" id="submit_loader">
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpuMzRqdGlhb3gycGxxbnZjZm5hM3k1NzdyYTpsbDRvNzc1Z2FsYjVmdzVqd3Q2ems0aGQ0bGd2ZXMzZHl1YXRkZHVwa2p0YXFnbmdtMmlxOjM6NjoxMDgxOQ==/loader-wide.gif"><br>
<strong>Submitting external news item... (this may take a while!)</strong>
</div>
</form>
<?php
}
else
{
echo("<!-- {$request->code} -->");
$var_code = ANONNEWS_ERROR_NONEXISTENT_URL;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_URL_BLACKLISTED;
require("module.error.php");
}
}
elseif($var_id == "submit")
{
// Stage 3: Processing the submission.
$recaptcha = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if($recaptcha->is_valid)
{
if(!empty($_POST['title']))
{
if(!empty($_POST['url']))
{
// It will have to be approved before it appears on the front page.
$spam_score = spam_score($_POST['url'], $_POST['title'], true);
if($spam_score < 10)
{
$request = curl_head($_POST['url']);
if($request->code == 200)
{
if($spam_score < 5)
{
$visible = true;
$approval_status = "Your submission is now visible on the frontpage.";
}
else
{
$visible = false;
$approval_status = "Your submission was however flagged as potential spam, and will be manually reviewed before appearing on the frontpage.";
}
$language = mysql_real_escape_string($_POST['language']);
$title = mysql_real_escape_string($_POST['title']);
$url = mysql_real_escape_string($_POST['url']);
$query = "INSERT INTO ext (`Name`, `Url`, `CommentCount`, `Deleted`, `Approved`, `Visible`, `Rank`, `Mod`, `Language`, `Posted`)
VALUES ('$title', '$url', '0', '0', '0', '{$visible}', '0', '', '{$language}', CURRENT_TIMESTAMP)";
if(mysql_query($query))
{
$insert_id = mysql_insert_id();
if(!empty($_POST['tags']))
{
// tags were entered.
$tags = $_POST['tags'];
$tags_list = explode(",", $tags);
foreach($tags_list as $tag)
{
$tag = mysql_real_escape_string(trim(clean_tag($tag)));
if(!empty($tag))
{
$query = "INSERT INTO tags (`Table`, `ItemId`, `TagName`) VALUES ('ext', '{$insert_id}', '$tag')";
mysql_query($query);
}
}
}
echo("<p><strong>Your external news item was successfully submitted.</strong> {$approval_status}</p>
<p><a href=\"/\" class=\"page-button\">&lt;&lt; back to front page</a></p>");
}
else
{
echo(mysql_error());
$var_code = ANONNEWS_ERROR_DATABASE_ERROR; // Generic upload error
require("module.error.php");
}
}
elseif($request->code == 300 || $request->code == 301 || $request->code == 302)
{
$var_code = ANONNEWS_ERROR_SHORTENER_DETECTED;
require("module.error.php");
}
else
{
echo("<!-- {$request->code} 7 -->");
$var_code = ANONNEWS_ERROR_NONEXISTENT_URL;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_SPAM;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_EMPTY_URL; // Empty body
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_EMPTY_TITLE; // Empty title
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_INCORRECT_CAPTCHA;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
}
else
{
$var_code = ANONNEWS_ERROR_BANNED; // Banned from submission.
require("module.error.php");
}
?>

@ -1,131 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module lists all press releases in a specified order. */
/* Note: internal page numbering starts at 0. */
$var_sort = "date";
if(!empty($var_id))
{
if($var_id == "rank")
{
$var_sort = "rank";
}
}
$var_sortdir = "desc";
if(!empty($var_subpage))
{
if($var_subpage == "asc")
{
$var_sortdir = "asc";
}
}
$query = "SELECT COUNT(*) FROM ext WHERE `Deleted` = '0' AND `Visible` = '1'";
if($result = mysql_query_cached($query))
{
if(isset($result->data[0]))
{
$total_records = $result->data[0]['COUNT(*)'];
$per_page = 20;
if(!empty($var_last) && is_numeric($var_last) && $var_last > 0)
{
$var_page = mysql_real_escape_string($var_last - 1);
}
else
{
$var_page = 0;
}
$start = $var_page * $per_page;
$last_page = floor($total_records / $per_page);
if($start >= $total_records)
{
$start = $total_pages * $per_page;
}
$page_list = "";
if($var_page > 0)
{
$p = $var_page;
$page_list .= "<a href=\"/external-news/list/{$var_sort}/{$var_sortdir}/{$p}/\"><< previous</a><span class=\"spacer\"> </span>";
}
for($i = 0; $i <= $last_page; $i++)
{
$p = $i + 1;
$current = ($var_page == $i) ? " class=\"current\"" : "";
$page_list .= "<a href=\"/external-news/list/{$var_sort}/{$var_sortdir}/{$p}/\"{$current}>{$p}</a><span class=\"spacer\"> </span>";
}
if($var_page < $last_page)
{
$p = $var_page + 2;
$page_list .= "<a href=\"/external-news/list/{$var_sort}/{$var_sortdir}/{$p}/\">next >></a>";
}
$query_sort = ($var_sort == "date") ? "Posted" : "Rank";
$query_dir = ($var_sortdir == "asc") ? "ASC" : "DESC";
$query = "SELECT Id, Name, CommentCount, Rank FROM ext WHERE `Visible` = '1' AND `Deleted` = '0' ORDER BY `{$query_sort}` {$query_dir} LIMIT {$start},{$per_page}";
if($result = mysql_query_cached($query))
{
$style[0] = ($var_sort == "date" && $var_sortdir == "desc") ? " class=\"active\"" : "";
$style[1] = ($var_sort == "date" && $var_sortdir == "asc") ? " class=\"active\"" : "";
$style[2] = ($var_sort == "rank" && $var_sortdir == "desc") ? " class=\"active\"" : "";
$style[3] = ($var_sort == "rank" && $var_sortdir == "asc") ? " class=\"active\"" : "";
echo("<div class=\"sort-options\">
Sort order:
<a href=\"/external-news/list/date/desc/\"{$style[0]}>Newest first</a>
<a href=\"/external-news/list/date/asc/\"{$style[1]}>Oldest first</a>
<a href=\"/external-news/list/rank/desc/\"{$style[2]}>Highest ranked first</a>
<a href=\"/external-news/list/rank/asc/\"{$style[3]}>Lowest ranked first</a>
</div>
<div class=\"clear\"></div>");
echo("<div class=\"page-list page-list-top\">
{$page_list}
</div>");
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$rank = $item['Rank'];
echo(template_item($name, "external-news", $id, $comments, false, 0, $rank));
}
echo("<div class=\"page-list page-list-bottom\">
{$page_list}
</div>");
}
else
{
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_MALFORMED_DATA;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
?>

@ -1,43 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module is a wrapper for all modules related to the 'external news' section. */
if($var_page == "")
{
header("Location: /ext/list");
}
elseif($var_page == "list")
{
require("module.ext.list.php");
}
elseif($var_page == "item")
{
if($var_subpage == "comments")
{
$var_post = (isset($parts[$var_start + 4])) ? $parts[$var_start + 4] : "";
if(!empty($var_post) && $var_post == "post")
{
require("module.comments.post.php");
}
else
{
require("module.comments.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
elseif($var_page == "add")
{
require("module.ext.add.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>

@ -1,62 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module handles the thread listing. */
$categoryname = mysql_real_escape_string($var_id);
if($result = mysql_query_cached("SELECT * FROM forum_categories WHERE `UrlName`='{$categoryname}'"))
{
$category = $result->data[0];
$catname = utf8entities(stripslashes($category['Name']));
$catid = $category['Id'];
$catthreads = (is_numeric($category['Name'])) ? $category['Name'] : 0;
echo("<h2><a href=\"/forum\">Forum</a> &gt; {$catname}</h2>");
?>
<div class="forum-buttons">
<a href="/forum/category/<?php echo($var_id); ?>/new">Create new thread</a>
<div class="clear"></div>
</div>
<table class="forum-table">
<tr>
<th class="forum-header-threads-name">Thread Title</th>
<th class="forum-header-threads-replies">Replies</th>
</tr>
<?php
if($result = mysql_query_cached("SELECT * FROM forum_posts WHERE `CategoryId`='{$catid}' AND `ParentId`='0' ORDER BY `LastReplyTime` DESC", 10))
{
foreach($result->data as $post)
{
$teaser = cut_text(utf8entities(stripslashes($post['Body'])), 90);
$topic = utf8entities(stripslashes($post['Topic']));
echo("<tr>
<td class=\"forum-item-threads-name\">
<a class=\"forum-table-link\" href=\"/forum/post/{$post['Id']}\">
<div class=\"forum-table-name\">{$topic}</div>
<div class=\"forum-table-teaser\">{$teaser}</div>
</a>
</td>
<td class=\"forum-item-threads-replies\">{$post['Replies']}</td>
</tr>");
}
}
else
{
echo("<tr>
<td colspan=\"2\">There are no threads in this category yet.</td>
</tr>");
}
?>
</table>
<?php
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>

@ -1,46 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module handles the category overview. */
?>
<h2>Forum</h2>
<div class="forum-header">
Be sure to read the <a href="/static/forumrules">Forum Rules</a>! All posting is anonymous, no registration is necessary and no IPs are kept.
</div>
<table class="forum-table">
<tr>
<th class="forum-header-category-name">Category</th>
<th class="forum-header-category-threads">Threads</th>
<th class="forum-header-category-posts">Posts</th>
</tr>
<?php
$result = mysql_query_cached("SELECT * FROM forum_categories ORDER BY `Name` ASC", 10);
foreach($result->data as $category)
{
if($category['Posts'] > 0)
{
$posttime = date("F j, Y H:i:s", strtotime($category['LastPostTime']));
$lasttopic = utf8entities($category['LastPostTopic']);
$lastpost = "Last post: <strong>{$lasttopic}</strong> @ {$posttime}";
}
else
{
$lastpost = "There are no posts in this category yet.";
}
echo("<tr>
<td class=\"forum-item-category-name\">
<a class=\"forum-table-link\" href=\"/forum/category/{$category['UrlName']}\">
<div class=\"forum-table-name\">{$category['Name']}</div>
<div class=\"forum-table-date\">{$lastpost}</div>
</a>
</td>
<td class=\"forum-item-category-threads\">{$category['Threads']}</td>
<td class=\"forum-item-category-posts\">{$category['Posts']}</td>
</tr>");
}
?>
</table>

@ -1,47 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module is a wrapper for the forum. */
// /forum/category/1/post/new
// forum x 1 category post new
//echo("$var_section // $var_table // $var_id // $var_page // $var_subpage // $var_last");
if(empty($var_page))
{
require("module.forum.overview.php");
}
elseif($var_page == "category")
{
if(empty($var_subpage))
{
require("module.forum.category.php");
}
elseif($var_subpage == "new")
{
$var_mode = "thread";
require("module.forum.post.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
elseif($var_page == "post")
{
if(empty($var_subpage))
{
require("module.forum.view.php");
}
elseif($var_subpage == "reply")
{
$var_mode = "reply";
require("module.forum.post.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
?>

@ -1,160 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module handles the thread listing. */
if($var_mode == "thread")
{
// Post a new thread.
$categoryname = mysql_real_escape_string($var_id);
if($result = mysql_query_cached("SELECT * FROM forum_categories WHERE `UrlName`='{$categoryname}'"))
{
$category = $result->data[0];
if(!isset($_POST['submit']))
{
$catname = utf8entities($var_id);
$catrealname = utf8entities(stripslashes($category['Name']));
echo("");
echo("
<h2><a href=\"/forum\">Forum</a> &gt; <a href=\"/forum/category/{$catname}/\">{$catrealname}</a> &gt; New Thread</h2>
<div class=\"forum-reply\">
<form class=\"forum\" method=\"post\" action=\"/forum/category/{$catname}/new\">
<h3>Name</h3>
<input type=\"text\" name=\"name\" value=\"Anonymous\">
<h3>Topic Title</h3>
<input type=\"text\" name=\"topic\">
<h3>Contents</h3>
<textarea name=\"body\" style=\"height: 350px;\"></textarea>
<div class=\"forum-reply-button\">
<button type=\"submit\" name=\"submit\">Create thread &gt;&gt;</button>
<h3>Complete the captcha</h3>
" . template_captcha() . "
</div>
</form>
</div>
");
}
else
{
$recaptcha = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if($recaptcha->is_valid)
{
$name = (!empty($_POST['name'])) ? mysql_real_escape_string($_POST['name']) : "Anonymous";
$body = mysql_real_escape_string($_POST['body']);
$topic = mysql_real_escape_string($_POST['topic']);
$catname = mysql_real_escape_string($var_id);
$result = mysql_query_cached("SELECT Id FROM forum_categories WHERE `UrlName`='{$catname}'");
$catid = $result->data[0]['Id'];
if(!empty($body))
{
if(!empty($topic))
{
$parent = $result->data[0];
$query = "INSERT INTO forum_posts (`CategoryId`, `ParentId`, `Name`, `Topic`, `Posted`, `Body`, `Replies`, `LastReplyUser`, `LastReplyTime`)
VALUES ('{$catid}', '0', '{$name}', '{$topic}', CURRENT_TIMESTAMP, '{$body}', '0', '', CURRENT_TIMESTAMP)";
if(mysql_query($query))
{
$insid = mysql_insert_id();
mysql_query("UPDATE forum_categories SET `Posts`=`Posts`+1 , `Threads`=`Threads`+1 , `LastPostTime`=CURRENT_TIMESTAMP , `LastPostTopic`='{$topic}' WHERE `Id`='{$catid}'");
echo("<p><strong>Your post was successful!</strong> It may take a few seconds to appear.</p>
<p><a href=\"/forum/post/{$insid}/#p-{$insid}\" class=\"page-button\">&lt;&lt; go to thread</a></p>");
}
else
{
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_POST_TOPIC;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_POST_BODY;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_INCORRECT_CAPTCHA;
require("module.error.php");
}
}
}
}
elseif($var_mode == "reply")
{
// Post a reply to an existing thread.
$recaptcha = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if($recaptcha->is_valid)
{
$post_id = (is_numeric($var_id)) ? $var_id : 0;
$name = (!empty($_POST['name'])) ? mysql_real_escape_string($_POST['name']) : "Anonymous";
$body = mysql_real_escape_string($_POST['body']);
if(!empty($body))
{
if($result = mysql_query_cached("SELECT * FROM forum_posts WHERE `Id`='{$post_id}'"))
{
$parent = $result->data[0];
$query = "INSERT INTO forum_posts (`CategoryId`, `ParentId`, `Name`, `Topic`, `Posted`, `Body`, `Replies`, `LastReplyUser`, `LastReplyTime`)
VALUES ('{$parent['CategoryId']}', '{$post_id}', '{$name}', '', CURRENT_TIMESTAMP, '{$body}', '0', '', CURRENT_TIMESTAMP)";
if(mysql_query($query))
{
$insid = mysql_insert_id();
$topic = mysql_real_escape_string(stripslashes($parent['Topic']));
mysql_query("UPDATE forum_categories SET `Posts`=`Posts`+1 , `LastPostTime`=CURRENT_TIMESTAMP , `LastPostTopic`='{$topic}' WHERE `Id`='{$parent['CategoryId']}'");
mysql_query("UPDATE forum_posts SET `Replies`=`Replies`+1 , `LastReplyUser`='{$name}' , `LastReplyTime`=CURRENT_TIMESTAMP WHERE `Id`='{$post_id}'");
echo("<p><strong>Your post was successful!</strong> It may take a few seconds to appear.</p>
<p><a href=\"/forum/post/{$post_id}/#p-{$insid}\" class=\"page-button\">&lt;&lt; back to thread</a></p>");
}
else
{
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_POST_BODY;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_INCORRECT_CAPTCHA;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>

@ -1,54 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module handles the thread listing. */
$post_id = (is_numeric($var_id)) ? $var_id : 0;
if($result = mysql_query_cached("SELECT * FROM forum_posts WHERE `Id`='{$var_id}' AND `ParentId`='0'", 5))
{
$post = $result->data[0];
$query = "SELECT * FROM forum_categories WHERE `Id`='{$post['CategoryId']}'";
if($category = mysql_query_cached($query)->data[0])
{
$topic = utf8entities(stripslashes($post['Topic']));
$caturlname = utf8entities(stripslashes($category['UrlName']));
$catname = utf8entities(stripslashes($category['Name']));
echo("<h2><a href=\"/forum\">Forum</a> &gt; <a href=\"/forum/category/{$caturlname}/\">{$catname}</a> &gt; {$topic}</h2>");
echo(template_post($post));
$query = "SELECT * FROM forum_posts WHERE `ParentId`='{$post['Id']}'";
if($children = mysql_query_cached($query, 5))
{
foreach($children->data as $child)
{
echo(template_post($child));
}
}
echo("<div class=\"forum-reply\">
<h3>Post a reply</h3>
<form class=\"forum\" method=\"post\" action=\"/forum/post/{$var_id}/reply\">
<input type=\"text\" name=\"name\" value=\"Anonymous\">
<textarea name=\"body\"></textarea>
<div class=\"forum-reply-button\">
<button type=\"submit\" name=\"submit\">Post reply &gt;&gt;</button>
" . template_captcha() . "
</div>
</form>
</div>");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>

@ -1,196 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module takes care of the home page. */
$result = mysql_query_cached("SELECT COUNT(*) FROM press WHERE `Deleted`='0' AND `Approved`='1'", 600);
$total_press = $result->data[0]['COUNT(*)'];
$result = mysql_query_cached("SELECT COUNT(*) FROM ext WHERE `Deleted`='0' AND `Visible`='1'", 600);
$total_ext = $result->data[0]['COUNT(*)'];
$result = mysql_query_cached("SELECT COUNT(*) FROM sites WHERE `Deleted`='0' AND `Approved`='1'", 600);
$total_sites = $result->data[0]['COUNT(*)'];
if($site_messages_enabled === true)
{
$sitemsg_id = floor(rand(0, count($site_messages)-1));
$i = 0;
$sitemsg_url = "";
$sitemsg_message = "";
foreach($site_messages as $key => $message)
{
if($i == $sitemsg_id)
{
$sitemsg_url = $key;
$sitemsg_message = $message;
}
$i += 1;
}
echo("<div class=\"section-wrapper\">
<a class=\"header-button\" style=\"float: none; display: block;\" href=\"$sitemsg_url\" target=\"_blank\">$sitemsg_message</a>
<div class=\"clear\"></div>
</div>");
}
?>
<div class="section-wrapper">
<div class="section-header">
<?php echo($lang[3]); ?>
<a href="#" class="tab-active" onclick="switchTab(this); $('#load_press')[0].style.display = 'block'; $('#container_press').load('process.frontpage.php?q=press_overview', function(){$('#load_press')[0].style.display = 'none';}); return false;">Overview</a>
<a href="/press/list/upvotes/desc/" class="tab" onclick="switchTab(this); $('#load_press')[0].style.display = 'block'; $('#container_press').load('process.frontpage.php?q=press_top', function(){$('#load_press')[0].style.display = 'none';}); return false;">Highest rated</a>
<a href="/press/list/date/desc/" class="tab" onclick="switchTab(this); $('#load_press')[0].style.display = 'block'; $('#container_press').load('process.frontpage.php?q=press_latest', function(){$('#load_press')[0].style.display = 'none';}); return false;">Most recent</a>
</div>
<div class="section">
<span id="container_press">
<?php
$query = "SELECT * FROM press WHERE `Deleted`='0' AND `Approved`='1' AND `Posted` >= DATE_SUB(CURRENT_DATE(), INTERVAL {$recent_days} DAY) ORDER BY `Upvotes` DESC LIMIT 3";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$upvotes = $item['Upvotes'];
echo(template_item($name, "press", $id, $comments, true, $upvotes, 0));
}
}
$query = "SELECT * FROM press WHERE `Deleted`='0' AND `Approved`='1' ORDER BY `Posted` DESC LIMIT 3";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$upvotes = $item['Upvotes'];
echo(template_item($name, "press", $id, $comments, false, $upvotes, 0));
}
}
?>
</span>
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzozM2l5cW90ZWNhY2NoazczY295NHd5YjY0aTp6YjM3aXpiNW5mZmtzc243eDRhaGM3dm10cWpzbHpub21leWdjYjJsbGN3Y3lmM3p4YzVxOjM6NjoyNTQ1/loading.gif" class="loader" id="load_press">
<a href="/press/list/date/desc/" class="section-button">More (<?php echo($total_press); ?>) <span class="bold">&gt;&gt;</span></a>
<a href="/press/add/" class="section-button"><span class="bold">+</span> Add</a>
<div class="clear"></div>
</div>
</div>
<div class="section-wrapper">
<div class="section-header">
<?php echo($lang[6]); ?>
</div>
<div class="section">
<?php
$query = "SELECT * FROM ext WHERE `Deleted`='0' AND `Visible`='1' ORDER BY `Posted` DESC LIMIT 4";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$rank = $item['Rank'];
echo(template_item($name, "external-news", $id, $comments, false, 0, $rank));
}
}
?>
<a href="/external-news/list/date/desc/" class="section-button">More (<?php echo($total_ext); ?>) <span class="bold">&gt;&gt;</span></a>
<a href="/external-news/add/" class="section-button"><span class="bold">+</span> Add</a>
<div class="clear"></div>
</div>
</div>
<div class="section-wrapper">
<div class="section-header">
<?php echo($lang[4]); ?>
<a href="#" class="tab-active" onclick="switchTab(this); $('#load_topext')[0].style.display = 'block'; $('#container_topext').load('process.frontpage.php?q=ext_top_7days', function(){$('#load_topext')[0].style.display = 'none';}); return false;">Last <?php echo($recent_days); ?> days</a>
<a href="#" class="tab" onclick="switchTab(this); $('#load_topext')[0].style.display = 'block'; $('#container_topext').load('process.frontpage.php?q=ext_top_all', function(){$('#load_topext')[0].style.display = 'none';}); return false;">Forever</a>
</div>
<div class="section">
<span id="container_topext">
<?php
$query = "SELECT * FROM ext WHERE `Deleted`='0' AND `Visible`='1' AND `Posted` >= DATE_SUB(CURRENT_DATE(), INTERVAL {$recent_days} DAY) ORDER BY `Rank` DESC LIMIT 4";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$rank = $item['Rank'];
echo(template_item($name, "external-news", $id, $comments, false, 0, $rank));
}
}
?>
</span>
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzozM2l5cW90ZWNhY2NoazczY295NHd5YjY0aTp6YjM3aXpiNW5mZmtzc243eDRhaGM3dm10cWpzbHpub21leWdjYjJsbGN3Y3lmM3p4YzVxOjM6NjoyNTQ1/loading.gif" class="loader" id="load_topext">
<a href="/external-news/list/rank/desc/" class="section-button">More (<?php echo($total_ext); ?>) <span class="bold">&gt;&gt;</span></a>
<a href="/external-news/add/" class="section-button"><span class="bold">+</span> Add</a>
<div class="clear"></div>
</div>
</div>
<div class="section-wrapper">
<div class="section-header">
<?php echo($lang[5]); ?>
<a href="#" class="tab-active" onclick="switchTab(this); $('#load_bottomext')[0].style.display = 'block'; $('#container_bottomext').load('process.frontpage.php?q=ext_bottom_7days', function(){$('#load_bottomext')[0].style.display = 'none';}); return false;">Last <?php echo($recent_days); ?> days</a>
<a href="#" class="tab" onclick="switchTab(this); $('#load_bottomext')[0].style.display = 'block'; $('#container_bottomext').load('process.frontpage.php?q=ext_bottom_all', function(){$('#load_bottomext')[0].style.display = 'none';}); return false;">Forever</a>
</div>
<div class="section">
<span id="container_bottomext">
<?php
$query = "SELECT * FROM ext WHERE `Deleted`='0' AND `Visible`='1' AND `Posted` >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) ORDER BY `Rank` ASC LIMIT 4";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$rank = $item['Rank'];
echo(template_item($name, "external-news", $id, $comments, false, 0, $rank));
}
}
?>
</span>
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzozM2l5cW90ZWNhY2NoazczY295NHd5YjY0aTp6YjM3aXpiNW5mZmtzc243eDRhaGM3dm10cWpzbHpub21leWdjYjJsbGN3Y3lmM3p4YzVxOjM6NjoyNTQ1/loading.gif" class="loader" id="load_bottomext">
<a href="/external-news/list/rank/asc/" class="section-button">More (<?php echo($total_ext); ?>) <span class="bold">&gt;&gt;</span></a>
<a href="/external-news/add/" class="section-button"><span class="bold">+</span> Add</a>
<div class="clear"></div>
</div>
</div>
<div class="section-wrapper">
<div class="section-header">
<?php echo($lang[7]); ?>
</div>
<div class="section">
<?php
$query = "SELECT * FROM sites WHERE `Deleted`='0' AND `Approved`='1' ORDER BY `Posted` DESC LIMIT 4";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
echo(template_item($name, "related-sites", $id, $comments, false, 0, 0));
}
}
?>
<a href="/related-sites/list/desc/" class="section-button">More (<?php echo($total_sites); ?>) <span class="bold">&gt;&gt;</span></a>
<a href="/related-sites/add/" class="section-button"><span class="bold">+</span> Add</a>
<div class="clear"></div>
</div>
</div>

@ -1,23 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
$sId = (is_numeric($var_page)) ? $var_page : 0;
switch($var_id)
{
case "external-news":
$sTable = "ext";
break;
case "press":
$sTable = "press";
break;
case "related-sites":
$sTable = "sites";
break;
default:
die($var_id);
}
mysql_query("UPDATE {$sTable} SET `Approved` = '1' WHERE `Id` = '{$sId}'");
?>

@ -1,34 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
if(isset($_POST['submit']))
{
// Process login.
$sUsername = mysql_real_escape_string($_POST['username']);
$sPassword = sha1($_POST['password']);
if($result = mysql_query_cached("SELECT * FROM mods WHERE `Username` = '{$sUsername}' AND `Hash` = '{$sPassword}'"))
{
$_SESSION['loggedin'] = true;
$_SESSION['userid'] = $result->data[0]['Id'];
$_SESSION['accesslevel'] = $result->data[0]['AccessLevel'];
echo("Successfully logged in! <a href=\"/moderation/\">Continue...</a>");
}
else
{
echo("The login details you entered are incorrect.");
}
}
else
{
// Show login form
echo("
<form method=\"post\" action=\"/moderation/login/\">
<strong>Log in to access the moderator panel.</strong><br>
Username: <input type=\"text\" name=\"username\"><br>
Password: <input type=\"password\" name=\"password\"><br>
<button type=\"submit\" name=\"submit\" value=\"submit\">Log in</button>
</form>
");
}
?>

@ -1,74 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
echo("<h2>Moderation panel</h2>");
echo("<h3>Press releases</h3>");
if($result = mysql_query_cached("SELECT * FROM press WHERE `Approved` = '0' AND `Deleted` = '0' ORDER BY `Posted` ASC LIMIT 30", 2))
{
foreach($result->data as $item)
{
$sTitle = utf8entities(stripslashes($item['Name']));
$sId = $item['Id']; // PRIMARY KEY, safe to assign
echo("<div class=\"mod-item\">
<a href=\"/press/item/{$sId}/\" target=\"_blank\">{$sTitle}</a>
<a href=\"/moderation/item/press/{$sId}/approve/\" class=\"mod-approve\">Approve</a>
<a href=\"/moderation/item/press/{$sId}/reject/\" class=\"mod-reject\">Reject</a>
</div>");
}
}
else
{
echo("No unmoderated press releases.");
}
echo("<div class=\"mod-spacer\"></div><h3>External news sources</h3>");
if($result = mysql_query_cached("SELECT * FROM ext WHERE `Deleted` = '0' AND `Approved` = '0' ORDER BY `Visible` DESC LIMIT 100", 2))
{
foreach($result->data as $item)
{
$sUrl = htmlspecialchars(stripslashes($item['Url']));
$sTitle = utf8entities(stripslashes($item['Name']));
$sId = $item['Id']; // PRIMARY KEY, safe to assign
echo("<div class=\"mod-item\">
<a href=\"{$sUrl}\" target=\"_blank\">{$sTitle}</a>
<a href=\"/moderation/item/external-news/{$sId}/approve/\" class=\"mod-approve\">Approve</a>
<a href=\"/moderation/item/external-news/{$sId}/reject/\" class=\"mod-reject\">Reject</a>
<div class=\"mod-url\">{$sUrl}</div>
</div>");
}
}
else
{
echo("No unmoderated external news sources.");
}
echo("<div class=\"mod-spacer\"></div><h3>Related sites</h3>");
if($result = mysql_query_cached("SELECT * FROM sites WHERE `Deleted` = '0' AND `Approved` = '0' ORDER BY `Id` ASC LIMIT 100", 2))
{
foreach($result->data as $item)
{
$sUrl = htmlspecialchars(stripslashes($item['Url']));
$sTitle = utf8entities(stripslashes($item['Name']));
$sId = $item['Id']; // PRIMARY KEY, safe to assign
echo("<div class=\"mod-item\">
<a href=\"{$sUrl}\" target=\"_blank\">{$sTitle}</a>
<a href=\"/moderation/item/external-news/{$sId}/approve/\" class=\"mod-approve\">Approve</a>
<a href=\"/moderation/item/external-news/{$sId}/reject/\" class=\"mod-reject\">Reject</a>
<div class=\"mod-url\">{$sUrl}</div>
</div>");
}
}
else
{
echo("No unmoderated related sites.");
}
//$result = mysql_query_cached("SELECT * FROM sites WHERE `Approved` = '0'", 2);
?>

@ -1,66 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module is a wrapper for the moderation panel. */
// /forum/category/1/post/new
// forum x 1 category post new
//echo("$var_section // $var_table // $var_id // $var_page // $var_subpage // $var_last");
if(isset($_SESSION['loggedin']))
{
if(empty($var_page))
{
require("module.moderation.overview.php");
}
elseif($var_page == "item")
{
if(empty($var_subpage))
{
require("module.moderation.item.php");
}
elseif($var_last == "approve" || $var_last == "reject")
{
require("module.moderation.process.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
elseif($var_page == "blacklist")
{
if($_SESSION['accesslevel'] > 5)
{
if(empty($var_id))
{
require("module.forum.blacklist.overview.php");
}
elseif($var_id == "add")
{
require("module.forum.blacklist.add.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
else
{
echo("You do not have sufficient rights to view this page.");
}
}
}
else
{
if($var_page == "login")
{
require("module.moderation.login.php");
}
else
{
echo("<strong>You are not logged in.</strong> Please <a href=\"/moderation/login/\">log in</a> to start moderating.");
}
}
?>

@ -1,42 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
$sId = (is_numeric($var_subpage)) ? $var_subpage : 0;
switch($var_id)
{
case "external-news":
$sTable = "ext";
break;
case "press":
$sTable = "press";
break;
case "related-sites":
$sTable = "sites";
break;
default:
die();
}
if($var_last == "approve")
{
$visible = ($sTable == "ext") ? ", `Visible` = '1'" : "";
$query = "UPDATE {$sTable} SET `Approved` = '1'{$visible}, `Mod` = '{$_SESSION['userid']}' WHERE `Id` = '{$sId}'";
$message = "The item has been approved.";
}
elseif($var_last == "reject")
{
$query = "UPDATE {$sTable} SET `Deleted` = '1', `Mod` = '{$_SESSION['userid']}' WHERE `Id` = '{$sId}'";
$message = "The item has been rejected.";
}
if(!mysql_query($query))
{
echo("An error occurred.");
}
else
{
echo($message);
}
?>

@ -1,252 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module allows a user to submit a new press release. */
if(check_banlist() == false)
{
if(empty($var_id))
{
// Stage 0: The page with guidelines.
?>
<h2>Read these guidelines. Not reading them may get you banned.</h2>
<p><strong>While no censorship based on opinion, views, etc. takes place on AnonNews, there are several guidelines in place to keep content on the site relevant.</strong>
Read these guidelines completely before submitting a press release. Not reading them may get you banned.</p>
<p><strong>This is not a forum.</strong> Opinion posts, questions to anons, and other similar things do not belong here. <a href="/forum">Use the forum.</a></p>
<p><strong>AnonNews is about Anonymous.</strong> While you may think your local political party, a phone tapping scandal, or anything else is important, this is not the place for personal army requests.
If you wish to discuss a topic that may be of interest to other anons, you can do so on the <a href="/forum">forum</a>. If it's not a press release or manifesto from Anonymous, it doesn't belong here - period.</p>
<p><strong>Format your press releases properly.</strong> Press releases and manifestos are expected to be readable and in proper formatting. While we certainly don't expect perfect grammar, a press
release that uses an abbreviation every other word or contains excessive 'leetspeak' is not going to be accepted. If your press release is in bright pink with images of red flowers on the side, it will
probably not be accepted either.</p>
<p><strong>No copypasting.</strong> This section is intended for those that wish to submit a press release about an operation they are involved with (not necessarily being part of staff). Don't copypaste
news articles or press releases from others that you have nothing to do with. Submitting it for someone else who is involved with an operation, is of course not an issue at all.</p>
<p><strong>You are not the leader of Anonymous. Noone is.</strong> Don't try to imply that <em>all</em> of Anonymous agrees with something or condemns it - your press release will be rejected. Unless you
have talked through your press release with literally every single anon out there, you cannot speak for all of them. Making a generic 'from Anonymous' statement is fine, as long as you don't try to say that
'person X and operation Y were not Anonymous' or try to impose alleged 'universal values or ideologies' onto Anonymous - they simply do not exist.</p>
<p><strong>On the IP retention policy: we normally do not store IP addresses of anyone submitting content to AnonNews (feel free to use TOR or a proxy to be completely sure). If you hit a spam filter,
however (there is almost zero chance for a false positive), your IP may be recorded and banned. If an IP is incorrectly recorded (a false positive) it will be reviewed and removed from the log within 24 hours, without exception.</strong></p>
<p><form method="GET" action="/press/add/form/">
If you have read the guidelines, <button name="submit" type="submit">click here to submit your press release.</button>
</form></p>
<?php
}
else
{
if($var_id == "form")
{
// Stage 1: Entering the actual press release information.
?>
<h2>Submit a press release</h2>
<form enctype="multipart/form-data" method="POST" action="/press/add/submit/" class="submission">
<input type="hidden" name="js_enabled" value="false" id="input_js_enabled">
<script type="text/javascript">
$(function(){
$('#input_js_enabled').val("true");
$('#notice_javascript').css({'display':'none'});
});
</script>
<h4>Press release title</h4>
<input type="text" name="title">
<h4>Press release text</h4>
<div class="form-notice" id="notice_javascript">
To make use of the WYSIWYG editor, Javascript is required. If Javascript is turned off, you can make use of HTML instead - line breaks will automatically be inserted.
</div>
<textarea name="body"></textarea>
<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "spellchecker,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,undo,redo,|,link,unlink,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Office example CSS
content_css : "css/office.css",
});
</script>
<h4>Upload an image (optional)</h4>
<div class="form-notice">
Allowed: PNG, GIF, JPG. Maximum filesize: 20MB. <strong>If possible, please use PNG instead of JPG for better image quality.</strong>
</div>
<input type="hidden" name="MAX_FILE_SIZE" value="20000000">
<input name="file" type="file" class="upload">
<h4>Tags (optional)</h4>
<div class="form-notice">
Enter comma-separated tags here, that indicate what the article is about. This will make it easier to find on the site.
</div>
<input type="text" name="tags" id="input_tags" value="">
<h4>Press Release Language</h4>
<select name="language">
<?php
foreach($languages as $iso => $lang)
{
echo("<option value=\"{$iso}\">{$lang}</option>");
}
?>
</select>
<h4>Complete the CAPTCHA</h4>
<?php echo(template_captcha()); ?>
<div class="submit">
<button type="submit" name="submit" onclick="$('#submit_loader').css({'display':'block'}); $(this).css({'display':'none'}); return true;">Submit press release &gt;&gt;</button>
</div>
<div class="submit-loader" id="submit_loader">
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpuMzRqdGlhb3gycGxxbnZjZm5hM3k1NzdyYTpsbDRvNzc1Z2FsYjVmdzVqd3Q2ems0aGQ0bGd2ZXMzZHl1YXRkZHVwa2p0YXFnbmdtMmlxOjM6NjoxMDgxOQ==/loader-wide.gif"><br>
<strong>Submitting press release... (this may take a while!)</strong>
</div>
</form>
<?php
}
elseif($var_id == "submit")
{
// Stage 2: Processing the upload and press release.
$recaptcha = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if($recaptcha->is_valid)
{
$error = false;
if(isset($_FILES['file']) && $_FILES['file']['error'] == 0)
{
$file_uploaded = true;
if(ends_with($_FILES['file']['name'], ".jpg") || ends_with($_FILES['file']['name'], ".jpeg") || ends_with($_FILES['file']['name'], ".png") || ends_with($_FILES['file']['name'], ".gif"))
{
if($_FILES['file']['size'] <= 20000000)
{
$upload_result = curl_put("{$tahoe_server}/uri", $_FILES['file']['tmp_name']);
if($upload_result !== false)
{
$upload_b64 = urlsafe_b64encode($upload_result);
$upload_url = "/download/$upload_b64/{$_FILES['file']['name']}";
}
}
else
{
$error = true;
$var_code = ANONNEWS_ERROR_TOO_LARGE; // Upload filesize error
require("module.error.php");
}
}
else
{
$error = true;
$var_code = ANONNEWS_ERROR_INCORRECT_FORMAT; // Upload file format error
require("module.error.php");
}
}
elseif(isset($_FILES['file']) && $_FILES['file']['error'] == 4)
{
// No file was uploaded.
$file_uploaded = false;
}
else
{
$error = true;
$var_code = ANONNEWS_ERROR_UPLOAD_ERR; // Generic upload error
require("module.error.php");
}
if($error === false)
{
// Either no file was uploaded or the file was successfully uploaded, continue...
if(!empty($_POST['title']))
{
if(!empty($_POST['body']))
{
if($file_uploaded === false)
{
$upload_url = "";
}
$body = $_POST['body'];
if($_POST['js_enabled'] === "false")
{
$body = nl2br($body, false);
}
$body = mysql_real_escape_string(str_replace("javascript:", "",strip_tags_attributes($body,
"<a><b><i><u><span><div><p><br><hr><font><ul><li><ol><dt><dd><h1><h2><h3><h4><h5><h6><h7><del><map><area><strong><em><big><small><sub><sup><ins><pre><blockquote><cite><q><center><marquee><table><tr><td><th>",
"href,src,alt,class,style,align,valign,color,face,size,width,height,shape,coords,target,border,cellpadding,cellspacing,colspan,rowspan")));
$title = mysql_real_escape_string($_POST['title']);
$language = mysql_real_escape_string($_POST['language']);
$query = "INSERT INTO press (`Name`, `Body`, `CommentCount`, `Deleted`, `Approved`, `Attachment`, `Upvotes`, `Mod`, `ExternalAttachment`, `Language`, `Posted`)
VALUES ('{$title}', '{$body}', '0', '0', '0', '{$upload_url}', '0', '', '1', '{$language}', CURRENT_TIMESTAMP)";
if(mysql_query($query))
{
$insert_id = mysql_insert_id();
if(!empty($_POST['tags']))
{
// tags were entered.
$tags = $_POST['tags'];
$tags_list = explode(",", $tags);
foreach($tags_list as $tag)
{
$tag = mysql_real_escape_string(trim(clean_tag($tag)));
if(!empty($tag))
{
$query = "INSERT INTO tags (`Table`, `ItemId`, `TagName`) VALUES ('press', '{$insert_id}', '$tag')";
mysql_query($query);
}
}
}
echo("<p><strong>Your press release was successfully submitted.</strong> It will have to be approved before it appears on the front page.</p>
<p><a href=\"/\" class=\"page-button\">&lt;&lt; back to front page</a></p>");
}
else
{
echo(mysql_error());
$var_code = ANONNEWS_ERROR_DATABASE_ERROR; // Generic upload error
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_EMPTY_BODY; // Empty body
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_EMPTY_TITLE; // Empty title
require("module.error.php");
}
}
}
else
{
$var_code = ANONNEWS_ERROR_INCORRECT_CAPTCHA;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
}
else
{
$var_code = ANONNEWS_ERROR_BANNED; // Banned from submission.
require("module.error.php");
}
?>

@ -1,67 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module shows a specific press release. */
if(is_numeric($var_id))
{
$id = mysql_real_escape_string($var_id);
$approved = " AND `Approved` = '1'";
if(isset($_SESSION['loggedin']))
{
$approved = "";
}
$query = "SELECT Name, Body, Attachment, ExternalAttachment, CommentCount FROM press WHERE `Id` = '$id'{$approved}";
if($result = mysql_query_cached($query))
{
$title = utf8entities(stripslashes($result->data[0]['Name']));
$body = youtubify(filter_extended(stripslashes($result->data[0]['Body'])));
$externalattachment = $result->data[0]['ExternalAttachment'];
$attachment = utf8entities(stripslashes($result->data[0]['Attachment']));
$commentcount = $result->data[0]['CommentCount'];
echo("<div class=\"pressrelease\">
<a class=\"hl-comments\" href=\"/press/item/{$id}/comments/\"><strong>Join the conversation!</strong> {$commentcount} comment(s) already posted - click to post one yourself, anonymously of course.</a>
<h5>$title</h5>");
if(!empty($attachment))
{
if($externalattachment == 1)
{
$image = $tahoe_gateway . $attachment;
}
else
{
$image = "/" . $attachment;
}
echo("<div class=\"pressrelease-image\">
<img src=\"$image\" alt=\"$title image\" width=\"900\">
</div>");
}
echo("$body
<a class=\"hl-comments\" href=\"/press/item/{$id}/comments/\"><strong>Join the conversation!</strong> {$commentcount} comment(s) already posted - click to post one yourself, anonymously of course.</a>
</div>
<script type=\"text/javascript\">
$(function(){
$(document).ready(function(){
//resizeImage();
});
});
</script>");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>

@ -1,127 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module lists all press releases in a specified order. */
/* Note: internal page numbering starts at 0. */
$var_sort = "date";
if(!empty($var_id))
{
if($var_id == "upvotes")
{
$var_sort = "upvotes";
}
}
$var_sortdir = "desc";
if(!empty($var_subpage))
{
if($var_subpage == "asc")
{
$var_sortdir = "asc";
}
}
$query = "SELECT COUNT(*) FROM press WHERE `Approved` = '1' AND `Deleted` = '0'";
if($result = mysql_query_cached($query))
{
if(isset($result->data[0]))
{
$total_records = $result->data[0]['COUNT(*)'];
$per_page = 20;
if(!empty($var_last) && is_numeric($var_last) && $var_last > 0)
{
$var_page = mysql_real_escape_string($var_last - 1);
}
else
{
$var_page = 0;
}
$start = $var_page * $per_page;
$last_page = floor($total_records / $per_page);
if($start >= $total_records)
{
$start = $total_pages * $per_page;
}
$page_list = "";
if($var_page > 0)
{
$p = $var_page;
$page_list .= "<a href=\"/press/list/{$var_sort}/{$var_sortdir}/{$p}/\"><< previous</a><span class=\"spacer\"> </span>";
}
for($i = 0; $i <= $last_page; $i++)
{
$p = $i + 1;
$current = ($var_page == $i) ? " class=\"current\"" : "";
$page_list .= "<a href=\"/press/list/{$var_sort}/{$var_sortdir}/{$p}/\"{$current}>{$p}</a><span class=\"spacer\"> </span>";
}
if($var_page < $last_page)
{
$p = $var_page + 2;
$page_list .= "<a href=\"/press/list/{$var_sort}/{$var_sortdir}/{$p}/\">next >></a>";
}
$query_sort = ($var_sort == "date") ? "Posted" : "Upvotes";
$query_dir = ($var_sortdir == "asc") ? "ASC" : "DESC";
$query = "SELECT Id, Name, CommentCount, Upvotes FROM press WHERE `Approved` = '1' AND `Deleted` = '0' ORDER BY `{$query_sort}` {$query_dir} LIMIT {$start},{$per_page}";
if($result = mysql_query_cached($query))
{
$style[0] = ($var_sort == "date" && $var_sortdir == "desc") ? " class=\"active\"" : "";
$style[1] = ($var_sort == "date" && $var_sortdir == "asc") ? " class=\"active\"" : "";
$style[2] = ($var_sort == "upvotes" && $var_sortdir == "desc") ? " class=\"active\"" : "";
$style[3] = ($var_sort == "upvotes" && $var_sortdir == "asc") ? " class=\"active\"" : "";
echo("<div class=\"sort-options\">
Sort order:
<a href=\"/press/list/date/desc/\"{$style[0]}>Newest first</a>
<a href=\"/press/list/date/asc/\"{$style[1]}>Oldest first</a>
<a href=\"/press/list/upvotes/desc/\"{$style[2]}>Highest ranked first</a>
<a href=\"/press/list/upvotes/asc/\"{$style[3]}>Lowest ranked first</a>
</div>
<div class=\"clear\"></div>");
echo("<div class=\"page-list page-list-top\">
{$page_list}
</div>");
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$upvotes = $item['Upvotes'];
echo(template_item($name, "press", $id, $comments, false, $upvotes, 0));
}
echo("<div class=\"page-list page-list-bottom\">
{$page_list}
</div>");
}
}
else
{
$var_code = ANONNEWS_ERROR_MALFORMED_DATA;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
?>

@ -1,47 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module is a wrapper for all press release-related modules. */
if($var_page == "")
{
header("Location: /press/list");
}
elseif($var_page == "list")
{
require("module.press.list.php");
}
elseif($var_page == "item")
{
if($var_subpage == "comments")
{
$var_post = (isset($parts[$var_start + 4])) ? $parts[$var_start + 4] : "";
if(!empty($var_post) && $var_post == "post")
{
require("module.comments.post.php");
}
else
{
require("module.comments.php");
}
}
elseif($var_subpage == "")
{
require("module.press.item.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
elseif($var_page == "add")
{
require("module.press.add.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>

@ -1,303 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module allows a user to submit a new external news item. */
if(check_banlist() == false)
{
if(empty($var_id))
{
// Stage 0: The page with guidelines.
?>
<h2>Read these guidelines. Not reading them may get you banned.</h2>
<p><strong>While no censorship based on opinion, views, etc. takes place on AnonNews, there are several guidelines in place to keep content on the site relevant.</strong>
Read these guidelines completely before submitting a related site. Not reading them may get you banned.</p>
<p><strong>This section is solely for Anonymous-related websites.</strong> The site must represent a group or 'part' of Anonymous. Examples are IRC networks, Anonymous event planners, specific
Anonymous-related news sites or blogs, and so on.</p>
<p><strong>Related sites have to be notable.</strong> This essentially means that your blog with 20 visitors a day and 3 total posts is not going to be accepted. An (almost) empty website is not going
to be accepted either. For networks/groups/'cells', there must be an established userbase already. Websites run by one person will only be accepted if they offer considerable value (your blog
with weekly opinion posts will probably not get accepted, whereas a blog with frequent news about various Anonymous groups will be accepted).</p>
<p><strong>This is not Craigslist.</strong> This is not a place to advertise your new site - this section is intended to help people find useful Anonymous-related resources that already exist.
If you are looking to start something new, and you're looking for people to join, the <a href="/forum">forums</a> would be a better place.</p>
<p><strong>Only very few entries will be accepted.</strong> The intention is to keep this section as small as possible, offering a brief overview of related resources for people that want to
learn more about Anonymous or get actively involved with it. Only the most notable and useful submissions will be accepted.</p>
<p><strong>Keep the submission title to the point.</strong> The title must be the name of the site, or, if it doesn't have a name, a brief description of what the site is. No slogans, no URLs,
no explanations - keep that for the site itself.</p>
<p><form method="GET" action="/related-sites/add/form/">
If you have read the guidelines, <button name="submit" type="submit">click here to submit your related site.</button>
</form></p>
<?php
}
else
{
if($var_id == "form")
{
// Stage 1: Entering the URL.
?>
<h2>Submit a related site</h2>
<form method="POST" action="/related-sites/add/check/" class="submission">
<h3>First of all, enter a URL. After the URL has been checked and found to be valid, you will be able to enter the rest.</h3>
<h4>Article URL</h4>
<input type="text" name="url" id="input_url" class="empty" value="http://">
<script type="text/javascript">
$(function(){
$('#input_url').focus(function(){
if($('#input_url').val() == "http://")
{
$('#input_url').val("");
}
$('#input_url').removeClass("empty");
});
$('#input_url').blur(function(){
if($('#input_url').val() == "")
{
$('#input_url').val("http://");
$('#input_url').addClass("empty");
}
});
});
</script>
<div class="submit">
<button type="submit" name="submit" onclick="$('#submit_loader').css({'display':'block'}); $(this).css({'display':'none'}); return true;">Submit URL &gt;&gt;</button>
</div>
<div class="submit-loader" id="submit_loader">
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpuMzRqdGlhb3gycGxxbnZjZm5hM3k1NzdyYTpsbDRvNzc1Z2FsYjVmdzVqd3Q2ems0aGQ0bGd2ZXMzZHl1YXRkZHVwa2p0YXFnbmdtMmlxOjM6NjoxMDgxOQ==/loader-wide.gif"><br>
<strong>Scanning URL... (this may take a while!)</strong>
</div>
</form>
<?php
}
elseif($var_id == "check")
{
// Stage 2: Verifying that the URL is indeed valid. If it is valid, suggest a title and allow the user to enter more details
if(spam_score($_POST['url'], "", false) < 10)
{
$request = curl_head($_POST['url']);
if($request->code == 999)
{
$var_code = ANONNEWS_ERROR_MALFORMED_DATA;
require("module.error.php");
}
elseif($request->code == 300 || $request->code == 301 || $request->code == 302)
{
$var_code = ANONNEWS_ERROR_SHORTENER_DETECTED;
require("module.error.php");
}
elseif($request->code == 200)
{
$request = curl_get($_POST['url']);
if(!preg_match("/<title>?(.*?)<\/title>/i", $request->result, $matches))
{
$title = "";
$title_desc = "No website title could be suggested. Please enter one yourself.";
}
else
{
$title = $matches[1];
$title_desc = "The below suggestion was made based on the full page title (<em>$title</em>). Make sure it's correct before submitting.";
$title_suggestion = utf8_entities_if_needed(suggest_title($title));
$raw_suggestion = html_entity_decode($title_suggestion, ENT_QUOTES, "UTF-8");
// Load noise dictionary, for tag generation
$noise = split_lines(file_get_contents_cached("english.dic")->data);
$noise = arraytolower($noise);
foreach(explode(" ", $raw_suggestion) as $tag)
{
$tag = trim(clean_tag($tag));
if(strlen(trim($tag)) > 1 && in_array(strtolower(trim($tag)), $noise) === false)
{
$tag_list[] = strtolower($tag);
}
}
$tag_list = array_unique($tag_list);
$tags_suggestion = utf8_entities_if_needed(implode(", ", $tag_list));
}
if($detect_language)
{
require_once("Text/LanguageDetect.php");
$detector = new Text_LanguageDetect;
$detected_language = $detector->detectSimple(strip_tags($request->result));
}
else
{
$detected_language = "English";
}
?>
<h2>Submit a related site</h2>
<form method="POST" action="/related-sites/add/submit/" class="submission">
<input type="hidden" name="url" value="<?php echo(utf8entities($_POST['url'])); ?>">
<h4>Website Title</h4>
<div class="form-notice">
<?php echo($title_desc); ?>
</div>
<input type="text" name="title" value="<?php echo($title_suggestion); ?>">
<h4>Tags (optional)</h4>
<div class="form-notice">
Enter comma-separated tags here, that indicate what the website is about. This will make it easier to find on the site.
</div>
<input type="text" name="tags" id="input_tags" value="<?php echo($tags_suggestion); ?>">
<h4>Website Language</h4>
<select name="language">
<?php
foreach($languages as $iso => $lang)
{
$sel = (strtolower($lang) == strtolower($detected_language)) ? " selected" : "";
echo("<option value=\"{$iso}\"{$sel}>{$lang}</option>");
}
?>
</select>
<div class="note">
Detected language: <?php echo($detected_language); ?>
</div>
<h4>Complete the CAPTCHA</h4>
<?php echo(template_captcha()); ?>
<div class="submit">
<button type="submit" name="submit" onclick="$('#submit_loader').css({'display':'block'}); $(this).css({'display':'none'}); return true;">Submit related site &gt;&gt;</button>
</div>
<div class="submit-loader" id="submit_loader">
<img src="http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpuMzRqdGlhb3gycGxxbnZjZm5hM3k1NzdyYTpsbDRvNzc1Z2FsYjVmdzVqd3Q2ems0aGQ0bGd2ZXMzZHl1YXRkZHVwa2p0YXFnbmdtMmlxOjM6NjoxMDgxOQ==/loader-wide.gif"><br>
<strong>Submitting related site... (this may take a while!)</strong>
</div>
</form>
<?php
}
else
{
$var_code = ANONNEWS_ERROR_NONEXISTENT_URL;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_URL_BLACKLISTED;
require("module.error.php");
}
}
elseif($var_id == "submit")
{
// Stage 3: Processing the submission.
$recaptcha = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if($recaptcha->is_valid)
{
if(!empty($_POST['title']))
{
if(!empty($_POST['url']))
{
// It will have to be approved before it appears on the front page.
$spam_score = spam_score($_POST['url'], $_POST['title'], false);
if($spam_score < 10)
{
$request = curl_head($_POST['url']);
if($request->code == 200)
{
$language = mysql_real_escape_string($_POST['language']);
$title = mysql_real_escape_string($_POST['title']);
$url = mysql_real_escape_string($_POST['url']);
$query = "INSERT INTO sites (`Name`, `Url`, `CommentCount`, `Deleted`, `Approved`, `Mod`, `Language`, `Posted`)
VALUES ('$title', '$url', '0', '0', '0', '', '{$language}', CURRENT_TIMESTAMP)";
if(mysql_query($query))
{
$insert_id = mysql_insert_id();
if(!empty($_POST['tags']))
{
// tags were entered.
$tags = $_POST['tags'];
$tags_list = explode(",", $tags);
foreach($tags_list as $tag)
{
$tag = mysql_real_escape_string(trim(clean_tag($tag)));
if(!empty($tag))
{
$query = "INSERT INTO tags (`Table`, `ItemId`, `TagName`) VALUES ('sites', '{$insert_id}', '$tag')";
mysql_query($query);
}
}
}
echo("<p><strong>Your related site was successfully submitted.</strong> It will have to be approved before it appears on the front page.</p>
<p><a href=\"/\" class=\"page-button\">&lt;&lt; back to front page</a></p>");
}
else
{
echo(mysql_error());
$var_code = ANONNEWS_ERROR_DATABASE_ERROR; // Generic upload error
require("module.error.php");
}
}
elseif($request->code == 300 || $request->code == 301 || $request->code == 302)
{
$var_code = ANONNEWS_ERROR_SHORTENER_DETECTED;
require("module.error.php");
}
else
{
$var_code = ANONNEWS_ERROR_NONEXISTENT_URL;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_SPAM;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_EMPTY_URL; // Empty body
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_EMPTY_TITLE; // Empty title
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_INCORRECT_CAPTCHA;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
}
else
{
$var_code = ANONNEWS_ERROR_BANNED; // Banned from submission.
require("module.error.php");
}
?>

@ -1,115 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module lists all press releases in a specified order. */
/* Note: internal page numbering starts at 0. */
$var_sortdir = "desc";
if(!empty($var_id))
{
if($var_id == "asc")
{
$var_sortdir = "asc";
}
}
$query = "SELECT COUNT(*) FROM sites WHERE `Deleted` = '0' AND `Approved` = '1'";
if($result = mysql_query_cached($query))
{
if(isset($result->data[0]))
{
$total_records = $result->data[0]['COUNT(*)'];
$per_page = 20;
if(!empty($var_subpage) && is_numeric($var_subpage) && $var_subpage > 0)
{
$var_page = mysql_real_escape_string($var_subpage - 1);
}
else
{
$var_page = 0;
}
$start = $var_page * $per_page;
$last_page = floor($total_records / $per_page);
if($start >= $total_records)
{
$start = $total_pages * $per_page;
}
$page_list = "";
if($var_page > 0)
{
$p = $var_page;
$page_list .= "<a href=\"/related-sites/list/{$var_sortdir}/{$p}/\"><< previous</a><span class=\"spacer\"> </span>";
}
for($i = 0; $i <= $last_page; $i++)
{
$p = $i + 1;
$current = ($var_page == $i) ? " class=\"current\"" : "";
$page_list .= "<a href=\"/related-sites/list/{$var_sortdir}/{$p}/\"{$current}>{$p}</a><span class=\"spacer\"> </span>";
}
if($var_page < $last_page)
{
$p = $var_page + 2;
$page_list .= "<a href=\"/related-sites/list/{$var_sortdir}/{$p}/\">next >></a>";
}
$query_dir = ($var_sortdir == "asc") ? "ASC" : "DESC";
$query = "SELECT Id, Name, CommentCount FROM sites WHERE `Approved` = '1' AND `Deleted` = '0' ORDER BY `Posted` {$query_dir} LIMIT {$start},{$per_page}";
if($result = mysql_query_cached($query))
{
$style[0] = ($var_sortdir == "desc") ? " class=\"active\"" : "";
$style[1] = ($var_sortdir == "asc") ? " class=\"active\"" : "";
echo("<div class=\"sort-options\">
Sort order:
<a href=\"/related-sites/list/desc/\"{$style[0]}>Newest first</a>
<a href=\"/related-sites/list/asc/\"{$style[1]}>Oldest first</a>
</div>
<div class=\"clear\"></div>");
echo("<div class=\"page-list page-list-top\">
{$page_list}
</div>");
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
echo(template_item($name, "related-sites", $id, $comments, false, 0, 0));
}
echo("<div class=\"page-list page-list-bottom\">
{$page_list}
</div>");
}
else
{
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_MALFORMED_DATA;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_DATABASE_ERROR;
require("module.error.php");
}
?>

@ -1,43 +0,0 @@
<?php
if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */
/* This module is a wrapper for all modules related to the 'related sites' section. */
if($var_page == "")
{
header("Location: /sites/list");
}
elseif($var_page == "list")
{
require("module.sites.list.php");
}
elseif($var_page == "item")
{
if($var_subpage == "comments")
{
$var_post = (isset($parts[$var_start + 4])) ? $parts[$var_start + 4] : "";
if(!empty($var_post) && $var_post == "post")
{
require("module.comments.post.php");
}
else
{
require("module.comments.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
elseif($var_page == "add")
{
require("module.sites.add.php");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>

@ -1,210 +0,0 @@
<?php
$_ANONNEWS = true;
require("include/base.php");
if(isset($_GET['q']))
{
if($_GET['q'] == "press_overview")
{
// We will handle the press release overview separately since it requires two queries rather than one.
$query = "SELECT * FROM press WHERE `Deleted`='0' AND `Approved`='1' AND `Posted` >= DATE_SUB(CURRENT_DATE(), INTERVAL {$recent_days} DAY) ORDER BY `Upvotes` DESC LIMIT 3";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$upvotes = $item['Upvotes'];
echo(template_item($name, "press", $id, $comments, true, $upvotes, 0));
}
}
$query = "SELECT * FROM press WHERE `Deleted`='0' AND `Approved`='1' ORDER BY `Posted` DESC LIMIT 3";
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$upvotes = $item['Upvotes'];
echo(template_item($name, "press", $id, $comments, false, $upvotes, 0));
}
}
}
else
{
// Process all other queries here.
if($_GET['q'] == "press_top")
{
$query = "SELECT * FROM press WHERE `Deleted`='0' AND `Approved`='1' ORDER BY `Upvotes` DESC LIMIT 6";
$section = "press";
}
elseif($_GET['q'] == "press_latest")
{
$query = "SELECT * FROM press WHERE `Deleted`='0' AND `Approved`='1' ORDER BY `Posted` DESC LIMIT 6";
$section = "press";
}
elseif($_GET['q'] == "ext_top_7days")
{
$query = "SELECT * FROM ext WHERE `Deleted`='0' AND `Visible`='1' AND `Posted` >= DATE_SUB(CURRENT_DATE(), INTERVAL {$recent_days} DAY) ORDER BY `Rank` DESC LIMIT 4";
$section = "external-news";
}
elseif($_GET['q'] == "ext_top_all")
{
$query = "SELECT * FROM ext WHERE `Deleted`='0' AND `Visible`='1' ORDER BY `Rank` DESC LIMIT 4";
$section = "external-news";
}
elseif($_GET['q'] == "ext_bottom_7days")
{
$query = "SELECT * FROM ext WHERE `Deleted`='0' AND `Visible`='1' AND `Posted` >= DATE_SUB(CURRENT_DATE(), INTERVAL {$recent_days} DAY) ORDER BY `Rank` ASC LIMIT 4";
$section = "external-news";
}
elseif($_GET['q'] == "ext_bottom_all")
{
$query = "SELECT * FROM ext WHERE `Deleted`='0' AND `Visible`='1' ORDER BY `Rank` ASC LIMIT 4";
$section = "external-news";
}
if($result = mysql_query_cached($query))
{
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$rank = ($section == "external-news") ? $item['Rank'] : 0;
$upvotes = ($section == "press") ? $item['Upvotes'] : 0;
echo(template_item($name, $section, $id, $comments, false, $upvotes, $rank));
}
}
}
}
else
{
die("Error: No valid query was passed on.");
}
/*
if(!isset($_GET['s']) || !isset($_GET['f']) || !isset($_GET['o']) || !isset($_GET['p']))
{
die("An internal error occurred. Not all variables were set.");
}
if($_GET['s'] == "ext")
{
$section = "ext";
$sectionname = "external-news";
$rules = "WHERE `Deleted`='0'";
}
elseif($_GET['s'] == "sites")
{
$section = "sites";
$sectionname = "related-sites";
$rules = "WHERE `Deleted`='0' AND `Approved`='1'";
}
elseif($_GET['s'] == "press")
{
$section = "press";
$sectionname = "press";
$rules = "WHERE `Deleted`='0' AND `Approved`='1'";
}
else
{
die("An internal error occurred. 's' was not correctly defined.");
}
if($_GET['o'] == "a")
{
$order = "ASC";
}
elseif($_GET['o'] == "d")
{
$order = "DESC";
}
else
{
die("An internal error occurred. 'o' was not correctly defined.");
}
if($_GET['f'] == "rank")
{
if($section == "press")
{
$field = "Upvotes";
}
elseif($section == "ext")
{
$field = "Rank";
}
else
{
die("An internal error occurred. 'fS' was not correctly defined.");
}
}
elseif($_GET['f'] == "date")
{
$field = "Posted";
}
else
{
die("An internal error occurred. 'f' was not correctly defined.");
}
if($_GET['p'] == "all")
{
$query = $rules;
}
elseif($_GET['p'] == "week")
{
$query = "{$rules} AND `Posted` >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)";
}
else
{
die("An internal error occurred. 'p' was not correctly defined.");
}
if(isset($_GET['l']) && is_numeric($_GET['l']))
{
$limit = $_GET['l'];
}
else
{
$limit = "5";
}
$query = "{$query} ORDER BY `{$field}` {$order} LIMIT {$limit}";
if(isset($_GET['hl']))
{
$highlight = " highlighted";
}
else
{
$highlight = "";
}
echo("SELECT * FROM {$section} {$query}");
//echo("SELECT * FROM {$section} {$query}");
/*
$result = mysql_query_cached("SELECT * FROM {$section} {$query}");
foreach($result->data as $item)
{
$name = utf8entities(stripslashes($item['Name']));
$id = $item['Id'];
$comments = $item['CommentCount'];
$upvotes = ($sectionname == "press") ? $item['Upvotes'] : 0;
$rank = ($sectionname == "ext") ? $item['Rank'] : 0;
echo(template_item($name, $sectionname, $id, $comments, isset($_GET['hl']), $upvotes, $rank));
}*/
?>

@ -1,73 +0,0 @@
<?php
$_ANONNEWS = true;
require("include/base.php");
if(isset($_GET['id']) && isset($_GET['vote']))
{
if(!isset($_GET['token']) || $_GET['token'] != $_SESSION['vote_token'])
{
die("<div class=\"votestate\">X</div>");
}
$nojs = (isset($_GET['nojs'])) ? true : false;
$frame = (isset($_GET['frame'])) ? true : false;
$item_id = (is_numeric($_GET['id'])) ? $_GET['id'] : 0;
$vote = $_GET['vote'];
$ip_hash = ip_hash(get_ip());
if(mysql_num_rows(mysql_query("SELECT Rank FROM ext WHERE `Id`='{$item_id}'")) > 0)
{
if(mysql_num_rows(mysql_query("SELECT * FROM votes WHERE `Id`='{$item_id}' AND `Ip`='{$ip_hash}'")) == 0)
{
if($vote == "up")
{
mysql_query("UPDATE ext SET `Rank`=`Rank`+1 WHERE `Id`='{$item_id}'");
if(!$nojs)
{
echo("<div class=\"votestate\">+</div>");
}
}
elseif($vote == "down")
{
mysql_query("UPDATE ext SET `Rank`=`Rank`-1 WHERE `Id`='{$item_id}'");
if(!$nojs)
{
echo("<div class=\"votestate\">-</div>");
}
}
else
{
die("X");
}
if($nojs && $frame)
{
echo("Your vote was counted.");
}
elseif($nojs)
{
echo("Your vote was counted. <a href=\"{$referer}\">Click here to go back to the page you came from.</a>");
}
mysql_query("INSERT INTO votes (`Id`, `Ip`) VALUES ('{$item_id}', '{$ip_hash}')");
}
else
{
if($nojs && $frame)
{
echo("You already voted.");
}
elseif($nojs)
{
header("Location: {$referer}");
}
else
{
die("<div class=\"votestate\">X</div>");
}
}
}
}
?>

@ -1,117 +0,0 @@
<?php
/* This handles the new-style pretty URLs. Old-style URLs (with parameters) are handled in index.php. */
$request_uri = substr($_SERVER['REQUEST_URI'], 1);
if(strpos($request_uri, '?') !== false)
{
$request_uri = substr($request_uri, 0, strpos($request_uri, '?'));
}
$parts = explode("/", $request_uri);
$_REWRITE = true;
$var_include = "internal.php";
$var_section = "home";
$var_table = "";
$var_page = "";
$var_id = "";
$var_subpage = "";
$var_last = "";
$var_start = 0;
$break = false;
//// *** /press/item/241/comments/
//// *** 0 1 2 3
if(isset($parts[0]) && strlen($request_uri) > 1)
{
if($parts[0] == "localize")
{
if(isset($parts[1]) && strlen($parts[1]) > 0)
{
$var_lang = $parts[1];
$_SESSION['curlang'] = $var_lang;
if(isset($parts[2]) && strlen($parts[2]) > 0)
{
$var_start = 2;
}
else
{
$break = true;
}
}
else
{
$var_section = "error";
$var_code = 404;
$break = true;
}
}
if($break === false)
{
$var_section = $parts[$var_start];
if($var_section == "press" || $var_section == "external-news" || $var_section == "related-sites" || $var_section == "forum" || $var_section == "moderation")
{
// Handle functional pages
if($var_section == "external-news")
{
$var_table = "ext";
}
elseif($var_section == "related-sites")
{
$var_table = "sites";
}
else
{
$var_table = "press";
}
if(isset($parts[$var_start + 3]) && strlen($parts[$var_start + 3]) > 0)
{
$var_subpage = $parts[$var_start + 3];
}
if(isset($parts[$var_start + 4]) && strlen($parts[$var_start + 4]) > 0)
{
$var_last = $parts[$var_start + 4];
}
if(isset($parts[$var_start + 1]) && strlen($parts[$var_start + 1]) > 0)
{
$var_page = $parts[$var_start + 1];
if(($var_table == "ext" || $var_table == "sites") && $var_page == "item" && $var_subpage != "comments")
{
$var_include = "external.php";
}
}
if(isset($parts[$var_start + 2]) && strlen($parts[$var_start + 2]) > 0)
{
$var_id = $parts[$var_start + 2];
}
}
elseif($var_section != "radio")
{
// Handle static pages
$var_section = "static";
if(isset($parts[$var_start + 1]))
{
$var_table = $parts[$var_start + 1];
}
else
{
$var_section = "error";
$var_code = 404;
}
}
}
}
$_INCLUDED = true;
require($var_include);
?>

@ -1,83 +0,0 @@
var debugEl;
var pr_img;
function vote(c,id)
{
var obj=newAjaxObject();
obj.onreadystatechange=function()
{
if(obj.readyState==4)
{
$('vote'+id).innerHTML = obj.responseText;
$('votebuttons'+id).innerHTML = "";
}
}
obj.open('GET', 'vote.php?c='+c+'&i='+id, true);
obj.send(null);
}
function switchTab(tabElement)
{
$(tabElement).siblings('.tab-active').removeClass('tab-active').addClass('tab');
$(tabElement).addClass('tab-active').removeClass('tab');
}
function initialize()
{
pr_img = $(".pressrelease-image img")[0];
if(pr_img != null)
{
var real_width;
$("<img/>")
.attr("src", $(pr_img).attr("src"))
.load(function()
{
real_width = this.width;
if(real_width < 900)
{
$(pr_img).removeAttr("width");
}
});
}
}
/*function get_filler()
{
// Dirty hack to avoid the 'press releases' section resizing when switching tabs
return "<div class=\"item\" style=\"visibility: hidden; height: 32px;\">placeholder</div> <div class=\"item\" style=\"visibility: hidden; height: 32px;\">placeholder</div> <div class=\"item\" style=\"visibility: hidden; height: 32px;\">placeholder</div>";
}*/
function replyToComment(element)
{
var el = $(element).parent().parent().parent().children('.c-reply');
var itemid = trim(el.text());
el.html("<div class=\"c-reply-header\">^</div><form method=\"post\" action=\"/" + var_section + "/item/" + var_id + "/comments/post/" + itemid + "/\"><input type=\"text\" name=\"name\" value=\"Anonymous\" class=\"c-inline\"><textarea name=\"body\" class=\"c-inline\"></textarea><div class=\"button\"><button type=\"submit\" name=\"submit\">Post reply</button></div></form>");
el.css({'display':'block'});
return false;
}
function trim(value)
{
value = value.replace(/^\s+/,'');
value = value.replace(/\s+$/,'');
return value;
}
function voteUp(id, token)
{
$('.votebuttons'+id).load("/process.vote.php?id="+id+"&vote=up&token="+token);
$('.votecount'+id).html(parseInt($('.votecount'+id).html()) + 1);
return false;
}
function voteDown(id, token)
{
$('.votebuttons'+id).load("/process.vote.php?id="+id+"&vote=down&token="+token);
$('.votecount'+id).html(parseInt($('.votecount'+id).html()) - 1);
return false;
}
$(function(){
initialize();
});

@ -1,9 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<h2>AnonNews is not just for AnonOps.</h2>
<p>AnonNews was made for anything involving Anonymous - that means you do not need to be affiliated or involved with a specific network or group. No matter
who you are affiliated with - or whether you are affiliated with anything or anyone at all! - you're welcome to post on AnonNews, as long as you follow the
same relevancy guidelines as everyone else (everything that does not fit in the main sections, can generally go in the forum).</p>
<p>AnonNews also does not promote any particular group or network over another - this is a 'neutral' site, not taking any sides.</p>
<p>We would also like to remind you that AnonOps does not equal Anonymous, and that no single group or network can be representative of Anonymous as a whole.
If anyone claims to 'represent' Anonymous, he lies - no exceptions. Anonymous is also not a democratic body, which means a majority of anons (if this is
something that can be measured in the first place) can not be considered representative of Anonymous either.</p>

@ -1,11 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<h2>Donate to AnonNews</h2>
<p>AnonNews accepts donations through various methods. If you want to use PayPal or Flattr, use one of the buttons at the top of the page.</p>
<p>You can also donate using Bitcoin. Bitcoin is an open-source, anonymous, and decentralized P2P currency (that means noone has control over it), that you can use to easily donate to AnonNews. For more information about Bitcoin, visit
<a href="http://www.weusecoins.com/">WeUseCoins (video)</a> or the <a href="http://www.bitcoin.org/">Bitcoin website</a>.</p>
<p>To send a Bitcoin donation to AnonNews, you can send Bitcoins to the following address: <strong>1PPVupRRz7tHvfvJWEDBnDr7bFVFFYLu6G</strong>.</p>
<p>Thanks for supporting AnonNews!</p>

@ -1,53 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<div class="pressrelease">
<h2>Frequently Asked Questions</h2>
<p>This section will discuss some questions that come up fairly often. If you have any other relevant questions, feel free to join the <a href="/static/irc/">IRC channel</a>.</p>
<h3>How can I join Anonymous?</h3>
<p>This question comes up quite often. Anonymous does not have a membership list, and you can't really 'join' it either. If you identify with or say you are Anonymous, you <em>are</em> Anonymous.
Noone has the authority to say whether you are Anonymous or not, except for yourself.</p>
<h3>How can I talk to Anonymous?</h3>
<p>Anons can be found all over the world - and all over the internet. There are no leaders or official spokespersons, and no official websites, IRC networks, or anything else. Basically, if you want
to talk to Anonymous, join a random IRC network or forum and start talking to anons! A starting point may be, for example, the <a href="/static/irc/">AnonNews IRC channel</a>.</p>
<h3>Isn't AnonNews just for AnonOps?</h3>
<p>No, not at all! Any anon is welcome to post on AnonNews, and there is no active affiliation with AnonOps. You can read more about this issue <a href="/static/anon/">here</a>.</p>
<h3>I don't like this press release! How can I get it removed?</h3>
<p>You can't. AnonNews is <a href="/static/moderation/">uncensored (but moderated)</a>, and everyone has equal rights to post press releases (or forum posts, or anything else). As long as something
is relevant and fits the guidelines, it will be published, regardless of pressure to take it down. There is one exception to this rule, and that is press releases that pretend to be made by the staff
of a specific network or operation, while actually being made by an outsider. In this case the network/operation staff can request removal of the press release (this only goes for operations and
networks with a defined leadership structure). Other than the aforementioned situation, don't bother trying to get something removed.</p>
<h3>Why was my submission rejected?</h3>
<p>If your submission doesn't show up after a while, that means it probably didn't fit the guidelines. If you think a submission was rejected in error, you can contact an administrator in the
<a href="/static/irc/">IRC channel</a>. Please don't resubmit your submissions.</p>
<h3>How do I upvote a press release?</h3>
<p>To upvote a press release, you will have to post a comment that is at least 2 lines long, and at least 100 characters long. This is to prevent pointless '+1' posts just to upvote a press release.
Simply enter a comment, and if your comment is long enough, a checkbox to upvote the press release will appear on the captcha verification page.</p>
<h3>Do you keep IPs?</h3>
<p>Short answer: no.</p>
<p>Longer answer: no, with a few exceptions. To prevent double voting, salted hashes of partial IPs are kept - these should be practically useless if someone were to gain access to the database.
The fact that only partial IPs are used for these hashes means that occasionally a vote may not be counted correctly, however this should not happen very often. The other situation is the spamfilter.
If your submission hits a severe spamfilter, your submission will be blocked, and the IP you are submitting from will be saved - the submission will be reviewed in 24 hours, and if it turns out your
submission was legitimate, your IP will be removed from the system. Most 'suspicious' submissions will be held for review, rather than being outright blocked - in this case, your IP is NOT kept. If
you do manage to hit a severe spamfilter and your submission was indeed malicious/spam, your IP may be banned (thus stored in the banlist).</p>
<p>No access logs or other logs with identifying information are kept on the server. You can visit the site and post submissions from TOR, VPNs, or other anonymization networks, however most of the
time your submission will be held for review when using one of these methods.</p>
<h3>How does the spamfilter work?</h3>
<p>AnonNews uses a custom spam score system, where a 'score' is assigned, depending on several characteristics of a submission. Several factors that play a role for submissions are banned IPs, blocked
domains, blacklisted keywords, DNSBL-listed IPs, and other things. Depending on your spam score, the submission is either directly visible, held for manual review, or outright blocked. For comments,
several text characteristics are analyzed such as the amount of lines, average length and variation in length of lines, special characters ratio, and amount of URLs.</p>
<h3>Can I use the press releases or forum posts on AnonNews elsewhere?</h3>
<p>Yes, all user-submitted content is automatically licensed under a Creative Commons Attribution license. This means that you are free to reuse and remix content, both for commercial and non-commercial
purposes, as long as you give credit to the original author. If no specific author is outlined, you should attribute to 'Anonymous' and place a backlink to the relevant page on AnonNews.</p>
<h3>Can I use the design / source code / etc. of AnonNews?</h3>
<p>Yes, AnonNews is licensed under the WTFPL, meaning you can pretty much do with it what you want. No attribution required, no restrictions whatsoever. Be aware that some third-party code is used
that may have separate restrictions - this is detailed in the LICENSE file of the source code package. You can download the source code <a href="http://www.cryto.net/projects/anonnews2/">here</a>.</p>
</div>

@ -1,25 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<div class="pressrelease">
<h2>Forum Rules</h2>
<p>The AnonNews forums are very loosely moderated, in fact very little will be removed - however, there are a few rules.</p>
<h3>No malicious or commercial content</h3>
<p>Content that is harmful towards users is not allowed. That means no posting of malware, phishers, etc. Commercial/promotional content is also not allowed - this includes merchandise and 'content farms'
that are obviously designed for turning a profit. Content that carries serious legal liability (such as child porn or fraud) is also not allowed, to protect the AnonNews infrastructure. Discussion about
these subjects is allowed, as long as no practical instructions and/or actual content is provided.</p>
<h3>No organizing of outright illegal operations</h3>
<p>Because of legal liability, organizing Anonymous Operations that are based on outright illegal activity - such as LOIC/DDoS operations - should not be organized from these forums. Discussing them
is of course allowed, as long as no actual organization takes place (that means no posting of targets and manuals and such). There are plenty of places to organize these kind of operations, look at the
Related Sites section for some examples.</p>
<h3>Threads have to be relevant</h3>
<p>Except for the offtopic forum, all threads should have at least some relevancy to (a part of) Anonymous. Discussing things that are not directly related but may be of interest to Anonymous, is of course
allowed. Please don't post 'how do I hack' topics anywhere, for those kinds of things there are sites like <a href="http://www.hackforums.net/">HackForums</a>.</p>
<h3>Users are encouraged to post in the right sections</h3>
<p>While there is no real moderation on this, you are encouraged to post topics in the 'appropriate' categories - this will ensure that those interested in the subject will read them. This is not a real
"rule", topics will not be moved when placed in the wrong section.</p>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 KiB

@ -1,18 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<h2>IRC</h2>
<p>AnonNews has an IRC channel on <a href="http://www.cryto.net/irc">Cryto IRC</a>, for support, questions, moderator applications, and general chit-chat. TOR users are welcome, however abusing IPs will
receive a temporary ban from the network. If you cannot connect through a TOR node, VPN, or proxy, please try using a different TOR identity / proxy / VPN IP. An I2P tunnel is planned, but not yet operational.</p>
<p><strong>Important:</strong> AnonNews is not affiliated with AnonOps or any other Anonymous-related website, network, or infrastructure. If you have complaints about an Anonymous Operation, please directly
contact those responsible for the organization - AnonNews has nothing to do with it, and is just a news platform.</p>
<p>
<strong>For webchat users:</strong><br>
Visit <a href="http://irc.lc/cryto/anonnews">http://irc.lc/cryto/anonnews</a> to use our web IRC client. No downloads or plugins are required.<br>
<em>Please do not 'slap' other users, this is considered rude.</em>
</p>
<p>
<strong>For users with an IRC client:</strong><br>
Server: irc.cryto.net<br>
Port: 6667 (regular) / 6697 (SSL)<br>
Channel: <a href="irc://irc.cryto.net/anonnews">#anonnews</a><br>
For those that do not wish to connect to a US-based server, you can connect to nijaxor.cryto.net (NL), haless.cryto.net (DE), or konjassiem.cryto.net (DE).
</p>

@ -1,28 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<h2>Moderation is not censorship.</h2>
<p>A question / criticism that comes up rather often is that AnonNews would be exercising censorship on submissions. This page will explain why this is not the case, and what the difference between
moderation and censorship is.</p>
<h4>What is censorship?</h4>
<p>Censorship is, generally speaking, attempting to filter out morally objectionable content - this can be news, images, music or anything else, and what classifies as 'morally objectionable' will differ
for everyone, based on their personal moral standpoints and opinions. The key here is that censorship revolves around specific ideas or information of which the spreading is actively hindered, based on
personal ideals.</p>
<h4>How is this different from moderation?</h4>
<p>Moderation, in the case of AnonNews, is the removal of content that is not relevant to 'Anonymous', is intended to cause harm to the machines of visitors, or attempts to exploit visitors. This means
that links to malware, scams, or news that is not about Anonymous (as well as things that are not put in the right category) will be removed. This is not based on any personal ideals, and the actual
message or opinion in said content does not play a role. Potentially 'offensive' content is <strong>not</strong> moderated, as even controversial ideas should have a voice.</p>
<h4>How does moderation on AnonNews work?</h4>
<p>There is a group of moderators, and anyone can apply to become a moderator. As a general rule of thumb, anyone who applies will become a moderator, and no 'screening' is done. The platform is made to
allow rollbacks in case of abuse, so there is very little harm that can be done by a moderator. If a moderator exhibits unsuitable behaviour (such as removing content based on personal morals) he will lose
his moderator status, to ensure that AnonNews only has mods that are capable of objective analysis.</p>
<p>Moderators are encouraged to <strong>not</strong> read any submissions before approving or rejecting them. The general rule of thumb is to use the browsers search-in-page feature to determine whether
'Anonymous' is mentioned somewhere in the article, and to quickly skim the text to get an idea of whether it's actually news, or something else (like an opinion blogpost). In the case of press releases,
moderators are encouraged to only look at the grammar, spelling, and formatting - and to check whether any part of the press release claims to speak for all of Anonymous. That's it.</p>
<p>TL;DR moderation is generally speaking done without even paying attention to what the article is about.</p>
<h4>About the comments sections and the forums</h4>
<p>"Regular" moderators do not have access to moderate comments or forum posts. This is because there is not really a need for a large moderation team - the only rules are that you cannot organize illegal
Anonymous Operations such as DDoS operations (this is in order to protect the AnonNews infrastructure), and that you cannot post malware / scams, or posts that are intended to make the pages unreasonably
long, such as posts that contain entire books (yes, it has been done.)</p>

@ -1,14 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<h2>AnonNews is looking for moderators!</h2>
<p>We are looking for people that have the time (and capability) to moderate incoming submissions. The most important requirements for being a moderator:</p>
<ul>
<li>You must be able to moderate submissions solely based on relevancy. You must be able to leave out your own personal morals in moderation.</li>
<li>You must be present in the AnonNews (staff) IRC channel regularly.</li>
<li>You must be tech-savvy enough to distinguish potentially harmful links from genuine links.</li>
<li>You must have read and understood the guidelines for the submission of press releases, external news, and related sites.</li>
<li>You must be able to speak and understand English.</li>
</ul>
<p>Being a moderator does not require an e-mail address, real name, or any other personally identifiable information - all that is needed is a username and a password.</p>
<p>Be aware that all moderation decisions are logged, and that intentionally bad moderation or unwillingness to follow the guidelines may result in your moderator account being disabled.
This includes exercising moderation based on personal morals.</p>
<p>To apply for being a moderator, <a href="/static/irc">join the IRC channel</a>.</p>

@ -1,494 +0,0 @@
able
about
above
acid
across
actually
after
again
against
ago
ai
all
almost
alors
already
also
alter
although
always
am
among
an
and
angry
another
any
anyway
appropriate
are
around
as
at
aussi
automatic
autre
autres
available
avant
awake
aware
away
back
bad
basic
be
beautiful
because
been
before
being
bent
better
between
big
bitter
black
blue
boiling
both
bright
broken
brown
but
by
came
can
cause
ceci
cela
central
certain
certainly
ces
ceux-ci
cheap
chemical
chief
clean
clear
clearly
close
cold
come
comme
common
complete
complex
concerned
conscious
could
cruel
current
cut
dans
dark
de
dead
dear
deep
delicate
dependent
depuis
des
did
different
difficult
dirty
do
does
down
dry
du
due
each
early
east
easy
economic
either
elastic
electric
elle
else
enough
equal
especially
est
et
eux
even
ever
every
exactly
false
far
fat
feeble
female
fertile
few
final
finalty
financial
fine
first
fixed
flat
following
foolish
for
foreign
form
former
forward
free
frequent
from
full
further
future
general
generality
get
give
go
good
got
great
green
grey/gray
had
half
hanging
happy
hard
has
have
he
healthy
heavy
help
her
here
high
him
himself
his
hollow
home
how
however
human
ici
if
il
ill
ils
important
in
indeed
individual
industrial
instead
international
into
is
it
its
je
just
keep
kind
la
labor
large
last
late
later
le
least
left
legal
les
less
let
leur
leurs
like
likely
line
little
living
local
long
loose
loud
low
lui
ma
main
mais
major
make
male
many
married
material
may
maybe
me
mean
medical
mes
might
military
mixed
modern
moi
moins
mon
more
most
much
must
my
name
narrow
national
natural
near
nearly
necessary
never
new
next
nice
no
nor
normal
north
nos
not
notre
nous
now
obviously
of
off
often
okay
old
on
once
one
only
open
opposite
or
original
other
ou
our
out
over
own
par
parallel
particular
particularly
past
perhaps
personal
physical
please
plus
political
poor
popular
possible
pour
present
previous
prime
private
probable
probably
professional
public
put
que
quick
quickly
quiet
quite
rather
ready
real
really
recent
recently
red
regular
responsible
right
rough
round
royal
sa
sad
safe
said
same
say
second
secret
see
seem
send
separate
serious
ses
several
shall
sharp
short
should
shut
significant
similar
simple
simply
since
single
slow
small
smooth
so
social
soft
solid
some
sometimes
son
soon
sorry
south
special
specific
sticky
stiff
still
straight
strange
strong
successful
such
sudden
suddenly
sure
sweet
ta
take
tall
tel
tes
than
that
the
their
them
then
there
therefore
these
they
thick
thin
think
this
those
though
through
thus
tight
till
tired
to
today
together
toi
tomorrow
ton
too
top
total
tous
tout
true
tu
turn
un
under
une
unless
until
up
use
used
useful
usually
various
very
violent
vos
votre
vous
waiting
warm
was
way
we
well
were
west
wet
what
whatever
when
where
whether
which
while
white
who
whole
whose
why
wide
will
wise
with
would
wrong
yeah
yellow
yes
yesterday
yet
you
young
your
brought
love

@ -1,4 +0,0 @@
<?php if(!isset($_ANONNEWS)) { die(); } /* Protect from direct requests */ ?>
<h2>AnonNews Radio has been discontinued</h2>
<p>AnonNews Radio no longer exists. Although this may change in the future, there are no direct plans to set up AnonNews Radio again.</p>
<p>If you are looking for new music, a good place to look would be <a href="http://www.jamendo.com/">Jamendo</a> - a website with thousands of freely shareable (Creative Commons-licensed) tracks.</p>

@ -0,0 +1,96 @@
body
{
background-color: #EEEEEE;
font-family: 'Istok Web', sans-serif;
padding: 0px;
margin: 0px;
}
.clear
{
clear: both;
}
.clear-left
{
clear: left;
}
.page-header
{
padding: 8px 12px 0px 12px;
background: url(images/background.jpg);
}
.page-header h1
{
margin: 4px 0px;
font-weight: normal;
}
.page-header nav a
{
display: block;
float: left;
margin: 0px 4px;
padding: 4px 8px;
background-color: #CECECE;
color: #3D3D3D;
text-decoration: none;
border: 1px solid gray;
border-bottom: none;
}
.page-header nav a.section
{
background-color: #BFBDCA;
}
.page-header nav a.submit
{
background-color: #E7D99B;
}
.page-header nav a:hover
{
color: black;
background-color: #B5B5B5;
}
.page-header nav a.section:hover
{
background-color: #A29CC6;
}
.page-header nav a.submit:hover
{
background-color: #E6CF64;
}
.page-header nav a.active
{
color: black;
background-color: #EEEEEE;
}
#button_donate
{
color: #060051;
border-color: #242058;
}
.license
{
clear: both;
margin: 8px 24px;
padding: 6px 11px;
font-size: 12px;
background-color: #E5E5E5;
}
.license p
{
margin: 3px 0px;
}

@ -1,755 +0,0 @@
.c-actions
{
bottom: 0;
position: absolute;
right: 0;
}
.c-actions-button
{
border: 1px solid #CACACA;
display: block;
float: right;
font-size: 14px;
font-weight: 700;
margin: 4px;
padding: 2px 5px;
}
.c-actions-button:hover
{
background-color: #E9E9E9;
border: 1px solid #000;
}
.c-body
{
padding-bottom: 25px;
text-align: justify;
}
.c-children
{
padding-left: 30px;
}
.c-meta
{
background-color: #E8E8E8;
border-radius: 5px;
margin-bottom: 9px;
moz-border-radius: 5px;
padding: 4px 8px;
}
.c-meta-date
{
float: right;
font-style: italic;
}
.c-outer
{
min-height: 95px;
padding: 8px;
}
.c-outer,.c-small
{
background-color: #DADADA;
border: 1px solid #888;
margin-top: 10px;
position: relative;
}
.c-reply
{
display: none;
padding-left: 20px;
}
.c-reply button,.c-comment button
{
font-size: 16px;
margin-top: 6px;
}
.c-reply div.button,.c-comment div.button
{
text-align: right;
}
.c-reply input,.c-reply textarea,.c-comment input,.c-comment textarea
{
border: 1px solid #000;
}
.c-reply input,.c-reply textarea,.c-reply div.button,.c-comment input,.c-comment textarea,.c-comment div.button
{
box-sizing: border-box;
display: block;
padding: 4px;
width: 80%;
}
.c-reply textarea,.c-comment textarea
{
font-size: 16px;
height: 250px;
}
.c-reply-header
{
font-size: 19px;
font-weight: 700;
margin-top: 7px;
}
.c-small
{
color: #505050;
padding: 4px;
}
.c-small .c-actions-button
{
margin: 2px;
}
.c-small-inner
{
padding: 3px;
}
.c-spacer
{
margin-top: 30px;
}
.forum-buttons a
{
border: 1px solid #C6C6C6;
display: block;
float: right;
margin-bottom: 5px;
padding: 5px;
text-decoration: none;
}
.forum-buttons a:hover
{
background-color: #DEDEDE;
border: 1px solid gray;
}
.forum-header
{
font-size: 18px;
font-weight: 700;
margin-bottom: 16px;
margin-top: 12px;
text-align: center;
}
.forum-header-category-threads,.forum-header-category-posts,.forum-header-threads-replies
{
width: 70px;
}
.forum-item-category-threads,.forum-item-category-posts,.forum-item-threads-replies
{
font-size: 28px;
font-weight: 700;
}
.forum-post
{
background-color: #DEDEDE;
border: 1px solid silver;
margin-top: 16px;
}
.forum-post-body
{
font-size: 15px;
padding: 9px 14px;
text-align: justify;
width: 682px;
}
.forum-post-date
{
font-size: 13px;
margin-bottom: 9px;
margin-top: 6px;
}
.forum-post-first
{
border: 1px solid gray;
}
.forum-post-meta
{
background-color: #D4D4D4;
padding: 9px 6px;
width: 178px;
}
.forum-post-meta,.forum-post-body
{
float: left;
}
.forum-post-user
{
font-size: 18px;
font-weight: 700;
}
.forum-table .forum-item-category-name,.forum-table .forum-item-threads-name
{
padding: 0;
}
.forum-table th
{
background-color: #D8D8D8;
text-align: left;
}
.forum-table th,.forum-table td
{
padding: 7px;
}
.forum-table,.forum-buttons,.forum-post,.forum-reply
{
margin: 0 auto;
width: 900px;
}
.forum-table,.forum-table th,.forum-table td
{
border: 1px solid #C6C6C6;
border-collapse: collapse;
}
.forum-table-date,.forum-table-teaser
{
font-size: 13px;
}
.forum-table-link
{
border: none;
display: block;
padding: 7px;
}
.forum-table-link:hover
{
background-color: #DCDCDC;
border: none;
}
.forum-table-name
{
font-size: 19px;
font-weight: 700;
}
@font-face
{
font-family: 'Muli';
font-style: normal;
font-weight: 400;
src: local('Muli Light'), local('Muli-Light'), url('http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzpjcWE1M3FhZTd6NXlsM3JuMmVkcGdzaHRvcTozMm9rbDN4Mmdsd2twM21mcG4yNGJ0M2RmZ2Zqb2NhM2hqaHRleTI3Nmo3cmlsdW92b3BhOjM6NjozMzkyNA==/anonnews.woff') format('woff');
}
a
{
border-bottom: 1px dashed;
color: #000;
text-decoration: none;
}
a.comments
{
display: block;
float: right;
margin-right: 9px;
padding: 3px 4px 6px;
text-decoration: none;
}
a.comments span.count
{
display: block;
font-size: 20px;
line-height: 17px;
margin-bottom: 0;
margin-left: auto;
margin-right: auto;
}
a.comments span.under
{
display: block;
font-size: 8px;
line-height: 6px;
margin-left: auto;
margin-right: auto;
margin-top: 0;
}
a.header-button,div.header-button
{
border: 1px solid #696969;
border-radius: 10px;
color: #202020;
display: block;
float: left;
font-size: 20px;
margin: 5px;
moz-border-radius: 10px;
overflow: hidden;
padding: 8px;
text-decoration: none;
}
a.header-button:hover,a.section-button:hover
{
background-color: #EFEFEF;
border: 1px solid #000;
color: #242424;
text-decoration: none;
}
a.hidden
{
display: block;
font-size: 13px;
margin-top: 19px;
}
a.minus
{
color: red;
padding-left: 8px;
padding-right: 8px;
}
a.name
{
border-bottom: none;
display: inline;
line-height: 32px;
padding: 6px;
text-decoration: none;
}
a.page-button,div.page-button
{
border: 1px solid #696969;
border-radius: 10px;
color: #202020;
font-size: 16px;
margin: 1px;
moz-border-radius: 10px;
overflow: hidden;
padding: 8px;
text-decoration: none;
}
a.page-button:hover
{
background-color: #D8D8D8;
border: 1px solid #000;
color: #242424;
text-decoration: none;
}
a.plus
{
color: lime;
padding-left: 4px;
padding-right: 4px;
}
a.plus,a.minus,a.comments
{
border-bottom: none;
}
a.plus,a.minus,div.votestate
{
display: block;
float: right;
padding-bottom: 3px;
padding-right: 3px;
text-decoration: none;
}
a.plus:hover,a.minus:hover,a.comments:hover
{
background-color: gray;
color: #FFF;
}
a.readmore
{
color: #000;
margin-left: 12px;
text-decoration: none;
}
a.readmore:hover,a.name:hover
{
text-decoration: underline;
}
a.section-button
{
border: 1px solid #DDD;
border-radius: 10px;
color: #EFEFEF;
display: block;
float: right;
font-size: 14px;
margin: 5px;
moz-border-radius: 10px;
padding: 6px;
text-decoration: none;
}
a.small
{
display: inline;
margin-left: 8px;
}
a.tab
{
border-bottom: 1px solid #000;
}
a.tab,a.tab-active
{
background-color: #DDD;
border: 1px solid #000;
border-top-left-radius: 7px;
border-top-right-radius: 7px;
font-size: 18px;
font-weight: 400;
moz-border-radius-topleft: 7px;
moz-border-radius-topright: 7px;
padding: 5px 5px 4px;
text-decoration: none;
}
a.tab-active,a.tab:hover
{
background-color: #7D7D7D;
color: #EFEFEF;
}
a:hover
{
border-bottom: 1px solid;
}
button.hiddenreply
{
float: right;
}
div.body-main
{
padding: 3px 13px;
}
div.cc-notice
{
background-color: #D9D9D9;
border: 1px solid #000;
border-radius: 8px;
font-size: 11px;
margin: 0 auto;
moz-border-radius: 8px;
padding: 4px;
width: 80%;
}
div.cc-notice img
{
float: left;
margin-right: 6px;
}
div.clear
{
clear: both;
}
div.comment
{
background-color: #E0E0E0;
border: 1px solid #000;
font-size: 16px;
margin-bottom: 18px;
padding: 16px;
}
div.form-notice
{
background-color: #FFEFBE;
background-image: url(http://tahoe-gateway.cryto.net:3719/download/VVJJOkNISzp5anRpYzc1b24zemx3M2k0MnJ0ajN4Y2Z5eTpqcGt1aXJkcXhiYnU3bnUzdjdycngyZWFhejd3cGpqZzY1d3ptbG81NnY3Y21mNGh4aDRhOjM6Njo2NjY=/error.png);
background-position: 6px 3px;
background-repeat: no-repeat;
border: 1px solid #735600;
border-radius: 10px;
box-sizing: border-box;
font-size: 12px;
khtml-box-sizing: border-box;
margin-bottom: 3px;
moz-border-radius: 10px;
moz-box-sizing: border-box;
ms-box-sizing: border-box;
padding: 5px 5px 5px 27px;
webkit-border-radius: 10px;
webkit-box-sizing: border-box;
width: 80%;
}
div.header,.forum-reply
{
margin-top: 16px;
}
div.hiddenreply
{
background-color: silver;
border: 1px solid #000;
display: none;
margin-top: 6px;
padding: 4px;
width: 358px;
}
div.highlighted
{
background-color: #FBEC99;
}
div.item
{
background-color: #DDD;
border: 1px solid gray;
border-radius: 8px;
font-size: 16px;
margin-top: 3px;
moz-border-radius: 8px;
padding: 0;
}
div.normalcomments
{
background-color: silver;
border: 1px solid #000;
padding: 4px;
width: 358px;
}
div.note
{
font-size: 12px;
margin-top: 6px;
}
div.page-list
{
padding: 0 15px;
text-align: center;
}
div.page-list a
{
border: none;
line-height: 180%;
margin: 2px 0;
padding: 3px 4px 3px 3px;
text-decoration: none;
}
div.page-list a:hover
{
outline: 1px dashed #000;
}
div.page-list-bottom
{
margin-top: 11px;
}
div.page-list-top
{
margin-bottom: 11px;
margin-top: 11px;
}
div.pagecontent
{
margin: 12px;
}
div.pressrelease
{
margin: 0 auto;
text-align: justify;
width: 900px;
}
div.pressrelease p
{
margin-bottom: 9px;
margin-top: 4px;
}
div.pressrelease-image
{
margin-bottom: 15px;
padding: 0;
text-align: center;
}
div.pressrelease-image img
{
margin: 0;
}
div.section
{
background-color: #7D7D7D;
border: 1px solid #000;
border-radius: 14px;
moz-border-radius: 14px;
padding: 4px;
}
div.section-header
{
color: #5B5B5B;
font-size: 23px;
font-weight: 700;
margin-bottom: 3px;
}
div.section-wrapper
{
margin: 0 auto 17px;
width: 98%;
}
div.small
{
background-color: #E1E1E1;
border-color: gray;
padding: 8px;
}
div.sort-options
{
float: right;
font-size: 13px;
margin-bottom: 6px;
}
div.sort-options a,input.empty
{
color: gray;
}
div.sort-options a.active
{
border-bottom-style: solid;
color: #000;
}
div.sort-options a:hover
{
border-bottom-style: dashed;
color: #000;
}
div.source-notice
{
text-align: center;
}
div.submit
{
margin-top: 15px;
text-align: center;
width: 80%;
}
div.submit button
{
font-size: 19px;
}
div.submit-loader
{
display: none;
font-size: 16px;
text-align: center;
width: 80%;
}
div.topbar
{
background-color: #E0E0E0;
border-bottom: 1px solid gray;
font-size: 18px;
margin-bottom: 15px;
padding: 3px 12px;
text-align: left;
}
div.upvotes
{
color: green;
float: right;
margin-right: 8px;
}
form h4
{
font-size: 22px;
margin-bottom: 2px;
margin-top: 14px;
}
form.forum input,form.forum textarea,form.forum select
{
font-size: 17px;
padding: 4px;
width: 100%;
}
form.forum textarea
{
height: 200px;
}
form.submission input,form.submission textarea,form.submission select
{
font-size: 24px;
padding: 5px;
width: 80%;
}
form.submission input,form.submission textarea,form.submission select,form.forum input,form.forum textarea,form.forum select
{
background-color: #F1F1F1;
border: 1px solid #000;
box-sizing: border-box;
display: block;
khtml-box-sizing: border-box;
moz-box-sizing: border-box;
ms-box-sizing: border-box;
webkit-box-sizing: border-box;
}
form.submission input.upload,.c-reply input,.c-comment input
{
font-size: 17px;
}
form.submission textarea
{
height: 400px;
}
form.submission textarea,form.forum textarea
{
font-size: 14px;
}
h1
{
background-color: #D7D7D7;
border-bottom: 1px solid gray;
font-weight: 400;
margin-bottom: 0;
margin-top: 0;
padding: 10px;
}
h1 img,h1 input
{
font-size: 2px;
}
h1,h1 a
{
border-bottom: none;
color: #3B3B3B;
}
h2
{
color: #3D3D3D;
display: inline;
padding: 7px;
}
h3
{
margin-bottom: 2px;
}
h5
{
border-bottom: 1px solid #000;
font-size: 26px;
margin-bottom: 15px;
margin-top: 3px;
padding-bottom: 7px;
}
html,body
{
background-color: #EBEBEB;
font-family: Muli, Verdana, Arial;
height: 100%;
margin: 0;
padding: 0;
}
img.loader
{
display: none;
float: left;
margin-left: 5px;
margin-top: 9px;
}
span.smallcomment
{
color: #242424;
}
span.spacer
{
font-size: 1px;
}
span.strong,a.tab-active,span.bold,div.page-list a.current,.c-meta-name
{
font-weight: 700;
}
span.votecount
{
float: right;
padding-right: 6px;
}
span.votes
{
float: right;
font-size: 24px;
font-weight: 700;
padding-right: 9px;
}
strong.hidden
{
display: block;
margin-bottom: 3px;
}
textarea.reply
{
font-family: arial;
height: 140px;
width: 350px;
}

@ -1,170 +0,0 @@
tinyMCE.addI18n({en:{
common:{
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
apply:"Apply",
insert:"Insert",
update:"Update",
cancel:"Cancel",
close:"Close",
browse:"Browse",
class_name:"Class",
not_set:"-- Not set --",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
invalid_data:"Error: Invalid values entered, these are marked in red.",
more_colors:"More colors"
},
contextmenu:{
align:"Alignment",
left:"Left",
center:"Center",
right:"Right",
full:"Full"
},
insertdatetime:{
date_fmt:"%Y-%m-%d",
time_fmt:"%H:%M:%S",
insertdate_desc:"Insert date",
inserttime_desc:"Insert time",
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
},
print:{
print_desc:"Print"
},
preview:{
preview_desc:"Preview"
},
directionality:{
ltr_desc:"Direction left to right",
rtl_desc:"Direction right to left"
},
layer:{
insertlayer_desc:"Insert new layer",
forward_desc:"Move forward",
backward_desc:"Move backward",
absolute_desc:"Toggle absolute positioning",
content:"New layer..."
},
save:{
save_desc:"Save",
cancel_desc:"Cancel all changes"
},
nonbreaking:{
nonbreaking_desc:"Insert non-breaking space character"
},
iespell:{
iespell_desc:"Run spell checking",
download:"ieSpell not detected. Do you want to install it now?"
},
advhr:{
advhr_desc:"Horizontal rule"
},
emotions:{
emotions_desc:"Emotions"
},
searchreplace:{
search_desc:"Find",
replace_desc:"Find/Replace"
},
advimage:{
image_desc:"Insert/edit image"
},
advlink:{
link_desc:"Insert/edit link"
},
xhtmlxtras:{
cite_desc:"Citation",
abbr_desc:"Abbreviation",
acronym_desc:"Acronym",
del_desc:"Deletion",
ins_desc:"Insertion",
attribs_desc:"Insert/Edit Attributes"
},
style:{
desc:"Edit CSS Style"
},
paste:{
paste_text_desc:"Paste as Plain Text",
paste_word_desc:"Paste from Word",
selectall_desc:"Select All",
plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
},
paste_dlg:{
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
text_linebreaks:"Keep linebreaks",
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
},
table:{
desc:"Inserts a new table",
row_before_desc:"Insert row before",
row_after_desc:"Insert row after",
delete_row_desc:"Delete row",
col_before_desc:"Insert column before",
col_after_desc:"Insert column after",
delete_col_desc:"Remove column",
split_cells_desc:"Split merged table cells",
merge_cells_desc:"Merge table cells",
row_desc:"Table row properties",
cell_desc:"Table cell properties",
props_desc:"Table properties",
paste_row_before_desc:"Paste table row before",
paste_row_after_desc:"Paste table row after",
cut_row_desc:"Cut table row",
copy_row_desc:"Copy table row",
del:"Delete table",
row:"Row",
col:"Column",
cell:"Cell"
},
autosave:{
unload_msg:"The changes you made will be lost if you navigate away from this page.",
restore_content:"Restore auto-saved content.",
warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?."
},
fullscreen:{
desc:"Toggle fullscreen mode"
},
media:{
desc:"Insert / edit embedded media",
edit:"Edit embedded media"
},
fullpage:{
desc:"Document properties"
},
template:{
desc:"Insert predefined template content"
},
visualchars:{
desc:"Visual control characters on/off."
},
spellchecker:{
desc:"Toggle spellchecker",
menu:"Spellchecker settings",
ignore_word:"Ignore word",
ignore_words:"Ignore all",
langs:"Languages",
wait:"Please wait...",
sug:"Suggestions",
no_sug:"No suggestions",
no_mpell:"No misspellings found."
},
pagebreak:{
desc:"Insert page break."
},
advlist:{
types:"Types",
def:"Default",
lower_alpha:"Lower alpha",
lower_greek:"Lower greek",
lower_roman:"Lower roman",
upper_alpha:"Upper alpha",
upper_roman:"Upper roman",
circle:"Circle",
disc:"Disc",
square:"Square"
}}});

@ -1,504 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

@ -1,5 +0,0 @@
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
.panel_wrapper div.current {height:80px;}
#width {width:50px; vertical-align:middle;}
#width2 {width:50px; vertical-align:middle;}
#size {width:100px;}

@ -1 +0,0 @@
(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})();

@ -1,57 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
init : function(ed, url) {
// Register commands
ed.addCommand('mceAdvancedHr', function() {
ed.windowManager.open({
file : url + '/rule.htm',
width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('advhr', {
title : 'advhr.advhr_desc',
cmd : 'mceAdvancedHr'
});
ed.onNodeChange.add(function(ed, cm, n) {
cm.setActive('advhr', n.nodeName == 'HR');
});
ed.onClick.add(function(ed, e) {
e = e.target;
if (e.nodeName === 'HR')
ed.selection.select(e);
});
},
getInfo : function() {
return {
longname : 'Advanced HR',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
})();

@ -1,43 +0,0 @@
var AdvHRDialog = {
init : function(ed) {
var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
w = dom.getAttrib(n, 'width');
f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
},
update : function() {
var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
h = '<hr';
if (f.size.value) {
h += ' size="' + f.size.value + '"';
st += ' height:' + f.size.value + 'px;';
}
if (f.width.value) {
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
}
if (f.noshade.checked) {
h += ' noshade="noshade"';
st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
}
if (ed.settings.inline_styles)
h += ' style="' + tinymce.trim(st) + '"';
h += ' />';
ed.execCommand("mceInsertContent", false, h);
tinyMCEPopup.close();
}
};
tinyMCEPopup.requireLangPack();
tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);

@ -1,5 +0,0 @@
tinyMCE.addI18n('en.advhr_dlg',{
width:"Width",
size:"Height",
noshade:"No shadow"
});

@ -1,57 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advhr.advhr_desc}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/rule.js"></script>
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form onsubmit="AdvHRDialog.update();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td><label for="width">{#advhr_dlg.width}</label></td>
<td class="nowrap">
<input id="width" name="width" type="text" value="" class="mceFocus" />
<select name="width2" id="width2">
<option value="">px</option>
<option value="%">%</option>
</select>
</td>
</tr>
<tr>
<td><label for="size">{#advhr_dlg.size}</label></td>
<td><select id="size" name="size">
<option value="">Normal</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></td>
</tr>
<tr>
<td><label for="noshade">{#advhr_dlg.noshade}</label></td>
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
</tr>
</table>
</div>
</div>
<div class="mceActionPanel">
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -1,13 +0,0 @@
#src_list, #over_list, #out_list {width:280px;}
.mceActionPanel {margin-top:7px;}
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
.checkbox {border:0;}
.panel_wrapper div.current {height:305px;}
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
#align, #classlist {width:150px;}
#width, #height {vertical-align:middle; width:50px; text-align:center;}
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
#class_list {width:180px;}
input {width: 280px;}
#constrain, #onmousemovecheck {width:auto;}
#id, #dir, #lang, #usemap, #longdesc {width:200px;}

@ -1 +0,0 @@
(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})();

@ -1,50 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
init : function(ed, url) {
// Register commands
ed.addCommand('mceAdvImage', function() {
// Internal image object like a flash placeholder
if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
return;
ed.windowManager.open({
file : url + '/image.htm',
width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('image', {
title : 'advimage.image_desc',
cmd : 'mceAdvImage'
});
},
getInfo : function() {
return {
longname : 'Advanced image',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
})();

@ -1,232 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advimage_dlg.dialog_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="../../utils/validate.js"></script>
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
<script type="text/javascript" src="js/image.js"></script>
<link href="css/advimage.css" rel="stylesheet" type="text/css" />
</head>
<body id="advimage" style="display: none">
<form onsubmit="ImageDialog.insert();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#advimage_dlg.general}</legend>
<table class="properties">
<tr>
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
<td id="srcbrowsercontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
<td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"><option value=""></option></select></td>
</tr>
<tr>
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{#advimage_dlg.preview}</legend>
<div id="prev"></div>
</fieldset>
</div>
<div id="appearance_panel" class="panel">
<fieldset>
<legend>{#advimage_dlg.tab_appearance}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
<td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
<option value="">{#not_set}</option>
<option value="baseline">{#advimage_dlg.align_baseline}</option>
<option value="top">{#advimage_dlg.align_top}</option>
<option value="middle">{#advimage_dlg.align_middle}</option>
<option value="bottom">{#advimage_dlg.align_bottom}</option>
<option value="text-top">{#advimage_dlg.align_texttop}</option>
<option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
<option value="left">{#advimage_dlg.align_left}</option>
<option value="right">{#advimage_dlg.align_right}</option>
</select>
</td>
<td rowspan="6" valign="top">
<div class="alignPreview">
<img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
erat volutpat.
</div>
</td>
</tr>
<tr>
<td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
<td class="nowrap">
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
<td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
</tr>
</table></td>
</tr>
<tr>
<td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
</td>
</tr>
<tr>
<td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
</tr>
<tr>
<td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
</tr>
<tr>
<td><label for="class_list">{#class_name}</label></td>
<td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"><option value=""></option></select></td>
</tr>
<tr>
<td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
<td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
</tr>
<!-- <tr>
<td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td>
<td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
</tr> -->
</table>
</fieldset>
</div>
<div id="advanced_panel" class="panel">
<fieldset>
<legend>{#advimage_dlg.swap_image}</legend>
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" />
<label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
<td id="onmouseoversrccontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td><label for="over_list">{#advimage_dlg.image_list}</label></td>
<td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
</tr>
<tr>
<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
<td class="column2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
<td id="onmouseoutsrccontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td><label for="out_list">{#advimage_dlg.image_list}</label></td>
<td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{#advimage_dlg.misc}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
<td>
<select id="dir" name="dir" onchange="ImageDialog.changeAppearance();">
<option value="">{#not_set}</option>
<option value="ltr">{#advimage_dlg.ltr}</option>
<option value="rtl">{#advimage_dlg.rtl}</option>
</select>
</td>
</tr>
<tr>
<td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td>
<td>
<input id="lang" name="lang" type="text" value="" />
</td>
</tr>
<tr>
<td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td>
<td>
<input id="usemap" name="usemap" type="text" value="" />
</td>
</tr>
<tr>
<td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="longdesc" name="longdesc" type="text" value="" /></td>
<td id="longdesccontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="mceActionPanel">
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

@ -1,443 +0,0 @@
var ImageDialog = {
preInit : function() {
var url;
tinyMCEPopup.requireLangPack();
if (url = tinyMCEPopup.getParam("external_image_list_url"))
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
},
init : function(ed) {
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();
tinyMCEPopup.resizeToInnerSize();
this.fillClassList('class_list');
this.fillFileList('src_list', 'tinyMCEImageList');
this.fillFileList('over_list', 'tinyMCEImageList');
this.fillFileList('out_list', 'tinyMCEImageList');
TinyMCE_EditableSelects.init();
if (n.nodeName == 'IMG') {
nl.src.value = dom.getAttrib(n, 'src');
nl.width.value = dom.getAttrib(n, 'width');
nl.height.value = dom.getAttrib(n, 'height');
nl.alt.value = dom.getAttrib(n, 'alt');
nl.title.value = dom.getAttrib(n, 'title');
nl.vspace.value = this.getAttrib(n, 'vspace');
nl.hspace.value = this.getAttrib(n, 'hspace');
nl.border.value = this.getAttrib(n, 'border');
selectByValue(f, 'align', this.getAttrib(n, 'align'));
selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true);
nl.style.value = dom.getAttrib(n, 'style');
nl.id.value = dom.getAttrib(n, 'id');
nl.dir.value = dom.getAttrib(n, 'dir');
nl.lang.value = dom.getAttrib(n, 'lang');
nl.usemap.value = dom.getAttrib(n, 'usemap');
nl.longdesc.value = dom.getAttrib(n, 'longdesc');
nl.insert.value = ed.getLang('update');
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
if (ed.settings.inline_styles) {
// Move attribs to styles
if (dom.getAttrib(n, 'align'))
this.updateStyle('align');
if (dom.getAttrib(n, 'hspace'))
this.updateStyle('hspace');
if (dom.getAttrib(n, 'border'))
this.updateStyle('border');
if (dom.getAttrib(n, 'vspace'))
this.updateStyle('vspace');
}
}
// Setup browse button
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
if (isVisible('srcbrowser'))
document.getElementById('src').style.width = '260px';
// Setup browse button
document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
if (isVisible('overbrowser'))
document.getElementById('onmouseoversrc').style.width = '260px';
// Setup browse button
document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
if (isVisible('outbrowser'))
document.getElementById('onmouseoutsrc').style.width = '260px';
// If option enabled default contrain proportions to checked
if (ed.getParam("advimage_constrain_proportions", true))
f.constrain.checked = true;
// Check swap image if valid data
if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
this.setSwapImage(true);
else
this.setSwapImage(false);
this.changeAppearance();
this.showPreviewImage(nl.src.value, 1);
},
insert : function(file, title) {
var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
if (f.src.value === '') {
if (ed.selection.getNode().nodeName == 'IMG') {
ed.dom.remove(ed.selection.getNode());
ed.execCommand('mceRepaint');
}
tinyMCEPopup.close();
return;
}
if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
if (!f.alt.value) {
tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
if (s)
t.insertAndClose();
});
return;
}
}
t.insertAndClose();
},
insertAndClose : function() {
var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
tinyMCEPopup.restoreSelection();
// Fixes crash in Safari
if (tinymce.isWebKit)
ed.getWin().focus();
if (!ed.settings.inline_styles) {
args = {
vspace : nl.vspace.value,
hspace : nl.hspace.value,
border : nl.border.value,
align : getSelectValue(f, 'align')
};
} else {
// Remove deprecated values
args = {
vspace : '',
hspace : '',
border : '',
align : ''
};
}
tinymce.extend(args, {
src : nl.src.value,
width : nl.width.value,
height : nl.height.value,
alt : nl.alt.value,
title : nl.title.value,
'class' : getSelectValue(f, 'class_list'),
style : nl.style.value,
id : nl.id.value,
dir : nl.dir.value,
lang : nl.lang.value,
usemap : nl.usemap.value,
longdesc : nl.longdesc.value
});
args.onmouseover = args.onmouseout = '';
if (f.onmousemovecheck.checked) {
if (nl.onmouseoversrc.value)
args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
if (nl.onmouseoutsrc.value)
args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
}
el = ed.selection.getNode();
if (el && el.nodeName == 'IMG') {
ed.dom.setAttribs(el, args);
} else {
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
ed.dom.setAttribs('__mce_tmp', args);
ed.dom.setAttrib('__mce_tmp', 'id', '');
ed.undoManager.add();
}
tinyMCEPopup.close();
},
getAttrib : function(e, at) {
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
if (ed.settings.inline_styles) {
switch (at) {
case 'align':
if (v = dom.getStyle(e, 'float'))
return v;
if (v = dom.getStyle(e, 'vertical-align'))
return v;
break;
case 'hspace':
v = dom.getStyle(e, 'margin-left')
v2 = dom.getStyle(e, 'margin-right');
if (v && v == v2)
return parseInt(v.replace(/[^0-9]/g, ''));
break;
case 'vspace':
v = dom.getStyle(e, 'margin-top')
v2 = dom.getStyle(e, 'margin-bottom');
if (v && v == v2)
return parseInt(v.replace(/[^0-9]/g, ''));
break;
case 'border':
v = 0;
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
sv = dom.getStyle(e, 'border-' + sv + '-width');
// False or not the same as prev
if (!sv || (sv != v && v !== 0)) {
v = 0;
return false;
}
if (sv)
v = sv;
});
if (v)
return parseInt(v.replace(/[^0-9]/g, ''));
break;
}
}
if (v = dom.getAttrib(e, at))
return v;
return '';
},
setSwapImage : function(st) {
var f = document.forms[0];
f.onmousemovecheck.checked = st;
setBrowserDisabled('overbrowser', !st);
setBrowserDisabled('outbrowser', !st);
if (f.over_list)
f.over_list.disabled = !st;
if (f.out_list)
f.out_list.disabled = !st;
f.onmouseoversrc.disabled = !st;
f.onmouseoutsrc.disabled = !st;
},
fillClassList : function(id) {
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
cl = [];
tinymce.each(v.split(';'), function(v) {
var p = v.split('=');
cl.push({'title' : p[0], 'class' : p[1]});
});
} else
cl = tinyMCEPopup.editor.dom.getClasses();
if (cl.length > 0) {
lst.options.length = 0;
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
tinymce.each(cl, function(o) {
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
});
} else
dom.remove(dom.getParent(id, 'tr'));
},
fillFileList : function(id, l) {
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
l = window[l];
lst.options.length = 0;
if (l && l.length > 0) {
lst.options[lst.options.length] = new Option('', '');
tinymce.each(l, function(o) {
lst.options[lst.options.length] = new Option(o[0], o[1]);
});
} else
dom.remove(dom.getParent(id, 'tr'));
},
resetImageData : function() {
var f = document.forms[0];
f.elements.width.value = f.elements.height.value = '';
},
updateImageData : function(img, st) {
var f = document.forms[0];
if (!st) {
f.elements.width.value = img.width;
f.elements.height.value = img.height;
}
this.preloadImg = img;
},
changeAppearance : function() {
var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg');
if (img) {
if (ed.getParam('inline_styles')) {
ed.dom.setAttrib(img, 'style', f.style.value);
} else {
img.align = f.align.value;
img.border = f.border.value;
img.hspace = f.hspace.value;
img.vspace = f.vspace.value;
}
}
},
changeHeight : function() {
var f = document.forms[0], tp, t = this;
if (!f.constrain.checked || !t.preloadImg) {
return;
}
if (f.width.value == "" || f.height.value == "")
return;
tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
f.height.value = tp.toFixed(0);
},
changeWidth : function() {
var f = document.forms[0], tp, t = this;
if (!f.constrain.checked || !t.preloadImg) {
return;
}
if (f.width.value == "" || f.height.value == "")
return;
tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
f.width.value = tp.toFixed(0);
},
updateStyle : function(ty) {
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
if (tinyMCEPopup.editor.settings.inline_styles) {
// Handle align
if (ty == 'align') {
dom.setStyle(img, 'float', '');
dom.setStyle(img, 'vertical-align', '');
v = getSelectValue(f, 'align');
if (v) {
if (v == 'left' || v == 'right')
dom.setStyle(img, 'float', v);
else
img.style.verticalAlign = v;
}
}
// Handle border
if (ty == 'border') {
dom.setStyle(img, 'border', '');
v = f.border.value;
if (v || v == '0') {
if (v == '0')
img.style.border = '0';
else
img.style.border = v + 'px solid black';
}
}
// Handle hspace
if (ty == 'hspace') {
dom.setStyle(img, 'marginLeft', '');
dom.setStyle(img, 'marginRight', '');
v = f.hspace.value;
if (v) {
img.style.marginLeft = v + 'px';
img.style.marginRight = v + 'px';
}
}
// Handle vspace
if (ty == 'vspace') {
dom.setStyle(img, 'marginTop', '');
dom.setStyle(img, 'marginBottom', '');
v = f.vspace.value;
if (v) {
img.style.marginTop = v + 'px';
img.style.marginBottom = v + 'px';
}
}
// Merge
dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img');
}
},
changeMouseMove : function() {
},
showPreviewImage : function(u, st) {
if (!u) {
tinyMCEPopup.dom.setHTML('prev', '');
return;
}
if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
this.resetImageData();
u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
if (!st)
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
else
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
}
};
ImageDialog.preInit();
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);

@ -1,43 +0,0 @@
tinyMCE.addI18n('en.advimage_dlg',{
tab_general:"General",
tab_appearance:"Appearance",
tab_advanced:"Advanced",
general:"General",
title:"Title",
preview:"Preview",
constrain_proportions:"Constrain proportions",
langdir:"Language direction",
langcode:"Language code",
long_desc:"Long description link",
style:"Style",
classes:"Classes",
ltr:"Left to right",
rtl:"Right to left",
id:"Id",
map:"Image map",
swap_image:"Swap image",
alt_image:"Alternative image",
mouseover:"for mouse over",
mouseout:"for mouse out",
misc:"Miscellaneous",
example_img:"Appearance preview image",
missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.",
dialog_title:"Insert/edit image",
src:"Image URL",
alt:"Image description",
list:"Image list",
border:"Border",
dimensions:"Dimensions",
vspace:"Vertical space",
hspace:"Horizontal space",
align:"Alignment",
align_baseline:"Baseline",
align_top:"Top",
align_middle:"Middle",
align_bottom:"Bottom",
align_texttop:"Text top",
align_textbottom:"Text bottom",
align_left:"Left",
align_right:"Right",
image_list:"Image list"
});

@ -1,8 +0,0 @@
.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
.mceActionPanel {margin-top:7px;}
.panel_wrapper div.current {height:320px;}
#classlist, #title, #href {width:280px;}
#popupurl, #popupname {width:200px;}
#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
#events_panel input {width:200px;}

@ -1 +0,0 @@
(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})();

@ -1,61 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.AdvancedLinkPlugin', {
init : function(ed, url) {
this.editor = ed;
// Register commands
ed.addCommand('mceAdvLink', function() {
var se = ed.selection;
// No selection and not in link
if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
return;
ed.windowManager.open({
file : url + '/link.htm',
width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)),
height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)),
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('link', {
title : 'advlink.link_desc',
cmd : 'mceAdvLink'
});
ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink');
ed.onNodeChange.add(function(ed, cm, n, co) {
cm.setDisabled('link', co && n.nodeName != 'A');
cm.setActive('link', n.nodeName == 'A' && !n.name);
});
},
getInfo : function() {
return {
longname : 'Advanced link',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin);
})();

@ -1,528 +0,0 @@
/* Functions for the advlink plugin popup */
tinyMCEPopup.requireLangPack();
var templates = {
"window.open" : "window.open('${url}','${target}','${options}')"
};
function preinit() {
var url;
if (url = tinyMCEPopup.getParam("external_link_list_url"))
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
}
function changeClass() {
var f = document.forms[0];
f.classes.value = getSelectValue(f, 'classlist');
}
function init() {
tinyMCEPopup.resizeToInnerSize();
var formObj = document.forms[0];
var inst = tinyMCEPopup.editor;
var elm = inst.selection.getNode();
var action = "insert";
var html;
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
// Link list
html = getLinkListHTML('linklisthref','href');
if (html == "")
document.getElementById("linklisthrefrow").style.display = 'none';
else
document.getElementById("linklisthrefcontainer").innerHTML = html;
// Resize some elements
if (isVisible('hrefbrowser'))
document.getElementById('href').style.width = '260px';
if (isVisible('popupurlbrowser'))
document.getElementById('popupurl').style.width = '180px';
elm = inst.dom.getParent(elm, "A");
if (elm != null && elm.nodeName == "A")
action = "update";
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
setPopupControlsDisabled(true);
if (action == "update") {
var href = inst.dom.getAttrib(elm, 'href');
var onclick = inst.dom.getAttrib(elm, 'onclick');
// Setup form data
setFormValue('href', href);
setFormValue('title', inst.dom.getAttrib(elm, 'title'));
setFormValue('id', inst.dom.getAttrib(elm, 'id'));
setFormValue('style', inst.dom.getAttrib(elm, "style"));
setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
setFormValue('type', inst.dom.getAttrib(elm, 'type'));
setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
setFormValue('onclick', onclick);
setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
// Parse onclick data
if (onclick != null && onclick.indexOf('window.open') != -1)
parseWindowOpen(onclick);
else
parseFunction(onclick);
// Select by the values
selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
selectByValue(formObj, 'linklisthref', href);
if (href.charAt(0) == '#')
selectByValue(formObj, 'anchorlist', href);
addClassesToList('classlist', 'advlink_styles');
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
} else
addClassesToList('classlist', 'advlink_styles');
}
function checkPrefix(n) {
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
n.value = 'mailto:' + n.value;
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
n.value = 'http://' + n.value;
}
function setFormValue(name, value) {
document.forms[0].elements[name].value = value;
}
function parseWindowOpen(onclick) {
var formObj = document.forms[0];
// Preprocess center code
if (onclick.indexOf('return false;') != -1) {
formObj.popupreturn.checked = true;
onclick = onclick.replace('return false;', '');
} else
formObj.popupreturn.checked = false;
var onClickData = parseLink(onclick);
if (onClickData != null) {
formObj.ispopup.checked = true;
setPopupControlsDisabled(false);
var onClickWindowOptions = parseOptions(onClickData['options']);
var url = onClickData['url'];
formObj.popupname.value = onClickData['target'];
formObj.popupurl.value = url;
formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
if (formObj.popupleft.value.indexOf('screen') != -1)
formObj.popupleft.value = "c";
if (formObj.popuptop.value.indexOf('screen') != -1)
formObj.popuptop.value = "c";
formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
buildOnClick();
}
}
function parseFunction(onclick) {
var formObj = document.forms[0];
var onClickData = parseLink(onclick);
// TODO: Add stuff here
}
function getOption(opts, name) {
return typeof(opts[name]) == "undefined" ? "" : opts[name];
}
function setPopupControlsDisabled(state) {
var formObj = document.forms[0];
formObj.popupname.disabled = state;
formObj.popupurl.disabled = state;
formObj.popupwidth.disabled = state;
formObj.popupheight.disabled = state;
formObj.popupleft.disabled = state;
formObj.popuptop.disabled = state;
formObj.popuplocation.disabled = state;
formObj.popupscrollbars.disabled = state;
formObj.popupmenubar.disabled = state;
formObj.popupresizable.disabled = state;
formObj.popuptoolbar.disabled = state;
formObj.popupstatus.disabled = state;
formObj.popupreturn.disabled = state;
formObj.popupdependent.disabled = state;
setBrowserDisabled('popupurlbrowser', state);
}
function parseLink(link) {
link = link.replace(new RegExp('&#39;', 'g'), "'");
var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
// Is function name a template function
var template = templates[fnName];
if (template) {
// Build regexp
var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
var replaceStr = "";
for (var i=0; i<variableNames.length; i++) {
// Is string value
if (variableNames[i].indexOf("'${") != -1)
regExp += "'(.*)'";
else // Number value
regExp += "([0-9]*)";
replaceStr += "$" + (i+1);
// Cleanup variable name
variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
if (i != variableNames.length-1) {
regExp += "\\s*,\\s*";
replaceStr += "<delim>";
} else
regExp += ".*";
}
regExp += "\\);?";
// Build variable array
var variables = [];
variables["_function"] = fnName;
var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
for (var i=0; i<variableNames.length; i++)
variables[variableNames[i]] = variableValues[i];
return variables;
}
return null;
}
function parseOptions(opts) {
if (opts == null || opts == "")
return [];
// Cleanup the options
opts = opts.toLowerCase();
opts = opts.replace(/;/g, ",");
opts = opts.replace(/[^0-9a-z=,]/g, "");
var optionChunks = opts.split(',');
var options = [];
for (var i=0; i<optionChunks.length; i++) {
var parts = optionChunks[i].split('=');
if (parts.length == 2)
options[parts[0]] = parts[1];
}
return options;
}
function buildOnClick() {
var formObj = document.forms[0];
if (!formObj.ispopup.checked) {
formObj.onclick.value = "";
return;
}
var onclick = "window.open('";
var url = formObj.popupurl.value;
onclick += url + "','";
onclick += formObj.popupname.value + "','";
if (formObj.popuplocation.checked)
onclick += "location=yes,";
if (formObj.popupscrollbars.checked)
onclick += "scrollbars=yes,";
if (formObj.popupmenubar.checked)
onclick += "menubar=yes,";
if (formObj.popupresizable.checked)
onclick += "resizable=yes,";
if (formObj.popuptoolbar.checked)
onclick += "toolbar=yes,";
if (formObj.popupstatus.checked)
onclick += "status=yes,";
if (formObj.popupdependent.checked)
onclick += "dependent=yes,";
if (formObj.popupwidth.value != "")
onclick += "width=" + formObj.popupwidth.value + ",";
if (formObj.popupheight.value != "")
onclick += "height=" + formObj.popupheight.value + ",";
if (formObj.popupleft.value != "") {
if (formObj.popupleft.value != "c")
onclick += "left=" + formObj.popupleft.value + ",";
else
onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
}
if (formObj.popuptop.value != "") {
if (formObj.popuptop.value != "c")
onclick += "top=" + formObj.popuptop.value + ",";
else
onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
}
if (onclick.charAt(onclick.length-1) == ',')
onclick = onclick.substring(0, onclick.length-1);
onclick += "');";
if (formObj.popupreturn.checked)
onclick += "return false;";
// tinyMCE.debug(onclick);
formObj.onclick.value = onclick;
if (formObj.href.value == "")
formObj.href.value = url;
}
function setAttrib(elm, attrib, value) {
var formObj = document.forms[0];
var valueElm = formObj.elements[attrib.toLowerCase()];
var dom = tinyMCEPopup.editor.dom;
if (typeof(value) == "undefined" || value == null) {
value = "";
if (valueElm)
value = valueElm.value;
}
// Clean up the style
if (attrib == 'style')
value = dom.serializeStyle(dom.parseStyle(value), 'a');
dom.setAttrib(elm, attrib, value);
}
function getAnchorListHTML(id, target) {
var inst = tinyMCEPopup.editor;
var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i;
var html = "";
html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
html += 'this.options[this.selectedIndex].value;">';
html += '<option value="">---</option>';
for (i=0; i<nodes.length; i++) {
if ((name = inst.dom.getAttrib(nodes[i], "name")) != "")
html += '<option value="#' + name + '">' + name + '</option>';
}
html += '</select>';
return html;
}
function insertAction() {
var inst = tinyMCEPopup.editor;
var elm, elementArray, i;
elm = inst.selection.getNode();
checkPrefix(document.forms[0].href);
elm = inst.dom.getParent(elm, "A");
// Remove element if there is no href
if (!document.forms[0].href.value) {
tinyMCEPopup.execCommand("mceBeginUndoLevel");
i = inst.selection.getBookmark();
inst.dom.remove(elm, 1);
inst.selection.moveToBookmark(i);
tinyMCEPopup.execCommand("mceEndUndoLevel");
tinyMCEPopup.close();
return;
}
tinyMCEPopup.execCommand("mceBeginUndoLevel");
// Create new anchor elements
if (elm == null) {
inst.getDoc().execCommand("unlink", false, null);
tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
for (i=0; i<elementArray.length; i++)
setAllAttribs(elm = elementArray[i]);
} else
setAllAttribs(elm);
// Don't move caret if selection was image
if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
inst.focus();
inst.selection.select(elm);
inst.selection.collapse(0);
tinyMCEPopup.storeSelection();
}
tinyMCEPopup.execCommand("mceEndUndoLevel");
tinyMCEPopup.close();
}
function setAllAttribs(elm) {
var formObj = document.forms[0];
var href = formObj.href.value;
var target = getSelectValue(formObj, 'targetlist');
setAttrib(elm, 'href', href);
setAttrib(elm, 'title');
setAttrib(elm, 'target', target == '_self' ? '' : target);
setAttrib(elm, 'id');
setAttrib(elm, 'style');
setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
setAttrib(elm, 'rel');
setAttrib(elm, 'rev');
setAttrib(elm, 'charset');
setAttrib(elm, 'hreflang');
setAttrib(elm, 'dir');
setAttrib(elm, 'lang');
setAttrib(elm, 'tabindex');
setAttrib(elm, 'accesskey');
setAttrib(elm, 'type');
setAttrib(elm, 'onfocus');
setAttrib(elm, 'onblur');
setAttrib(elm, 'onclick');
setAttrib(elm, 'ondblclick');
setAttrib(elm, 'onmousedown');
setAttrib(elm, 'onmouseup');
setAttrib(elm, 'onmouseover');
setAttrib(elm, 'onmousemove');
setAttrib(elm, 'onmouseout');
setAttrib(elm, 'onkeypress');
setAttrib(elm, 'onkeydown');
setAttrib(elm, 'onkeyup');
// Refresh in old MSIE
if (tinyMCE.isMSIE5)
elm.outerHTML = elm.outerHTML;
}
function getSelectValue(form_obj, field_name) {
var elm = form_obj.elements[field_name];
if (!elm || elm.options == null || elm.selectedIndex == -1)
return "";
return elm.options[elm.selectedIndex].value;
}
function getLinkListHTML(elm_id, target_form_element, onchange_func) {
if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
return "";
var html = "";
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
html += 'this.options[this.selectedIndex].value;';
if (typeof(onchange_func) != "undefined")
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
html += '"><option value="">---</option>';
for (var i=0; i<tinyMCELinkList.length; i++)
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
html += '</select>';
return html;
// tinyMCE.debug('-- image list start --', html, '-- image list end --');
}
function getTargetListHTML(elm_id, target_form_element) {
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
var html = '';
html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
html += 'this.options[this.selectedIndex].value;">';
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
for (var i=0; i<targets.length; i++) {
var key, value;
if (targets[i] == "")
continue;
key = targets[i].split('=')[0];
value = targets[i].split('=')[1];
html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
}
html += '</select>';
return html;
}
// While loading
preinit();
tinyMCEPopup.onInit.add(init);

@ -1,52 +0,0 @@
tinyMCE.addI18n('en.advlink_dlg',{
title:"Insert/edit link",
url:"Link URL",
target:"Target",
titlefield:"Title",
is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
list:"Link list",
general_tab:"General",
popup_tab:"Popup",
events_tab:"Events",
advanced_tab:"Advanced",
general_props:"General properties",
popup_props:"Popup properties",
event_props:"Events",
advanced_props:"Advanced properties",
popup_opts:"Options",
anchor_names:"Anchors",
target_same:"Open in this window / frame",
target_parent:"Open in parent window / frame",
target_top:"Open in top frame (replaces all frames)",
target_blank:"Open in new window",
popup:"Javascript popup",
popup_url:"Popup URL",
popup_name:"Window name",
popup_return:"Insert 'return false'",
popup_scrollbars:"Show scrollbars",
popup_statusbar:"Show status bar",
popup_toolbar:"Show toolbars",
popup_menubar:"Show menu bar",
popup_location:"Show location bar",
popup_resizable:"Make window resizable",
popup_dependent:"Dependent (Mozilla/Firefox only)",
popup_size:"Size",
popup_position:"Position (X/Y)",
id:"Id",
style:"Style",
classes:"Classes",
target_name:"Target name",
langdir:"Language direction",
target_langcode:"Target language",
langcode:"Language code",
encoding:"Target character encoding",
mime:"Target MIME type",
rel:"Relationship page to target",
rev:"Relationship target to page",
tabindex:"Tabindex",
accesskey:"Accesskey",
ltr:"Left to right",
rtl:"Right to left",
link_list:"Link list"
});

@ -1,333 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advlink_dlg.title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="../../utils/validate.js"></script>
<script type="text/javascript" src="js/advlink.js"></script>
<link href="css/advlink.css" rel="stylesheet" type="text/css" />
</head>
<body id="advlink" style="display: none">
<form onsubmit="insertAction();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
<li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#advlink_dlg.general_props}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
<td id="hrefbrowsercontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr id="linklisthrefrow">
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
<td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
</tr>
<tr>
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
<td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
</tr>
<tr>
<td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
<td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td>
</tr>
<tr>
<td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
<td><input id="title" name="title" type="text" value="" /></td>
</tr>
<tr>
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
<td>
<select id="classlist" name="classlist" onchange="changeClass();">
<option value="" selected="selected">{#not_set}</option>
</select>
</td>
</tr>
</table>
</fieldset>
</div>
<div id="popup_panel" class="panel">
<fieldset>
<legend>{#advlink_dlg.popup_props}</legend>
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label>&nbsp;</td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
<td id="popupurlbrowsercontainer">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label>&nbsp;</td>
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
</tr>
<tr>
<td class="nowrap"><label>{#advlink_dlg.popup_size}</label>&nbsp;</td>
<td class="nowrap">
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
</td>
</tr>
<tr>
<td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label>&nbsp;</td>
<td class="nowrap">
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
</td>
</tr>
</table>
<fieldset>
<legend>{#advlink_dlg.popup_opts}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
<td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
</tr>
<tr>
<td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
<td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
</tr>
<tr>
<td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
<td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
</tr>
<tr>
<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
<td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
</tr>
</table>
</fieldset>
</fieldset>
</div>
<div id="advanced_panel" class="panel">
<fieldset>
<legend>{#advlink_dlg.advanced_props}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" /></td>
</tr>
<tr>
<td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
<td><input type="text" id="style" name="style" value="" /></td>
</tr>
<tr>
<td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
<td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
</tr>
<tr>
<td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
<td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
</tr>
<tr>
<td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
<td>
<select id="dir" name="dir">
<option value="">{#not_set}</option>
<option value="ltr">{#advlink_dlg.ltr}</option>
<option value="rtl">{#advlink_dlg.rtl}</option>
</select>
</td>
</tr>
<tr>
<td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
<td><input type="text" id="hreflang" name="hreflang" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
<td>
<input id="lang" name="lang" type="text" value="" />
</td>
</tr>
<tr>
<td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
<td><input type="text" id="charset" name="charset" value="" /></td>
</tr>
<tr>
<td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
<td><input type="text" id="type" name="type" value="" /></td>
</tr>
<tr>
<td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
<td><select id="rel" name="rel">
<option value="">{#not_set}</option>
<option value="lightbox">Lightbox</option>
<option value="alternate">Alternate</option>
<option value="designates">Designates</option>
<option value="stylesheet">Stylesheet</option>
<option value="start">Start</option>
<option value="next">Next</option>
<option value="prev">Prev</option>
<option value="contents">Contents</option>
<option value="index">Index</option>
<option value="glossary">Glossary</option>
<option value="copyright">Copyright</option>
<option value="chapter">Chapter</option>
<option value="subsection">Subsection</option>
<option value="appendix">Appendix</option>
<option value="help">Help</option>
<option value="bookmark">Bookmark</option>
<option value="nofollow">No Follow</option>
<option value="tag">Tag</option>
</select>
</td>
</tr>
<tr>
<td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
<td><select id="rev" name="rev">
<option value="">{#not_set}</option>
<option value="alternate">Alternate</option>
<option value="designates">Designates</option>
<option value="stylesheet">Stylesheet</option>
<option value="start">Start</option>
<option value="next">Next</option>
<option value="prev">Prev</option>
<option value="contents">Contents</option>
<option value="index">Index</option>
<option value="glossary">Glossary</option>
<option value="copyright">Copyright</option>
<option value="chapter">Chapter</option>
<option value="subsection">Subsection</option>
<option value="appendix">Appendix</option>
<option value="help">Help</option>
<option value="bookmark">Bookmark</option>
</select>
</td>
</tr>
<tr>
<td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
</tr>
<tr>
<td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
</tr>
</table>
</fieldset>
</div>
<div id="events_panel" class="panel">
<fieldset>
<legend>{#advlink_dlg.event_props}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="column1"><label for="onfocus">onfocus</label></td>
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onblur">onblur</label></td>
<td><input id="onblur" name="onblur" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onclick">onclick</label></td>
<td><input id="onclick" name="onclick" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="ondblclick">ondblclick</label></td>
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onmousedown">onmousedown</label></td>
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onmouseup">onmouseup</label></td>
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onmouseover">onmouseover</label></td>
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onmousemove">onmousemove</label></td>
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onmouseout">onmouseout</label></td>
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onkeypress">onkeypress</label></td>
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onkeydown">onkeydown</label></td>
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label for="onkeyup">onkeyup</label></td>
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="mceActionPanel">
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -1 +0,0 @@
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square")},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("_mce_style")}}}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle"}).setDisabled(1);a(f[d],function(k){k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();

@ -1,154 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
var each = tinymce.each;
tinymce.create('tinymce.plugins.AdvListPlugin', {
init : function(ed, url) {
var t = this;
t.editor = ed;
function buildFormats(str) {
var formats = [];
each(str.split(/,/), function(type) {
formats.push({
title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')),
styles : {
listStyleType : type == 'default' ? '' : type
}
});
});
return formats;
};
// Setup number formats from config or default
t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");
t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square");
},
createControl: function(name, cm) {
var t = this, btn, format;
if (name == 'numlist' || name == 'bullist') {
// Default to first item if it's a default item
if (t[name][0].title == 'advlist.def')
format = t[name][0];
function hasFormat(node, format) {
var state = true;
each(format.styles, function(value, name) {
// Format doesn't match
if (t.editor.dom.getStyle(node, name) != value) {
state = false;
return false;
}
});
return state;
};
function applyListFormat() {
var list, ed = t.editor, dom = ed.dom, sel = ed.selection;
// Check for existing list element
list = dom.getParent(sel.getNode(), 'ol,ul');
// Switch/add list type if needed
if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format))
ed.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList');
// Append styles to new list element
if (format) {
list = dom.getParent(sel.getNode(), 'ol,ul');
if (list) {
dom.setStyles(list, format.styles);
list.removeAttribute('_mce_style');
}
}
};
btn = cm.createSplitButton(name, {
title : 'advanced.' + name + '_desc',
'class' : 'mce_' + name,
onclick : function() {
applyListFormat();
}
});
btn.onRenderMenu.add(function(btn, menu) {
menu.onShowMenu.add(function() {
var dom = t.editor.dom, list = dom.getParent(t.editor.selection.getNode(), 'ol,ul'), fmtList;
if (list || format) {
fmtList = t[name];
// Unselect existing items
each(menu.items, function(item) {
var state = true;
item.setSelected(0);
if (list && !item.isDisabled()) {
each(fmtList, function(fmt) {
if (fmt.id == item.id) {
if (!hasFormat(list, fmt)) {
state = false;
return false;
}
}
});
if (state)
item.setSelected(1);
}
});
// Select the current format
if (!list)
menu.items[format.id].setSelected(1);
}
});
menu.add({id : t.editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
each(t[name], function(item) {
item.id = t.editor.dom.uniqueId();
menu.add({id : item.id, title : item.title, onclick : function() {
format = item;
applyListFormat();
}});
});
});
return btn;
}
},
getInfo : function() {
return {
longname : 'Advanced lists',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin);
})();

@ -1 +0,0 @@
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this;if(a.getParam("fullscreen_is_enabled")){return}function b(){var h=a.getDoc(),e=h.body,j=h.documentElement,g=tinymce.DOM,i=d.autoresize_min_height,f;f=tinymce.isIE?e.scrollHeight:j.offsetHeight;if(f>d.autoresize_min_height){i=f}g.setStyle(g.get(a.id+"_ifr"),"height",i+"px");if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(f,e){f.setProgressState(true);d.throbbing=true;f.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(f,e){b();setTimeout(function(){b();f.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();

@ -1,119 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
/**
* Auto Resize
*
* This plugin automatically resizes the content area to fit its content height.
* It will retain a minimum height, which is the height of the content area when
* it's initialized.
*/
tinymce.create('tinymce.plugins.AutoResizePlugin', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
var t = this;
if (ed.getParam('fullscreen_is_enabled'))
return;
/**
* This method gets executed each time the editor needs to resize.
*/
function resize() {
var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
// Get height differently depending on the browser used
myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight;
// Don't make it smaller than the minimum height
if (myHeight > t.autoresize_min_height)
resizeHeight = myHeight;
// Resize content element
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
// if we're throbbing, we'll re-throb to match the new size
if (t.throbbing) {
ed.setProgressState(false);
ed.setProgressState(true);
}
};
t.editor = ed;
// Define minimum height
t.autoresize_min_height = ed.getElement().offsetHeight;
// Add appropriate listeners for resizing content area
ed.onChange.add(resize);
ed.onSetContent.add(resize);
ed.onPaste.add(resize);
ed.onKeyUp.add(resize);
ed.onPostRender.add(resize);
if (ed.getParam('autoresize_on_init', true)) {
// Things to do when the editor is ready
ed.onInit.add(function(ed, l) {
// Show throbber until content area is resized properly
ed.setProgressState(true);
t.throbbing = true;
// Hide scrollbars
ed.getBody().style.overflowY = "hidden";
});
ed.onLoadContent.add(function(ed, l) {
resize();
// Because the content area resizes when its content CSS loads,
// and we can't easily add a listener to its onload event,
// we'll just trigger a resize after a short loading period
setTimeout(function() {
resize();
// Disable throbber
ed.setProgressState(false);
t.throbbing = false;
}, 1250);
});
}
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
ed.addCommand('mceAutoResize', resize);
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Auto Resize',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
})();

@ -1 +0,0 @@
(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();m.save("TinyMCE")},getItem:function(l){var m=i.getElement();m.load("TinyMCE");return m.getAttribute(l)},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,i=h.storage;if(i){content=i.getItem(h.key);if(content){h.editor.setContent(content);h.onRestoreDraft.dispatch(h,{content:content})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce);

@ -1,422 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*
* Adds auto-save capability to the TinyMCE text editor to rescue content
* inadvertently lost. This plugin was originally developed by Speednet
* and that project can be found here: http://code.google.com/p/tinyautosave/
*
* TECHNOLOGY DISCUSSION:
*
* The plugin attempts to use the most advanced features available in the current browser to save
* as much content as possible. There are a total of four different methods used to autosave the
* content. In order of preference, they are:
*
* 1. localStorage - A new feature of HTML 5, localStorage can store megabytes of data per domain
* on the client computer. Data stored in the localStorage area has no expiration date, so we must
* manage expiring the data ourselves. localStorage is fully supported by IE8, and it is supposed
* to be working in Firefox 3 and Safari 3.2, but in reality is is flaky in those browsers. As
* HTML 5 gets wider support, the AutoSave plugin will use it automatically. In Windows Vista/7,
* localStorage is stored in the following folder:
* C:\Users\[username]\AppData\Local\Microsoft\Internet Explorer\DOMStore\[tempFolder]
*
* 2. sessionStorage - A new feature of HTML 5, sessionStorage works similarly to localStorage,
* except it is designed to expire after a certain amount of time. Because the specification
* around expiration date/time is very loosely-described, it is preferrable to use locaStorage and
* manage the expiration ourselves. sessionStorage has similar storage characteristics to
* localStorage, although it seems to have better support by Firefox 3 at the moment. (That will
* certainly change as Firefox continues getting better at HTML 5 adoption.)
*
* 3. UserData - A very under-exploited feature of Microsoft Internet Explorer, UserData is a
* way to store up to 128K of data per "document", or up to 1MB of data per domain, on the client
* computer. The feature is available for IE 5+, which makes it available for every version of IE
* supported by TinyMCE. The content is persistent across browser restarts and expires on the
* date/time specified, just like a cookie. However, the data is not cleared when the user clears
* cookies on the browser, which makes it well-suited for rescuing autosaved content. UserData,
* like other Microsoft IE browser technologies, is implemented as a behavior attached to a
* specific DOM object, so in this case we attach the behavior to the same DOM element that the
* TinyMCE editor instance is attached to.
*/
(function(tinymce) {
// Setup constants to help the compressor to reduce script size
var PLUGIN_NAME = 'autosave',
RESTORE_DRAFT = 'restoredraft',
TRUE = true,
undefined,
unloadHandlerAdded,
Dispatcher = tinymce.util.Dispatcher;
/**
* This plugin adds auto-save capability to the TinyMCE text editor to rescue content
* inadvertently lost. By using localStorage.
*
* @class tinymce.plugins.AutoSave
*/
tinymce.create('tinymce.plugins.AutoSave', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @method init
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
var self = this, settings = ed.settings;
self.editor = ed;
// Parses the specified time string into a milisecond number 10m, 10s etc.
function parseTime(time) {
var multipels = {
s : 1000,
m : 60000
};
time = /^(\d+)([ms]?)$/.exec('' + time);
return (time[2] ? multipels[time[2]] : 1) * parseInt(time);
};
// Default config
tinymce.each({
ask_before_unload : TRUE,
interval : '30s',
retention : '20m',
minlength : 50
}, function(value, key) {
key = PLUGIN_NAME + '_' + key;
if (settings[key] === undefined)
settings[key] = value;
});
// Parse times
settings.autosave_interval = parseTime(settings.autosave_interval);
settings.autosave_retention = parseTime(settings.autosave_retention);
// Register restore button
ed.addButton(RESTORE_DRAFT, {
title : PLUGIN_NAME + ".restore_content",
onclick : function() {
if (ed.getContent({draft: true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi, "").length > 0) {
// Show confirm dialog if the editor isn't empty
ed.windowManager.confirm(
PLUGIN_NAME + ".warning_message",
function(ok) {
if (ok)
self.restoreDraft();
}
);
} else
self.restoreDraft();
}
});
// Enable/disable restoredraft button depending on if there is a draft stored or not
ed.onNodeChange.add(function() {
var controlManager = ed.controlManager;
if (controlManager.get(RESTORE_DRAFT))
controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft());
});
ed.onInit.add(function() {
// Check if the user added the restore button, then setup auto storage logic
if (ed.controlManager.get(RESTORE_DRAFT)) {
// Setup storage engine
self.setupStorage(ed);
// Auto save contents each interval time
setInterval(function() {
self.storeDraft();
ed.nodeChanged();
}, settings.autosave_interval);
}
});
/**
* This event gets fired when a draft is stored to local storage.
*
* @event onStoreDraft
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
* @param {Object} draft Draft object containing the HTML contents of the editor.
*/
self.onStoreDraft = new Dispatcher(self);
/**
* This event gets fired when a draft is restored from local storage.
*
* @event onStoreDraft
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
* @param {Object} draft Draft object containing the HTML contents of the editor.
*/
self.onRestoreDraft = new Dispatcher(self);
/**
* This event gets fired when a draft removed/expired.
*
* @event onRemoveDraft
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
* @param {Object} draft Draft object containing the HTML contents of the editor.
*/
self.onRemoveDraft = new Dispatcher(self);
// Add ask before unload dialog only add one unload handler
if (!unloadHandlerAdded) {
window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler;
unloadHandlerAdded = TRUE;
}
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @method getInfo
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Auto save',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
/**
* Returns an expiration date UTC string.
*
* @method getExpDate
* @return {String} Expiration date UTC string.
*/
getExpDate : function() {
return new Date(
new Date().getTime() + this.editor.settings.autosave_retention
).toUTCString();
},
/**
* This method will setup the storage engine. If the browser has support for it.
*
* @method setupStorage
*/
setupStorage : function(ed) {
var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK";
self.key = PLUGIN_NAME + ed.id;
// Loop though each storage engine type until we find one that works
tinymce.each([
function() {
// Try HTML5 Local Storage
if (localStorage) {
localStorage.setItem(testKey, testVal);
if (localStorage.getItem(testKey) === testVal) {
localStorage.removeItem(testKey);
return localStorage;
}
}
},
function() {
// Try HTML5 Session Storage
if (sessionStorage) {
sessionStorage.setItem(testKey, testVal);
if (sessionStorage.getItem(testKey) === testVal) {
sessionStorage.removeItem(testKey);
return sessionStorage;
}
}
},
function() {
// Try IE userData
if (tinymce.isIE) {
ed.getElement().style.behavior = "url('#default#userData')";
// Fake localStorage on old IE
return {
autoExpires : TRUE,
setItem : function(key, value) {
var userDataElement = ed.getElement();
userDataElement.setAttribute(key, value);
userDataElement.expires = self.getExpDate();
userDataElement.save("TinyMCE");
},
getItem : function(key) {
var userDataElement = ed.getElement();
userDataElement.load("TinyMCE");
return userDataElement.getAttribute(key);
},
removeItem : function(key) {
ed.getElement().removeAttribute(key);
}
};
}
},
], function(setup) {
// Try executing each function to find a suitable storage engine
try {
self.storage = setup();
if (self.storage)
return false;
} catch (e) {
// Ignore
}
});
},
/**
* This method will store the current contents in the the storage engine.
*
* @method storeDraft
*/
storeDraft : function() {
var self = this, storage = self.storage, editor = self.editor, expires, content;
// Is the contents dirty
if (storage) {
// If there is no existing key and the contents hasn't been changed since
// it's original value then there is no point in saving a draft
if (!storage.getItem(self.key) && !editor.isDirty())
return;
// Store contents if the contents if longer than the minlength of characters
content = editor.getContent({draft: true});
if (content.length > editor.settings.autosave_minlength) {
expires = self.getExpDate();
// Store expiration date if needed IE userData has auto expire built in
if (!self.storage.autoExpires)
self.storage.setItem(self.key + "_expires", expires);
self.storage.setItem(self.key, content);
self.onStoreDraft.dispatch(self, {
expires : expires,
content : content
});
}
}
},
/**
* This method will restore the contents from the storage engine back to the editor.
*
* @method restoreDraft
*/
restoreDraft : function() {
var self = this, storage = self.storage;
if (storage) {
content = storage.getItem(self.key);
if (content) {
self.editor.setContent(content);
self.onRestoreDraft.dispatch(self, {
content : content
});
}
}
},
/**
* This method will return true/false if there is a local storage draft available.
*
* @method hasDraft
* @return {boolean} true/false state if there is a local draft.
*/
hasDraft : function() {
var self = this, storage = self.storage, expDate, exists;
if (storage) {
// Does the item exist at all
exists = !!storage.getItem(self.key);
if (exists) {
// Storage needs autoexpire
if (!self.storage.autoExpires) {
expDate = new Date(storage.getItem(self.key + "_expires"));
// Contents hasn't expired
if (new Date().getTime() < expDate.getTime())
return TRUE;
// Remove it if it has
self.removeDraft();
} else
return TRUE;
}
}
return false;
},
/**
* Removes the currently stored draft.
*
* @method removeDraft
*/
removeDraft : function() {
var self = this, storage = self.storage, key = self.key, content;
if (storage) {
// Get current contents and remove the existing draft
content = storage.getItem(key);
storage.removeItem(key);
storage.removeItem(key + "_expires");
// Dispatch remove event if we had any contents
if (content) {
self.onRemoveDraft.dispatch(self, {
content : content
});
}
}
},
"static" : {
// Internal unload handler will be called before the page is unloaded
_beforeUnloadHandler : function(e) {
var msg;
tinymce.each(tinyMCE.editors, function(ed) {
// Store a draft for each editor instance
if (ed.plugins.autosave)
ed.plugins.autosave.storeDraft();
// Never ask in fullscreen mode
if (ed.getParam("fullscreen_is_enabled"))
return;
// Setup a return message if the editor is dirty
if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload"))
msg = ed.getLang("autosave.unload_msg");
});
return msg;
}
}
});
tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave);
})(tinymce);

@ -1,4 +0,0 @@
tinyMCE.addI18n('en.autosave',{
restore_content: "Restore auto-saved content",
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
});

@ -1 +0,0 @@
(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/&nbsp;/gi," ");b(/&quot;/gi,'"');b(/&lt;/gi,"<");b(/&gt;/gi,">");b(/&amp;/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();

@ -1,120 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.BBCodePlugin', {
init : function(ed, url) {
var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
ed.onBeforeSetContent.add(function(ed, o) {
o.content = t['_' + dialect + '_bbcode2html'](o.content);
});
ed.onPostProcess.add(function(ed, o) {
if (o.set)
o.content = t['_' + dialect + '_bbcode2html'](o.content);
if (o.get)
o.content = t['_' + dialect + '_html2bbcode'](o.content);
});
},
getInfo : function() {
return {
longname : 'BBCode Plugin',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
// Private methods
// HTML -> BBCode in PunBB dialect
_punbb_html2bbcode : function(s) {
s = tinymce.trim(s);
function rep(re, str) {
s = s.replace(re, str);
};
// example: <strong> to [b]
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
rep(/<font>(.*?)<\/font>/gi,"$1");
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");
rep(/<\/(strong|b)>/gi,"[/b]");
rep(/<(strong|b)>/gi,"[b]");
rep(/<\/(em|i)>/gi,"[/i]");
rep(/<(em|i)>/gi,"[i]");
rep(/<\/u>/gi,"[/u]");
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
rep(/<u>/gi,"[u]");
rep(/<blockquote[^>]*>/gi,"[quote]");
rep(/<\/blockquote>/gi,"[/quote]");
rep(/<br \/>/gi,"\n");
rep(/<br\/>/gi,"\n");
rep(/<br>/gi,"\n");
rep(/<p>/gi,"");
rep(/<\/p>/gi,"\n");
rep(/&nbsp;/gi," ");
rep(/&quot;/gi,"\"");
rep(/&lt;/gi,"<");
rep(/&gt;/gi,">");
rep(/&amp;/gi,"&");
return s;
},
// BBCode -> HTML from PunBB dialect
_punbb_bbcode2html : function(s) {
s = tinymce.trim(s);
function rep(re, str) {
s = s.replace(re, str);
};
// example: [b] to <strong>
rep(/\n/gi,"<br />");
rep(/\[b\]/gi,"<strong>");
rep(/\[\/b\]/gi,"</strong>");
rep(/\[i\]/gi,"<em>");
rep(/\[\/i\]/gi,"</em>");
rep(/\[u\]/gi,"<u>");
rep(/\[\/u\]/gi,"</u>");
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");
rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span>&nbsp;");
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span>&nbsp;");
return s;
}
});
// Register plugin
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
})();

@ -1 +0,0 @@
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(d){var f=this,g;f.editor=d;f.onContextMenu=new tinymce.util.Dispatcher(this);d.onContextMenu.add(function(h,i){if(!i.ctrlKey){if(g){h.selection.setRng(g)}f._getMenu(h).showMenu(i.clientX,i.clientY);a.add(h.getDoc(),"click",function(j){e(h,j)});a.cancel(i)}});d.onRemove.add(function(){if(f._menu){f._menu.removeAll()}});function e(h,i){g=null;if(i&&i.button==2){g=h.selection.getRng();return}if(f._menu){f._menu.removeAll();f._menu.destroy();a.remove(h.getDoc(),"click",e)}}d.onMouseDown.add(e);d.onKeyDown.add(e)},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(h){var l=this,f=l._menu,i=h.selection,e=i.isCollapsed(),d=i.getNode()||h.getBody(),g,k,j;if(f){f.removeAll();f.destroy()}k=b.getPos(h.getContentAreaContainer());j=b.getPos(h.getContainer());f=h.controlManager.createDropMenu("contextmenu",{offset_x:k.x+h.getParam("contextmenu_offset_x",0),offset_y:k.y+h.getParam("contextmenu_offset_y",0),constrain:1});l._menu=f;f.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(e);f.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(e);f.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((d.nodeName=="A"&&!h.dom.getAttrib(d,"name"))||!e){f.addSeparator();f.add({title:"advanced.link_desc",icon:"link",cmd:h.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}f.addSeparator();f.add({title:"advanced.image_desc",icon:"image",cmd:h.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator();g=f.addMenu({title:"contextmenu.align"});g.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});g.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});g.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});g.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});l.onContextMenu.dispatch(l,f,d,e);return f}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();

@ -1,147 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM;
/**
* This plugin a context menu to TinyMCE editor instances.
*
* @class tinymce.plugins.ContextMenu
*/
tinymce.create('tinymce.plugins.ContextMenu', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @method init
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed) {
var t = this, lastRng;
t.editor = ed;
/**
* This event gets fired when the context menu is shown.
*
* @event onContextMenu
* @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event.
* @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed.
*/
t.onContextMenu = new tinymce.util.Dispatcher(this);
ed.onContextMenu.add(function(ed, e) {
if (!e.ctrlKey) {
// Restore the last selection since it was removed
if (lastRng)
ed.selection.setRng(lastRng);
t._getMenu(ed).showMenu(e.clientX, e.clientY);
Event.add(ed.getDoc(), 'click', function(e) {
hide(ed, e);
});
Event.cancel(e);
}
});
ed.onRemove.add(function() {
if (t._menu)
t._menu.removeAll();
});
function hide(ed, e) {
lastRng = null;
// Since the contextmenu event moves
// the selection we need to store it away
if (e && e.button == 2) {
lastRng = ed.selection.getRng();
return;
}
if (t._menu) {
t._menu.removeAll();
t._menu.destroy();
Event.remove(ed.getDoc(), 'click', hide);
}
};
ed.onMouseDown.add(hide);
ed.onKeyDown.add(hide);
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @method getInfo
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Contextmenu',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
_getMenu : function(ed) {
var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p1, p2;
if (m) {
m.removeAll();
m.destroy();
}
p1 = DOM.getPos(ed.getContentAreaContainer());
p2 = DOM.getPos(ed.getContainer());
m = ed.controlManager.createDropMenu('contextmenu', {
offset_x : p1.x + ed.getParam('contextmenu_offset_x', 0),
offset_y : p1.y + ed.getParam('contextmenu_offset_y', 0),
constrain : 1
});
t._menu = m;
m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col);
m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col);
m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'});
if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) {
m.addSeparator();
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
}
m.addSeparator();
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
m.addSeparator();
am = m.addMenu({title : 'contextmenu.align'});
am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'});
am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'});
am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'});
am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'});
t.onContextMenu.dispatch(t, m, el, col);
return m;
}
});
// Register plugin
tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu);
})();

@ -1 +0,0 @@
(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();

@ -1,82 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.Directionality', {
init : function(ed, url) {
var t = this;
t.editor = ed;
ed.addCommand('mceDirectionLTR', function() {
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
if (e) {
if (ed.dom.getAttrib(e, "dir") != "ltr")
ed.dom.setAttrib(e, "dir", "ltr");
else
ed.dom.setAttrib(e, "dir", "");
}
ed.nodeChanged();
});
ed.addCommand('mceDirectionRTL', function() {
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
if (e) {
if (ed.dom.getAttrib(e, "dir") != "rtl")
ed.dom.setAttrib(e, "dir", "rtl");
else
ed.dom.setAttrib(e, "dir", "");
}
ed.nodeChanged();
});
ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
ed.onNodeChange.add(t._nodeChange, t);
},
getInfo : function() {
return {
longname : 'Directionality',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
// Private methods
_nodeChange : function(ed, cm, n) {
var dom = ed.dom, dir;
n = dom.getParent(n, dom.isBlock);
if (!n) {
cm.setDisabled('ltr', 1);
cm.setDisabled('rtl', 1);
return;
}
dir = dom.getAttrib(n, 'dir');
cm.setActive('ltr', dir == "ltr");
cm.setDisabled('ltr', 0);
cm.setActive('rtl', dir == "rtl");
cm.setDisabled('rtl', 0);
}
});
// Register plugin
tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
})();

@ -1 +0,0 @@
(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce);

@ -1,43 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function(tinymce) {
tinymce.create('tinymce.plugins.EmotionsPlugin', {
init : function(ed, url) {
// Register commands
ed.addCommand('mceEmotion', function() {
ed.windowManager.open({
file : url + '/emotions.htm',
width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
},
getInfo : function() {
return {
longname : 'Emotions',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
})(tinymce);

@ -1,40 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#emotions_dlg.title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/emotions.js"></script>
</head>
<body style="display: none">
<div align="center">
<div class="title">{#emotions_dlg.title}:<br /><br /></div>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td><a href="javascript:EmotionsDialog.insert('smiley-cool.gif','emotions_dlg.cool');"><img src="img/smiley-cool.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cool}" title="{#emotions_dlg.cool}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-cry.gif','emotions_dlg.cry');"><img src="img/smiley-cry.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cry}" title="{#emotions_dlg.cry}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-embarassed.gif','emotions_dlg.embarassed');"><img src="img/smiley-embarassed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.embarassed}" title="{#emotions_dlg.embarassed}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-foot-in-mouth.gif','emotions_dlg.foot_in_mouth');"><img src="img/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.foot_in_mouth}" title="{#emotions_dlg.foot_in_mouth}" /></a></td>
</tr>
<tr>
<td><a href="javascript:EmotionsDialog.insert('smiley-frown.gif','emotions_dlg.frown');"><img src="img/smiley-frown.gif" width="18" height="18" border="0" alt="{#emotions_dlg.frown}" title="{#emotions_dlg.frown}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-innocent.gif','emotions_dlg.innocent');"><img src="img/smiley-innocent.gif" width="18" height="18" border="0" alt="{#emotions_dlg.innocent}" title="{#emotions_dlg.innocent}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-kiss.gif','emotions_dlg.kiss');"><img src="img/smiley-kiss.gif" width="18" height="18" border="0" alt="{#emotions_dlg.kiss}" title="{#emotions_dlg.kiss}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-laughing.gif','emotions_dlg.laughing');"><img src="img/smiley-laughing.gif" width="18" height="18" border="0" alt="{#emotions_dlg.laughing}" title="{#emotions_dlg.laughing}" /></a></td>
</tr>
<tr>
<td><a href="javascript:EmotionsDialog.insert('smiley-money-mouth.gif','emotions_dlg.money_mouth');"><img src="img/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.money_mouth}" title="{#emotions_dlg.money_mouth}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-sealed.gif','emotions_dlg.sealed');"><img src="img/smiley-sealed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.sealed}" title="{#emotions_dlg.sealed}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-smile.gif','emotions_dlg.smile');"><img src="img/smiley-smile.gif" width="18" height="18" border="0" alt="{#emotions_dlg.smile}" title="{#emotions_dlg.smile}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-surprised.gif','emotions_dlg.surprised');"><img src="img/smiley-surprised.gif" width="18" height="18" border="0" alt="{#emotions_dlg.surprised}" title="{#emotions_dlg.surprised}" /></a></td>
</tr>
<tr>
<td><a href="javascript:EmotionsDialog.insert('smiley-tongue-out.gif','emotions_dlg.tongue_out');"><img src="img/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{#emotions_dlg.tongue-out}" title="{#emotions_dlg.tongue_out}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-undecided.gif','emotions_dlg.undecided');"><img src="img/smiley-undecided.gif" width="18" height="18" border="0" alt="{#emotions_dlg.undecided}" title="{#emotions_dlg.undecided}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-wink.gif','emotions_dlg.wink');"><img src="img/smiley-wink.gif" width="18" height="18" border="0" alt="{#emotions_dlg.wink}" title="{#emotions_dlg.wink}" /></a></td>
<td><a href="javascript:EmotionsDialog.insert('smiley-yell.gif','emotions_dlg.yell');"><img src="img/smiley-yell.gif" width="18" height="18" border="0" alt="{#emotions_dlg.yell}" title="{#emotions_dlg.yell}" /></a></td>
</tr>
</table>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save