mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
trackback - admin logging, plugin.xml
This commit is contained in:
@@ -1,46 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| <20>Steve Dunstan 2001-2002
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| jalist@e107.org
|
*
|
||||||
|
|
* Plugin administration - newsfeeds
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/admin_config.php,v $
|
||||||
|
|
* $Revision: 1.3 $
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/admin_config.php,v $
|
* $Date: 2008-12-20 22:32:36 $
|
||||||
| $Revision: 1.2 $
|
* $Author: e107steved $
|
||||||
| $Date: 2007-12-26 14:19:54 $
|
*
|
||||||
| $Author: e107steved $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
require_once("../../class2.php");
|
require_once("../../class2.php");
|
||||||
if (!getperms("P")) {
|
if (!getperms("P") || !plugInstalled('trackback'))
|
||||||
|
{
|
||||||
header("location:".e_BASE."index.php");
|
header("location:".e_BASE."index.php");
|
||||||
exit ;
|
exit() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include_once(e_PLUGIN."trackback/languages/".e_LANGUAGE.".php");
|
@include_lan(e_PLUGIN."trackback/languages/".e_LANGUAGE."_admin_trackback.php");
|
||||||
@include_once(e_PLUGIN."trackback/languages/English.php");
|
|
||||||
|
|
||||||
require_once(e_ADMIN."auth.php");
|
require_once(e_ADMIN."auth.php");
|
||||||
|
|
||||||
if (isset($_POST['updatesettings']))
|
if (isset($_POST['updatesettings']))
|
||||||
{
|
{
|
||||||
if ($pref['trackbackEnabled'] != $_POST['trackbackEnabled'])
|
$temp = array();
|
||||||
{
|
if ($pref['trackbackEnabled'] != $_POST['trackbackEnabled'])
|
||||||
$pref['trackbackEnabled'] = $_POST['trackbackEnabled'];
|
{
|
||||||
$e107cache->clear("news.php");
|
$temp['trackbackEnabled'] = $_POST['trackbackEnabled'];
|
||||||
}
|
$e107cache->clear('news.php');
|
||||||
$pref['trackbackString'] = $tp->toDB($_POST['trackbackString']);
|
}
|
||||||
save_prefs();
|
$temp['trackbackString'] = $tp->toDB($_POST['trackbackString']);
|
||||||
$message = TRACKBACK_L4;
|
if ($admin_log->logArrayDiffs($temp, $pref, 'TRACK_01'))
|
||||||
|
{
|
||||||
|
save_prefs(); // Only save if changes
|
||||||
|
$message = TRACKBACK_L4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = TRACKBACK_L17;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isset($message)) {
|
if (isset($message))
|
||||||
|
{
|
||||||
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
|
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,19 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system : http://e107.org
|
*
|
||||||
| Steve Dunstan 2001-2002 : jalist@e107.org
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| Released under the terms and conditions of the GNU General Public License (http://gnu.org).
|
* Released under the terms and conditions of the
|
||||||
|
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/e_meta.php,v $
|
*
|
||||||
| $Revision: 1.3 $
|
* Plugin administration - newsfeeds
|
||||||
| $Date: 2007-07-12 12:59:05 $
|
*
|
||||||
| $Author: sweetas $
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/e_meta.php,v $
|
||||||
+-----------------------------------------------------------------------------------------------+
|
* $Revision: 1.4 $
|
||||||
|
* $Date: 2008-12-20 22:32:36 $
|
||||||
|
* $Author: e107steved $
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
if(isset($pref['trackbackEnabled'])){
|
if(plugInstalled('trackback') && isset($pref['trackbackEnabled']))
|
||||||
|
{
|
||||||
echo "<link rel='pingback' href='".SITEURLBASE.e_PLUGIN_ABS."trackback/trackback.php' />";
|
echo "<link rel='pingback' href='".SITEURLBASE.e_PLUGIN_ABS."trackback/trackback.php' />";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,20 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| ©Steve Dunstan 2001-2002
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| jalist@e107.org
|
*
|
||||||
|
|
* Plugin administration - newsfeeds
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/languages/English_admin_trackback.php,v $
|
||||||
|
|
* $Revision: 1.1 $
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/languages/English.php,v $
|
* $Date: 2008-12-20 22:32:36 $
|
||||||
| $Revision: 1.1.1.1 $
|
* $Author: e107steved $
|
||||||
| $Date: 2006-12-02 04:35:43 $
|
*
|
||||||
| $Author: mcfly_e107 $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define("TRACKBACK_L1", "Configure Trackback");
|
define("TRACKBACK_L1", "Configure Trackback");
|
||||||
@@ -33,5 +31,13 @@ define("TRACKBACK_L12", "No trackbacks for this item");
|
|||||||
define("TRACKBACK_L13", "Moderate trackbacks");
|
define("TRACKBACK_L13", "Moderate trackbacks");
|
||||||
define("TRACKBACK_L14", "Delete");
|
define("TRACKBACK_L14", "Delete");
|
||||||
define("TRACKBACK_L15", "Trackbacks deleted.");
|
define("TRACKBACK_L15", "Trackbacks deleted.");
|
||||||
|
define('TRACKBACK_L16', 'Trackback');
|
||||||
|
define('TRACKBACK_L17', 'Nothing changed - not saved');
|
||||||
|
|
||||||
|
|
||||||
|
// Admin log messages
|
||||||
|
//-------------------
|
||||||
|
define('LAN_AL_TRACK_01', 'Trackback settings changed');
|
||||||
|
define('LAN_AL_TRACK_02', 'Trackback items deleted');
|
||||||
|
|
||||||
?>
|
?>
|
@@ -1,49 +1,62 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| <20>Steve Dunstan 2001-2002
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| jalist@e107.org
|
*
|
||||||
|
|
* Plugin administration - newsfeeds
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/modtrackback.php,v $
|
||||||
|
|
* $Revision: 1.4 $
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/modtrackback.php,v $
|
* $Date: 2008-12-20 22:32:36 $
|
||||||
| $Revision: 1.3 $
|
* $Author: e107steved $
|
||||||
| $Date: 2008-08-04 20:31:49 $
|
*
|
||||||
| $Author: e107steved $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
$eplug_admin = true;
|
||||||
require_once("../../class2.php");
|
require_once("../../class2.php");
|
||||||
|
|
||||||
if (!getperms("P") || !$pref['trackbackEnabled'])
|
if (!getperms("P") || !plugInstalled('trackback') || !$pref['trackbackEnabled'])
|
||||||
{
|
{
|
||||||
header("location:".e_BASE."index.php");
|
header("location:".e_BASE."index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once(e_ADMIN."auth.php");
|
require_once(e_ADMIN."auth.php");
|
||||||
if (IsSet($_POST['moderate']))
|
if (isset($_POST['moderate']))
|
||||||
{
|
{
|
||||||
if (is_array($_POST['trackback_delete']))
|
$temp = array();
|
||||||
{
|
if (is_array($_POST['trackback_delete']))
|
||||||
while (list ($key, $cid) = each ($_POST['trackback_delete']))
|
|
||||||
{
|
{
|
||||||
$sql->db_Delete("trackback", "trackback_id='".intval($cid)."' ");
|
while (list ($key, $cid) = each ($_POST['trackback_delete']))
|
||||||
|
{
|
||||||
|
$cid = intval($cid);
|
||||||
|
if ($cid > 0)
|
||||||
|
{
|
||||||
|
$sql->db_Delete("trackback", "trackback_id=".$cid);
|
||||||
|
$temp[] = $cid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count($temp))
|
||||||
|
{
|
||||||
|
$admin_log->log_event('TRACK_02',implode(', ',$temp), E_LOG_INFORMATIVE,'');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
$ns->tablerender("", "<div style='text-align:center'><b>".TRACKBACK_L15."</b></div>");
|
||||||
$ns->tablerender("", "<div style='text-align:center'><b>".TRACKBACK_L15."</b></div>");
|
$e107cache->clear("news.php");
|
||||||
$e107cache->clear("news.php");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = "<div style='text-align:center'>
|
$text = "<div style='text-align:center'>
|
||||||
<form method='post' action='".e_SELF."?".e_QUERY."'>
|
<form method='post' action='".e_SELF."?".e_QUERY."'>
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>";
|
<table style='".ADMIN_WIDTH."' class='fborder'>";
|
||||||
|
|
||||||
if (e_QUERY=='all') {
|
if (e_QUERY=='all')
|
||||||
|
{
|
||||||
$res=$sql->db_Select("trackback", "*");
|
$res=$sql->db_Select("trackback", "*");
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$res=$sql->db_Select("trackback", "*", "trackback_pid=".intval(e_QUERY));
|
$res=$sql->db_Select("trackback", "*", "trackback_pid=".intval(e_QUERY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
+ ----------------------------------------------------------------------------+
|
|
||||||
| e107 website system
|
|
||||||
|
|
|
||||||
| <20>Steve Dunstan 2001-2002
|
|
||||||
| http://e107.org
|
|
||||||
| jalist@e107.org
|
|
||||||
|
|
|
||||||
| Released under the terms and conditions of the
|
|
||||||
| GNU General Public License (http://gnu.org).
|
|
||||||
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/plugin.php,v $
|
|
||||||
| $Revision: 1.1.1.1 $
|
|
||||||
| $Date: 2006-12-02 04:35:43 $
|
|
||||||
| $Author: mcfly_e107 $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
|
||||||
|
|
||||||
include_lan(e_PLUGIN."trackback/languages/".e_LANGUAGE.".php");
|
|
||||||
|
|
||||||
// Plugin info -------------------------------------------------------------------------------------------------------
|
|
||||||
$eplug_name = "Trackback";
|
|
||||||
$eplug_version = "1.1";
|
|
||||||
$eplug_author = "jalist";
|
|
||||||
$eplug_url = "http://e107.org";
|
|
||||||
$eplug_email = "jalist@e107.org";
|
|
||||||
$eplug_description = TRACKBACK_L2;
|
|
||||||
$eplug_compatible = "e107v0.7+";
|
|
||||||
$eplug_readme = "";
|
|
||||||
// leave blank if no readme file
|
|
||||||
|
|
||||||
// Name of the plugin's folder -------------------------------------------------------------------------------------
|
|
||||||
$eplug_folder = "trackback";
|
|
||||||
|
|
||||||
// Mane of menu item for plugin ----------------------------------------------------------------------------------
|
|
||||||
$eplug_menu_name = "";
|
|
||||||
|
|
||||||
// Name of the admin configuration file --------------------------------------------------------------------------
|
|
||||||
$eplug_conffile = "admin_config.php";
|
|
||||||
|
|
||||||
// Icon image and caption text ------------------------------------------------------------------------------------
|
|
||||||
$eplug_icon = $eplug_folder."/images/trackback_32.png";
|
|
||||||
$eplug_icon_small = $eplug_folder."/images/trackback_16.png";
|
|
||||||
$eplug_caption = TRACKBACK_L1;
|
|
||||||
|
|
||||||
// List of preferences -----------------------------------------------------------------------------------------------
|
|
||||||
$eplug_prefs = array(
|
|
||||||
"trackbackEnabled" => 0,
|
|
||||||
"trackbackString" => "<span class='smalltext'><b>".TRACKBACK_L11."</b></span>"
|
|
||||||
);
|
|
||||||
|
|
||||||
// List of table names -----------------------------------------------------------------------------------------------
|
|
||||||
$eplug_table_names = array(
|
|
||||||
"trackback");
|
|
||||||
|
|
||||||
// List of sql requests to create tables -----------------------------------------------------------------------------
|
|
||||||
$eplug_tables = array(
|
|
||||||
"CREATE TABLE ".MPREFIX."trackback (
|
|
||||||
trackback_id int(10) unsigned NOT NULL auto_increment,
|
|
||||||
trackback_pid int(10) unsigned NOT NULL default '0',
|
|
||||||
trackback_title varchar(200) NOT NULL default '',
|
|
||||||
trackback_excerpt varchar(250) NOT NULL default '',
|
|
||||||
trackback_url varchar(150) NOT NULL default '',
|
|
||||||
trackback_blogname varchar(150) NOT NULL default '',
|
|
||||||
PRIMARY KEY (trackback_id),
|
|
||||||
KEY trackback_pid (trackback_pid)
|
|
||||||
) TYPE=MyISAM;");
|
|
||||||
|
|
||||||
// Create a link in main menu (yes=TRUE, no=FALSE) -------------------------------------------------------------
|
|
||||||
$eplug_link = FALSE;
|
|
||||||
$eplug_link_name = "";
|
|
||||||
$ec_dir = "";
|
|
||||||
$eplug_link_url = "";
|
|
||||||
|
|
||||||
|
|
||||||
// Text to display after plugin successfully installed ------------------------------------------------------------------
|
|
||||||
$eplug_done = TRACKBACK_L3;
|
|
||||||
$upgrade_alter_tables = array(
|
|
||||||
"ALTER TABLE ".MPREFIX."trackback ADD INDEX (trackback_pid);"
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
22
e107_plugins/trackback/plugin.xml
Normal file
22
e107_plugins/trackback/plugin.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
|
||||||
|
<!-- $Id: plugin.xml,v 1.1 2008-12-20 22:32:36 e107steved Exp $ -->
|
||||||
|
|
||||||
|
<e107Plugin name="TRACKBACK_L16" version="1.1" compatibility="0.8" installRequired="true">
|
||||||
|
<author name="jalist" url="http://e107.org" email="jalist@e107.org" />
|
||||||
|
<description>TRACKBACK_L2</description>
|
||||||
|
<folder>trackback</folder>
|
||||||
|
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||||
|
<logLanguageFile filename="languages/--LAN--_admin_trackback.php" />
|
||||||
|
<administration>
|
||||||
|
<configFile>admin_config.php</configFile>
|
||||||
|
<icon>images/trackback_32.png</icon>
|
||||||
|
<iconSmall>images/trackback_16.png</iconSmall>
|
||||||
|
<caption>TRACKBACK_L1</caption>
|
||||||
|
<installDone>TRACKBACK_L3</installDone>
|
||||||
|
</administration>
|
||||||
|
<mainPrefs>
|
||||||
|
<pref name="trackbackEnabled" value="0" />
|
||||||
|
<pref name="trackbackString" value="Trackback address for this post:" />
|
||||||
|
</mainPrefs>
|
||||||
|
</e107Plugin>
|
@@ -1,22 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| <20>Steve Dunstan 2001-2002
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| jalist@e107.org
|
*
|
||||||
|
|
* Plugin administration - newsfeeds
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/trackback.php,v $
|
||||||
|
|
* $Revision: 1.2 $
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/trackback.php,v $
|
* $Date: 2008-12-20 22:32:36 $
|
||||||
| $Revision: 1.1.1.1 $
|
* $Author: e107steved $
|
||||||
| $Date: 2006-12-02 04:35:43 $
|
*
|
||||||
| $Author: mcfly_e107 $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
require_once("../../class2.php");
|
require_once("../../class2.php");
|
||||||
|
if (!plugInstalled('trackback'))
|
||||||
|
{
|
||||||
|
exit();
|
||||||
|
}
|
||||||
header('Content-Type: text/xml');
|
header('Content-Type: text/xml');
|
||||||
include(e_PLUGIN."trackback/trackbackClass.php");
|
include(e_PLUGIN."trackback/trackbackClass.php");
|
||||||
$trackback = trackbackClass :: respondTrackback();
|
$trackback = trackbackClass :: respondTrackback();
|
||||||
|
@@ -1,20 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| <20>Steve Dunstan 2001-2002
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| jalist@e107.org
|
*
|
||||||
|
|
* Plugin administration - newsfeeds
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/trackbackClass.php,v $
|
||||||
|
|
* $Revision: 1.6 $
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/trackbackClass.php,v $
|
* $Date: 2008-12-20 22:32:36 $
|
||||||
| $Revision: 1.5 $
|
* $Author: e107steved $
|
||||||
| $Date: 2007-12-10 22:39:43 $
|
*
|
||||||
| $Author: e107steved $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
Reference in New Issue
Block a user