1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

We will no longer be maintaining "links_page". Feel free to continue where we left off and share on Github.

This commit is contained in:
Cameron
2012-12-22 01:53:02 -08:00
parent c1d21f18b6
commit 949c2cc8f9
32 changed files with 0 additions and 4948 deletions

View File

@@ -1,338 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2012 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Links plugin
*
* $URL$
* $Revision$
* $Date$
* $Author$
*/
/**
* e107 Links plugin
*
* @package e107_plugins
* @subpackage links
* @version $Id$;
*/
require_once('../../class2.php');
if (!getperms('P') || !plugInstalled('links_page'))
{
header('location:'.e_BASE.'index.php');
exit();
}
require_once(e_PLUGIN.'links_page/link_shortcodes.php');
require_once(e_PLUGIN.'links_page/link_defines.php');
require_once(e_ADMIN.'auth.php');
require_once(e_HANDLER.'userclass_class.php');
require_once(e_HANDLER.'form_handler.php');
$rs = new form; // FIX v2 style?
$frm = e107::getForm();
require_once(e_HANDLER.'file_class.php');
$fl = new e_file;
e107_require_once(e_HANDLER.'arraystorage_class.php');
$eArrayStorage = new ArrayData();
require_once(e_PLUGIN.'links_page/link_class.php');
$lc = new linkclass;
include_lan(e_PLUGIN.'links_page/languages/'.e_LANGUAGE.'.php');
$linkspage_pref = $lc->getLinksPagePref();
//$deltest = array_flip($_POST); // Not used any more
if(e_QUERY)
{
$qs = explode('.', e_QUERY);
if(is_numeric($qs[0]))
{
$from = array_shift($qs);
}
else
{
$from = '0';
}
}
$incdec_action = '';
foreach($_POST as $k => $v)
{
if ((preg_match("#^(inc|dec)".URL_SEPARATOR."(\d+)".URL_SEPARATOR."(\d+)".URL_SEPARATOR."(\d+){0,1}_[x|y]#", $k, $matches)))
{
$incdec_action = $matches[1]; // (inc|dec)
$linkid = intval($matches[2]);
$link_order = intval($matches[3]);
$link_location = intval(varset($matches[4], ''));
break;
}
}
switch ($incdec_action)
{
case 'inc' :
$lc->dbOrderUpdateInc($linkid, $link_order, $link_location);
break;
case 'dec' :
$lc->dbOrderUpdateDec($linkid, $link_order, $link_location);
break;
}
if (isset($_POST['delete']))
{
$tmp = array_pop($tmp = array_flip($_POST['delete']));
list($delete, $del_id) = explode("_", $tmp);
$del_id = intval($del_id);
}
elseif (isset($_POST['create_category']))
{
$lc -> dbCategoryCreate();
}
elseif (isset($_POST['update_category']))
{
$lc -> dbCategoryUpdate();
}
elseif (isset($_POST['updateoptions']))
{
$linkspage_pref = $lc -> UpdateLinksPagePref();
$lc -> show_message(LCLAN_ADMIN_6);
}
elseif (isset($_POST['add_link']))
{
$lc -> dbLinkCreate();
}
//upload link icon
elseif(isset($_POST['uploadlinkicon']))
{
$lc -> uploadLinkIcon();
}
//upload category icon
elseif(isset($_POST['uploadcatlinkicon']))
{
$lc -> uploadCatLinkIcon();
}
//update link order
elseif (isset($_POST['update_order']))
{
$lc -> dbOrderUpdate($_POST['link_order']);
}
//update link category order
elseif (isset($_POST['update_category_order']))
{
$lc -> dbOrderCatUpdate($_POST['link_category_order']);
}
//delete link
if (isset($delete) && $del_id)
{
switch ($delete)
{
case 'main' : // Delete link
$sql->db_Select('links_page', 'link_order', 'link_id='.$del_id);
$row = $sql->db_Fetch();
$sql2 = e107::getDb('sql2');
$sql->db_Select("links_page", "link_id", "link_order>'".$row['link_order']."' && link_category='".$id."'");
while ($row = $sql->db_Fetch()) {
$sql2->db_Update('links_page', "link_order=link_order-1 WHERE link_id='".$row['link_id']."'");
}
if ($sql->db_Delete('links_page', 'link_id='.$del_id))
{
$msg = LCLAN_ADMIN_10." #".$del_id." ".LCLAN_ADMIN_11;
$data = array('method'=>'delete', 'table'=>'links_page', 'id'=>$del_id, 'plugin'=>'links_page', 'function'=>'delete');
$msg .= $e_event->triggerHook($data);
$admin_log->log_event('LINKS_02','ID: '.$del_id,E_LOG_INFORMATIVE,'');
$lc->show_message($msg);
}
break;
case 'category' : //delete category
//check if links are present for this category
if($sql->db_Select('links_page', '*', 'link_category='.$del_id))
{
$lc->show_message(LCLAN_ADMIN_12." #".$del_id." ".LAN_DELETED_FAILED."<br />".LCLAN_ADMIN_15);
//no? then we can safely remove this category
}
else
{
if ($sql->db_Delete('links_page_cat', 'link_category_id='.$del_id))
{
$admin_log->log_event('LINKS_03','ID: '.$del_id,E_LOG_INFORMATIVE,'');
$lc->show_message(LCLAN_ADMIN_12." #".$del_id." ".LCLAN_ADMIN_11);
unset($id);
}
}
break;
case 'sn' : //delete submitted link
if ($sql->db_Delete('tmp', 'tmp_time='.$del_id))
{
$admin_log->log_event('LINKS_04','ID: '.$del_id,E_LOG_INFORMATIVE,'');
$lc->show_message(LCLAN_ADMIN_13);
}
}
}
//show link categories (cat edit)
if (!e_QUERY)
{
$lc->show_categories('cat');
}
elseif (isset($qs[0]))
{
switch ($qs[0])
{
case 'cat' :
if (isset($qs[1]))
{
//show cat edit form
if (($qs[1] == 'edit') && isset($qs[2]) && is_numeric($qs[2]))
{
$lc->show_cat_create();
}
//show cat create form
elseif (($qs[1] == 'create') && !isset($qs[2]) )
{
$lc->show_cat_create();
}
}
break;
case 'link' :
if (isset($qs[1]))
{
switch ($qs[1])
{
case 'view' :
if (isset($qs[2]) && (is_numeric($qs[2]) || $qs[2] == "all") )
{
$lc->show_links();
}
break;
case 'edit' : // Edit link
if (isset($qs[2]) && is_numeric($qs[2]))
{
$lc->show_link_create();
}
break;
case 'create' : // Create link
if (!isset($qs[2]) )
{
$lc->show_link_create();
}
break;
case 'sn' : // Post submitted
if (isset($qs[2]) && is_numeric($qs[2]) )
{
$lc->show_link_create();
}
break;
}
}
else
{
$lc->show_categories('link'); //view categories (link select cat)
}
break;
case 'sn' : //view submitted links
$lc->show_submitted();
break;
case 'opt' : // Options
$lc->show_pref_options();
break;
}
}
// ##### Display options --------------------------------------------------------------------------
function admin_linkspage_config_adminmenu()
{
global $qs, $sql;
$act = varset($qs[0],'cat');
if($act == 'cat' && isset($qs[1]))
{
if($qs[1] == 'create')
{
$act .= '.create';
}
elseif ($qs[1] == 'edit')
{
$act .= '';
}
elseif ($qs[1] == 'view')
{
$act .= '';
}
}
$var['cat']['text'] = LCLAN_ADMINMENU_2;
$var['cat']['link'] = e_SELF;
$var['cat.create']['text'] = LCLAN_ADMINMENU_3;
$var['cat.create']['link'] = e_SELF."?cat.create";
$var['link']['text'] = LCLAN_ADMINMENU_4;
$var['link']['link'] = e_SELF."?link";
$var['link.create']['text'] = LCLAN_ADMINMENU_5;
$var['link.create']['link'] = e_SELF."?link.create";
if ($tot = $sql->db_Select("tmp", "*", "tmp_ip='submitted_link' "))
{
$var['sn']['text'] = LCLAN_ADMINMENU_7." (".$tot.")";
$var['sn']['link'] = e_SELF."?sn";
}
$var['opt']['text'] = LCLAN_ADMINMENU_6;
$var['opt']['link'] = e_SELF."?opt";
show_admin_menu(LCLAN_ADMINMENU_1, $act, $var);
if($qs[0] != 'opt')
{
unset($var);
$var=array();
if ($sql->db_Select("links_page_cat", "*"))
{
while ($row = $sql->db_Fetch()) {
$var[$row['link_category_id']]['text'] = $row['link_category_name'];
$var[$row['link_category_id']]['link'] = e_SELF."?link.view.".$row['link_category_id'];
}
$active = ($qs[0] == 'link') ? vartrue($id) : FALSE;
show_admin_menu(LCLAN_ADMINMENU_8, $active, $var);
}
}
if(isset($qs[0]) && $qs[0] == "opt")
{
unset($var);
$var=array();
$var['optgeneral']['text'] = LCLAN_OPT_MENU_1;
$var['optmanager']['text'] = LCLAN_OPT_MENU_2;
$var['optcategory']['text'] = LCLAN_OPT_MENU_3;
$var['optlinks']['text'] = LCLAN_OPT_MENU_4;
$var['optrefer']['text'] = LCLAN_OPT_MENU_5;
$var['optrating']['text'] = LCLAN_OPT_MENU_6;
$var['optmenu']['text'] = LCLAN_OPT_MENU_7;
show_admin_menu(LCLAN_ADMINMENU_6, $qs[0], $var, TRUE);
}
}
require_once(e_ADMIN.'footer.php');
exit;
// End ---------------------------------------------------------------------------------------------------------
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 B

View File

@@ -1,41 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
/*
$e_plug_table = "links_page"; //This is set to the table name you have decided to use.
$reply_location= e_PLUGIN."links_page/links.php?comment.$nid"; //This is set to the location you'd like the user to return to after replying to a comment.
$db_table = "links_page"; //This is the name of your plugins database table.
$link_name = "link_name"; //This is the name of the field in your plugin's db table that corresponds to it's name or title.
$db_id = "link_id"; // This is the name of the field in your plugin's db table that correspond to it's unique id number.
$plugin_name = "Links"; // A name for your plugin. It will be used in links to comments, in list_new/new.php.
*/
//This is set to the table name you have decided to use.
$e_comment['eplug_comment_ids'] = "links_page";
//This is set to the location you'd like the user to return to after replying to a comment.
$e_comment['reply_location'] = e_PLUGIN."links_page/links.php?comment.{NID}";
//A name for your plugin. It will be used in links to comments, in list_new/new.php.
$e_comment['plugin_name'] = "links_page";
//The path of the plugin folder
$e_comment['plugin_path'] = "links_page";
//This is the name of the field in your plugin's db table that corresponds to it's name or title.
$e_comment['db_title'] = "link_name";
//This is the name of the field in your plugin's db table that correspond to it's unique id number.
$e_comment['db_id'] = "link_id";
//qry must be set with a select_gen query.
//the main reason would be to check if a category from another table has a class restriction
//the id of the item should be provided as {NID}
//returned fields should at least contain the 'link_id' and 'db_id' fields set above
$e_comment['qry'] = "
SELECT l.*,c.*
FROM #links_page as l
LEFT JOIN #links_page_cat AS c ON l.link_category = c.link_category_id
WHERE l.link_id='{NID}' AND l.link_class REGEXP '".e_CLASS_REGEXP."' AND c.link_category_class REGEXP '".e_CLASS_REGEXP."' ";
?>

View File

@@ -1,26 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/e_frontpage.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
if (file_exists(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php")) {
include_once(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php");
} else {
include_once(e_PLUGIN."links_page/languages/English.php");
}
$front_page['links_page'] = array('page' => $PLUGINS_DIRECTORY.'links_page/links.php', 'title' => LCLAN_PLUGIN_LAN_1);
?>

View File

@@ -1,74 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
include_lan(e_PLUGIN."/links_page/languages/".e_LANGUAGE."_admin_links_page.php");
if(!e_QUERY)
{
$text = LAN_ADMIN_HELP_1;
}
else
{
$qs = explode(".", e_QUERY);
if(is_numeric($qs[0]))
{
$from = array_shift($qs);
}
else
{
$from = "0";
}
//##### LINK --------------------------------------------------
//manage Link items
if($qs[0] == "link" && !isset($qs[1]) )
{
$text = LAN_ADMIN_HELP_3;
//edit
}
elseif($qs[0] == "link" && $qs[1] == "edit" && is_numeric($qs[2]) )
{
$text = LAN_ADMIN_HELP_9;
//view links in cat
}
elseif($qs[0] == "link" && $qs[1] == "view" && (is_numeric($qs[2]) || $qs[2] == "all") )
{
$text = LAN_ADMIN_HELP_8;
//create
}
elseif($qs[0] == "link" && $qs[1] == "create" && !isset($qs[2]))
{
$text = LAN_ADMIN_HELP_4;
//create/post submitted
}
elseif($qs[0] == "link" && $qs[1] == "sn" && is_numeric($qs[2]))
{
$text = LAN_ADMIN_HELP_10;
//##### SUBMITTED --------------------------------------------------
}
elseif($qs[0] == "sn" && !isset($qs[1]) )
{
$text = LAN_ADMIN_HELP_5;
//##### OPTION --------------------------------------------------
}
elseif($qs[0] == "opt" && !isset($qs[1]) )
{
$text = LAN_ADMIN_HELP_6;
//##### CATEGORY --------------------------------------------------
}
elseif($qs[0] == "cat" && $qs[1] == "create" )
{
$text = LAN_ADMIN_HELP_2;
}
elseif($qs[0] == "cat" && $qs[1] == "edit" && is_numeric($qs[2]) )
{
$text = LAN_ADMIN_HELP_7;
}
}
$ns -> tablerender(LAN_ADMIN_HELP_0, $text);
?>

View File

@@ -1,22 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
class links_page_latest
{
function config()
{
$sql = e107::getDb();
$submitted_links = $sql->db_Select("tmp", "*", "tmp_ip='submitted_link'");
$var[0]['icon'] = E_16_LINKSPAGE;
$var[0]['title'] = ADLAN_LAT_5;
$var[0]['url'] = e_PLUGIN."links_page/admin_linkspage_config.php?sn";
$var[0]['total'] = $submitted_links;
return $var;
}
}
?>

View File

@@ -1,77 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* linksPage e_list Handler
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/e_list.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
if (!defined('e107_INIT')) { exit; }
class list_links_page
{
function list_links_page($parent)
{
$this->parent = $parent;
}
function getListData()
{
$list_caption = $this->parent->settings['caption'];
$list_display = ($this->parent->settings['open'] ? "" : "none");
$qry = '';
if($this->parent->mode == "new_page" || $this->parent->mode == "new_menu" )
{
$lvisit = $this->parent->getlvisit();
$qry = " l.link_datestamp>".$lvisit." AND ";
}
$bullet = $this->parent->getBullet($this->parent->settings['icon']);
$qry = "
SELECT l.*, c.link_category_id, c.link_category_name
FROM #links_page AS l
LEFT JOIN #links_page_cat AS c ON c.link_category_id = l.link_category
WHERE ".$qry." l.link_class REGEXP '".e_CLASS_REGEXP."' AND c.link_category_class REGEXP '".e_CLASS_REGEXP."'
ORDER BY l.link_datestamp DESC LIMIT 0,".intval($this->parent->settings['amount'])." ";
if(!$this->parent->e107->sql->db_Select_gen($qry))
{
$list_data = LIST_LINKS_2;
}
else
{
$list_data = array();
while($row = $this->parent->e107->sql->db_Fetch())
{
$record = array();
$rowheading = $this->parent->parse_heading($row['link_name']);
$record['icon'] = $bullet;
$record['heading'] = "<a href='".$row['link_url']."' rel='external'>".$rowheading."</a>";
$record['author'] = "";
$record['category'] = ($this->parent->settings['category'] ? "<a href='".e_PLUGIN."links_page/links.php?cat.".$row['link_category_id']."'>".$row['link_category_name']."</a>" : "");
$record['date'] = ($this->parent->settings['date'] ? ($row['link_datestamp'] > 0 ? $this->parent->getListDate($row['link_datestamp']) : "") : "");
$record['info'] = "";
$list_data[] = $record;
}
}
//return array with 'records', (global)'caption', 'display'
return array(
'records'=>$list_data,
'caption'=>$list_caption,
'display'=>$list_display
);
}
}
?>

View File

@@ -1,41 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/e_notify.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
{
include_lan(e_PLUGIN."links_page/languages/".e_LANGUAGE."_admin_links_page.php");
$config_category = NT_LAN_LP_1;
$config_events = array('linksub' => NT_LAN_LP_2);
}
if (!function_exists('notify_linksub'))
{
function notify_linksub($data)
{
global $nt, $_lanfile;
include_lan(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php");
foreach ($data as $key => $value)
{
$message .= $key.': '.$value.'<br />';
}
$nt -> send('linksub', NT_LAN_LP_3, $message);
}
}
?>

View File

@@ -1,50 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
//------ create feed for admin, return array $eplug_rss_feed ------------------
$feed['name'] = 'Links Page';
$feed['url'] = 'links'; //the identifier for the rss feed url
$feed['topic_id'] = ''; //the topic_id, empty on default (to select a certain category)
$feed['path'] = 'links_page'; //this is the plugin path location
$feed['text'] = 'this is the rss feed for the links_page entries';
$feed['class'] = '0';
$feed['limit'] = '9';
//------ create rss data, return as array $eplug_rss_data -----------------------
$qry = "
SELECT l.*, c.link_category_id, c.link_category_name
FROM #links_page AS l
LEFT JOIN #links_page_cat AS c ON c.link_category_id = l.link_category
WHERE l.link_class REGEXP '".e_CLASS_REGEXP."' AND c.link_category_class REGEXP '".e_CLASS_REGEXP."'
ORDER BY l.link_datestamp DESC LIMIT 0,".$this->limit;
$rss = array();
$sqlrss = new db;
if($items = $sqlrss->db_Select_gen($qry)){
$i=0;
while($rowrss = $sqlrss -> db_Fetch()){
$tmp = '';
$rss[$i]['author'] = $tmp[1];
$rss[$i]['author_email'] = $tmp[2];
$rss[$i]['link'] = $rowrss['link_url'];
$rss[$i]['linkid'] = $rowrss['link_id'];
$rss[$i]['title'] = $rowrss['link_name'];
$rss[$i]['description'] = '';
$rss[$i]['category_name'] = $rowrss['link_category_name'];
$rss[$i]['category_link'] = $e107->base_path.$PLUGINS_DIRECTORY."links_page/links.php?cat.".$rowrss['link_category_id'];
$rss[$i]['datestamp'] = $rowrss['link_datestamp'];
$rss[$i]['enc_url'] = "";
$rss[$i]['enc_leng'] = "";
$rss[$i]['enc_type'] = "";
$i++;
}
}
//##### ------------------------------------------------------------------------------------
$eplug_rss_data[] = $rss;
$eplug_rss_feed[] = $feed;
?>

View File

@@ -1,11 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
if (file_exists(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php")) {
include_once(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php");
} else {
include_once(e_PLUGIN."links_page/languages/English.php");
}
$search_info[] = array('sfile' => e_PLUGIN.'links_page/search/search_parser.php', 'qtype' => LCLAN_ADMIN_14, 'refpage' => 'links.php', 'advanced' => e_PLUGIN.'links_page/search/search_advanced.php');
?>

View File

@@ -1,20 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
class links_page_status // include plugin-folder in the name.
{
function config()
{
$sql = e107::getDb();
$links_page_links = $sql->db_Count("links_page", "(*)");
$var[0]['icon'] = E_16_LINKSPAGE;
$var[0]['title'] = LCLAN_ADMIN_14;
$var[0]['url'] = e_PLUGIN."links_page/admin_linkspage_config.php";
$var[0]['total'] = $links_page_links;
return $var;
}
}
?>

View File

@@ -1,46 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
class e_tagwords_links_page
{
function e_tagwords_links_page()
{
$this->settings = array();
$this->settings['plugin'] = "links_page";
$this->settings['table'] = "links_page";
$this->settings['db_id'] = "link_id";
$this->settings['caption'] = "links page";
}
function getLink($id)
{
global $tp;
if($this->row=='')
{
$this->row = $this->getRecord($id);
}
$url = e_PLUGIN."links_page/links.php?view.{$this->row['link_id']}";
return "<a href='".$url."'>".$tp->toHTML($this->row['link_name'], TRUE, '')."</a>";
}
function getRecord($id)
{
global $sql;
$this->row = '';
$qry = "SELECT l.*
FROM #links_page as l
WHERE l.link_id='{$id}' AND l.link_class REGEXP '".e_CLASS_REGEXP."' ";
if($sql->db_Select_gen($qry))
{
$this->row=$sql->db_Fetch();
}
return $this->row;
}
}
?>

View File

@@ -1,75 +0,0 @@
<?php
if(!function_exists('e_userprofile_links_page'))
{
function e_userprofile_links_page()
{
global $qs, $sql, $tp;
$id=intval($qs[1]);
include_lan(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php"); // Need the LAN file in some places even if no links found
$qry = "
SELECT l.*, lc.*
FROM #links_page AS l
LEFT JOIN #links_page_cat AS lc ON lc.link_category_id = l.link_category
WHERE l.link_author = '".$id."'
ORDER BY l.link_name";
$qry1 = $qry." LIMIT 0,3";
$text = '';
$total = $sql -> db_Select_gen($qry);
if ($sql -> db_Select_gen($qry1))
{
while ($row = $sql -> db_Fetch())
{
$LINK_APPEND = "<a class='linkspage_url' href='".$row['link_url']."' onclick=\"open_window('".e_PLUGIN."links_page/links.php?view.".$row['link_id']."','full');return false;\" >";
$icon = $LINK_APPEND."<img class='linkspage_button' style='width:50px; height:50px;' src='".e_PLUGIN."links_page/images/blank.gif' alt='' /></a>";
if ($row['link_button'])
{
if (strpos($row['link_button'], "http://") !== FALSE)
{
$icon = $LINK_APPEND."<img class='linkspage_button' src='".$row['link_button']."' alt='' /></a>";
}
else
{
if(strstr($row['link_button'], "/"))
{
if(is_readable(e_BASE.$row['link_button']))
{
$icon = $LINK_APPEND."<img class='linkspage_button' style='width:50px; height:50px;' src='".e_BASE.$row['link_button']."' alt='' /></a>";
}
}
else
{
if(is_readable(e_PLUGIN."links_page/link_images/".$row['link_button']))
{
$icon = $LINK_APPEND."<img class='linkspage_button' style='width:50px; height:50px;' src='".e_PLUGIN."links_page/link_images/".$row['link_button']."' alt='' /></a>";
}
}
}
}
$date = strftime("%d %b %Y", $row['link_datestamp']);
$heading = ($row['link_name'] ? $LINK_APPEND.$tp->toHTML($row['link_name'], TRUE)."</a><br />" : '');
$text .= "
<div style='clear:both; padding-bottom:10px;'>
<div style='float:left; padding-bottom:10px;'>".$icon."</div>
<div style='margin-left:60px; padding-bottom:10px;'>
".$heading."
<span class='smalltext'>".$date."</span>
</div>
</div>";
}
$text .= "<div style='clear:both; padding-bottom:10px;'><a href='".e_PLUGIN."links_page/links.php'>".LCLAN_USERPROFILE_1."</a></div>";
}
$caption = str_replace('{total}',$total, LCLAN_USERPROFILE_2);
return array('caption'=>$caption, 'text'=>$text);
}
}
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,367 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/languages/English.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
*/
define("LCLAN_USERPROFILE_1", ">> view all links");
define("LCLAN_USERPROFILE_2", "links: {total} links found");
/*
define("LCLAN_PLUGIN_LAN_1", "Links Page");
define("LCLAN_PLUGIN_LAN_2", "Links Page For Displaying External Web Links");
define("LCLAN_PLUGIN_LAN_3", "Configure Links Page");
define("LCLAN_PLUGIN_LAN_4", "links");
define("LCLAN_PLUGIN_LAN_5", "Links page has successfully installed, please configure it from the Links Page link on the admin front page.");
define("LCLAN_PLUGIN_LAN_6", "Links_page successfully upgraded, now using version");
define("LCLAN_OPT_MENU_1", "general options");
define("LCLAN_OPT_MENU_2", "personal link managers");
define("LCLAN_OPT_MENU_3", "category page");
define("LCLAN_OPT_MENU_4", "links display");
define("LCLAN_OPT_MENU_5", "refer page");
define("LCLAN_OPT_MENU_6", "rating page");
define("LCLAN_OPT_MENU_7", "menu");
*/
define("LCLAN_PAGETITLE_1", "Links");
define("LCLAN_PAGETITLE_2", "All categories");
define("LCLAN_PAGETITLE_3", "All Links");
define("LCLAN_PAGETITLE_4", "category");
/*
define("LCLAN_PAGETITLE_5", "Top Rated");
define("LCLAN_PAGETITLE_6", "Top Referrals");
define("LCLAN_PAGETITLE_7", "Personal Link Manager");
define("LCLAN_PAGETITLE_8", "Link Comments");
define("LCLAN_PAGETITLE_9", "Submit Link");
define("LCLAN_PAGETITLE_10", "");
define("LCLAN_OPT_1", "general options");
define("LCLAN_OPT_2", "Link Page Options");
define("LCLAN_OPT_3", "enabled");
define("LCLAN_OPT_4", "disabled");
define("LCLAN_OPT_5", "px");
define("LCLAN_OPT_6", "");
define("LCLAN_OPT_7", "divide categories into individual pages");
define("LCLAN_OPT_8", "allow links to be submitted");
define("LCLAN_OPT_9", "who can submit links");
define("LCLAN_OPT_10", "use multiple pages to show the links");
define("LCLAN_OPT_11", "number of links per page");
define("LCLAN_OPT_12", "category page");
define("LCLAN_OPT_13", "display which sections");
define("LCLAN_OPT_14", "icon");
define("LCLAN_OPT_15", "description");
define("LCLAN_OPT_16", "amount");
define("LCLAN_OPT_17", "referral");
define("LCLAN_OPT_18", "url");
define("LCLAN_OPT_19", "total category info line");
define("LCLAN_OPT_20", "link to top refer");
define("LCLAN_OPT_21", "link to top rated");
define("LCLAN_OPT_22", "show default icon if none is present");
define("LCLAN_OPT_23", "default sort method");
define("LCLAN_OPT_24", "default order method");
define("LCLAN_OPT_25", "default resize value");
define("LCLAN_OPT_26", "links page");
define("LCLAN_OPT_27", "allow users to rate links");
define("LCLAN_OPT_28", "show default icon if none present");
define("LCLAN_OPT_29", "display sort and order menu");
define("LCLAN_OPT_30", "ascending");
define("LCLAN_OPT_31", "descending");
define("LCLAN_OPT_32", "use override of link open method");
define("LCLAN_OPT_33", "default resize value");
define("LCLAN_OPT_34", "name");
define("LCLAN_OPT_35", "url");
define("LCLAN_OPT_36", "order");
define("LCLAN_OPT_37", "refer");
define("LCLAN_OPT_38", "");
define("LCLAN_OPT_39", "");
define("LCLAN_OPT_40", "name");
define("LCLAN_OPT_41", "id");
define("LCLAN_OPT_42", "use individual link setting");
define("LCLAN_OPT_43", "Opens in same window");
define("LCLAN_OPT_44", "Opens in new window");
define("LCLAN_OPT_45", "Opens in 600x400 mini-window");
define("LCLAN_OPT_46", "who can manage links");
define("LCLAN_OPT_47", "these users can add/edit their own personal links");
define("LCLAN_OPT_48", "allow direct posting");
define("LCLAN_OPT_49", "if enabled links are submitted directly, else a site admin needs to approve them");
define("LCLAN_OPT_50", "allow direct deleting");
define("LCLAN_OPT_51", "if enabled the link managers can delete their own links");
define("LCLAN_OPT_52", "personal link managers");
define("LCLAN_OPT_53", "date");
define("LCLAN_OPT_54", "allow personal management on links");
define("LCLAN_OPT_55", "allow comments on all links");
define("LCLAN_OPT_56", "minimum refer value");
define("LCLAN_OPT_57", "only links with a refer count larger then the given value are displayed (0 or empty = all)");
define("LCLAN_OPT_58", "link to submit link");
define("LCLAN_OPT_59", "link to personal manager (only if allowed)");
define("LCLAN_OPT_60", "link to link frontpage");
define("LCLAN_OPT_61", "link to all categories");
define("LCLAN_OPT_62", "show these navigator links");
define("LCLAN_OPT_63", "minimum rating value");
define("LCLAN_OPT_64", "only links with a rating larger then the given value are displayed (0 or empty = all)");
define("LCLAN_OPT_65", "show empty categories");
define("LCLAN_OPT_66", "link to each category");
define("LCLAN_OPT_67", "link to all links");
*/
define("LCLAN_OPT_68", "view all links");
/*
define("LCLAN_OPT_69", "rendertype navigator links");
define("LCLAN_OPT_70", "show category links");
define("LCLAN_OPT_71", "rendertype category links");
define("LCLAN_OPT_72", "show recent links");
define("LCLAN_OPT_73", "display which data");
define("LCLAN_OPT_74", "how many recent links are displayed");
define("LCLAN_OPT_75", "hyperlinks");
define("LCLAN_OPT_76", "selectbox");
define("LCLAN_OPT_77", "category");
define("LCLAN_OPT_78", "description");
define("LCLAN_OPT_79", "caption navigator");
define("LCLAN_OPT_80", "caption categories");
define("LCLAN_OPT_81", "caption recent list");
define("LCLAN_OPT_82", "navigator");
define("LCLAN_OPT_83", "categories");
define("LCLAN_OPT_84", "recent list");
define("LCLAN_OPT_85", "caption menu");
define("LCLAN_OPT_86", "link menu");
define("LCLAN_OPT_87", "show amount of links");
define("LCLAN_ADMIN_1", "update"); // deprecated
define("LCLAN_ADMIN_2", "Link saved to database.");
define("LCLAN_ADMIN_3", "Link updated in database.");
define("LCLAN_ADMIN_4", "Link Category Saved");
define("LCLAN_ADMIN_5", "Link Category Updated");
define("LCLAN_ADMIN_6", "Options Saved");
define("LCLAN_ADMIN_7", "link icon was uploaded successfully !");
define("LCLAN_ADMIN_8", "link icon was not uploaded !");
define("LCLAN_ADMIN_9", "Order updated");
define("LCLAN_ADMIN_10", "Link");
define("LCLAN_ADMIN_11", "deleted"); // deprecated
define("LCLAN_ADMIN_12", "Link Category");
define("LCLAN_ADMIN_13", "Submitted link deleted");
define("LCLAN_ADMIN_14", "Links");
define("LCLAN_ADMIN_15", "This category still contains links, please (re)move them first");
define("LCLAN_SL_1", "Submitted Links");
define("LCLAN_SL_2", "No submitted links");
define("LCLAN_SL_3", "Link");
define("LCLAN_SL_4", "Submitted by");
define("LCLAN_SL_5", "Options");
define("LCLAN_SL_6", "Post");
define("LCLAN_SL_7", "Delete");
define("LCLAN_SL_8", "Are you sure you want to delete this submitted link?");
define("LCLAN_SL_9", "After submitting your link it will be reviewed by a site admin and if appropriate it will be added to the main links page.");
define("LCLAN_SL_10", "Category:");
define("LCLAN_SL_11", "name");
define("LCLAN_SL_12", "url");
define("LCLAN_SL_13", "description");
define("LCLAN_SL_14", "URL to link button:");
define("LCLAN_SL_15", "Underlined fields are required.");
define("LCLAN_SL_16", "Submit Link");
define("LCLAN_SL_17", "");
define("LCLAN_SL_18", "");
define("LCLAN_CAT_1", "Image");
define("LCLAN_CAT_2", "Category");
define("LCLAN_CAT_3", "Options");
define("LCLAN_CAT_4", "Move");
define("LCLAN_CAT_5", "Order");
define("LCLAN_CAT_6", "Edit");
define("LCLAN_CAT_7", "Are");
define("LCLAN_CAT_8", "Are you sure you want to delete this category?");
define("LCLAN_CAT_9", "View Links");
define("LCLAN_CAT_10", "Reorder");
define("LCLAN_CAT_11", "No link categories");
define("LCLAN_CAT_12", "Existing Link Categories");
define("LCLAN_CAT_13", "Name:");
define("LCLAN_CAT_14", "Description:");
define("LCLAN_CAT_15", "Upload a new icon:");
define("LCLAN_CAT_16", "Auto-Thumbnail size:");
define("LCLAN_CAT_17", "This option is disabled as file uploading is not enabled on your server");
define("LCLAN_CAT_18", "The");
define("LCLAN_CAT_19", "folder is not writable, you need to CHMOD 777 the folder before uploading");
define("LCLAN_CAT_20", "px");
define("LCLAN_CAT_21", "upload");
define("LCLAN_CAT_22", "Choose an icon:");
define("LCLAN_CAT_23", "View Images");
define("LCLAN_CAT_24", "Visible for:");
define("LCLAN_CAT_25", "tick to update timestamp to current time");
define("LCLAN_CAT_26", "Update Link Category");
define("LCLAN_CAT_27", "Clear Form");
define("LCLAN_CAT_28", "Create Link Category");
define("LCLAN_CAT_29", "Link Category");
define("LCLAN_ITEM_1", "Submitted by");
define("LCLAN_ITEM_2", "Category:");
define("LCLAN_ITEM_3", "no categories yet");
define("LCLAN_ITEM_4", "Name:");
define("LCLAN_ITEM_5", "Url:");
define("LCLAN_ITEM_6", "Description:");
define("LCLAN_ITEM_7", "Upload an icon:");
define("LCLAN_ITEM_8", "Auto-Thumbnail size:");
define("LCLAN_ITEM_9", "This option is disabled as file uploading is not enabled on your server");
define("LCLAN_ITEM_10", "The");
define("LCLAN_ITEM_11", "folder is not writable, you need to CHMOD 777 the folder before uploading");
define("LCLAN_ITEM_12", "px");
define("LCLAN_ITEM_13", "upload");
define("LCLAN_ITEM_14", "Choose an icon:");
define("LCLAN_ITEM_15", "View Images");
define("LCLAN_ITEM_16", "Open Type:");
define("LCLAN_ITEM_17", "Opens in same window");
define("LCLAN_ITEM_18", "Opens in new window");
define("LCLAN_ITEM_19", "Opens in 600x400 mini-window");
define("LCLAN_ITEM_20", "Visible for:");
define("LCLAN_ITEM_21", "tick to update timestamp to current time");
define("LCLAN_ITEM_22", "Update Link");
define("LCLAN_ITEM_23", "Create link");
define("LCLAN_ITEM_24", "Links");
define("LCLAN_ITEM_25", "Image");
define("LCLAN_ITEM_26", "Link Name");
define("LCLAN_ITEM_27", "Options");
define("LCLAN_ITEM_28", "Move");
define("LCLAN_ITEM_29", "Order");
define("LCLAN_ITEM_30", "Reorder");
define("LCLAN_ITEM_31", "edit");
define("LCLAN_ITEM_32", "delete");
define("LCLAN_ITEM_33", "Are you sure you want to delete this link?");
define("LCLAN_ITEM_34", "no icon");
define("LCLAN_ITEM_35", "manage personal links");
define("LCLAN_ITEM_36", "go");
define("LCLAN_ITEM_37", "view all links");
define("LCLAN_ITEM_38", "All Links");
define("LCLAN_ITEM_39", "Rating");
define("LCLAN_ADMINMENU_1", "Link Options");
define("LCLAN_ADMINMENU_2", "Manage Link Categories");
define("LCLAN_ADMINMENU_3", "Create Link Category");
define("LCLAN_ADMINMENU_4", "Manage Links");
define("LCLAN_ADMINMENU_5", "Create Link");
define("LCLAN_ADMINMENU_6", "Options");
define("LCLAN_ADMINMENU_7", "Submitted Links");
define("LCLAN_ADMINMENU_8", "Categories");
define("NT_LAN_LP_1", "Links Page Events");
define("NT_LAN_LP_2", "Link submitted by user");
define("NT_LAN_LP_3", "Link Submitted");
define("LNK_SCH_LAN_2", "All Links Categories");
define("LNK_SCH_LAN_3", "All links details");
define("LAN_LINKS_MANAGER_0", "icon");
define("LAN_LINKS_MANAGER_1", "link");
define("LAN_LINKS_MANAGER_2", "options");
define("LAN_LINKS_MANAGER_3", "create new link");
define("LAN_LINKS_MANAGER_4", "you don't have any links present");
define("LAN_LINKS_MANAGER_5", "category");
define("LAN_LINKS_MANAGER_6", "");
define("LAN_LINKS_MANAGER_7", "");
define("LAN_LINKS_MANAGER_8", "");
define("LAN_LINKS_MANAGER_9", "");
*/
define("LAN_LINKS_1", "Total links");
define("LAN_LINKS_2", "Total links activated");
define("LAN_LINKS_3", "Anonymous");
define("LAN_LINKS_4", "heading");
define("LAN_LINKS_5", "url");
define("LAN_LINKS_6", "order");
define("LAN_LINKS_7", "refer");
define("LAN_LINKS_8", "ascending");
define("LAN_LINKS_9", "descending");
define("LAN_LINKS_10", "Top Links : Refer");
define("LAN_LINKS_11", "Top Links : Rating");
define("LAN_LINKS_12", "view links by refer");
define("LAN_LINKS_13", "view links by rating");
define("LAN_LINKS_14", "view links frontpage");
define("LAN_LINKS_15", "sort by");
define("LAN_LINKS_16", "in this category");
define("LAN_LINKS_17", "link");
define("LAN_LINKS_18", "links");
define("LAN_LINKS_19", "categories");
define("LAN_LINKS_20", "category");
define("LAN_LINKS_21", "There");
define("LAN_LINKS_22", "is");
define("LAN_LINKS_23", "are");
define("LAN_LINKS_24", "total in");
define("LAN_LINKS_25", "show all links");
define("LAN_LINKS_26", "Referrals");
define("LAN_LINKS_27", "submit a link");
define("LAN_LINKS_28", "Thank you");
define("LAN_LINKS_29", "Your link has been saved and will be reviewed by a site administrator.");
define("LAN_LINKS_30", "Link Categories");
define("LAN_LINKS_31", "submit a link");
define("LAN_LINKS_32", "Category:");
define("LAN_LINKS_33", "No Links are rated yet.");
define("LAN_LINKS_34", "There are currently no links");
define("LAN_LINKS_35", "personal links manager");
define("LAN_LINKS_36", "link comments");
define("LAN_LINKS_37", "Comments");
define("LAN_LINKS_38", "date");
define("LAN_LINKS_39", "Links");
define("LAN_LINKS_40", "Category");
define("LAN_LINKS_41", "no categories yet");
define("LAN_LINKS_42", "no links are referred yet");
define("LAN_LINKS_43", "view all categories");
define("LAN_LINKS_44", "id");
define("LAN_LINKS_45", "Link Category");
define("LAN_LINKS_46", "Link Subcategories");
define("LAN_LINKS_47", "link navigator...");
define("LAN_LINKS_48", "-- view category --");
define("LAN_LINKS_49", "");
define("LAN_LINKS_50", "You do not have permission to submit links at present");
define('LAN_LINKS_SCH_1','Posted in reply to link');
/*
define("LAN_ADMIN_HELP_0", "linkspage help area");
define("LAN_ADMIN_HELP_1", "<i>the manage link categories page shows all categories present.</i><br /><br /><b>detailed list</b><br />You see a list of all categories with their icon, name and description, options, and sorting options.<br /><br /><b>explanation of icons</b><br />
".LINK_ICON_LINK." : link to the category<br /><br />
".LINK_ICON_EDIT." : edit the category<br /><br />
".LINK_ICON_DELETE." : delete the category<br /><br />
".LINK_ICON_ORDER_UP." : the up button allows you to move the category item one up in order.<br /><br />
".LINK_ICON_ORDER_DOWN." : the down button allows you to move the category item one down in order.<br />
<br />
<b>order</b><br />here you can manually set the order of all the categories. You need to change the values in the select boxes to the order of your kind and press the reorder button below to save the new order.<br />");
define("LAN_ADMIN_HELP_2", "<i>the create link category page allows you to add new categories</i><br /><br />You can upload a new icon, and after uploading assign the icon to the category.");
define("LAN_ADMIN_HELP_3", "<i>the manage links page first show all categories.</i><br /><br />".LINK_ICON_LINK." : link to the category<br /><br />".LINK_ICON_EDIT." : click the icon to view all links in this category<br />");
define("LAN_ADMIN_HELP_4", "<i>the create link page allows you to add a new link</i><br /><br />You can upload a new icon, and after uploading assign the icon to the link.<br /><br />the open type allows you to define how the link will be opened when a user clicks on it.");
define("LAN_ADMIN_HELP_5", "<i>the submitted links page shows all links that are submitted by users</i><br /><br /><b>detailed list</b><br />You see the link url, the name of the user who submitted the link and options.<br /><br /><b>explanation of icons</b><br />
".LINK_ICON_EDIT." : post the submitted link to the link create form<br /><br />
".LINK_ICON_DELETE." : delete the submitted link<br />
");
define("LAN_ADMIN_HELP_6", "<i>the options page allows you to change the behaviour of the links_page plugin</i><br /><br />
general options<br />
these options are generally used throughout the link pages.<br /><br />
personal link managers<br />
the personal link managers are privileged users who can manage their own personally added links.<br /><br />
category page<br />
here you can change options for the category page.<br /><br />
links page<br />
These options are used on the link pages.<br /><br />
refer page<br />
These options are used on the top refer links page.<br /><br />
rating page<br />
These options are used on the top rated links page.<br />
");
define("LAN_ADMIN_HELP_7", "<i>the edit link category page allows you to edit an existing category</i><br /><br />You can upload a new icon, and after uploading assign the icon to the category.<br />You can update the timestamp of the link by checking the box.");
define("LAN_ADMIN_HELP_8", "<i>this page shows all existing links in the selected category.</i><br /><br /><b>detailed list</b><br />You see a list of the links with their image, name, options, and sorting options.<br /><br /><b>explanation of icons</b><br />
".LINK_ICON_LINK." : link to the website<br /><br />
".LINK_ICON_EDIT." : edit the link<br /><br />
".LINK_ICON_DELETE." : delete the link<br /><br />
".LINK_ICON_ORDER_UP." : the up button allows you to move the link one up in order.<br /><br />
".LINK_ICON_ORDER_DOWN." : the down button allows you to move the link one down in order.<br />
<br />
<b>order</b><br />here you can manually set the order of all the links. You need to change the values in the select boxes to the order of your kind and press the reorder button below to save the new order.<br />");
define("LAN_ADMIN_HELP_9", "<i>the edit link page allows you to edit an existing link</i><br /><br />You can upload a new icon, and after uploading assign the icon to the link.<br /><br />the open type allows you to define how the link will be opened when a user clicks on it.");
define("LAN_ADMIN_HELP_10", "<i>the post submitted link page allows you to add a submitted link to the existing links</i><br /><br />A small submitted text is added into the description field.<br /><br />You can upload a new icon, and after uploading assign the icon to the link.<br /><br />the open type allows you to define how the link will be opened when a user clicks on it.");
*/
?>

View File

@@ -1,383 +0,0 @@
<?php
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id$
*
* Admin Language File
*
*/
//define("LCLAN_USERPROFILE_1", ">> view all links");
//define("LCLAN_USERPROFILE_2", "links: {total} links found");
define("LCLAN_PLUGIN_LAN_1", "Links Page");
define("LCLAN_PLUGIN_LAN_2", "Links Page For Displaying External Web Links");
define("LCLAN_PLUGIN_LAN_3", "Configure Links Page");
define("LCLAN_PLUGIN_LAN_4", "links");
define("LCLAN_PLUGIN_LAN_5", "Links page has successfully installed, please configure it from the Links Page link on the admin front page.");
define("LCLAN_PLUGIN_LAN_6", "Links_page successfully upgraded, now using version");
define("LCLAN_OPT_MENU_1", "general options");
define("LCLAN_OPT_MENU_2", "personal link managers");
define("LCLAN_OPT_MENU_3", "category page");
define("LCLAN_OPT_MENU_4", "links display");
define("LCLAN_OPT_MENU_5", "refer page");
define("LCLAN_OPT_MENU_6", "rating page");
define("LCLAN_OPT_MENU_7", "menu");
define("LCLAN_PAGETITLE_1", "Links");
define("LCLAN_PAGETITLE_2", "All categories");
define("LCLAN_PAGETITLE_3", "All Links");
define("LCLAN_PAGETITLE_4", "category");
define("LCLAN_PAGETITLE_5", "Top Rated");
define("LCLAN_PAGETITLE_6", "Top Referrals");
define("LCLAN_PAGETITLE_7", "Personal Link Manager");
define("LCLAN_PAGETITLE_8", "Link Comments");
define("LCLAN_PAGETITLE_9", "Submit Link");
define("LCLAN_PAGETITLE_10", "");
//define("LCLAN_OPT_1", "general options");
define("LCLAN_OPT_2", "Link Page Options");
define("LCLAN_OPT_3", "enabled");
define("LCLAN_OPT_4", "disabled");
define("LCLAN_OPT_5", "px");
define("LCLAN_OPT_6", "");
define("LCLAN_OPT_7", "divide categories into individual pages");
define("LCLAN_OPT_8", "allow links to be submitted");
define("LCLAN_OPT_9", "who can submit links");
define("LCLAN_OPT_10", "use multiple pages to show the links");
define("LCLAN_OPT_11", "number of links per page");
define("LCLAN_OPT_12", "category page");
define("LCLAN_OPT_13", "display which sections");
define("LCLAN_OPT_14", "icon");
define("LCLAN_OPT_15", "description");
define("LCLAN_OPT_16", "amount");
define("LCLAN_OPT_17", "referral");
define("LCLAN_OPT_18", "url");
define("LCLAN_OPT_19", "total category info line");
define("LCLAN_OPT_20", "link to top refer");
define("LCLAN_OPT_21", "link to top rated");
define("LCLAN_OPT_22", "show default icon if none is present");
define("LCLAN_OPT_23", "default sort method");
define("LCLAN_OPT_24", "default order method");
define("LCLAN_OPT_25", "default resize value");
define("LCLAN_OPT_26", "links page");
define("LCLAN_OPT_27", "allow users to rate links");
define("LCLAN_OPT_28", "show default icon if none present");
define("LCLAN_OPT_29", "display sort and order menu");
define("LCLAN_OPT_30", "ascending");
define("LCLAN_OPT_31", "descending");
define("LCLAN_OPT_32", "use override of link open method");
define("LCLAN_OPT_33", "default resize value");
define("LCLAN_OPT_34", "name");
define("LCLAN_OPT_35", "url");
define("LCLAN_OPT_36", "order");
define("LCLAN_OPT_37", "refer");
define("LCLAN_OPT_38", "");
define("LCLAN_OPT_39", "");
define("LCLAN_OPT_40", "name");
define("LCLAN_OPT_41", "id");
define("LCLAN_OPT_42", "use individual link setting");
define("LCLAN_OPT_43", "Opens in same window");
define("LCLAN_OPT_44", "Opens in new window");
define("LCLAN_OPT_45", "Opens in 600x400 mini-window");
define("LCLAN_OPT_46", "who can manage links");
define("LCLAN_OPT_47", "these users can add/edit their own personal links");
define("LCLAN_OPT_48", "allow direct posting");
define("LCLAN_OPT_49", "if enabled links are submitted directly, else a site admin needs to approve them");
define("LCLAN_OPT_50", "allow direct deleting");
define("LCLAN_OPT_51", "if enabled the link managers can delete their own links");
define("LCLAN_OPT_52", "personal link managers");
define("LCLAN_OPT_53", "date");
define("LCLAN_OPT_54", "allow personal management on links");
define("LCLAN_OPT_55", "allow comments on all links");
define("LCLAN_OPT_56", "minimum refer value");
define("LCLAN_OPT_57", "only links with a refer count larger then the given value are displayed (0 or empty = all)");
define("LCLAN_OPT_58", "link to submit link");
define("LCLAN_OPT_59", "link to personal manager (only if allowed)");
define("LCLAN_OPT_60", "link to link frontpage");
define("LCLAN_OPT_61", "link to all categories");
define("LCLAN_OPT_62", "show these navigator links");
define("LCLAN_OPT_63", "minimum rating value");
define("LCLAN_OPT_64", "only links with a rating larger then the given value are displayed (0 or empty = all)");
define("LCLAN_OPT_65", "show empty categories");
define("LCLAN_OPT_66", "link to each category");
define("LCLAN_OPT_67", "link to all links");
define("LCLAN_OPT_68", "view all links");
define("LCLAN_OPT_69", "rendertype navigator links");
define("LCLAN_OPT_70", "show category links");
define("LCLAN_OPT_71", "rendertype category links");
define("LCLAN_OPT_72", "show recent links");
define("LCLAN_OPT_73", "display which data");
define("LCLAN_OPT_74", "how many recent links are displayed");
define("LCLAN_OPT_75", "hyperlinks");
define("LCLAN_OPT_76", "selectbox");
define("LCLAN_OPT_77", "category");
define("LCLAN_OPT_78", "description");
define("LCLAN_OPT_79", "caption navigator");
define("LCLAN_OPT_80", "caption categories");
define("LCLAN_OPT_81", "caption recent list");
define("LCLAN_OPT_82", "navigator");
define("LCLAN_OPT_83", "categories");
define("LCLAN_OPT_84", "recent list");
define("LCLAN_OPT_85", "caption menu");
define("LCLAN_OPT_86", "link menu");
define("LCLAN_OPT_87", "show amount of links");
//define("LCLAN_ADMIN_1", "update"); // deprecated
define("LCLAN_ADMIN_2", "Link saved to database.");
define("LCLAN_ADMIN_3", "Link updated in database.");
define("LCLAN_ADMIN_4", "Link Category Saved");
define("LCLAN_ADMIN_5", "Link Category Updated");
define("LCLAN_ADMIN_6", "Options Saved");
define("LCLAN_ADMIN_7", "link icon was uploaded successfully !");
define("LCLAN_ADMIN_8", "link icon was not uploaded !");
define("LCLAN_ADMIN_9", "Order updated");
define("LCLAN_ADMIN_10", "Link");
define("LCLAN_ADMIN_11", "deleted"); // deprecated
define("LCLAN_ADMIN_12", "Link Category");
define("LCLAN_ADMIN_13", "Submitted link deleted");
define("LCLAN_ADMIN_14", "Links");
define("LCLAN_ADMIN_15", "This category still contains links, please (re)move them first");
define('LCLAN_ADMIN_16', 'Nothing changed - not updated');
define("LCLAN_SL_1", "Submitted Links");
define("LCLAN_SL_2", "No submitted links");
define("LCLAN_SL_3", "Link");
define("LCLAN_SL_4", "Submitted by");
define("LCLAN_SL_5", "Options");
define("LCLAN_SL_6", "Post");
define("LCLAN_SL_7", "Delete");
define("LCLAN_SL_8", "Are you sure you want to delete this submitted link?");
define("LCLAN_SL_9", "After submitting your link it will be reviewed by a site admin and if appropriate it will be added to the main links page.");
define("LCLAN_SL_10", "Category:");
define("LCLAN_SL_11", "name");
define("LCLAN_SL_12", "url");
define("LCLAN_SL_13", "description");
define("LCLAN_SL_14", "URL to link button:");
define("LCLAN_SL_15", "Underlined fields are required.");
define("LCLAN_SL_16", "Submit Link");
define("LCLAN_SL_17", "");
define("LCLAN_SL_18", "");
define("LCLAN_CAT_1", "Image");
define("LCLAN_CAT_2", "Category");
define("LCLAN_CAT_3", "Options");
define("LCLAN_CAT_4", "Move");
define("LCLAN_CAT_5", "Order");
define("LCLAN_CAT_6", "Edit");
define("LCLAN_CAT_7", "Are");
define("LCLAN_CAT_8", "Are you sure you want to delete this category?");
define("LCLAN_CAT_9", "View Links");
define("LCLAN_CAT_10", "Reorder");
define("LCLAN_CAT_11", "No link categories");
define("LCLAN_CAT_12", "Existing Link Categories");
define("LCLAN_CAT_13", "Name:");
define("LCLAN_CAT_14", "Description:");
define("LCLAN_CAT_15", "Upload a new icon:");
define("LCLAN_CAT_16", "Auto-Thumbnail size:");
define("LCLAN_CAT_17", "This option is disabled as file uploading is not enabled on your server");
define("LCLAN_CAT_18", "The");
define("LCLAN_CAT_19", "folder is not writable, you need to CHMOD 777 the folder before uploading");
define("LCLAN_CAT_20", "px");
define("LCLAN_CAT_21", "upload");
define("LCLAN_CAT_22", "Choose an icon:");
define("LCLAN_CAT_23", "View Images");
define("LCLAN_CAT_24", "Visible for:");
define("LCLAN_CAT_25", "tick to update timestamp to current time");
define("LCLAN_CAT_26", "Update Link Category");
define("LCLAN_CAT_27", "Clear Form");
define("LCLAN_CAT_28", "Create Link Category");
define("LCLAN_CAT_29", "Link Category");
define("LCLAN_ITEM_1", "Submitted by");
define("LCLAN_ITEM_2", "Category:");
define("LCLAN_ITEM_3", "no categories yet");
define("LCLAN_ITEM_4", "Name:");
define("LCLAN_ITEM_5", "Url:");
define("LCLAN_ITEM_6", "Description:");
define("LCLAN_ITEM_7", "Upload an icon:");
define("LCLAN_ITEM_8", "Auto-Thumbnail size:");
define("LCLAN_ITEM_9", "This option is disabled as file uploading is not enabled on your server");
define("LCLAN_ITEM_10", "The");
define("LCLAN_ITEM_11", "folder is not writable, you need to CHMOD 777 the folder before uploading");
define("LCLAN_ITEM_12", "px");
define("LCLAN_ITEM_13", "upload");
define("LCLAN_ITEM_14", "Choose an icon:");
define("LCLAN_ITEM_15", "View Images");
define("LCLAN_ITEM_16", "Open Type:");
define("LCLAN_ITEM_17", "Opens in same window");
define("LCLAN_ITEM_18", "Opens in new window");
define("LCLAN_ITEM_19", "Opens in 600x400 mini-window");
define("LCLAN_ITEM_20", "Visible for:");
define("LCLAN_ITEM_21", "tick to update timestamp to current time");
define("LCLAN_ITEM_22", "Update Link");
define("LCLAN_ITEM_23", "Create link");
define("LCLAN_ITEM_24", "Links");
define("LCLAN_ITEM_25", "Image");
define("LCLAN_ITEM_26", "Link Name");
define("LCLAN_ITEM_27", "Options");
define("LCLAN_ITEM_28", "Move");
define("LCLAN_ITEM_29", "Order");
define("LCLAN_ITEM_30", "Reorder");
define("LCLAN_ITEM_31", "edit");
define("LCLAN_ITEM_32", "delete");
define("LCLAN_ITEM_33", "Are you sure you want to delete this link?");
define("LCLAN_ITEM_34", "no icon");
define("LCLAN_ITEM_35", "manage personal links");
define("LCLAN_ITEM_36", "go");
define("LCLAN_ITEM_37", "view all links");
define("LCLAN_ITEM_38", "All Links");
define("LCLAN_ITEM_39", "Rating");
define("LCLAN_ADMINMENU_1", "Link Options");
define("LCLAN_ADMINMENU_2", "Manage Link Categories");
define("LCLAN_ADMINMENU_3", "Create Link Category");
define("LCLAN_ADMINMENU_4", "Manage Links");
define("LCLAN_ADMINMENU_5", "Create Link");
define("LCLAN_ADMINMENU_6", "Options");
define("LCLAN_ADMINMENU_7", "Submitted Links");
define("LCLAN_ADMINMENU_8", "Categories");
define("NT_LAN_LP_1", "Links Page Events");
define("NT_LAN_LP_2", "Link submitted by user");
define("NT_LAN_LP_3", "Link Submitted");
define("LNK_SCH_LAN_2", "All Links Categories");
define("LNK_SCH_LAN_3", "All links details");
define("LAN_LINKS_MANAGER_0", "icon");
define("LAN_LINKS_MANAGER_1", "link");
define("LAN_LINKS_MANAGER_2", "options");
define("LAN_LINKS_MANAGER_3", "create new link");
define("LAN_LINKS_MANAGER_4", "you don't have any links present");
define("LAN_LINKS_MANAGER_5", "category");
define("LAN_LINKS_MANAGER_6", "");
define("LAN_LINKS_MANAGER_7", "");
define("LAN_LINKS_MANAGER_8", "");
define("LAN_LINKS_MANAGER_9", "");
/*
define("LAN_LINKS_1", "Total links");
define("LAN_LINKS_2", "Total links activated");
define("LAN_LINKS_3", "Anonymous");
define("LAN_LINKS_4", "heading");
define("LAN_LINKS_5", "url");
define("LAN_LINKS_6", "order");
define("LAN_LINKS_7", "refer");
define("LAN_LINKS_8", "ascending");
define("LAN_LINKS_9", "descending");
define("LAN_LINKS_10", "Top Links : Refer");
define("LAN_LINKS_11", "Top Links : Rating");
define("LAN_LINKS_12", "view links by refer");
define("LAN_LINKS_13", "view links by rating");
define("LAN_LINKS_14", "view links frontpage");
define("LAN_LINKS_15", "sort by");
define("LAN_LINKS_16", "in this category");
define("LAN_LINKS_17", "link");
define("LAN_LINKS_18", "links");
define("LAN_LINKS_19", "categories");
define("LAN_LINKS_20", "category");
define("LAN_LINKS_21", "There");
define("LAN_LINKS_22", "is");
define("LAN_LINKS_23", "are");
define("LAN_LINKS_24", "total in");
define("LAN_LINKS_25", "show all links");
define("LAN_LINKS_26", "Referrals");
define("LAN_LINKS_27", "submit a link");
define("LAN_LINKS_28", "Thank you");
define("LAN_LINKS_29", "Your link has been saved and will be reviewed by a site administrator.");
define("LAN_LINKS_30", "Link Categories");
define("LAN_LINKS_31", "submit a link");
define("LAN_LINKS_32", "Category:");
define("LAN_LINKS_33", "No Links are rated yet.");
define("LAN_LINKS_34", "There are currently no links");
define("LAN_LINKS_35", "personal links manager");
define("LAN_LINKS_36", "link comments");
define("LAN_LINKS_37", "Comments");
define("LAN_LINKS_38", "date");
define("LAN_LINKS_39", "Links");
define("LAN_LINKS_40", "Category");
define("LAN_LINKS_41", "no categories yet");
define("LAN_LINKS_42", "no links are referred yet");
define("LAN_LINKS_43", "view all categories");
define("LAN_LINKS_44", "id");
define("LAN_LINKS_45", "Link Category");
define("LAN_LINKS_46", "Link Subcategories");
define("LAN_LINKS_47", "link navigator...");
define("LAN_LINKS_48", "-- view category --");
define("LAN_LINKS_49", "");
define("LAN_LINKS_50", "You do not have permission to submit links at present");
define('LAN_LINKS_SCH_1','Posted in reply to link');
*/
// Admin log texts
//----------------
define('LAN_AL_LINKS_01', 'Links page preferences changed');
define('LAN_AL_LINKS_02', 'Link deleted');
define('LAN_AL_LINKS_03', 'Link category deleted');
define('LAN_AL_LINKS_04', 'Submitted link deleted');
define('LAN_AL_LINKS_05', 'Link category added');
define('LAN_AL_LINKS_06', 'Link category updated');
define('LAN_AL_LINKS_07', 'Link order updated');
define('LAN_AL_LINKS_08', 'Link Category order updated');
define('LAN_AL_LINKS_09', 'Link: move up');
define('LAN_AL_LINKS_10', 'Category: move up');
define('LAN_AL_LINKS_11', 'Link: move down');
define('LAN_AL_LINKS_12', 'Category: move down');
define('LAN_AL_LINKS_13', 'Link created');
define('LAN_AL_LINKS_14', 'Link updated');
define('LAN_AL_LINKS_15', '');
define('LAN_AL_LINKS_16', '');
define("LAN_ADMIN_HELP_0", "linkspage help area");
define("LAN_ADMIN_HELP_1", "<i>the manage link categories page shows all categories present.</i><br /><br /><b>detailed list</b><br />You see a list of all categories with their icon, name and description, options, and sorting options.<br /><br /><b>explanation of icons</b><br />
".defset('LINK_ICON_LINK')." : link to the category<br /><br />
".defset('LINK_ICON_EDIT')." : edit the category<br /><br />
".defset('LINK_ICON_DELETE')." : delete the category<br /><br />
".defset('LINK_ICON_ORDER_UP')." : the up button allows you to move the category item one up in order.<br /><br />
".defset('LINK_ICON_ORDER_DOWN')." : the down button allows you to move the category item one down in order.<br />
<br />
<b>order</b><br />here you can manually set the order of all the categories. You need to change the values in the select boxes to the order of your kind and press the reorder button below to save the new order.<br />");
// FIXME - not to be used in language files!!! Temporary fix to avoid notices in e.g. plugin manager
define("LAN_ADMIN_HELP_2", "<i>the create link category page allows you to add new categories</i><br /><br />You can upload a new icon, and after uploading assign the icon to the category.");
define("LAN_ADMIN_HELP_3", "<i>the manage links page first show all categories.</i><br /><br />".defset('LINK_ICON_LINK')." : link to the category<br /><br />".defset('LINK_ICON_EDIT')." : click the icon to view all links in this category<br />");
define("LAN_ADMIN_HELP_4", "<i>the create link page allows you to add a new link</i><br /><br />You can upload a new icon, and after uploading assign the icon to the link.<br /><br />the open type allows you to define how the link will be opened when a user clicks on it.");
define("LAN_ADMIN_HELP_5", "<i>the submitted links page shows all links that are submitted by users</i><br /><br /><b>detailed list</b><br />You see the link url, the name of the user who submitted the link and options.<br /><br /><b>explanation of icons</b><br />
".defset('LINK_ICON_EDIT')." : post the submitted link to the link create form<br /><br />
".defset('LINK_ICON_DELETE')." : delete the submitted link<br />
");
define("LAN_ADMIN_HELP_6", "<i>the options page allows you to change the behaviour of the links_page plugin</i><br /><br />
general options<br />
these options are generally used throughout the link pages.<br /><br />
personal link managers<br />
the personal link managers are privileged users who can manage their own personally added links.<br /><br />
category page<br />
here you can change options for the category page.<br /><br />
links page<br />
These options are used on the link pages.<br /><br />
refer page<br />
These options are used on the top refer links page.<br /><br />
rating page<br />
These options are used on the top rated links page.<br />
");
define("LAN_ADMIN_HELP_7", "<i>the edit link category page allows you to edit an existing category</i><br /><br />You can upload a new icon, and after uploading assign the icon to the category.<br />You can update the timestamp of the link by checking the box.");
define("LAN_ADMIN_HELP_8", "<i>this page shows all existing links in the selected category.</i><br /><br /><b>detailed list</b><br />You see a list of the links with their image, name, options, and sorting options.<br /><br /><b>explanation of icons</b><br />
".defset('LINK_ICON_LINK')." : link to the website<br /><br />
".defset('LINK_ICON_EDIT')." : edit the link<br /><br />
".defset('LINK_ICON_DELETE')." : delete the link<br /><br />
".defset('LINK_ICON_ORDER_UP')." : the up button allows you to move the link one up in order.<br /><br />
".defset('LINK_ICON_ORDER_DOWN')." : the down button allows you to move the link one down in order.<br />
<br />
<b>order</b><br />here you can manually set the order of all the links. You need to change the values in the select boxes to the order of your kind and press the reorder button below to save the new order.<br />");
define("LAN_ADMIN_HELP_9", "<i>the edit link page allows you to edit an existing link</i><br /><br />You can upload a new icon, and after uploading assign the icon to the link.<br /><br />the open type allows you to define how the link will be opened when a user clicks on it.");
define("LAN_ADMIN_HELP_10", "<i>the post submitted link page allows you to add a submitted link to the existing links</i><br /><br />A small submitted text is added into the description field.<br /><br />You can upload a new icon, and after uploading assign the icon to the link.<br /><br />the open type allows you to define how the link will be opened when a user clicks on it.");
?>

View File

@@ -1,6 +0,0 @@
<?php
define("LAN_PLUGIN_LINKSPAGE_NAME", "Links Page");
define("LAN_PLUGIN_LINKSPAGE_DESCRIPTION", "Links Page for displaying external web links.");
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,30 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/link_defines.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
$imagedir = e_IMAGE."admin_images/";
if (!defined("IMAGE_NEW")){ define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : e_IMAGE."generic/new.png")); }
if (!defined('LINK_ICON_EDIT')) { define("LINK_ICON_EDIT", "<img src='".$imagedir."edit_16.png' alt='' class='icon S16' />"); }
if (!defined('LINK_ICON_DELETE')) { define("LINK_ICON_DELETE", "<img src='".$imagedir."delete_16.png' alt='' class='icon S16' />"); }
if (!defined('LINK_ICON_DELETE_BASE')) { define("LINK_ICON_DELETE_BASE", $imagedir."delete_16.png"); }
if (!defined('LINK_ICON_LINK')) { define("LINK_ICON_LINK", "<img src='".$imagedir."leave_16.png' alt='' class='icon S16' />"); }
if (!defined('LINK_ICON_ORDER_UP_BASE')) { define("LINK_ICON_ORDER_UP_BASE", $imagedir."up.png"); }
if (!defined('LINK_ICON_ORDER_DOWN_BASE')) { define("LINK_ICON_ORDER_DOWN_BASE", $imagedir."down.png"); }
if (!defined('LINK_ICON_ORDER_UP')) { define("LINK_ICON_ORDER_UP", "<img src='".$imagedir."up.png' alt='' class='icon S16' />"); }
if (!defined('LINK_ICON_ORDER_DOWN')) { define("LINK_ICON_ORDER_DOWN", "<img src='".$imagedir."down.png' alt='' class='icon S16' />"); }
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,181 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
if (!plugInstalled('links_page'))
{
return '';
}
unset($text);
require_once(e_PLUGIN.'links_page/link_class.php');
$lc = new linkclass();
require_once(e_HANDLER."form_handler.php");
$rs = new form;
global $tp;
include_lan(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php");
//TODO review bullet
$bullet = '';
if(defined('BULLET'))
{
$bullet = '<img src="'.THEME.'images/'.BULLET.'" alt="" class="icon" />';
}
elseif(file_exists(THEME.'images/bullet2.gif'))
{
$bullet = '<img src="'.THEME.'images/bullet2.gif" alt="" class="icon" />';
}
global $linkspage_pref;
$linkspage_pref = $lc -> getLinksPagePref();
//navigator -------------------------
$mains = "";
$text = "";
$baseurl = e_PLUGIN_ABS."links_page/links.php";
if(isset($linkspage_pref['link_menu_navigator_frontpage']) && $linkspage_pref['link_menu_navigator_frontpage']){
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1")
{
$mains .= $rs -> form_option(LAN_LINKS_14, "0", $baseurl, "");
}else{
$mains .= $bullet." <a href='".$baseurl."'>".LAN_LINKS_14."</a><br />";
}
}
if(isset($linkspage_pref['link_menu_navigator_refer']) && $linkspage_pref['link_menu_navigator_refer']){
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1"){
$mains .= $rs -> form_option(LAN_LINKS_12, "0", $baseurl."?top", "");
}else{
$mains .= $bullet." <a href='".$baseurl."?top'>".LAN_LINKS_12."</a><br />";
}
}
if(isset($linkspage_pref['link_menu_navigator_rated']) && $linkspage_pref['link_menu_navigator_rated']){
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1"){
$mains .= $rs -> form_option(LAN_LINKS_13, "0", $baseurl."?rated", "");
}else{
$mains .= $bullet." <a href='".$baseurl."?rated'>".LAN_LINKS_13."</a><br />";
}
}
if(isset($linkspage_pref['link_menu_navigator_category']) && $linkspage_pref['link_menu_navigator_category']){
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1"){
$mains .= $rs -> form_option(LAN_LINKS_43, "0", $baseurl."?cat", "");
}else{
$mains .= $bullet." <a href='".$baseurl."?cat'>".LAN_LINKS_43."</a><br />";
}
}
if(isset($linkspage_pref['link_menu_navigator_links']) && $linkspage_pref['link_menu_navigator_links']){
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1"){
$mains .= $rs -> form_option(LCLAN_OPT_68, "0", $baseurl."?all", "");
}else{
$mains .= $bullet." <a href='".$baseurl."?all'>".LCLAN_OPT_68."</a><br />";
}
}
if(isset($linkspage_pref['link_menu_navigator_submit']) && $linkspage_pref['link_menu_navigator_submit'] && isset($linkspage_pref['link_submit']) && $linkspage_pref['link_submit'] && check_class($linkspage_pref['link_submit_class'])){
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1"){
$mains .= $rs -> form_option(LAN_LINKS_27, "0", $baseurl."?submit", "");
}else{
$mains .= $bullet." <a href='".$baseurl."?submit'>".LAN_LINKS_27."</a><br />";
}
}
if(isset($linkspage_pref['link_menu_navigator_manager']) && $linkspage_pref['link_menu_navigator_manager'] && isset($linkspage_pref['link_manager']) && $linkspage_pref['link_manager'] && check_class($linkspage_pref['link_manager_class'])){
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1"){
$mains .= $rs -> form_option(LCLAN_ITEM_35, "0", $baseurl."?manage", "");
}else{
$mains .= $bullet." <a href='".$baseurl."?manage'>".LCLAN_ITEM_35."</a><br />";
}
}
if($mains){
$cap = (isset($linkspage_pref['link_menu_navigator_caption']) && $linkspage_pref['link_menu_navigator_caption'] ? $linkspage_pref['link_menu_navigator_caption'] : LCLAN_OPT_82);
if(isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1"){
$selectjs = "style='width:100%;' onchange=\"if(this.options[this.selectedIndex].value != ''){ return document.location=this.options[this.selectedIndex].value; }\" ";
$text .= $rs -> form_select_open("navigator", $selectjs);
$text .= $rs -> form_option($cap, "0", "", "");
$text .= $mains;
$text .= $rs -> form_select_close();
$text .= "<br />";
}else{
$text .= $cap."<br />";
$text .= $mains."<br />";
}
}
//categories ------------------------
if(isset($linkspage_pref['link_menu_category']) && $linkspage_pref['link_menu_category']){
$mains = "";
$cap = (isset($linkspage_pref['link_menu_category_caption']) && $linkspage_pref['link_menu_category_caption'] ? $linkspage_pref['link_menu_category_caption'] : LCLAN_OPT_83);
$sqlc = new db; $sql2 = new db;
if ($sqlc->db_Select("links_page_cat", "link_category_id, link_category_name", "link_category_class REGEXP '".e_CLASS_REGEXP."' ORDER BY link_category_name")){
while ($rowc = $sqlc->db_Fetch()){
if(isset($linkspage_pref['link_menu_category_amount']) && $linkspage_pref['link_menu_category_amount']){
$amount = $sql2 -> db_Count("links_page", "(*)", "WHERE link_category = '".$rowc['link_category_id']."' AND link_class REGEXP '".e_CLASS_REGEXP."' ");
$amount = "(".$amount.")";
}else{
$amount = "";
}
if(isset($linkspage_pref['link_menu_category_rendertype']) && $linkspage_pref['link_menu_category_rendertype'] == "1"){
$mains .= $rs -> form_option($rowc['link_category_name']." ".$amount, "0", $baseurl."?cat.".$rowc['link_category_id'], "");
}else{
$mains .= $bullet." <a href='".$baseurl."?cat.".$rowc['link_category_id']."'>".$rowc['link_category_name']."</a> ".$amount."<br />";
}
}
if(isset($linkspage_pref['link_menu_category_rendertype']) && $linkspage_pref['link_menu_category_rendertype'] == "1"){
$selectjs = "style='width:100%;' onchange=\"if(this.options[this.selectedIndex].value != ''){ return document.location=this.options[this.selectedIndex].value; }\" ";
$text .= $rs -> form_select_open("category", $selectjs);
$text .= $rs -> form_option($cap, "0", "", "");
$text .= $mains;
$text .= $rs -> form_select_close();
$text .= "<br />";
}else{
$text .= $cap."<br />";
$text .= $mains;
}
}
}
//recent ----------------------------
if(isset($linkspage_pref["link_menu_recent"]) && $linkspage_pref["link_menu_recent"]){
$num = (isset($linkspage_pref["link_menu_recent_number"]) && $linkspage_pref["link_menu_recent_number"] ? $linkspage_pref["link_menu_recent_number"] : "5");
$qry = "
SELECT l.*, c.link_category_id, c.link_category_name
FROM #links_page AS l
LEFT JOIN #links_page_cat AS c ON c.link_category_id = l.link_category
WHERE l.link_class REGEXP '".e_CLASS_REGEXP."' AND c.link_category_class REGEXP '".e_CLASS_REGEXP."'
ORDER BY l.link_datestamp DESC LIMIT 0,".intval($num)."
";
$cap = (isset($linkspage_pref['link_menu_recent_caption']) && $linkspage_pref['link_menu_recent_caption'] ? $linkspage_pref['link_menu_recent_caption'] : LCLAN_OPT_84);
if($sql -> db_Select_gen($qry)){
$text .= "<br />".$cap."<br />";
while($row = $sql -> db_Fetch()){
$append = $lc -> parse_link_append($row);
$heading = $append.$tp->toHTML($row['link_name'],TRUE,"")."</a>";
$cat = (isset($linkspage_pref['link_menu_recent_category']) && $linkspage_pref['link_menu_recent_category'] ? "<br /><a href='".e_PLUGIN."links_page/links.php?cat.".$row['link_category_id']."'>".$row['link_category_name']."</a>" : "");
$desc = (isset($linkspage_pref['link_menu_recent_description']) && $linkspage_pref['link_menu_recent_description'] && $row['link_description'] ? "<br />".$tp->toHTML($row['link_description'],TRUE,"") : "");
$text .= "
<table style='width:100%; text-align:left; border:0;' cellpadding='0' cellspacing='0'>
<tr>
<td style='width:1%; white-space:nowrap; vertical-align:top; padding-right:5px;'>".$bullet."</td>
<td>
".$heading."
".$cat."
".$desc."
</td>
</tr>
</table>";
}
}
}
$caption = (isset($linkspage_pref['link_menu_caption']) && $linkspage_pref['link_menu_caption'] ? $linkspage_pref['link_menu_caption'] : LCLAN_OPT_86);
$ns -> tablerender($caption, $text);
?>

View File

@@ -1,481 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
include_once(e_HANDLER.'shortcode_handler.php');
$link_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
/*
SC_BEGIN LINK_NAVIGATOR
global $LINK_NAVIGATOR, $rs, $linkspage_pref, $qs;
$mains = "";
$baseurl = e_PLUGIN."links_page/links.php";
if(isset($linkspage_pref['link_navigator_frontpage']) && $linkspage_pref['link_navigator_frontpage']){
$mains .= $rs -> form_option(LAN_LINKS_14, "0", $baseurl, "");
}
if(isset($linkspage_pref['link_navigator_refer']) && $linkspage_pref['link_navigator_refer']){
$mains .= $rs -> form_option(LAN_LINKS_12, "0", $baseurl."?top", "");
}
if(isset($linkspage_pref['link_navigator_rated']) && $linkspage_pref['link_navigator_rated']){
$mains .= $rs -> form_option(LAN_LINKS_13, "0", $baseurl."?rated", "");
}
if(isset($linkspage_pref['link_navigator_category']) && $linkspage_pref['link_navigator_category']){
$mains .= $rs -> form_option(LAN_LINKS_43, "0", $baseurl."?cat", "");
}
if(isset($linkspage_pref['link_navigator_links']) && $linkspage_pref['link_navigator_links']){
$mains .= $rs -> form_option(LCLAN_OPT_68, "0", $baseurl."?all", "");
}
if(isset($linkspage_pref['link_navigator_submit']) && $linkspage_pref['link_navigator_submit'] && isset($linkspage_pref['link_submit']) && $linkspage_pref['link_submit'] && check_class($linkspage_pref['link_submit_class'])){
$mains .= $rs -> form_option(LAN_LINKS_27, "0", $baseurl."?submit", "");
}
if(isset($linkspage_pref['link_navigator_manager']) && $linkspage_pref['link_navigator_manager'] && isset($linkspage_pref['link_manager']) && $linkspage_pref['link_manager'] && check_class($linkspage_pref['link_manager_class'])){
$mains .= $rs -> form_option(LCLAN_ITEM_35, "0", $baseurl."?manage", "");
}
if(isset($linkspage_pref['link_navigator_allcat']) && $linkspage_pref['link_navigator_allcat']){
$sqlc = new db;
if ($sqlc->db_Select("links_page_cat", "link_category_id, link_category_name", "link_category_class REGEXP '".e_CLASS_REGEXP."' ORDER BY link_category_name")){
$mains .= $rs -> form_option("&nbsp;", "0", "", "");
$mains .= $rs -> form_option(LAN_LINKS_48, "0", "", "");
while ($rowc = $sqlc->db_Fetch()){
$mains .= $rs -> form_option($rowc['link_category_name'], "0", $baseurl."?cat.".$rowc['link_category_id'], "");
}
}
}
if($mains){
$main = "";
$selectjs = " onchange=\"if(this.options[this.selectedIndex].value.indexOf('-') &amp;&amp; this.options[this.selectedIndex].value != '' &amp;&amp; this.options[this.selectedIndex].value != '&nbsp;'){ return document.location=this.options[this.selectedIndex].value; }\" ";
// $selectjs = " onchange=\"if(this.options[this.selectedIndex].value != '-- view category --' || this.options[this.selectedIndex].value != '&nbsp;'){ return document.location=this.options[this.selectedIndex].value; }\" ";
$main .= $rs -> form_select_open("navigator", $selectjs);
$main .= $rs -> form_option(LAN_LINKS_47, "0", "", "");
$main .= $mains;
$main .= $rs -> form_select_close();
return $main;
}
SC_END
SC_BEGIN LINK_SORTORDER
global $LINK_SORTORDER;
return $LINK_SORTORDER;
SC_END
SC_BEGIN LINK_NAVIGATOR_TABLE_PRE
global $LINK_NAVIGATOR_TABLE_PRE;
if($LINK_NAVIGATOR_TABLE_PRE === TRUE){
$LINK_NAVIGATOR_TABLE_PRE = " ";
return $LINK_NAVIGATOR_TABLE_PRE;
}
SC_END
SC_BEGIN LINK_NAVIGATOR_TABLE_POST
global $LINK_NAVIGATOR_TABLE_POST;
if($LINK_NAVIGATOR_TABLE_POST === TRUE){
$LINK_NAVIGATOR_TABLE_POST = " ";
return $LINK_NAVIGATOR_TABLE_POST;
}
SC_END
SC_BEGIN LINK_NEXTPREV
global $LINK_NEXTPREV;
return $LINK_NEXTPREV;
SC_END
// LINK_TABLE_MANAGER ------------------------------------------------
SC_BEGIN LINK_MANAGE_ICON
global $LINK_MANAGE_ICON, $row;
$LINK_MANAGE_ICON = "";
return $LINK_MANAGE_ICON;
SC_END
SC_BEGIN LINK_MANAGE_NAME
global $LINK_MANAGE_NAME, $row, $tp;
return $tp->toHTML($row['link_name'], TRUE);
SC_END
SC_BEGIN LINK_MANAGE_OPTIONS
global $LINK_MANAGE_OPTIONS, $row, $tp, $linkspage_pref;
$linkid = $row['link_id'];
$LINK_MANAGE_OPTIONS = "<a href='".e_SELF."?manage.edit.".$linkid."' title='".LCLAN_ITEM_31."'>".LINK_ICON_EDIT."</a>";
if (isset($linkspage_pref['link_directdelete']) && $linkspage_pref['link_directdelete']){
$LINK_MANAGE_OPTIONS .= " <input type='image' title='delete' name='delete[main_{$linkid}]' alt='".LCLAN_ITEM_32."' src='".LINK_ICON_DELETE_BASE."' onclick=\"return jsconfirm('".$tp->toJS(LCLAN_ITEM_33." [ ".$row['link_name']." ]")."')\" style='vertical-align:top;' />";
}
return $LINK_MANAGE_OPTIONS;
SC_END
SC_BEGIN LINK_MANAGE_CAT
global $LINK_MANAGE_CAT, $tp, $row;
return $tp->toHTML($row['link_category_name'], TRUE);
SC_END
SC_BEGIN LINK_MANAGE_NEWLINK
global $LINK_MANAGE_NEWLINK;
return "<a href='".e_SELF."?manage'>".LAN_LINKS_MANAGER_3."</a>";
SC_END
// LINK_MAIN_TABLE ------------------------------------------------
SC_BEGIN LINK_MAIN_HEADING
global $LINK_MAIN_HEADING, $rowl, $tp;
return (!$rowl['total_links'] ? $rowl['link_category_name'] : "<a href='links.php?cat.".$rowl['link_category_id']."'>".$tp->toHTML($rowl['link_category_name'], TRUE)."</a>");
SC_END
SC_BEGIN LINK_MAIN_DESC
global $LINK_MAIN_DESC, $rowl, $linkspage_pref, $tp;
return (isset($linkspage_pref['link_cat_desc']) && $linkspage_pref['link_cat_desc'] ? $tp->toHTML($rowl['link_category_description'], TRUE,'description') : "");
SC_END
SC_BEGIN LINK_MAIN_NUMBER
global $LINK_MAIN_NUMBER, $rowl, $linkspage_pref;
if(isset($linkspage_pref['link_cat_amount']) && $linkspage_pref['link_cat_amount']){
$LINK_MAIN_NUMBER = $rowl['total_links']." ".($rowl['total_links'] == 1 ? LAN_LINKS_17 : LAN_LINKS_18)." ".LAN_LINKS_16;
}else{
$LINK_MAIN_NUMBER = "";
}
return $LINK_MAIN_NUMBER;
SC_END
SC_BEGIN LINK_MAIN_ICON
global $LINK_MAIN_ICON, $rowl, $linkspage_pref;
$LINK_MAIN_ICON = "";
$bullet = '';
if(defined('BULLET'))
{
$bullet = '<img src="'.THEME.'images/'.BULLET.'" alt="" class="icon" />';
}
elseif(file_exists(THEME.'images/bullet2.gif'))
{
$bullet = '<img src="'.THEME.'images/bullet2.gif" alt="" class="icon" />';
}
if(isset($linkspage_pref['link_cat_icon']) && $linkspage_pref['link_cat_icon'])
{
if (isset($rowl['link_category_icon']) && $rowl['link_category_icon'])
{
if(strstr($rowl['link_category_icon'], "/"))
{
if(file_exists(e_BASE.$rowl['link_category_icon']))
{
$LINK_MAIN_ICON = "<img src='".e_BASE.$rowl['link_category_icon']."' alt='' style='border:0; vertical-align:middle' />";
}
else
{
if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty'])
{
$LINK_MAIN_ICON = $bullet;
}
}
}
else
{
if(file_exists(e_PLUGIN."links_page/cat_images/".$rowl['link_category_icon']))
{
$LINK_MAIN_ICON = "<img src='".e_PLUGIN_ABS."links_page/cat_images/".$rowl['link_category_icon']."' alt='' style='border:0; vertical-align:middle' />";
}
else
{
if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty'])
{
$LINK_MAIN_ICON = $bullet;
}
}
}
}
else
{
if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty'])
{
$LINK_MAIN_ICON = $bullet;
}
}
if($rowl['total_links'] && $LINK_MAIN_ICON)
{
$LINK_MAIN_ICON = "<a href='links.php?cat.".$rowl['link_category_id']."'>".$LINK_MAIN_ICON."</a>";
}
}
return $LINK_MAIN_ICON;
SC_END
SC_BEGIN LINK_MAIN_TOTAL
global $LINK_MAIN_TOTAL, $sql, $category_total, $linkspage_pref, $alllinks;
if(isset($linkspage_pref['link_cat_total']) && $linkspage_pref['link_cat_total']){
$LINK_MAIN_TOTAL = LAN_LINKS_21." ".($alllinks == 1 ? LAN_LINKS_22 : LAN_LINKS_23)." ".$alllinks." ".($alllinks == 1 ? LAN_LINKS_17 : LAN_LINKS_18)." ".LAN_LINKS_24." ".$category_total." ".($category_total == 1 ? LAN_LINKS_20 : LAN_LINKS_19);
}else{
$LINK_MAIN_TOTAL = "";
}
return $LINK_MAIN_TOTAL;
SC_END
SC_BEGIN LINK_MAIN_SHOWALL
global $LINK_MAIN_SHOWALL, $linkspage_pref;
return (isset($linkspage_pref['link_cat_total']) && $linkspage_pref['link_cat_total'] ? "<a href='".e_PLUGIN_ABS."links_page/links.php?cat.all'>".LAN_LINKS_25."</a>" : "");
SC_END
// LINK_TABLE ------------------------------------------------
SC_BEGIN LINK_BUTTON
global $LINK_BUTTON, $linkspage_pref, $rowl, $LINK_NAME, $LINK_APPEND;
if(!$linkspage_pref['link_icon']){
return "";
}
$LINK_BUTTON = "&nbsp;";
if(isset($linkspage_pref['link_icon']) && $linkspage_pref['link_icon']){
if ($rowl['link_button']) {
if (strpos($rowl['link_button'], "http://") !== FALSE) {
$LINK_BUTTON = $LINK_APPEND."\n<img class='linkspage_button' src='".$rowl['link_button']."' alt='' /></a>";
} else {
if(strstr($rowl['link_button'], "/")){
if(file_exists(e_BASE.$rowl['link_button'])){
$LINK_BUTTON = $LINK_APPEND."\n<img class='linkspage_button' src='".e_BASE.$rowl['link_button']."' alt='' /></a>";
} else {
if(isset($linkspage_pref['link_icon_empty']) && $linkspage_pref['link_icon_empty']){
$LINK_BUTTON = $LINK_APPEND."\n<img class='linkspage_button' style='width: 88px; height: 31px;' src='".e_PLUGIN_ABS."links_page/images/generic.png' alt='' /></a>";
}
}
}else{
if(file_exists(e_PLUGIN."links_page/link_images/".$rowl['link_button'])){
$LINK_BUTTON = $LINK_APPEND."\n<img class='linkspage_button' src='".e_PLUGIN_ABS."links_page/link_images/".$rowl['link_button']."' alt='' /></a>";
}else{
if(isset($linkspage_pref['link_icon_empty']) && $linkspage_pref['link_icon_empty']){
$LINK_BUTTON = $LINK_APPEND."\n<img class='linkspage_button' style='width: 88px; height: 31px;' src='".e_PLUGIN_ABS."links_page/images/generic.png' alt='' /></a>";
}
}
}
}
} else {
if(isset($linkspage_pref['link_icon_empty']) && $linkspage_pref['link_icon_empty']){
$LINK_BUTTON = $LINK_APPEND."\n<img class='linkspage_button' style='width: 88px; height: 31px;' src='".e_PLUGIN_ABS."links_page/images/generic.png' alt='' /></a>";
}
}
}else{
if(isset($linkspage_pref['link_icon_empty']) && $linkspage_pref['link_icon_empty']){
$LINK_BUTTON = $LINK_APPEND."\n<img class='linkspage_button' style='width: 88px; height: 31px;' src='".e_PLUGIN_ABS."links_page/images/generic.png' alt='' /></a>";
}
}
return $LINK_BUTTON;
SC_END
SC_BEGIN BUTTON_COLUMN
global $linkbutton_count,$linkspage_pref;
return ($linkspage_pref['link_icon']) ? 2 : 1;
SC_END
SC_BEGIN LINK_APPEND
global $LINK_APPEND;
return $LINK_APPEND;
SC_END
SC_BEGIN LINK_NAME
global $LINK_NAME, $rowl;
return $rowl['link_name'];
SC_END
SC_BEGIN LINK_URL
global $LINK_URL, $linkspage_pref, $rowl;
if(!$linkspage_pref['link_url'])
{
return "";
}
return ($parm == "link") ? "<a class='linkspage_url' href=\"".$rowl['link_url']."\" rel='external' title=\"".$rowl['link_description']."\">".$rowl['link_url']."</a>" : $rowl['link_url'];
SC_END
SC_BEGIN LINK_REFER
global $LINK_REFER, $linkspage_pref, $rowl;
return (isset($linkspage_pref['link_referal']) && $linkspage_pref['link_referal'] ? $rowl['link_refer'] : "");
SC_END
SC_BEGIN LINK_COMMENT
global $LINK_COMMENT, $linkspage_pref, $rowl;
return (isset($linkspage_pref['link_comment']) && $linkspage_pref['link_comment'] ? "<a href='".e_SELF."?comment.".$rowl['link_id']."'>".($rowl['link_comment'] ? $rowl['link_comment'] : "0")."</a>" : "");
SC_END
SC_BEGIN LINK_DESC
global $LINK_DESC, $linkspage_pref, $tp, $rowl;
return (isset($linkspage_pref['link_desc']) && $linkspage_pref['link_desc'] ? $tp->toHTML($rowl['link_description'], TRUE,'BODY') : "");
SC_END
SC_BEGIN LINK_RATING
global $LINK_RATING, $LINK_RATED_RATING, $linkspage_pref, $rater, $rowl, $qs;
$LINK_RATING = "";
if(isset($linkspage_pref['link_rating']) && $linkspage_pref['link_rating']){
$LINK_RATING = $rater->composerating("links_page", $rowl['link_id'], $enter=TRUE, $userid=FALSE);
}
return $LINK_RATING;
SC_END
SC_BEGIN LINK_NEW
global $LINK_NEW, $linkspage_pref, $qs, $rowl;
$LINK_NEW = "";
if(USER && $rowl['link_datestamp'] > USERLV){
$LINK_NEW = "<img class='linkspage_new' src='".IMAGE_NEW."' alt='' style='vertical-align:middle' />";
}
return $LINK_NEW;
SC_END
SC_BEGIN LINK_CAT_NAME
global $rowl;
return $rowl['link_category_name'];
SC_END
SC_BEGIN LINK_CAT_DESC
global $rowl;
return $rowl['link_category_description'];
SC_END
SC_BEGIN LINK_CAT_TOTAL
global $link_category_total;
return " (<span title='".(ADMIN ? LAN_LINKS_2 : LAN_LINKS_1)."' >".$link_category_total."</span>".(ADMIN ? "/<span title='".(ADMIN ? LAN_LINKS_1 : "" )."' >".$link_category_total."</span>" : "").") ";
SC_END
SC_BEGIN LINK_REFER_LAN
global $linkspage_pref;
return (isset($linkspage_pref['link_referal']) && $linkspage_pref['link_referal'] ? LAN_LINKS_26 : "");
SC_END
SC_BEGIN LINK_COMMENT_LAN
global $linkspage_pref;
return (isset($linkspage_pref['link_comment']) && $linkspage_pref['link_comment'] ? LAN_LINKS_37 : "");
SC_END
SC_BEGIN LINK_RATING_LAN
global $linkspage_pref;
if(isset($linkspage_pref['link_rating']) && $linkspage_pref['link_rating']){
return LCLAN_ITEM_39;
}
return "";
SC_END
SC_BEGIN NAVIGATOR
return displayNavigator('');
SC_END
// LINK_TOP_TABLE ------------------------------------------------
// LINK_RATED_TABLE ------------------------------------------------
SC_BEGIN LINK_RATED_RATING
global $LINK_RATED_RATING, $rowl;
$tmp = explode(".", $rowl['rate_avg']);
$one = $tmp[0];
$two = round($tmp[1],1);
$rating = $one.".".$two." ";
for($c=1; $c<= $one; $c++){
$rating .= "<img src='".e_IMAGE_ABS."rate/box.png' alt='' style='height:8px; vertical-align:middle' />";
}
if($one < 10){
for($c=9; $c>=$one; $c--){
$rating .= "<img src='".e_IMAGE_ABS."rate/empty.png' alt='' style='height:8px; vertical-align:middle' />";
}
}
$rating .= "<img src='".e_IMAGE_ABS."rate/boxend.png' alt='' style='height:8px; vertical-align:middle' />";
return $rating;
SC_END
SC_BEGIN LINK_RATED_BUTTON
global $LINK_RATED_BUTTON, $linkspage_pref, $rowl, $LINK_RATED_NAME, $LINK_RATED_APPEND;
if(isset($linkspage_pref['link_icon']) && $linkspage_pref['link_icon']){
if ($rowl['link_button']) {
if (strpos($rowl['link_button'], "http://") !== FALSE) {
$LINK_RATED_BUTTON = $LINK_RATED_APPEND."\n<img src='".$rowl['link_button']."' alt='".$LINK_RATED_NAME."' /></a>";
} else {
if(strstr($rowl['link_button'], "/")){
$LINK_RATED_BUTTON = $LINK_RATED_APPEND."\n<img src='".e_BASE.$rowl['link_button']."' alt='".$LINK_RATED_NAME."' /></a>";
}else{
$LINK_RATED_BUTTON = $LINK_RATED_APPEND."\n<img src='".e_PLUGIN_ABS."links_page/link_images/".$rowl['link_button']."' alt='".$LINK_RATED_NAME."' /></a>";
}
}
} else {
if(isset($linkspage_pref['link_icon_empty']) && $linkspage_pref['link_icon_empty']){
$LINK_RATED_BUTTON = $LINK_RATED_APPEND."\n<img style='width: 88px; height: 31px;' src='".e_PLUGIN_ABS."links_page/images/generic.png' alt='".$LINK_RATED_NAME."' /></a>";
}else{
$LINK_RATED_BUTTON = "";
}
}
}else{
if(isset($linkspage_pref['link_icon_empty']) && $linkspage_pref['link_icon_empty']){
$LINK_RATED_BUTTON = $LINK_RATED_APPEND."\n<img style='width: 88px; height: 31px;' src='".e_PLUGIN_ABS."links_page/images/generic.png' alt='".$LINK_RATED_NAME."' /></a>";
}else{
$LINK_RATED_BUTTON = "";
}
}
return $LINK_RATED_BUTTON;
SC_END
SC_BEGIN LINK_RATED_APPEND
global $LINK_RATED_APPEND;
return $LINK_RATED_APPEND;
SC_END
SC_BEGIN LINK_RATED_CATEGORY
global $LINK_RATED_CATEGORY, $rowl, $qs, $tp;
if(!isset($qs[1])){
$LINK_RATED_CATEGORY = "<a href='".e_SELF."?cat.".$rowl['link_category_id']."'>".$tp->toHTML($rowl['link_category_name'], TRUE)."</a>";
}
return $LINK_RATED_CATEGORY;
SC_END
SC_BEGIN LINK_RATED_NAME
global $LINK_RATED_NAME, $rowl;
return $rowl['link_name'];
SC_END
SC_BEGIN LINK_RATED_URL
global $LINK_RATED_URL, $linkspage_pref, $rowl;
return (isset($linkspage_pref['link_url']) && $linkspage_pref['link_url'] ? $rowl['link_url'] : "");
SC_END
SC_BEGIN LINK_RATED_REFER
global $LINK_RATED_REFER, $linkspage_pref, $rowl;
return (isset($linkspage_pref['link_referal']) && $linkspage_pref['link_referal'] ? LAN_LINKS_26." ".$rowl['link_refer'] : "");
SC_END
SC_BEGIN LINK_RATED_DESC
global $LINK_RATED_DESC, $linkspage_pref, $tp, $rowl;
return (isset($linkspage_pref['link_desc']) && $linkspage_pref['link_desc'] ? $tp->toHTML($rowl['link_description'], TRUE) : "");
SC_END
// LINK_SUBMIT_TABLE ------------------------------------------------
SC_BEGIN LINK_SUBMIT_CAT
global $LINK_SUBMIT_CAT;
return $LINK_SUBMIT_CAT;
SC_END
SC_BEGIN LINK_SUBMIT_PRETEXT
global $LINK_SUBMIT_PRETEXT, $linkspage_pref;
if(isset($linkspage_pref['link_submit_directpost']) && $linkspage_pref['link_submit_directpost']){
return "";
}else{
return LCLAN_SL_9;
}
SC_END
*/
?>

View File

@@ -1,595 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/links.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once('../../class2.php');
if (!plugInstalled('links_page'))
{
header("location:".e_BASE."index.php");
exit;
}
require_once(e_HANDLER."rate_class.php");
$rater = new rater;
require_once(e_PLUGIN.'links_page/link_shortcodes.php');
require_once(e_PLUGIN.'links_page/link_defines.php');
require_once(e_HANDLER."userclass_class.php");
e107_require_once(e_HANDLER.'arraystorage_class.php');
$eArrayStorage = new ArrayData();
require_once(e_HANDLER."form_handler.php");
$rs = new form;
require_once(e_HANDLER."file_class.php");
$fl = new e_file;
require_once(e_HANDLER."comment_class.php");
$cobj = new comment;
require_once(e_PLUGIN.'links_page/link_class.php');
$lc = new linkclass();
global $tp;
$linkspage_pref = $lc -> getLinksPagePref();
$deltest = array_flip($_POST);
if(e_QUERY){
$qs = explode(".", e_QUERY);
if(is_numeric($qs[0]))
{
$from = array_shift($qs);
}
else
{
$from = "0";
}
}
include_lan(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php");
$lc -> setPageTitle();
//submit comment
if (isset($_POST['commentsubmit']))
{
if (!$sql->db_Select("links_page", "link_id", "link_id = '".intval($qs[1])."' "))
{
header("location:".e_BASE."index.php");
exit;
}
else
{
$row = $sql->db_Fetch();
if ($row[0] && (ANON === TRUE || USER === TRUE))
{
$cobj->enter_comment($_POST['author_name'], $_POST['comment'], "links_page", $qs[1], $pid, $_POST['subject']);
$e107cache->clear("comment.links_page.{$qs[1]}");
}
}
}
//update refer
if (isset($qs[0]) && $qs[0] == "view" && isset($qs[1]) && is_numeric($qs[1]))
{
if($sql->db_Select("links_page", "*", "link_id='".intval($qs[1])."' AND link_class REGEXP '".e_CLASS_REGEXP."' "))
{
$row = $sql->db_Fetch();
$sql->db_Update("links_page", "link_refer=link_refer+1 WHERE link_id='".intval($qs[1])."' ");
//header("location:".$row['link_url']); exit;
js_location($row['link_url']);
}
}
require_once(HEADERF);
if (is_readable(THEME."links_template.php"))
{
require_once(THEME."links_template.php");
}
else
{
require_once(e_PLUGIN."links_page/links_template.php");
}
//submit / manage link
if (isset($_POST['add_link']))
{
if($qs[0] == "submit"){
if(check_class($linkspage_pref['link_submit_class']))
{
if(isset($linkspage_pref['link_submit_directpost']) && $linkspage_pref['link_submit_directpost'])
{
$lc -> dbLinkCreate();
}
else
{
$lc -> dbLinkCreate("submit");
}
}
else
{
js_location(e_SELF);
}
}
if($qs[0] == "manage")
{
if(check_class($linkspage_pref['link_manager_class']))
{
if(isset($qs[2]) && is_numeric($qs[2]))
{
$lc->verify_link_manage($qs[2]);
}
if(isset($linkspage_pref['link_directpost']) && $linkspage_pref['link_directpost'])
{
$lc -> dbLinkCreate();
}
else
{
$lc -> dbLinkCreate("submit");
}
}
else
{
js_location(e_SELF);
}
}
}
//message submitted link
if(isset($qs[0]) && $qs[0] == "s")
{
$lc->show_message(LAN_LINKS_29, LAN_LINKS_28);
}
$qsorder = FALSE;
if(isset($qs[0]) && substr($qs[0],0,5) == "order")
{
$qsorder = TRUE;
}
//show all categories
if((!isset($qs[0]) || $qsorder) && $linkspage_pref['link_page_categories'])
{
echo displayNavigator('cat');
displayCategory();
}
//show all categories
if(isset($qs[0]) && $qs[0] == "cat" && !isset($qs[1]) ){
echo displayNavigator('cat');
displayCategory();
}
//show all links in all categories
if( ((!isset($qs[0]) || $qsorder) && !$linkspage_pref['link_page_categories']) || (isset($qs[0]) && $qs[0] == "all") )
{
// displayNavigator('');
displayCategoryLinks();
}
//show all links in one category
if(isset($qs[0]) && $qs[0] == "cat" && isset($qs[1]) && is_numeric($qs[1]))
{
// echo displayNavigator('');
displayCategoryLinks($qs[1]);
}
//view top rated
if(isset($qs[0]) && $qs[0] == "rated")
{
echo displayNavigator('');
displayTopRated();
}
//view top refer
if(isset($qs[0]) && $qs[0] == "top"){
echo displayNavigator('');
displayTopRefer();
}
//personal link managers
if (isset($qs[0]) && $qs[0] == "manage"){
echo displayNavigator('');
displayPersonalManager();
}
//comments on links
if (isset($qs[0]) && $qs[0] == "comment" && isset($qs[1]) && is_numeric($qs[1]) ){
echo displayNavigator('');
displayLinkComment();
}
//submit link
if (isset($qs[0]) && $qs[0] == "submit")
{
if (check_class($linkspage_pref['link_submit_class']))
{
echo displayNavigator('');
displayLinkSubmit();
}
else
{
$lc->show_message(LAN_LINKS_50);
}
}
function displayTopRated(){
global $qs, $sql, $lc, $tp, $rowl, $link_shortcodes, $from, $ns, $linkspage_pref;
global $LINK_RATED_TABLE_START, $LINK_RATED_TABLE, $LINK_RATED_TABLE_END, $LINK_RATED_RATING, $LINK_RATED_APPEND;
$number = (isset($linkspage_pref["link_nextprev_number"]) && $linkspage_pref["link_nextprev_number"] ? $linkspage_pref["link_nextprev_number"] : "20");
$np = ($linkspage_pref["link_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : "");
$catrate = (isset($qs[1]) && is_numeric($qs[1]) ? " AND l.link_category='".$qs[1]."' " : "");
$ratemin = (isset($linkspage_pref['link_rating_minimum']) && $linkspage_pref['link_rating_minimum'] ? $linkspage_pref['link_rating_minimum'] : "0");
$qry = "
SELECT l.*, r.*, lc.link_category_id, lc.link_category_name, (r.rate_rating / r.rate_votes) as rate_avg
FROM #rate AS r
LEFT JOIN #links_page AS l ON l.link_id = r.rate_itemid
LEFT JOIN #links_page_cat AS lc ON lc.link_category_id = l.link_category
WHERE l.link_class REGEXP '".e_CLASS_REGEXP."' ".$catrate." AND lc.link_category_class REGEXP '".e_CLASS_REGEXP."' AND r.rate_table='links_page'
ORDER BY rate_avg DESC
";
$qry2 = $qry." ".$np;
if(!is_object($sql)){ $sql = new db; }
$linktotalrated = $sql -> db_Select_gen($qry);
if (!$ratedlinks = $sql->db_Select_gen($qry2)){
$lc -> show_message(LAN_LINKS_33, LAN_LINKS_11);
}else{
$link_rated_table_string = "";
$list = $sql -> db_getList();
foreach($list as $rowl) {
if( ($rowl['rate_avg'] > $ratemin) ){
$cat = $rowl['link_category_name'];
$LINK_RATED_APPEND = $lc -> parse_link_append($rowl);
$LINK_RATED_RATING = $tp -> parseTemplate('{LINK_RATED_RATING}', FALSE, $link_shortcodes);
$link_rated_table_string .= $tp -> parseTemplate($LINK_RATED_TABLE, FALSE, $link_shortcodes);
}
}
$link_rated_table_start = $tp -> parseTemplate($LINK_RATED_TABLE_START, FALSE, $link_shortcodes);
$link_rated_table_end = $tp -> parseTemplate($LINK_RATED_TABLE_END, FALSE, $link_shortcodes);
if(isset($qs[1])){
$captioncat = " : ".LAN_LINKS_40." : ".$cat;
}
$caption = LAN_LINKS_11." ".(isset($captioncat) ? $captioncat : "");
$text = $link_rated_table_start.$link_rated_table_string.$link_rated_table_end;
$ns->tablerender($caption, $text);
$lc->ShowNextPrev($from, $number, $linktotalrated);
}
}
function displayTopRefer(){
global $qs, $sql2, $lc, $link_shortcodes, $cobj, $rowl, $from, $tp, $ns, $linkspage_pref;
global $LINK_TABLE_START, $LINK_TABLE, $LINK_TABLE_END, $LINK_APPEND;
$number = ($linkspage_pref["link_nextprev_number"] ? $linkspage_pref["link_nextprev_number"] : "20");
$np = ($linkspage_pref["link_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : "");
$min = (isset($linkspage_pref['link_refer_minimum']) && $linkspage_pref['link_refer_minimum'] ? " AND l.link_refer > ".$linkspage_pref['link_refer_minimum'] : "");
$qry = "
SELECT l.*, lc.*, COUNT(c.comment_id) AS link_comment
FROM #links_page AS l
LEFT JOIN #links_page_cat AS lc ON lc.link_category_id = l.link_category
LEFT JOIN #comments as c ON c.comment_item_id=l.link_id AND comment_type='links_page'
WHERE l.link_class REGEXP '".e_CLASS_REGEXP."' ".$min."
GROUP BY l.link_id
ORDER BY l.link_refer DESC
";
$qry2 = $qry." ".$np;
if(!is_object($sql2)){ $sql2 = new db; }
$link_total = $sql2 -> db_Select_gen($qry);
if(!$sql2 -> db_Select_gen($qry2)){
$lc -> show_message(LAN_LINKS_42, LAN_LINKS_10);
}else{
$link_top_table_string = "";
$list = $sql2 -> db_getList();
foreach($list as $rowl) {
$category = $rowl['link_category_id'];
$LINK_APPEND = $lc -> parse_link_append($rowl);
$link_top_table_string .= $tp -> parseTemplate($LINK_TABLE, FALSE, $link_shortcodes);
}
$link_top_table_start = $tp -> parseTemplate($LINK_TABLE_START, FALSE, $link_shortcodes);
$link_top_table_end = $tp -> parseTemplate($LINK_TABLE_END, FALSE, $link_shortcodes);
$text = $link_top_table_start.$link_top_table_string.$link_top_table_end;
$caption = LAN_LINKS_10;
$ns->tablerender($caption, $text);
$lc->ShowNextPrev($from, $number, $link_total);
}
}
function displayPersonalManager()
{
global $qs, $sql, $sql2, $lc, $link_shortcodes, $cobj, $row, $from, $tp, $ns, $linkspage_pref;
global $LINK_TABLE_MANAGE_START, $LINK_TABLE_MANAGE, $LINK_TABLE_MANAGE_END;
if(!(isset($linkspage_pref['link_manager']) && $linkspage_pref['link_manager']))
{
js_location(e_SELF);
}
//delete link
if(isset($linkspage_pref['link_directdelete']) && $linkspage_pref['link_directdelete'])
{
if(isset($_POST['delete']))
{
$tmp = array_pop(array_flip($_POST['delete']));
list($delete, $del_id) = explode("_", $tmp);
}
if (isset($delete) && $delete == 'main')
{
$sql->db_Select("links_page", "link_category, link_order, link_author", "link_id='".intval($del_id)."'"); // Get the position of target in the order
$row = $sql->db_Fetch();
if($row['link_author'] != USERID) {
header('Location: '.SITEURL);
exit;
}
if (!is_object($sql2)){ $sql2 = new db; }
$sql->db_Select("links_page", "link_id", "link_order>'".$row['link_order']."' && link_category='".intval($row['link_category'])."'");
while ($row = $sql->db_Fetch())
{
$sql2->db_Update("links_page", "link_order=link_order-1 WHERE link_id='".$row['link_id']."'");
}
if ($sql->db_Delete("links_page", "link_id='".intval($del_id)."'"))
{
$lc->show_message(LCLAN_ADMIN_10." #".$del_id." ".LCLAN_ADMIN_11);
}
}
}
//upload link icon
if(isset($_POST['uploadlinkicon'])){
$lc -> uploadLinkIcon();
}
//show existing links
if(!(check_class($linkspage_pref['link_manager_class']))){
js_location(e_SELF);
}else{
$qry = "
SELECT l.*, lc.*
FROM #links_page AS l
LEFT JOIN #links_page_cat AS lc ON lc.link_category_id = l.link_category
WHERE l.link_author = '".USERID."'
ORDER BY l.link_name
";
$link_table_manage = "";
if(!$manager_total = $sql -> db_Select_gen($qry)){
$text = LAN_LINKS_MANAGER_4;
}else{
$link_table_manage_start = $tp -> parseTemplate($LINK_TABLE_MANAGE_START, FALSE, $link_shortcodes);
while($row = $sql -> db_Fetch()){
$link_table_manage .= $tp -> parseTemplate($LINK_TABLE_MANAGE, FALSE, $link_shortcodes);
}
$link_table_manage_end = $tp -> parseTemplate($LINK_TABLE_MANAGE_END, FALSE, $link_shortcodes);
$text = $link_table_manage_start.$link_table_manage.$link_table_manage_end;
}
$ns->tablerender(LAN_LINKS_35, $text);
//show link create
$lc->show_link_create();
}
return;
}
//comments on links
function displayLinkComment(){
global $qs, $cobj, $tp, $sql, $linkbutton_count, $lc, $rowl, $link_shortcodes, $ns, $linkspage_pref, $LINK_TABLE_START, $LINK_TABLE, $LINK_TABLE_END, $LINK_APPEND;
if(!(isset($linkspage_pref["link_comment"]) && $linkspage_pref["link_comment"])){
js_location(e_SELF);
}else{
$qry = "
SELECT l.*, lc.*, COUNT(c.comment_id) AS link_comment
FROM #links_page AS l
LEFT JOIN #links_page_cat AS lc ON lc.link_category_id = l.link_category
LEFT JOIN #comments as c ON c.comment_item_id=l.link_id AND comment_type='links_page'
WHERE l.link_id = '".intval($qs[1])."' AND lc.link_category_class REGEXP '".e_CLASS_REGEXP."' AND l.link_class REGEXP '".e_CLASS_REGEXP."'
GROUP BY l.link_id";
$link_comment_table_string = "";
if(!$linkcomment = $sql -> db_Select_gen($qry)){
js_location(e_SELF);
}else{
$rowl = $sql->db_Fetch();
$linkbutton_count = ($rowl['link_button']) ? $linkbutton_count + 1 : $linkbutton_count;
$LINK_APPEND = $lc -> parse_link_append($rowl);
$subject = $rowl['link_name'];
$text = $tp -> parseTemplate($LINK_TABLE_START, FALSE, $link_shortcodes);
$text .= $tp -> parseTemplate($LINK_TABLE, FALSE, $link_shortcodes);
$text .= $tp -> parseTemplate($LINK_TABLE_END, FALSE, $link_shortcodes);
$ns->tablerender(LAN_LINKS_36, $text);
$cobj->compose_comment("links_page", "comment", $qs[1], $width, $subject, $showrate=FALSE);
}
}
return;
}
function displayLinkSubmit(){
global $qs, $sql, $tp, $rs, $ns, $linkspage_pref, $link_shortcodes, $LINK_SUBMIT_TABLE, $LINK_SUBMIT_CAT;
if ($link_cats = $sql->db_Select("links_page_cat", "*", " link_category_class REGEXP '".e_CLASS_REGEXP."' ")) {
$LINK_SUBMIT_CAT = $rs -> form_select_open("cat_id");
while (list($cat_id, $cat_name, $cat_description) = $sql->db_Fetch()) {
$LINK_SUBMIT_CAT .= $rs -> form_option($cat_name, "0", $cat_id);
}
$LINK_SUBMIT_CAT .= $rs -> form_select_close();
}
$text = $tp -> parseTemplate($LINK_SUBMIT_TABLE, FALSE, $link_shortcodes);
$ns->tablerender(LAN_LINKS_31, $text);
return;
}
function displayCategory(){
global $sql, $sql2, $ns, $lc, $tp, $qs, $rowl, $link_shortcodes, $linkspage_pref, $total_links, $category_total, $alllinks;
global $LINK_MAIN_TABLE_END_ALL, $LINK_MAIN_TABLE, $LINK_MAIN_TABLE_START;
$order = $lc -> getOrder('cat');
$qry = "
SELECT lc.*
FROM #links_page_cat AS lc
WHERE lc.link_category_class REGEXP '".e_CLASS_REGEXP."'
".$order."
";
if(!is_object($sql)){ $sql = new db; }
if(!is_object($sql2)){ $sql2 = new db; }
if (!$category_total = $sql->db_Select_gen($qry)){
$lc -> show_message(LAN_LINKS_41, LAN_LINKS_30);
}else{
$link_main_table_string = "";
$list = $sql->db_getList();
foreach($list as $rowl) {
$rowl['total_links'] = $sql2 -> db_Count("links_page", "(*)", "WHERE link_category = '".$rowl['link_category_id']."' AND link_class REGEXP '".e_CLASS_REGEXP."' ");
if((!isset($linkspage_pref['link_cat_empty']) || $linkspage_pref['link_cat_empty'] == 0 && $rowl['total_links'] > "0") || (isset($linkspage_pref['link_cat_empty']) && $linkspage_pref['link_cat_empty'])){
$alllinks = $alllinks + $rowl['total_links'];
$link_main_table_string .= $tp -> parseTemplate($LINK_MAIN_TABLE, FALSE, $link_shortcodes);
}
}
$link_main_table_start = $tp -> parseTemplate($LINK_MAIN_TABLE_START, FALSE, $link_shortcodes);
$link_main_table_end = $tp -> parseTemplate($LINK_MAIN_TABLE_END_ALL, FALSE, $link_shortcodes);
$text = $link_main_table_start.$link_main_table_string.$link_main_table_end;
$caption = LAN_LINKS_30;
$ns->tablerender($caption, $text);
}
return;
}
function displayNavigator($mode='')
{
global $sql2, $ns, $lc, $tp, $cobj, $rowl, $qs, $linkspage_pref, $from, $link_shortcodes;
global $LINK_NAVIGATOR_TABLE, $LINK_SORTORDER, $LINK_NAVIGATOR, $LINK_NAVIGATOR_TABLE_PRE, $LINK_NAVIGATOR_TABLE_POST;
static $hasBeenShown = FALSE;
if ($hasBeenShown) return '';
$hasBeenShown = TRUE;
if($mode == "cat")
{
if(isset($linkspage_pref['link_cat_sortorder']) && $linkspage_pref['link_cat_sortorder'])
{
$LINK_SORTORDER = $lc->showLinkSort('cat');
}
}
else
{
if(isset($linkspage_pref['link_sortorder']) && $linkspage_pref['link_sortorder'])
{
$LINK_SORTORDER = $lc->showLinkSort();
}
}
$nav = $tp -> parseTemplate('{LINK_NAVIGATOR}', FALSE, $link_shortcodes);
$so = $tp -> parseTemplate('{LINK_SORTORDER}', FALSE, $link_shortcodes);
$LINK_NAVIGATOR_TABLE_PRE = FALSE;
$LINK_NAVIGATOR_TABLE_POST = FALSE;
if ($nav!="" || $so!="" ) {
$LINK_NAVIGATOR_TABLE_PRE = TRUE;
$LINK_NAVIGATOR_TABLE_POST = TRUE;
}
$text = $tp -> parseTemplate($LINK_NAVIGATOR_TABLE, FALSE, $link_shortcodes);
return $text;
}
function displayCategoryLinks($mode=''){
global $sql2, $ns, $lc, $tp, $cobj, $rowl, $qs, $linkspage_pref, $from, $link_shortcodes, $link_category_total;
global $LINK_TABLE_START,$linkbutton_count, $LINK_TABLE,$link_category_total, $LINK_TABLE_CAPTION, $LINK_TABLE_END, $LINK_APPEND;
$order = $lc -> getOrder();
$number = ($linkspage_pref["link_nextprev_number"] ? $linkspage_pref["link_nextprev_number"] : "20");
$nextprevquery = ($mode && $linkspage_pref["link_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : "");
$cat = ($mode ? " AND l.link_category='".intval($mode)."' " : "");
$qry = "
SELECT l.*, lc.*, COUNT(c.comment_id) AS link_comment
FROM #links_page AS l
LEFT JOIN #links_page_cat AS lc ON lc.link_category_id = l.link_category
LEFT JOIN #comments as c ON c.comment_item_id=l.link_id AND comment_type='links_page'
WHERE l.link_class REGEXP '".e_CLASS_REGEXP."' AND lc.link_category_class REGEXP '".e_CLASS_REGEXP."' ".$cat."
GROUP BY l.link_id
".$order."
".$nextprevquery."
";
$link_table_string = "";
if(!is_object($sql2)){ $sql2 = new db; }
$link_total = $sql2 -> db_Count("links_page as l", "(*)", "WHERE l.link_class REGEXP '".e_CLASS_REGEXP."' ".$cat." ");
if (!$sql2->db_Select_gen($qry)){
$lc -> show_message(LAN_LINKS_34, LAN_LINKS_39);
}else{
$linkbutton_count = 0;
$list = $sql2 -> db_getList();
foreach($list as $rowl) {
$linkbutton_count = ($rowl['link_button']) ? $linkbutton_count + 1 : $linkbutton_count;
if($mode){
$cat_name = $rowl['link_category_name'];
$cat_desc = $rowl['link_category_description'];
$LINK_APPEND = $lc -> parse_link_append($rowl);
$link_table_string .= $tp -> parseTemplate($LINK_TABLE, FALSE, $link_shortcodes);
}else{
$arr[$rowl['link_category_id']][] = $rowl;
}
}
if($mode)
{
$link_category_total = $link_total;
$link_table_start = $tp -> parseTemplate($LINK_TABLE_START, FALSE, $link_shortcodes);
$link_table_end = $tp -> parseTemplate($LINK_TABLE_END, FALSE, $link_shortcodes);
$text = $link_table_start.$link_table_string.$link_table_end;
$caption = LAN_LINKS_32." ".$cat_name." ".($cat_desc ? " <i>[".$cat_desc."]</i>" : "");
//number of links
$caption .= " (<b title='".(ADMIN ? LAN_LINKS_2 : LAN_LINKS_1)."' >".$link_total."</b>".(ADMIN ? "/<b title='".(ADMIN ? LAN_LINKS_1 : "" )."' >".$link_total."</b>" : "").") ";
$ns->tablerender($caption, $text);
if(is_numeric($mode))
{
$lc->ShowNextPrev($from, $number, $link_total);
}
}
else
{
$text = '';
foreach($arr as $key => $value)
{
$link_table_string = "";
$linkbutton_count = 0;
$i=0;
for($i=0;$i<count($value);$i++)
{
$rowl = $value[$i];
$linkbutton_count = ($rowl['link_button']) ? $linkbutton_count + 1 : $linkbutton_count;
$cat_name = $rowl['link_category_name'];
$cat_desc = $rowl['link_category_description'];
$LINK_APPEND = $lc -> parse_link_append($rowl);
$link_table_string .= $tp -> parseTemplate($LINK_TABLE, FALSE, $link_shortcodes);
}
$link_category_total = count($value);
$link_table_caption = $tp -> parseTemplate($LINK_TABLE_CAPTION, FALSE, $link_shortcodes);
$link_table_start = $tp -> parseTemplate($LINK_TABLE_START, FALSE, $link_shortcodes);
$link_table_end = $tp -> parseTemplate($LINK_TABLE_END, FALSE, $link_shortcodes);
$text .= $link_table_start.$link_table_string.$link_table_end;
}
// $nav = $tp->parseTemplate("{NAVIGATOR}", FALSE, $link_shortcodes); Navigator now positioned in template
// $ns->tablerender($link_table_caption, $nav.$text);
$ns->tablerender($link_table_caption, $text);
}
}
return;
}
require_once(FOOTERF);
?>

View File

@@ -1,51 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/links_page_sql.php,v $
* $Revision$
* $Date$
* $Author$
*/
header("location:../../index.php");
exit;
?>
# Table structure for table `links_page_cat`
#
CREATE TABLE links_page_cat (
link_category_id int(10) unsigned NOT NULL auto_increment,
link_category_name varchar(100) NOT NULL default '',
link_category_description varchar(250) NOT NULL default '',
link_category_icon varchar(100) NOT NULL default '',
link_category_order int(10) unsigned NOT NULL default '0',
link_category_class varchar(100) NOT NULL default '0',
link_category_datestamp int(10) unsigned NOT NULL default '0',
PRIMARY KEY (link_category_id)
) ENGINE=MyISAM;
# --------------------------------------------------------
# Table structure for table `links_page`
#
CREATE TABLE links_page (
link_id int(10) unsigned NOT NULL auto_increment,
link_name varchar(100) NOT NULL default '',
link_url varchar(200) NOT NULL default '',
link_description text NOT NULL,
link_button varchar(100) NOT NULL default '',
link_category tinyint(3) unsigned NOT NULL default '0',
link_order int(10) unsigned NOT NULL default '0',
link_refer int(10) unsigned NOT NULL default '0',
link_open tinyint(1) unsigned NOT NULL default '0',
link_class smallint(5) NOT NULL default '0',
link_datestamp int(10) unsigned NOT NULL default '0',
link_author varchar(255) NOT NULL default '',
PRIMARY KEY (link_id)
) ENGINE=MyISAM;
# --------------------------------------------------------

View File

@@ -1,270 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/links_template.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
global $sc_style, $link_shortcodes;
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:97%"); }
// ##### NEXT PREV --------------------------------------------------
if(!isset($LINK_NP_TABLE)){
$LINK_NP_TABLE = "<div class='nextprev'>{LINK_NEXTPREV}</div>";
}
// ##### ----------------------------------------------------------------------
//general : backlink to link frontpage
$sc_style['LINK_NAVIGATOR']['pre'] = "<td style='text-align:right;'>";
$sc_style['LINK_NAVIGATOR']['post'] = "</td>";
//general : order menu
$sc_style['LINK_SORTORDER']['pre'] = "<td style='text-align:left;'>";
$sc_style['LINK_SORTORDER']['post'] = "</td>";
$sc_style['LINK_CATMENU']['pre'] = "<td style='text-align:left;'>";
$sc_style['LINK_CATMENU']['post'] = "</td>";
$sc_style['LINK_NAVIGATOR_TABLE_PRE']['pre'] = "<table cellpadding='0' cellspacing='0' style='width:100%; margin-bottom:20px;'><tr>";
$sc_style['LINK_NAVIGATOR_TABLE_PRE']['post'] = "";
$sc_style['LINK_NAVIGATOR_TABLE_POST']['pre'] = "";
$sc_style['LINK_NAVIGATOR_TABLE_POST']['post'] = "</tr></table>";
$LINK_NAVIGATOR_TABLE = "{LINK_NAVIGATOR_TABLE_PRE}{LINK_SORTORDER}{LINK_NAVIGATOR}{LINK_NAVIGATOR_TABLE_POST}";
$sc_style['LINK_MANAGE_NEWLINK']['pre'] = "<div style='text-align:right;'>";
$sc_style['LINK_MANAGE_NEWLINK']['post'] = " >></div>";
$LINK_TABLE_MANAGE_START = "
<form method='post' action='".e_SELF."?".e_QUERY."' id='linkmanagerform' enctype='multipart/form-data'>
<table class='fborder' style='width:100%;' cellspacing='0' cellpadding='0'>
<tr>
<td style='width:15%' class='fcaption'>".LAN_LINKS_MANAGER_5."</td>
<td style='width:75%' class='fcaption'>".LAN_LINKS_MANAGER_1."</td>
<td style='width:10%' class='fcaption'>".LAN_LINKS_MANAGER_2."</td>
</tr>";
$LINK_TABLE_MANAGE = "
<tr>
<td style='width:15%; padding-bottom:5px;' class='forumheader3'>{LINK_MANAGE_CAT}</td>
<td style='width:75%; padding-bottom:5px;' class='forumheader3'>{LINK_MANAGE_ICON} {LINK_MANAGE_NAME}</td>
<td style='width:10%; padding-bottom:5px; text-align:center; vertical-align:top;' class='forumheader3'>{LINK_MANAGE_OPTIONS}</td>
</tr>";
$LINK_TABLE_MANAGE_END = "</table></form><br />{LINK_MANAGE_NEWLINK}";
// MAIN TABLE -------------------------------------------------------------------------------
$sc_style['LINK_MAIN_ICON']['pre'] = "<td rowspan='2' class='forumheader3' style='width:2%; text-align:left; padding-right:10px;'>";
$sc_style['LINK_MAIN_ICON']['post'] = "</td>";
$sc_style['LINK_MAIN_HEADING']['pre'] = "";
$sc_style['LINK_MAIN_HEADING']['post'] = "";
$sc_style['LINK_MAIN_DESC']['pre'] = "<tr><td class='forumheader3' colspan='3'>";
$sc_style['LINK_MAIN_DESC']['post'] = "</td></tr>";
$sc_style['LINK_MAIN_NUMBER']['pre'] = "<td class='forumheader' style='width:8%; white-space:nowrap;'>";
$sc_style['LINK_MAIN_NUMBER']['post'] = "</td>";
$sc_style['LINK_MAIN_TOTAL']['pre'] = "";
$sc_style['LINK_MAIN_TOTAL']['post'] = "<br />";
$LINK_MAIN_TABLE_START = "
<div style='text-align:center'>";
$LINK_MAIN_TABLE = "
<table class='fborder' style='width:100%; margin-bottom:20px;' cellspacing='0' cellpadding='0'>
<tr>
{LINK_MAIN_ICON}
<td class='fcaption'>{LINK_MAIN_HEADING}</td>
{LINK_MAIN_NUMBER}
</tr>
{LINK_MAIN_DESC}
</table>";
$LINK_MAIN_TABLE_END = "
<div style='text-align:right;'>
{LINK_MAIN_TOTAL}
</div>
</div>";
$LINK_MAIN_TABLE_START_ALL = "
<div style='text-align:center'>";
$LINK_MAIN_TABLE_END_ALL = "
</div>";
// LINKS ITEM ----------------------------------------------------------------------------
$sc_style['LINK_BUTTON']['pre'] = "<td class='forumheader3' style='width:5%; text-align:center'>";
$sc_style['LINK_BUTTON']['post'] = "</td>";
$sc_style['LINK_COMMENT']['pre'] = "<td class='forumheader3' style='width:5%; text-align:center'>";
$sc_style['LINK_COMMENT']['post'] = "</td>";
$sc_style['LINK_RATING']['pre'] = "<td class='forumheader3' style='width:5%; text-align:center'>";
$sc_style['LINK_RATING']['post'] = "</td>";
$sc_style['LINK_REFER']['pre'] = "<td class='forumheader3' style='width:5%; text-align:center'>";
$sc_style['LINK_REFER']['post'] = "</td>";
$sc_style['LINK_URL']['pre'] = "<span class='smalltext'>";
$sc_style['LINK_URL']['post'] = "</span>";
$sc_style['LINK_DESC']['pre'] = "<span class='smalltext'>";
$sc_style['LINK_DESC']['post'] = "</span>";
$sc_style['LINK_REFER_LAN']['pre'] = "<td class='fcaption' style='text-align:center;width:5%'>";
$sc_style['LINK_REFER_LAN']['post'] = "</td>";
$sc_style['LINK_COMMENT_LAN']['pre'] = "<td class='fcaption' style='width:5%'>";
$sc_style['LINK_COMMENT_LAN']['post'] = "</td>";
$sc_style['LINK_RATING_LAN']['pre'] = "<td class='fcaption' style='width:5%'>";
$sc_style['LINK_RATING_LAN']['post'] = "</td>";
$sc_style['LINK_BUTTON_LAN']['pre'] = "<td class='fcaption' style='width:5%'>";
$sc_style['LINK_BUTTON_LAN']['post'] = "</td>";
$sc_style['LINK_CAT_DESC']['pre'] = "<br /><span class='smalltext'><i>";
$sc_style['LINK_CAT_DESC']['post'] = "</i></span>";
//$LINK_TABLE_CAPTION = LCLAN_ITEM_24."{NAVIGATOR}" ;
$LINK_TABLE_CAPTION = LCLAN_ITEM_24;
$LINK_TABLE_START = "{NAVIGATOR}
<div style='text-align:center'>
<table class='fborder' style='".USER_WIDTH.";margin-bottom:20px;'>
<tr>
<td colspan='{BUTTON_COLUMN}' class='fcaption'>".LAN_LINKS_32." {LINK_CAT_NAME} {LINK_CAT_TOTAL} {LINK_CAT_DESC} </td>
{LINK_RATING_LAN}
{LINK_COMMENT_LAN}
{LINK_REFER_LAN}
</tr>";
$LINK_TABLE = "
<tr>
{LINK_BUTTON}
<td class='forumheader3' style='width:60%'>
{LINK_NEW} {LINK_APPEND} {LINK_NAME} </a><br />
{LINK_URL=link}
{LINK_DESC}
</td>
{LINK_RATING}
{LINK_COMMENT}
{LINK_REFER}
</tr>
";
$LINK_TABLE_END = "
</table></div>";
// RATED -----------------------------------------------------------------------------------
$sc_style['LINK_RATED_BUTTON']['pre'] = "<td rowspan='5' class='forumheader3' style='width:10%; text-align:center; padding-right:5px;'>";
$sc_style['LINK_RATED_BUTTON']['post'] = "</td>";
$sc_style['LINK_RATED_NAME']['pre'] = "";
$sc_style['LINK_RATED_NAME']['post'] = "";
$sc_style['LINK_RATED_URL']['pre'] = "<tr><td colspan='2' class='forumheader2' style='line-height:130%;'><i>";
$sc_style['LINK_RATED_URL']['post'] = "</i></td></tr>";
$sc_style['LINK_RATED_REFER']['pre'] = "<td class='forumheader' style='white-space:nowrap;'>";
$sc_style['LINK_RATED_REFER']['post'] = "</td>";
$sc_style['LINK_RATED_DESC']['pre'] = "<tr><td colspan='2' class='forumheader3' style='line-height:130%;'>";
$sc_style['LINK_RATED_DESC']['post'] = "</td></tr>";
$sc_style['LINK_RATED_RATING']['pre'] = "<td colspan='2' class='forumheader' style='line-height:130%; width:25%; white-space:nowrap; text-align:right;'>";
$sc_style['LINK_RATED_RATING']['post'] = "</td>";
$sc_style['LINK_RATED_CATEGORY']['pre'] = "<tr><td colspan='2' class='forumheader2' style='line-height:130%;'><i>";
$sc_style['LINK_RATED_CATEGORY']['post'] = "</i></td></tr>";
$LINK_RATED_TABLE_START = "
<div style='text-align:center'>
";
$LINK_RATED_TABLE = "
<table class='fborder' style='width:100%; margin-bottom:20px;' cellspacing='0' cellpadding='0'>
<tr>
{LINK_RATED_BUTTON}
<td class='fcaption' style='width:75%;'>
{LINK_RATED_APPEND} {LINK_RATED_NAME} </a>
</td>
{LINK_RATED_RATING}
</tr>
{LINK_RATED_URL}
{LINK_RATED_CATEGORY}
{LINK_RATED_DESC}
</table>";
$LINK_RATED_TABLE_END = "
</div>";
$sc_style['LINK_SUBMIT_PRETEXT']['pre'] = "<tr><td colspan='2' style='text-align:center' class='forumheader2'>";
$sc_style['LINK_SUBMIT_PRETEXT']['post'] = "</td></tr>";
// SUBMIT -----------------------------------------------------------------------------------
$LINK_SUBMIT_TABLE = "
<div style='text-align:center'>
<form method='post' action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."'>
<table class='fborder' style='width:100%' cellspacing='0' cellpadding='0'>
{LINK_SUBMIT_PRETEXT}
<tr>
<td class='forumheader3' style='width:30%'>".LCLAN_SL_10."</td>
<td class='forumheader3' style='width:70%'>{LINK_SUBMIT_CAT}</td>
</tr>
<tr>
<td class='forumheader3' style='width:30%'><u>".LCLAN_SL_11."</u></td>
<td class='forumheader3' style='width:30%'><input class='tbox' type='text' name='link_name' size='60' value='' maxlength='100' /></td>
</tr>
<tr>
<td class='forumheader3' style='width:30%'><u>".LCLAN_SL_12."</u></td>
<td class='forumheader3' style='width:30%'><input class='tbox' type='text' name='link_url' size='60' value='' maxlength='200' /></td>
</tr>
<tr>
<td class='forumheader3' style='width:30%'><u>".LCLAN_SL_13."</u></td>
<td class='forumheader3' style='width:30%'><textarea class='tbox' name='link_description' cols='59' rows='3'></textarea></td>
</tr>
<tr>
<td class='forumheader3' style='width:30%'>".LCLAN_SL_14."</td>
<td class='forumheader3' style='width:30%'><input class='tbox' type='text' name='link_but' size='60' value='' maxlength='200' /></td>
</tr>
<tr>
<td colspan='2' style='text-align:center' class='forumheader3'><span class='smalltext'>".LCLAN_SL_15."</span></td>
</tr>
<tr>
<td colspan='2' style='text-align:center' class='forumheader'><input class='button' type='submit' name='add_link' value='".LCLAN_SL_16."' /></td>
</tr>
</table>
</form>
</div>
";
?>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: plugin.xml,v 1.9 2009-10-22 04:14:45 e107coders Exp $ -->
<e107Plugin name="Links Page" lan="LAN_PLUGIN_LINKSPAGE_NAME" version="1.12" date="2012-08-01" compatibility="2.0" installRequired="true">
<author name="e107 Inc." url="http://e107.org" />
<description lan="LAN_PLUGIN_LINKSPAGE_DESCRIPTION">Links Page for displaying external web links.</description>
<category>content</category>
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
<adminLinks>
<link url='admin_linkspage_config.php' description='Configure Links Page' icon='images/linkspage_32.png' iconSmall='images/linkspage_16.png' primary='true' >Configure Links Page</link>
</adminLinks>
<siteLinks>
<link url="{e_PLUGIN}links_page/links.php">Links</link>
</siteLinks>
<pluginPrefs>
</pluginPrefs>
</e107Plugin>

View File

@@ -1,38 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/search/search_advanced.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
$advanced['cat']['type'] = 'dropdown';
$advanced['cat']['text'] = LAN_SEARCH_63.':';
$advanced['cat']['list'][] = array('id' => 'all', 'title' => LAN_SEARCH_51);
$advanced_caption['id'] = 'cat';
$advanced_caption['title']['all'] = LNK_SCH_LAN_2;
if ($sql -> db_Select("links_page_cat", "link_category_id, link_category_name")) {
while ($row = $sql -> db_Fetch()) {
$advanced['cat']['list'][] = array('id' => $row['link_category_id'], 'title' => $row['link_category_name']);
$advanced_caption['title'][$row['link_category_id']] = LNK_SCH_LAN_1.' -> '.$row['link_category_name'];
}
}
$advanced['match']['type'] = 'dropdown';
$advanced['match']['text'] = LAN_SEARCH_52.':';
$advanced['match']['list'][] = array('id' => 0, 'title' => LNK_SCH_LAN_3);
$advanced['match']['list'][] = array('id' => 1, 'title' => LAN_SEARCH_54);
?>

View File

@@ -1,21 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
$comments_title = 'Links';
$comments_type_id = 'links_page';
$comments_return['links_page'] = "l.link_id, l.link_name";
$comments_table['links_page'] = "LEFT JOIN #links_page AS l ON c.comment_type='links_page' AND l.link_id = c.comment_item_id";
function com_search_links_page($row) {
global $con;
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
$res['link'] = e_PLUGIN."links_page/links.php?comment.".$row['link_id'];
$res['pre_title'] = LAN_LINKS_SCH_1.': ';
$res['title'] = $row['link_name'];
$res['summary'] = $row['comment_comment'];
preg_match("/([0-9]+)\.(.*)/", $row['comment_author'], $user);
$res['detail'] = LAN_SEARCH_7."<a href='user.php?id.".$user[1]."'>".$user[2]."</a>".LAN_SEARCH_8.$datestamp;
return $res;
}
?>

View File

@@ -1,52 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.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/links_page/search/search_parser.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
// advanced
$advanced_where = "";
if (isset($_GET['cat']) && is_numeric($_GET['cat'])) {
$advanced_where .= " l.link_category='".$_GET['cat']."' AND";
}
if (isset($_GET['match']) && $_GET['match']) {
$search_fields = array('l.link_name');
} else {
$search_fields = array('l.link_name', 'l.link_description');
}
// basic
$return_fields = 'l.link_id, l.link_name, l.link_description, l.link_url, l.link_category, l.link_class, c.link_category_name';
$weights = array('1.2', '0.6');
$no_results = LAN_198;
$where = "l.link_class IN (".USERCLASS_LIST.") AND".$advanced_where;
$order = "";
$table = "links_page AS l LEFT JOIN #links_page_cat AS c ON l.link_category = c.link_category_id";
$ps = $sch -> parsesearch($table, $return_fields, $search_fields, $weights, 'search_links', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_links($row) {
$res['link'] = e_PLUGIN."links_page/links.php?".$row['link_id'];
$res['pre_title'] = $row['link_category_name']." | ";
$res['title'] = $row['link_name'];
$res['summary'] = $row['link_description'];
$res['detail'] = "<a href='".e_PLUGIN."links_page/links.php?".$row['link_id']."'>".$row['link_url']."</a>";
return $res;
}
?>