1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

TagWords Plugin + e_tagwords files for news, download, cpage, links_page, calendar_menu

This commit is contained in:
lisa
2008-12-29 20:51:24 +00:00
parent e571deeb0d
commit 8009699297
26 changed files with 2252 additions and 33 deletions

View File

@@ -9,9 +9,9 @@
* Custom Menus/Pages Administration
*
* $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $
* $Revision: 1.10 $
* $Date: 2008-12-29 15:23:06 $
* $Author: secretr $
* $Revision: 1.11 $
* $Date: 2008-12-29 20:50:41 $
* $Author: lisa_ $
*
*/
@@ -185,7 +185,7 @@ class page
{
/* mode: FALSE == page, mode: TRUE == menu */
global $sql, $tp, $e107, $sub_action, $id, $frm, $e_userclass;
global $sql, $tp, $e107, $sub_action, $id, $frm, $e_userclass, $e_event;
$edit = ($sub_action == 'edit');
$caption =(!$mode ? ($edit ? CUSLAN_23 : CUSLAN_24) : ($edit ? CUSLAN_25 : CUSLAN_26));
@@ -319,6 +319,37 @@ class page
</td>
</tr>
";
//triggerHook
$data = array('method'=>'form', 'table'=>'page', 'id'=>$id, 'plugin'=>'page', 'function'=>'createPage');
$hooks = $e_event->triggerHook($data);
if(!empty($hooks))
{
$text .= "
</tbody>
</table>
</fieldset>
<fieldset id='core-cpage-create-hooks'>
<legend>".LAN_HOOKS."</legend>
<table cellpadding='0' cellspacing='0' class='adminedit options'>
<colgroup span='2'>
<col class='col-label' />
<col class='col-control' />
</colgroup>
<tbody>";
foreach($hooks as $hook)
{
if(!empty($hook))
{
$text .= "
<tr>
<td class='label'>".$hook['caption']."</td>
<td class='control'>".$hook['text']."</td>
</tr>";
}
}
}
}
$text .= "
@@ -345,7 +376,7 @@ class page
// $type = FALSE for page, TRUE for menu
function submitPage($mode = FALSE, $type=FALSE)
{
global $sql, $tp, $e107cache, $admin_log;
global $sql, $tp, $e107cache, $admin_log, $e_event;
$page_title = $tp->toDB($_POST['page_title']);
$page_text = $tp->toDB($_POST['data']);
@@ -359,6 +390,9 @@ class page
$e107cache->clear("page_{$mode}");
$e107cache->clear("page-t_{$mode}");
$data = array('method'=>'update', 'table'=>'page', 'id'=>$mode, 'plugin'=>'page', 'function'=>'submitPage');
$this->message = $e_event->triggerHook($data);
if($type)
{
$menu_name = $tp->toDB($_POST['menu_name']); // not to be confused with menu-caption.
@@ -395,11 +429,12 @@ class page
$menuname = ($type ? $tp->toDB($_POST['menu_name']) : "");
admin_update($sql->db_Insert("page", "0, '{$page_title}', '{$page_text}', '{$pauthor}', '".time()."', '".intval($_POST['page_rating_flag'])."', '".intval($_POST['page_comment_flag'])."', '".$_POST['page_password']."', '".$_POST['page_class']."', '', '".$menuname."'"), 'insert', CUSLAN_27, LAN_CREATED_FAILED, false);
$pid = mysql_insert_id();
$admin_log->log_event('CPAGE_01',$menuname.'[!br!]'.$page_title.'[!br!]'.$pauthor,E_LOG_INFORMATIVE,'');
if($type)
{
$sql->db_Insert("menus", "0, '$menuname', '0', '0', '0', '', '".mysql_insert_id()."' ");
$sql->db_Insert("menus", "0, '$menuname', '0', '0', '0', '', '".$pid."' ");
}
if($_POST['page_link'])
@@ -412,12 +447,15 @@ class page
$e107cache->clear("sitelinks");
}
}
$data = array('method'=>'create', 'table'=>'page', 'id'=>$pid, 'plugin'=>'page', 'function'=>'submitPage');
$this->message = $e_event->triggerHook($data);
}
}
function delete_page($del_id)
{
global $sql, $e107cache, $admin_log;
global $sql, $e107cache, $admin_log, $e_event;
admin_update($sql->db_Delete("page", "page_id='{$del_id}' "), 'delete', CUSLAN_28, false, false);
$sql->db_Delete("menus", "menu_path='$del_id' ");
$admin_log->log_event('CPAGE_03','ID: '.$del_id,E_LOG_INFORMATIVE,'');
@@ -426,6 +464,9 @@ class page
$sql->db_Delete("links", "link_url='page.php?".$del_id."'");
$e107cache->clear("sitelinks");
}
$data = array('method'=>'delete', 'table'=>'page', 'id'=>$del_id, 'plugin'=>'page', 'function'=>'delete_page');
$this->message = $e_event->triggerHook($data);
}
function optionsPage()

View File

@@ -9,9 +9,9 @@
* News Administration
*
* $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $
* $Revision: 1.18 $
* $Date: 2008-12-07 13:08:41 $
* $Author: e107steved $
* $Revision: 1.19 $
* $Date: 2008-12-29 20:50:41 $
* $Author: lisa_ $
*/
require_once("../class2.php");
@@ -105,6 +105,9 @@ if ($delete == "main" && $del_id)
$e107cache->clear("othernews");
$e107cache->clear("othernews2");
$data = array('method'=>'delete', 'table'=>'news', 'id'=>$del_id, 'plugin'=>'news', 'function'=>'delete');
$message = $e_event->triggerHook($data);
admin_purge_related("news", $del_id);
}
}
@@ -456,7 +459,7 @@ class newspost
{
global $cal;
// ##### Display creation form
global $sql, $rs, $ns, $pref, $tp, $pst, $e107;
global $sql, $rs, $ns, $pref, $tp, $pst, $e107, $e_event;
if ($sub_action == "sn" && !$_POST['preview'])
{
@@ -839,6 +842,24 @@ class newspost
</tr>\n";
}
//triggerHook
$data = array('method'=>'form', 'table'=>'news', 'id'=>$id, 'plugin'=>'news', 'function'=>'create_item');
$hooks = $e_event->triggerHook($data);
if(!empty($hooks))
{
$text .= "<tr><td class='forumheader3' colspan='2' >".LAN_HOOKS." </td></tr>";
foreach($hooks as $hook)
{
if(!empty($hook))
{
$text .= "
<tr>
<td class='forumheader3'>".$hook['caption']."</td>
<td class='forumheader3'>".$hook['text']."</td>
</tr>";
}
}
}
$text .= "<tr style='vertical-align: top;'>
<td colspan='2' style='text-align:center' class='forumheader'>".

View File

@@ -9,9 +9,9 @@
* News handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/news_class.php,v $
* $Revision: 1.7 $
* $Date: 2008-12-07 13:08:41 $
* $Author: e107steved $
* $Revision: 1.8 $
* $Date: 2008-12-29 20:50:41 $
* $Author: lisa_ $
*/
if (!defined('e107_INIT')) { exit; }
@@ -47,6 +47,8 @@ class news {
{
$message = "<strong>".(!mysql_errno() ? LAN_NEWS_46 : LAN_NEWS_5)."</strong>";
}
$data = array('method'=>'update', 'table'=>'news', 'id'=>$news['news_id'], 'plugin'=>'news', 'function'=>'submit_item');
$message .= $e_event->triggerHook($data);
}
else
{ // Adding item
@@ -56,6 +58,9 @@ class news {
$e_event -> trigger('newspost', $news);
$message = LAN_NEWS_6;
$e107cache -> clear('news.php');
$id = mysql_insert_id();
$data = array('method'=>'create', 'table'=>'news', 'id'=>$id, 'plugin'=>'news', 'function'=>'submit_item');
$message .= $e_event->triggerHook($data);
}
else
{

View File

@@ -4,9 +4,9 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/English.php,v $
| $Revision: 1.9 $
| $Date: 2008-12-28 22:37:43 $
| $Author: e107steved $
| $Revision: 1.10 $
| $Date: 2008-12-29 20:50:52 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
setlocale(LC_ALL, 'en');
@@ -53,5 +53,6 @@ define('LAN_NO', 'No');
define('LAN_OK', 'OK');
define('LAN_CONTINUE', 'Continue');
define('LAN_ENTER', 'Enter');
define('LAN_HOOKS', 'Hooks');
?>

View File

@@ -0,0 +1,44 @@
<?php
if (!defined('e107_INIT')) { exit; }
class e_tagwords_calendar_menu
{
function e_tagwords_calendar_menu()
{
$this->settings = array();
$this->settings['plugin'] = "calendar_menu";
$this->settings['table'] = "event";
$this->settings['db_id'] = "event_id";
$this->settings['caption'] = "calendar";
}
function getLink($id)
{
global $tp;
if($this->row=='')
{
$this->row = $this->getRecord($id);
}
$url = e_PLUGIN."calendar_menu/event.php?{$this->row['event_start']}.event.{$this->row['event_id']}";
return "<a href='".$url."'>".$tp->toHTML($this->row['event_title'], TRUE, '')."</a>";
}
function getRecord($id)
{
global $sql;
$this->row = '';
$qry = "SELECT * FROM #event as e WHERE e.event_id='{$id}'";
if($sql->db_Select_gen($qry))
{
$this->row=$sql->db_Fetch();
}
return $this->row;
}
}
?>

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/event.php,v $
| $Revision: 1.6 $
| $Date: 2008-03-20 20:49:02 $
| $Author: e107steved $
| $Revision: 1.7 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
|
+----------------------------------------------------------------------------+
*/
@@ -128,6 +128,11 @@ if ((isset($_POST['ne_insert']) || isset($_POST['ne_update'])) && ($cal_super |
{
$qry = " 0, '".intval($ev_start)."', '".intval($ev_end)."', '".$ev_allday."', '".$recurring."', '".time()."', '$ev_title', '$ev_location', '$ev_event', '".USERID.".".USERNAME."', '".$ev_email."', '".$ev_category."', '".$ev_thread."', '".intval($rec_m)."', '".intval($rec_y)."' ";
$sql->db_Insert("event", $qry);
$id = mysql_insert_id();
$data = array('method'=>'create', 'table'=>'event', 'id'=>$id, 'plugin'=>'calendar_menu', 'function'=>'dbCalendarCreate');
$e_event->triggerHook($data);
$ecal_class->cal_log(1,'db_Insert',$qry, $ev_start);
$report_msg = '.m4';
}
@@ -137,6 +142,10 @@ if ((isset($_POST['ne_insert']) || isset($_POST['ne_update'])) && ($cal_super |
{ // Bits specific to updating an existing event
$qry = "event_start='".intval($ev_start)."', event_end='".intval($ev_end)."', event_allday='".$ev_allday."', event_recurring='".$recurring."', event_datestamp= '".time()."', event_title= '$ev_title', event_location='$ev_location', event_details='$ev_event', event_contact='".$ev_email."', event_category='".$ev_category."', event_thread='".$ev_thread."', event_rec_m='".intval($rec_m)."', event_rec_y='".intval($rec_y)."' WHERE event_id='".intval($_POST['id'])."' ";
$sql->db_Update("event", $qry);
$data = array('method'=>'update', 'table'=>'event', 'id'=>intval($_POST['id']), 'plugin'=>'calendar_menu', 'function'=>'dbCalendarUpdate');
$e_event->triggerHook($data);
$ecal_class->cal_log(2,'db_Update',$qry, $ev_start);
$qs = preg_replace("/ed./i", "", $_POST['qs']);
$report_msg = '.m5';
@@ -278,6 +287,10 @@ if ($cal_super || check_class($pref['eventpost_admin']))
if ($sql->db_Delete("event", $qry))
{
$message = EC_LAN_51; //Event Deleted
$data = array('method'=>'delete', 'table'=>'event', 'id'=>$_POST['existing'], 'plugin'=>'calendar_menu', 'function'=>'dbEventDelete');
$message .= $e_event->triggerHook($data);
$ecal_class->cal_log(3,'db_Delete',$qry,$ev_start);
}
else
@@ -648,7 +661,29 @@ if ($action == "ne" || $action == "ed")
$text .= "
<tr><td class='forumheader3'>".EC_LAN_59." </td><td class='forumheader3'>
<input class='tbox' type='text' name='ne_email' size='60' value='$ne_email' maxlength='150' style='width:95%' />
</td></tr>
</td></tr>";
//triggerHook
$hid = ($action=='ed' ? intval($qs[1]) : '');
$data = array('method'=>'form', 'table'=>'event', 'id'=>$hid, 'plugin'=>'calendar_menu', 'function'=>'CalendarCreate');
$hooks = $e_event->triggerHook($data);
if(!empty($hooks))
{
$text .= "<tr><td class='forumheader3' colspan='2' >".LAN_HOOKS." </td></tr>";
foreach($hooks as $hook)
{
if(!empty($hook))
{
$text .= "
<tr>
<td class='forumheader3'>".$hook['caption']."</td>
<td class='forumheader3'>".$hook['text']."</td>
</tr>";
}
}
}
$text .= "
<tr>
<td class='forumheader3' colspan='2' >".EC_LAN_105." </td>
</tr>

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/admin_linkspage_config.php,v $
| $Revision: 1.2 $
| $Date: 2008-12-13 16:06:11 $
| $Author: e107steved $
| $Revision: 1.3 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
@@ -131,8 +131,11 @@ if (isset($delete) && ($delete == 'main') && $del_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(LCLAN_ADMIN_10." #".$del_id." ".LCLAN_ADMIN_11);
$lc->show_message($msg);
}
}

View File

@@ -0,0 +1,46 @@
<?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

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/link_class.php,v $
| $Revision: 1.10 $
| $Date: 2008-12-13 16:06:11 $
| $Author: e107steved $
| $Revision: 1.11 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
@@ -606,9 +606,12 @@ class linkclass
$edata_ls['link_datestamp'] = $time;
$sql->db_UpdateArray("links_page", $edata_ls, " WHERE link_id='".intval($qs[2])."'");
$admin_log->logArrayAll('LINKS_14',$edata_ls);
$msg = LCLAN_ADMIN_3;
$data = array('method'=>'update', 'table'=>'links_page', 'id'=>$qs[2], 'plugin'=>'links_page', 'function'=>'dbLinkCreate');
$msg .= $e_event->triggerHook($data);
$admin_log->logArrayAll('LINKS_14',$edata_ls);
$e107cache->clear("sitelinks");
$this->show_message(LCLAN_ADMIN_3);
$this->show_message($msg);
//create link
}
else
@@ -616,9 +619,13 @@ class linkclass
$edata_ls['link_datestamp'] = time();
$edata_ls['link_order'] = $link_t+1;
$sql->db_Insert("links_page", $edata_ls);
$msg = LCLAN_ADMIN_2;
$id = mysql_insert_id();
$data = array('method'=>'create', 'table'=>'links_page', 'id'=>$id, 'plugin'=>'links_page', 'function'=>'dbLinkCreate');
$msg .= $e_event->triggerHook($data);
$admin_log->logArrayAll('LINKS_13',$edata_ls);
$e107cache->clear("sitelinks");
$this->show_message(LCLAN_ADMIN_2);
$this->show_message($msg);
}
//delete from tmp table after approval
if (is_numeric($qs[2]) && $qs[1] == "sn")
@@ -630,7 +637,7 @@ class linkclass
function show_link_create()
{
global $sql, $rs, $qs, $ns, $fl, $linkspage_pref;
global $sql, $rs, $qs, $ns, $fl, $linkspage_pref, $e_event;
$row['link_category'] = "";
$row['link_name'] = "";
@@ -780,7 +787,28 @@ class linkclass
<td style='width:70%' class='forumheader3'>
".r_userclass("link_class", $row['link_class'], "off", "public,guest,nobody,member,admin,classes")."
</td>
</tr>
</tr>";
//triggerHook
$data = array('method'=>'form', 'table'=>'links_page', 'id'=>$row['link_id'], 'plugin'=>'links_page', 'function'=>'show_link_create');
$hooks = $e_event->triggerHook($data);
if(!empty($hooks))
{
$text .= "<tr><td class='fcaption' colspan='2' >".LAN_HOOKS." </td></tr>";
foreach($hooks as $hook)
{
if(!empty($hook))
{
$text .= "
<tr>
<td style='width:30%; vertical-align:top;' class='forumheader3'>".$hook['caption']."</td>
<td style='width:70%' class='forumheader3'>".$hook['text']."</td>
</tr>";
}
}
}
$text .= "
<tr style='vertical-align:top'>
<td colspan='2' style='text-align:center' class='forumheader'>";
if (isset($qs[2]) && $qs[2] && $qs[1] == "edit") {

View File

@@ -0,0 +1,50 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/admin_tagwords_config.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
if (!getperms("P"))
{
header("location:".e_BASE."index.php");
exit ;
}
require_once(e_ADMIN."auth.php");
require_once(e_HANDLER."userclass_class.php");
e107_require_once(e_HANDLER.'arraystorage_class.php');
$eArrayStorage = new ArrayData();
require_once(e_PLUGIN."tagwords/tagwords_class.php");
$tag = new tagwords();
//update preferences
if(isset($_POST['updatesettings']))
{
$tag->update_prefs();
$message = LAN_TAG_ADMIN_1;
}
if(isset($message))
{
$tag->show_message($message, $caption='', $type='ns');
}
$tag->tagwords_options();
require_once(e_ADMIN."footer.php");
?>

View File

@@ -0,0 +1,92 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/e_event.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
if(!defined("TAG_TEXTAREA_COLS")){ define("TAG_TEXTAREA_COLS", "70"); }
if(!defined("TAG_TEXTAREA_ROWS")){ define("TAG_TEXTAREA_ROWS", "4"); }
class e_event_tagwords
{
/*
* all event methods have a single parameter
* @param array $data array containing
* @param string $method form,insert,update,delete
* @param string $table the table name of the calling plugin
* @param int $id item id of the record
* @param string $plugin identifier for the calling plugin
* @param string $function identifier for the calling function
*/
/*
* constructor
*/
function e_event_tagwords()
{
global $tag;
require_once(e_PLUGIN."tagwords/tagwords_class.php");
$this->tag = new tagwords();
$tag = $this->tag;
}
/*
* add form field
* @param array $data
*/
function event_form($data)
{
return $this->tag->tagwords_form($data['table'], intval($data['id']));
}
/*
* handle db create
* @param array $data
*/
function event_create($data)
{
if(isset($_POST['tagwords']) && trim($_POST['tagwords'])!='')
{
return $this->tag->dbTagWords($data['table'], intval($data['id']), $_POST['tagwords']);
}
}
/*
* handle db update
* @param array $data
*/
function event_update($data)
{
if(isset($_POST['tagwords']) && trim($_POST['tagwords'])!='')
{
return $this->tag->dbTagWords($data['table'], intval($data['id']), $_POST['tagwords']);
}
}
/*
* handle db delete
* @param array $data
*/
function event_delete($data)
{
return $this->tag->dbDelete($data['table'], intval($data['id']));
}
} //end class
?>

View File

@@ -0,0 +1,29 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/e_meta.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
if (is_readable(THEME."tagwords_css.php"))
{
$src = THEME."tagwords_css.php";
} else {
$src = e_PLUGIN."tagwords/tagwords_css.php";
}
echo "<link rel='stylesheet' href='".$src."' type='text/css' />\n";
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,66 @@
<?php
define("LAN_TAG_INS_1", "Tagwords");
define("LAN_TAG_INS_2", "A fully featured Tagword system");
define("LAN_TAG_INS_3", "Configure TagWords");
define("LAN_TAG_INS_4", "Tagwords is installed<br />To configure please click on the link in the plugins section of the admin front page");
define("LAN_TAG_SEARCH_1", "Search For:");
define("LAN_TAG_SEARCH_2", "Search");
define("LAN_TAG_SEARCH_3", "View");
define("LAN_TAG_1", "TagWords");
define("LAN_TAG_2", "Tag");
define("LAN_TAG_3", "TagWords updated");
define("LAN_TAG_4", "sort ");
define("LAN_TAG_5", "display ");
define("LAN_TAG_6", "");
define("LAN_TAG_7", "< Back to Tagwords Frontpage");
define("LAN_TAG_8", "result found for");
define("LAN_TAG_9", "results found for");
define("LAN_TAG_10", "alphabetically");
define("LAN_TAG_11", "by size");
define("LAN_TAG_12", "taglist");
define("LAN_TAG_13", "tagcloud");
define("LAN_TAG_14", "selection : ");
define("LAN_TAG_15", "all areas");
define("LAN_TAG_16", "TagCloud");
define("LAN_TAG_17", "TagList");
define("LAN_TAG_18", "no tagwords found for this selection");
define("LAN_TAG_19", "choose sort");
define("LAN_TAG_20", "choose style");
define("LAN_TAG_21", "each tag on a seperate line");
define("LAN_TAG_ADMIN_1", "preferences updated");
define("LAN_TAG_OPT_1", "tagwords preferences");
define("LAN_TAG_OPT_2", "minimum word appearance needed for tagcloud/taglist");
define("LAN_TAG_OPT_3", "tagcloud/taglist only visible for");
define("LAN_TAG_OPT_4", "default tag sort");
define("LAN_TAG_OPT_5", "alphabetically");
define("LAN_TAG_OPT_6", "by size");
define("LAN_TAG_OPT_7", "default tag style");
define("LAN_TAG_OPT_8", "tagcloud");
define("LAN_TAG_OPT_9", "taglist");
define("LAN_TAG_OPT_10", "yes");
define("LAN_TAG_OPT_11", "no");
define("LAN_TAG_OPT_12", "options tag sort");
define("LAN_TAG_OPT_13", "options tag type");
define("LAN_TAG_OPT_14", "options tag area");
define("LAN_TAG_OPT_15", "maximum amount of words in menu");
define("LAN_TAG_OPT_16", "tagwords page");
define("LAN_TAG_OPT_17", "tagwords menu");
define("LAN_TAG_OPT_18", "menu caption");
define("LAN_TAG_OPT_19", "options tag search");
define("LAN_TAG_OPT_20", "frequence behind tagword");
define("LAN_TAG_OPT_21", "shortcode");
define("LAN_TAG_OPT_22", "word seperator");
define("LAN_TAG_OPT_23", "areas");
define("LAN_TAG_OPT_24", "check active areas");
define("LAN_TAG_OPT_25", "generic");
define("LAN_TAG_OPT_26", "display");
define("LAN_TAG_MENU_1", "view complete tagwords cloud");
define("LAN_TAG_MENU_2", "Tagwords");
?>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Id: plugin.xml,v 1.1 2008-12-29 20:51:07 lisa_ Exp $ -->
<e107Plugin name="Tagwords" version="1.0" compatibility="0.8" installRequired="true">
<author name="e107dev" url="http://e107.org/" />
<description>A fully featured Tagword system</description>
<folder>tagwords</folder>
<administration>
<configFile>admin_tagwords_config.php</configFile>
<icon>images/tagwords_32.png</icon>
<iconSmall>images/tagwords_16.png</iconSmall>
<caption>Configure Tagwords</caption>
<installDone>Tagwords is installed<br />To configure please click on the link in the plugins section of the admin front page</installDone>
</administration>
<menuLink name="Tagwords" url="tagwords/tagwords.php" perm="everyone"/>
</e107Plugin>

View File

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

View File

@@ -0,0 +1,48 @@
<?php
if (!defined('e107_INIT')) { exit; }
class e_tagwords_news
{
function e_tagwords_news()
{
$this->settings = array();
$this->settings['plugin'] = "";
$this->settings['table'] = "news";
$this->settings['db_id'] = "news_id";
$this->settings['caption'] = "news";
}
function getLink($id)
{
global $tp;
if(empty($this->row))
{
$this->row = $this->getRecord($id);
}
$url = e_BASE."news.php?item.".$this->row['news_id'];
return "<a href='".$url."'>".$tp->toHTML($this->row['news_title'], TRUE, '')."</a>";
}
function getRecord($id)
{
global $sql;
$this->row = '';
$qry = "SELECT n.*
FROM #news as n
WHERE n.news_id='{$id}'
AND n.news_start < ".time()."
AND (n.news_end=0 || n.news_end>".time().")
AND n.news_class REGEXP '".e_CLASS_REGEXP."' ";
if($sql->db_Select_gen($qry))
{
$this->row=$sql->db_Fetch();
}
return $this->row;
}
}
?>

View File

@@ -0,0 +1,46 @@
<?php
if (!defined('e107_INIT')) { exit; }
class e_tagwords_page
{
function e_tagwords_page()
{
$this->settings = array();
$this->settings['plugin'] = "";
$this->settings['table'] = "page";
$this->settings['db_id'] = "page_id";
$this->settings['caption'] = "page";
}
function getLink($id)
{
global $tp;
if($this->row=='')
{
$this->row = $this->getRecord($id);
}
$url = e_BASE."page.php?".$this->row['page_id'];
return "<a href='".$url."'>".$tp->toHTML($this->row['page_title'], TRUE, '')."</a>";
}
function getRecord($id)
{
global $sql;
$this->row = '';
$qry = "SELECT p.*, u.user_id, u.user_name FROM #page AS p
LEFT JOIN #user AS u ON p.page_author = u.user_id
WHERE p.page_id='{$id}' AND p.page_class IN (".USERCLASS_LIST.") ";
if($sql->db_Select_gen($qry))
{
$this->row=$sql->db_Fetch();
}
return $this->row;
}
}
?>

View File

@@ -0,0 +1,44 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/tagwords.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
require_once('../../class2.php');
if (!defined('e107_INIT')) { exit; }
require_once(HEADERF);
require_once(e_PLUGIN."tagwords/tagwords_class.php");
$tag = new tagwords();
if(varsettrue($tag->pref['tagwords_class']) && !check_class($tag->pref['tagwords_class']) )
{
header("location:".e_BASE); exit;
}
if(varsettrue($_GET['q']))
{
$tag->TagSearchResults();
}
else
{
$tag->TagRender();
}
require_once(FOOTERF);
?>

View File

@@ -0,0 +1,895 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/tagwords_class.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
if(!defined("TAG_TEXTAREA_COLS")){ define("TAG_TEXTAREA_COLS", "70"); }
if(!defined("TAG_TEXTAREA_ROWS")){ define("TAG_TEXTAREA_ROWS", "4"); }
//##### explanation of present $_GET's ----------------------------------------
// $_GET['type'] : the type of tag to show (cloud, list)
// $_GET['sort'] : the sort method for the cloud/list (alpha, freq)
// $_GET['area'] : the area to show cloud/list for (eg news, content)
// $_GET['q'] : the search query to show results for
class tagwords
{
var $tagwords = array();
var $mapper = array();
var $core = array('download', 'news', 'page');
var $table = 'tagwords';
var $pref;
var $template;
var $shortcodes;
/*
* constructor (include all e_tagwords.php files)
*/
function tagwords()
{
global $pref, $tp, $TEMPLATE_TAGWORDS, $tagwords_shortcodes;
$this->tp = $tp;
//language
include_lan(e_PLUGIN."tagwords/languages/".e_LANGUAGE.".php");
//shortcodes
require_once(e_PLUGIN.'tagwords/tagwords_shortcodes.php');
$this->shortcodes = $tagwords_shortcodes;
//template
if (is_readable(THEME."tagwords_template.php"))
{
require_once(THEME."tagwords_template.php");
}
else
{
require_once(e_PLUGIN."tagwords/tagwords_template.php");
}
$this->template = $TEMPLATE_TAGWORDS;
$this->pref = $this->get_prefs();
//load plugin and core tagword areas
$this->loadPlugin();
$this->loadCore();
//prepare and assign key'ed tagwords data
$this->mapper();
}
/*
* get all plugin classes
*/
function loadPlugin()
{
global $pref;
if(is_array($pref['e_tagwords_list']))
{
foreach($pref['e_tagwords_list'] as $e_tag)
{
if(is_readable(e_PLUGIN.$e_tag."/e_tagwords.php"))
{
require_once(e_PLUGIN.$e_tag."/e_tagwords.php");
$name = "e_tagwords_{$e_tag}";
if(class_exists($name))
{
if(!is_object($name))
{
$this->$name = new $name;
}
$this->tagwords[] = $e_tag;
}
}
}
}
}
/*
* get all core classes
*/
function loadCore()
{
foreach($this->core as $s)
{
require_once(e_PLUGIN."tagwords/section/e_tagwords_{$s}.php");
$name = "e_tagwords_{$s}";
if(class_exists($name))
{
if(!is_object($name))
{
$this->$name = new $name;
}
$this->tagwords[] = $s;
}
}
}
/*
* map plugin names to tables names
*/
function mapper()
{
$ret = array();
foreach($this->tagwords as $area)
{
$ins = "e_tagwords_{$area}";
$table = $this->$ins->settings['table'];
$ret[$table] = $area;
}
$this->mapper = $ret;
}
/*
* display the form element to provide tag words
* @param string $tag_type type
* @param string $tag_itemid itemid
* @return array $caption, $text form element
*/
function tagwords_form($tag_type='', $tag_itemid='')
{
$allowed = $this->getAllowedAreas();
if(count($allowed)==0)
{
return;
}
else
{
if(!in_array($tag_type, $allowed))
{
return;
}
}
$this->word = false;
if( $ret = $this->getRecords($tag_type, $tag_itemid) )
{
$this->word = $this->tp->toForm($ret);
}
$caption = $this->tp->parseTemplate($this->template['caption'], FALSE, $this->shortcodes);
$text = $this->tp->parseTemplate($this->template['form'], FALSE, $this->shortcodes);
return array('caption'=>$caption, 'text'=>$text);
}
/*
* retrieve all tag_words for the provided item (type+itemid)
* @param string $tag_type type
* @param string $tag_itemid itemid
* @param boolean $returnwordsonly return comma seperated list of tagwords
* @param boolean $link return hyperlink to taglist on words
* @return array $ret array of tagwords
*/
function getRecords($tag_type='', $tag_itemid='', $returnwordsonly=FALSE, $link=TRUE)
{
$sqlgr = new db;
$qry = "
SELECT tag_word FROM #".$this->table."
WHERE tag_type='".$this->tp->toDB($tag_type)."'
AND tag_itemid='".intval($tag_itemid)."'
ORDER BY tag_word ";
if($sqlgr->db_Select_gen($qry))
{
$ret=array();
while($row=$sqlgr->db_Fetch())
{
$ret[] = $row['tag_word'];
}
if($returnwordsonly)
{
$arr = array();
foreach($ret as $word)
{
$word = $this->tp->toHTML($word,TRUE,'no_hook, emotes_off');
$arr[] = ($link ? trim($this->createTagWordLink($word)) : $word);
}
return implode($this->pref['tagwords_word_seperator'], $arr);
}
//return a \n seperated list of tagwords for the specific item
return implode("\n", $ret);
}
return;
}
/*
* used on tagword search; get only those records that contain ALL tagwords that is searched on
* @param array $array the array containing all results for each word seperately
* @return array $combined array of combined tagwords
*/
function getUnique($array)
{
//combine all arrays
$combined = array();
foreach($array as $v)
{
foreach($v as $type=>$arr)
{
foreach($arr as $id)
{
if(!array_key_exists($type,$combined))
{
$combined[$type] = array();
}
if(!in_array($id, $combined[$type]))
{
$combined[$type][] = $id;
}
}
}
}
//$combined is combined array of ALL values
foreach($combined as $ntype=>$narr)
{
foreach($narr as $nid)
{
//$array is the array containing all results for each word seperately
foreach($array as $ov)
{
//if an id value is not present in the result $array, remove it from the combined array
if(!in_array($nid, $ov[$ntype]))
{
$key = array_search($nid, $combined[$ntype]);
unset($combined[$ntype][$key]);
}
}
}
}
//finally remove empty areas from the array
foreach($combined as $ntype=>$narr)
{
sort($combined[$ntype]);
if(empty($combined[$ntype]))
{
unset($combined[$ntype]);
}
}
return $combined;
}
/*
* create the tag word hyperlink
* @param string $word word
* @param string $class if present and int, adds the 'level' of the word to the css item
* @return string $text hyperlink to tagword
*/
function createTagWordLink($word, $class='')
{
$word = trim($word);
$qry = $this->tp->toDB($word);
$qry = str_replace(' ', '+', $qry);
$word = $this->tp->toHTML($word,TRUE,'no_hook, emotes_off');
$class = ($class ? "class='tag".intval($class)."'" : "");
return "<a href='".e_PLUGIN."tagwords/tagwords.php?q=".$qry."' ".$class." title=''>".$word."</a> ";
}
/*
* db entry tagwords
* @param string $tag_type type
* @param string $tag_itemid itemid
* @param string $tag_word word
* @return string $text message
*/
function dbTagWords($tag_type='', $tag_itemid='', $tag_word='')
{
global $sql;
//prepare data
$tag_type = $this->tp->toDB($tag_type);
$tag_itemid = intval($tag_itemid);
//get existing word records
$existing_array = $this->getRecords($tag_type, $tag_itemid, FALSE);
$existing = explode("\n", $existing_array);
//create array of new posted words
$new = explode("\n", $tag_word);
//delete the differences (delete what has been removed)
$delete_diff = array_diff($existing, $new);
foreach($delete_diff as $word)
{
$word = trim($word);
$word = $this->tp->toDB($word);
$sql->db_Delete($this->table, "tag_type='".$tag_type."' AND tag_itemid='".$tag_itemid."' AND tag_word='".$word."'");
}
//insert the differences (insert what has been added)
$insert_diff = array_diff($new, $existing);
foreach($insert_diff as $word)
{
$word = trim($word);
$word = $this->tp->toDB($word);
$sql->db_Insert($this->table, "'0', '".$tag_type."', '".$tag_itemid."', '".$word."' ");
}
return "<br />".LAN_TAG_3;
}
/*
* db delete entries
* @param string $tag_type type
* @param string $tag_itemid itemid
*/
function dbDelete($tag_type='', $tag_itemid='')
{
global $sql;
$sql->db_Delete($this->table, "tag_type='".$tag_type."' AND tag_itemid='".$tag_itemid."' ");
}
/*
* retrieve all tag words (if $_GET['area'], only retrieve tagwords from that area (news, content, ...) )
* @param string $tagarea tagarea
* @return array $ret array of word=>number
*/
function getAllTagWords($tagarea='')
{
global $sql;
$tag_type='';
$allowed = $this->getAllowedAreas();
if(count($allowed)>0)
{
$typeqry = " AND tag_type IN ('".implode("','", $this->getAllowedAreas())."') ";
}
if($tagarea!='menu')
{
//if user is able to manually set a area
if(varsettrue($this->pref['tagwords_view_area'])=='1')
{
foreach($this->tagwords as $area)
{
//limit data to only one area, if so, which area
if(varsettrue($_GET['area'])==$area)
{
$ins = "e_tagwords_{$area}";
$typeqry = " AND tag_type='".$this->$ins->settings['table']."'";
break;
}
}
}
}
//menu additions
$menuqry='';
if($tagarea=='menu')
{
if($this->pref['tagwords_menu_min'])
{
$menuqry = "ORDER BY number DESC LIMIT 0,".$this->pref['tagwords_menu_min'];
}
}
$qry = "
SELECT tag_id, tag_itemid, tag_type, tag_word, COUNT(tag_word) as number
FROM #".$this->table."
WHERE tag_word!='' ".$typeqry."
GROUP BY tag_word HAVING COUNT(tag_word)>=".intval($this->pref['tagwords_min'])." ".$menuqry." ";
if($sql->db_Select_gen($qry))
{
$ret=array();
while($row=$sql->db_Fetch())
{
$word = trim($row['tag_word']);
$word = $this->tp->toHTML($word,TRUE,'no_hook, emotes_off');
$ret[$word] = $row['number'];
}
return $ret;
}
return;
}
/*
* Get allowed areas from pref
* @return $array allowed areas
*/
function getAllowedAreas()
{
$this->allowed_areas = array();
foreach($this->tagwords as $area)
{
if(array_key_exists($area,$this->pref['tagwords_activeareas']))
{
$ins = "e_tagwords_{$area}";
$this->allowed_areas[] = $this->$ins->settings['table'];
}
}
return $this->allowed_areas;
}
/*
* Sort data array of tag words
* @param string $array the array of words
* @param string $tagarea the area (menu,page)
* @return $array sorted array
*/
function TagSort($array, $tagarea='')
{
//MENU
if($tagarea=='menu')
{
if(varsettrue($this->pref['tagwords_menu_default_sort'])==1)
{
//alphabetically
ksort($array, SORT_STRING);
}
else
{
//by size
arsort($array);
}
return $array;
}
//PAGE
//user can set own sort
if(varsettrue($this->pref['tagwords_view_sort'])==1)
{
$s = varset($_GET['sort'],'');
switch($s)
{
//if user has set sort, and is set to alpha
case 'alpha':
ksort($array, SORT_STRING);
break;
//if user has set sort, and is set to by size
case 'freq':
arsort($array);
break;
default:
if(varsettrue($this->pref['tagwords_default_sort'])==1)
{
//alphabetically
ksort($array, SORT_STRING);
}
else
{
//by size
arsort($array);
}
break;
}
//user cannot set sort, so use default sort value
}
else
{
if(varsettrue($this->pref['tagwords_default_sort'])==1)
{
//alphabetically
ksort($array, SORT_STRING);
}
else
{
//by size
arsort($array);
}
}
return $array;
}
/*
* Render Message
* @param string $message message
* @param string $caption caption
* @return string $text (ns,echo,return)
*/
function show_message($message, $caption='', $type='ns')
{
switch($type)
{
case 'echo':
echo "<div style='text-align:center'><b>".$message."</b></div>";
break;
case 'return':
return "<div style='text-align:center'><b>".$message."</b></div>";
break;
case 'ns':
default:
global $ns;
$ns->tablerender($caption, "<div style='text-align:center'><b>".$message."</b></div>");
break;
}
}
//##### show tagcloud/taglist -------------------------------------------------
/*
* Show tagcloud/taglist
* @return tablerender tagcloud/taglist
*/
function TagRender()
{
global $ns;
$type = FALSE;
//decide whether to show the taglist or the tagcloud
//user can set own tag style
if(varsettrue($this->pref['tagwords_view_style'])=='1')
{
$t = varset($_GET['type'],'');
switch($t)
{
case 'cloud':
$type='cloud';
break;
case 'list':
$type='list';
break;
default:
$type = (varsettrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');
break;
}
}
else
{
//user cannot set tag style, so use default tag style value
$type = (varsettrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');
}
//show the taglist or tagcloud
if($type=='list')
{
$text = $this->tp->parseTemplate($this->template['cloudlist'], FALSE, $this->shortcodes);
$ns->tablerender(LAN_TAG_17, $text);
}
else
{
$text = $this->tp->parseTemplate($this->template['cloud'], FALSE, $this->shortcodes);
$ns->tablerender(LAN_TAG_16, $text);
}
return;
}
/*
* retrieve all records based on tag word
* @param string $word word
* @param string $caption caption
* @return array $type=>$id
*/
function getRecordsByTag($word='')
{
global $sql;
$typeqry = '';
$allowed = $this->getAllowedAreas();
if(count($allowed)>0)
{
$typeqry = " AND tag_type IN ('".implode("','", $allowed)."') ";
}
if($sql->db_Select_gen("SELECT tag_type, tag_itemid FROM #".$this->table." WHERE tag_word REGEXP('".$this->tp->toDB($word)."') ".$typeqry." "))
{
$ret = array();
while($row=$sql->db_Fetch())
{
$ret[$row['tag_type']][] = $row['tag_itemid'];
}
return $ret;
}
return;
}
/*
* show list of related content based on the word (=$_GET['q'])
* @param string tablerender
*/
function TagSearchResults()
{
global $sql, $ns, $row;
//the full search query + every single word in the query will be used to search
$_GET['q'] = str_replace('+', ' ', $_GET['q']);
$words=array();
//add each seperate word to search
$words = explode(" ", trim($_GET['q']));
if(count($words)>1)
{
//add full query to search
array_unshift($words, $_GET['q']);
}
$results=array();
foreach($words as $w)
{
if($w!='')
{
if($t = $this->getRecordsByTag($w))
{
$results[] = $t;
}
}
}
//only combine the array if searching on multiple words
//else the array is always the [0] key
if(count($words)==1)
{
$records = $results[0];
ksort($records, SORT_STRING);
}
elseif(count($words) > 1)
{
$records = $this->getUnique($results);
ksort($records, SORT_STRING);
}
$this->num = count($records, 1) - count($records);
$text = $this->tp->parseTemplate($this->template['intro'], FALSE, $this->shortcodes);
foreach($records as $type=>$ids)
{
if(array_key_exists($type, $this->mapper))
{
$pluginName = $this->mapper[$type];
$ins = "e_tagwords_{$pluginName}";
$this->area = $this->$ins;
//area (news, content, ...)
$text .= $this->tp->parseTemplate($this->template['area'], FALSE, $this->shortcodes);
//records for found related tagword
$text .= $this->template['link_start'];
foreach($ids as $id)
{
$this->id = $id;
if(method_exists($this->area, 'getRecord'))
{
$this->area->getRecord($this->id);
$text .= $this->tp->parseTemplate($this->template['link_item'], FALSE, $this->shortcodes);
}
}
$text .= $this->template['link_end'];
}
}
$ns->tablerender(LAN_TAG_1, $text);
return;
}
/*
* create a tag cloud
* @return string $text
*/
function TagCloud($mode='')
{
global $sql;
if($mode=='menu')
{
$t_start = $this->template['menu_cloud_start'];
$t_item = $this->template['menu_cloud_item'];
$t_end = $this->template['menu_cloud_end'];
}
else
{
$t_start = $this->template['cloud_start'];
$t_item = $this->template['cloud_item'];
$t_end = $this->template['cloud_end'];
}
$tags = $this->getAllTagWords($mode);
$tags = $this->TagSort($tags, $mode);
if(!is_array($tags))
{
return $this->show_message(LAN_TAG_18, '', 'return');
}
// tags will be displayed between class 1 to class 5
$min_size = 1;
$max_size = 5;
// get the largest and smallest array values
$min_qty = min(array_values($tags));
$max_qty = max(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
// we don't want to divide by zero
if(0 == $spread)
{
$spread = 1;
}
// determine the increment, this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
$text = $t_start;
// loop through our tag array
foreach ($tags as $key => $value)
{
$class = ceil($min_size + (($value - $min_qty) * $step));
$this->word = $this->createTagWordLink($key, $class);
$this->number = $value;
$text .= $this->tp->parseTemplate($t_item, FALSE, $this->shortcodes);
}
$text .= $t_end;
return $text;
}
/*
* create a tag list
* @return string $text tagcloudlist
*/
function TagCloudList()
{
global $sql;
$tags = $this->getAllTagWords();
$tags = $this->TagSort($tags);
if(!is_array($tags))
{
return $this->show_message(LAN_TAG_18, '', 'return');
}
$text = $this->template['cloudlist_start'];
foreach ($tags as $key => $value)
{
$this->word = $this->createTagWordLink($key);
$this->number = $value;
$text .= $this->tp->parseTemplate($this->template['cloudlist_item'], FALSE, $this->shortcodes);
}
$text .= $this->template['cloudlist_end'];
return $text;
}
//##### ADMIN
/*
* default preferences
*/
function default_prefs()
{
$ret=array();
$ret['tagwords_min'] = 1;
$ret['tagwords_class'] = 0;
$ret['tagwords_default_sort'] = 1;
$ret['tagwords_default_style'] = 1;
$ret['tagwords_view_sort'] = 1;
$ret['tagwords_view_style'] = 1;
$ret['tagwords_view_area'] = 1;
$ret['tagwords_view_search'] = 1;
$ret['tagwords_view_freq'] = 1;
$ret['tagwords_word_seperator'] = ' / ';
$ret['tagwords_menu_caption'] = 'LAN_TAG_MENU_2';
$ret['tagwords_menu_min'] = 5;
$ret['tagwords_menu_default_sort'] = 1;
$ret['tagwords_menu_view_search'] = 1;
$ret['tagwords_menu_view_freq'] = 0;
//activate core areas by default
$ret['tagwords_activeareas'] = array();
foreach($this->core as $area)
{
$ret['tagwords_activeareas'][$area] = 1;
}
return $ret;
}
/*
* get preferences from db
*/
function get_prefs()
{
global $sql, $eArrayStorage;
$num_rows = $sql->db_Select_gen("SELECT * FROM #core WHERE e107_name='".$this->table."' ");
if($num_rows == 0)
{
$p = $this->default_prefs();
$tmp = $eArrayStorage->WriteArray($p);
$sql->db_Insert("core", "'".$this->table."', '{$tmp}' ");
$sql->db_Select_gen("SELECT * FROM #core WHERE e107_name='".$this->table."' ");
}
$row = $sql->db_Fetch();
$p = $eArrayStorage->ReadArray($row['e107_value']);
//validation
if(!array_key_exists('tagwords_activeareas', $p))
{
$p['tagwords_activeareas'] = array();
}
return $p;
}
/*
* Update preferences
*/
function update_prefs()
{
global $sql, $eArrayStorage;
$num_rows = $sql->db_Select_gen("SELECT * FROM #core WHERE e107_name='".$this->table."' ");
if ($num_rows == 0)
{
$p = $this->default_prefs();
$tmp = $eArrayStorage->WriteArray($p);
$sql->db_Insert("core", "'".$this->table."', '{$tmp}' ");
}
else
{
$row = $sql->db_Fetch();
//assign new preferences
foreach($_POST as $k => $v)
{
if(preg_match("#^tagwords_#",$k))
{
$tagwords_pref[$k] = $this->tp->toDB($v);
}
}
$this->pref = $tagwords_pref;
//create new array of preferences
$tmp = $eArrayStorage->WriteArray($tagwords_pref);
$sql->db_Update("core", "e107_value = '{$tmp}' WHERE e107_name = '".$this->table."' ");
}
return;
}
/*
* Validate tagword db, removes all non-existing records
* in case a db entry has been deleted but the tagwords were not
*/
function validate()
{
global $sql, $sql2;
if($sql->db_Select_gen("SELECT * FROM #".$this->table." GROUP BY tag_type, tag_itemid ORDER BY tag_id"))
{
while($row=$sql->db_Fetch())
{
if(array_key_exists($row['tag_type'], $this->mapper))
{
$name = "e_tagwords_{$this->mapper[$row['tag_type']]}";
if(!$sql2->db_Select_gen("SELECT * FROM #".$row['tag_type']." WHERE ".$this->$name->settings['db_id']." = '".$row['tag_itemid']."' "))
{
$sql2->db_Delete($this->table, "tag_type='".$row['tag_type']."' AND tag_itemid='".$row['tag_itemid']."' ");
}
}
}
}
}
/*
* Options
* @return string tablerender
*/
function tagwords_options()
{
global $ns;
$this->validate();
$text = $this->tp->parseTemplate($this->template['admin_options'], FALSE, $this->shortcodes);
$ns->tablerender(LAN_TAG_OPT_1, $text);
}
} //end class
?>

View File

@@ -0,0 +1,58 @@
<?php
// First, let the browser know this is a CSS file.
header('Content-type: text/css');
/* stylesheet for the tagwords plugin */
$color1 = "#C79810";
$color2 = "#D15600";
$color3 = "#6BBA70";
$color4 = "#73880A";
$color5 = "#356AA0";
?>
.tag1, a.tag1:link, a.tag1:active, a.tag1:visited, a.tag1:hover {
font-size: 100%;
color:#C79810;
text-decoration:none;
}
a.tag1:hover {
text-decoration:underline;
}
.tag2, a.tag2:link, a.tag2:active, a.tag2:visited, a.tag2:hover {
font-size: 137%;
color:#D15600;
text-decoration:none;
}
a.tag2:hover {
text-decoration:underline;
}
.tag3, a.tag3:link, a.tag3:active, a.tag3:visited, a.tag3:hover {
font-size: 175%;
color:#6BBA70;
text-decoration:none;
}
a.tag3:hover {
text-decoration:underline;
}
.tag4, a.tag4:link, a.tag4:active, a.tag4:visited, a.tag4:hover {
font-size: 212%;
color:#73880A;
text-decoration:none;
}
a.tag1:hover {
text-decoration:underline;
}
.tag5, a.tag5:link, a.tag5:active, a.tag5:visited, a.tag5:hover {
font-size: 250%;
color:#356AA0;
text-decoration:none;
}
a.tag5:hover {
text-decoration:underline;
}

View File

@@ -0,0 +1,34 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/tagwords_menu.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
global $tag;
require_once(e_PLUGIN."tagwords/tagwords_class.php");
$tag = new tagwords();
if(varsettrue($tag->pref['tagwords_class']) && !check_class($tag->pref['tagwords_class']) )
{
return;
}
$text = $tp->parseTemplate($tag->template['menu_cloud'], FALSE, $tag->shortcodes);
$caption = ($tag->pref['tagwords_menu_caption'] ? $tag->pref['tagwords_menu_caption'] : LAN_TAG_16);
$ns->tablerender($caption, $text);
?>

View File

@@ -0,0 +1,348 @@
<?php
if (!defined('e107_INIT')) { exit; }
include_once(e_HANDLER.'shortcode_handler.php');
$tagwords_shortcodes = $tp->e_sc->parse_scbatch(__FILE__);
/*
SC_BEGIN TAG_SEARCH
global $tp, $tag;
$value = (isset($_GET['q']) ? $tp->toForm($_GET['q']) : '');
switch($sc_mode)
{
case 'menu':
if(varsettrue($tag->pref['tagwords_menu_view_search'])!=1)
{
return;
}
$id = 'tagwords_searchform_menu';
return "
<form id='".$id."' name='".$id."' method='get' action='".e_PLUGIN."tagwords/tagwords.php'>
<input class='tbox' style='width:100px;' type='text' name='q' size='35' value='".$value."' maxlength='50' />
<input class='button' type='submit' name='se' value='".LAN_TAG_SEARCH_2."' />
</form>";
break;
case 'search':
if(varsettrue($tag->pref['tagwords_view_search'])!=1)
{
return;
}
$id = 'tagwords_searchform';
return "
<form id='".$id."' name='".$id."' method='get' action='".e_PLUGIN."tagwords/tagwords.php'>
<input class='tbox' style='width:100px;' type='text' name='q' size='35' value='".$value."' maxlength='50' />
<input class='button' type='submit' name='s' value='".LAN_TAG_SEARCH_2."' />
</form>";
break;
default:
if(varsettrue($tag->pref['tagwords_view_search'])!=1)
{
return;
}
return "
<input class='tbox' style='width:100px;' type='text' name='q' size='35' value='".$value."' maxlength='50' />
<input class='button' type='submit' name='s' value='".LAN_TAG_SEARCH_2."' />";
break;
}
SC_END
SC_BEGIN TAG_AREA_HEADING
global $tag;
return varsettrue($tag->area->settings['caption']);
SC_END
SC_BEGIN TAG_LINK
global $tag;
switch($sc_mode)
{
case 'menu':
return "<a href='".e_PLUGIN."tagwords/tagwords.php'>".LAN_TAG_MENU_1."</a>";
break;
case 'home':
return "<a href='".e_PLUGIN."tagwords/tagwords.php'>".LAN_TAG_7."</a>";
break;
default:
if(method_exists($tag->area, 'getLink'))
{
return $tag->area->getLink($tag->id);
}
break;
}
SC_END
SC_BEGIN TAG_CLOUD
global $tag;
switch($sc_mode)
{
case 'menu':
return $tag->TagCloud('menu');
break;
case 'list':
return $tag->TagCloudList();
break;
default:
return $tag->TagCloud();
break;
}
SC_END
SC_BEGIN TAG_WORD
global $tag, $tp;
switch($sc_mode)
{
case 'result':
return "<b>".$tag->num."</b> ".($tag->num==1 ? LAN_TAG_8 : LAN_TAG_9)." '<b>".$tp->toHTML($_GET['q'],TRUE)."</b>'";
break;
case 'form':
default:
return $tag->word;
break;
}
SC_END
SC_BEGIN TAG_NUMBER
global $tag;
switch($sc_mode)
{
case 'list':
return $tag->number;
break;
case 'menu':
if(varsettrue($tag->pref['tagwords_menu_view_freq'])==1)
{
return $tag->number;
}
break;
default:
if(varsettrue($tag->pref['tagwords_view_freq'])==1)
{
return $tag->number;
}
break;
}
SC_END
SC_BEGIN TAG_SORT
global $tag;
$sort=FALSE;
if(varsettrue($tag->pref['tagwords_view_sort'])==1)
{
$s = varset($_GET['sort'],'');
switch($s)
{
case 'alpha':
$sel = 'alpha';
break;
case 'freq':
$sel = 'freq';
break;
default:
$sel = '';
break;
}
$text = "
<select id='sort' name='sort' class='tbox'>
<option value=''>".LAN_TAG_19."</option>
<option value='alpha' ".($sel=='alpha' ? "selected='selected'" : '')." >".LAN_TAG_10."</option>
<option value='freq' ".($sel=='freq' ? "selected='selected'" : '')." >".LAN_TAG_11."</option>
</select>";
return $text;
}
return;
SC_END
SC_BEGIN TAG_TYPE
global $tag;
$type=FALSE;
if(varsettrue($tag->pref['tagwords_view_style'])==1)
{
$t = varset($_GET['type'],'');
switch($t)
{
case 'cloud':
$sel = 'cloud';
break;
case 'list':
$sel = 'list';
break;
default:
$sel = '';
break;
}
$text = "
<select id='type' name='type' class='tbox'>
<option value=''>".LAN_TAG_20."</option>
<option value='cloud' ".($sel=='cloud' ? "selected='selected'" : '')." >".LAN_TAG_13."</option>
<option value='list' ".($sel=='list' ? "selected='selected'" : '')." >".LAN_TAG_12."</option>
</select>";
return $text;
}
return;
SC_END
SC_BEGIN TAG_AREA
global $tag;
if(varsettrue($tag->pref['tagwords_view_area'])==1)
{
$text = "
<select id='area' name='area' class='tbox'>
<option value='' >".LAN_TAG_15."</option>";
foreach($tag->tagwords as $area)
{
if(array_key_exists($area,$tag->pref['tagwords_activeareas']))
{
$name = "e_tagwords_{$area}";
$selected = (varsettrue($_GET['area'])==$area ? "selected=selected" : '');
$text .= "<option value='".$area."' ".$selected." >".$tag->$name->settings['caption']."</option>";
}
}
$text .= "
</select>";
return $text;
}
return;
SC_END
SC_BEGIN TAG_BUTTON
return "<input class='button' type='submit' name='so' value='".LAN_TAG_SEARCH_3."' />";
SC_END
SC_BEGIN TAG_OPTIONS
global $tp, $tag;
if( varsettrue($tag->pref['tagwords_view_search'])==1 || varsettrue($tag->pref['tagwords_view_sort'])==1 || varsettrue($tag->pref['tagwords_view_style'])==1 || varsettrue($tag->pref['tagwords_view_area'])==1 )
{
return $tp->parseTemplate($tag->template['options'], FALSE, $tag->shortcodes);
}
SC_END
//##### ADMIN OPTIONS -------------------------
SC_BEGIN TAG_OPT_MIN
global $tag;
$id = ($sc_mode=='menu' ? 'tagwords_menu_min' : 'tagwords_min');
return "<input class='tbox' type='text' id='".$id."' name='".$id."' value='".$tag->pref[$id]."' size='3' maxlength='3' />";
SC_END
SC_BEGIN TAG_OPT_CLASS
global $tag;
$id = 'tagwords_class';
return r_userclass($id,$tag->pref[$id],"","admin,public,guest,nobody,member,classes");
SC_END
SC_BEGIN TAG_OPT_DEFAULT_SORT
global $tag;
$id = ($sc_mode=='menu' ? 'tagwords_menu_default_sort' : 'tagwords_default_sort');
return "<label><input type='radio' name='".$id."' value='1' ".($tag->pref[$id] ? "checked='checked'" : "")." /> ".LAN_TAG_OPT_5."</label>&nbsp;&nbsp;
<label><input type='radio' name='".$id."' value='0' ".($tag->pref[$id] ? "" : "checked='checked'")." /> ".LAN_TAG_OPT_6."</label>";
SC_END
SC_BEGIN TAG_OPT_DEFAULT_STYLE
global $tag;
$id = 'tagwords_default_style';
return "<label><input type='radio' name='".$id."' value='1' ".($tag->pref[$id] ? "checked='checked'" : "")." /> ".LAN_TAG_OPT_8."</label>&nbsp;&nbsp;
<label><input type='radio' name='".$id."' value='0' ".($tag->pref[$id] ? "" : "checked='checked'")." /> ".LAN_TAG_OPT_9."</label>";
SC_END
SC_BEGIN TAG_OPT_VIEW_SORT
global $tag;
$id = 'tagwords_view_sort';
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_12."
</label>";
SC_END
SC_BEGIN TAG_OPT_VIEW_STYLE
global $tag;
$id = 'tagwords_view_style';
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_13."
</label>";
SC_END
SC_BEGIN TAG_OPT_VIEW_AREA
global $tag;
$id = 'tagwords_view_area';
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_14."
</label>";
SC_END
SC_BEGIN TAG_OPT_VIEW_SEARCH
global $tag;
$id = ($sc_mode=='menu' ? 'tagwords_menu_view_search' : 'tagwords_view_search');
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_19."
</label>";
SC_END
SC_BEGIN TAG_OPT_VIEW_FREQ
global $tag;
if($sc_mode=='menu')
{
$id = 'tagwords_menu_view_freq';
}
else
{
$id = 'tagwords_view_freq';
}
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_20."
</label>";
SC_END
SC_BEGIN TAG_OPT_CAPTION
global $tp, $tag;
$id = 'tagwords_menu_caption';
return "<input class='tbox' type='text' id='".$id."' name='".$id."' value='".$tp->toForm($tag->pref[$id],"","defs")."' size='30' maxlength='100' />";
SC_END
SC_BEGIN TAG_OPT_SEPERATOR
global $tp, $tag;
$id = 'tagwords_word_seperator';
return "<input class='tbox' type='text' id='".$id."' name='".$id."' value='".$tp->toForm($tag->pref[$id])."' size='3' maxlength='10' />";
SC_END
SC_BEGIN TAG_OPT_ACTIVEAREAS
global $tag;
$id = 'tagwords_activeareas';
$text = "";
foreach($tag->tagwords as $area)
{
$sel = (array_key_exists($area,$tag->pref[$id]) ? "checked='checked'" : '');
$name = "e_tagwords_{$area}";
$text .= "
<label for='".$id."[".$area."]'>
<input type='checkbox' name='".$id."[".$area."]' id='".$id."[".$area."]' value='1' ".$sel." />
".$tag->$name->settings['caption']."
</label><br />";
}
return $text;
SC_END
SC_BEGIN TAG_OPT_BUTTON
return "<input class='button' type='submit' name='updatesettings' value='".LAN_UPDATE."' />";
SC_END
*/
?>

View File

@@ -0,0 +1,8 @@
CREATE TABLE tagwords (
`tag_id` int(10) unsigned NOT NULL auto_increment,
`tag_type` varchar(100) NOT NULL default '',
`tag_itemid` int(10) unsigned NOT NULL default '0',
`tag_word` varchar(255) NOT NULL default '',
PRIMARY KEY (`tag_id`),
KEY `tag_word` (`tag_word`)
) TYPE=MyISAM AUTO_INCREMENT=1;

View File

@@ -0,0 +1,216 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/tagwords_template.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-29 20:51:07 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
global $sc_style, $tagwords_shortcodes;
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:97%"); }
//##### form element ------------------------------------------------
$TEMPLATE_TAGWORDS['caption'] = LAN_TAG_1."<br /><span class='smalltext'>(".LAN_TAG_21.")</span>";
$TEMPLATE_TAGWORDS['form'] = "<textarea class='tbox' cols='".TAG_TEXTAREA_COLS."' rows='".TAG_TEXTAREA_ROWS."' id='tagwords' name='tagwords'>{TAG_WORD|form}</textarea><br />";
//##### intro in the 'related content' list -------------------------
$sc_style['TAG_SEARCH|search']['pre'] = "<div style='float:right; margin-bottom:5px; margin-left:5px;'>";
$sc_style['TAG_SEARCH|search']['post'] = "</div>";
$sc_style['TAG_LINK|home']['pre'] = "";
$sc_style['TAG_LINK|home']['post'] = "<br /><br />";
$TEMPLATE_TAGWORDS['intro'] = "
{TAG_LINK|home}
{TAG_SEARCH|search}
<div>
{TAG_WORD|result}<br />
<br />
</div>";
//##### area heading in the 'related content' list ------------------
$TEMPLATE_TAGWORDS['area'] = "<h2>{TAG_AREA_HEADING}</h2>";
//##### link to an item present in the 'related content' list -------
$TEMPLATE_TAGWORDS['link_start'] = "<div><ul>";
$TEMPLATE_TAGWORDS['link_item'] = "<li>{TAG_LINK}</li>";
$TEMPLATE_TAGWORDS['link_end'] = "</ul></div>";
//##### options --------------------------------------------------
$TEMPLATE_TAGWORDS['options'] = "
<form id='dataform' name='dataform' method='get' action='".e_PLUGIN."tagwords/tagwords.php'>
{TAG_SEARCH}
</form>
<form id='dataform' name='dataform' method='get' action='".e_PLUGIN."tagwords/tagwords.php'>
<div style='line-height:150%; padding-bottom:10px;'>
{TAG_TYPE} {TAG_SORT} {TAG_AREA} {TAG_BUTTON}
</div>
</form>";
//##### cloud -------------------------------------------------------
$sc_style['TAG_NUMBER']['pre'] = "(";
$sc_style['TAG_NUMBER']['post'] = ") ";
$TEMPLATE_TAGWORDS['cloud_start'] = "";
$TEMPLATE_TAGWORDS['cloud_item'] = "{TAG_WORD}{TAG_NUMBER}";
$TEMPLATE_TAGWORDS['cloud_end'] = "";
$TEMPLATE_TAGWORDS['cloud'] = "
{TAG_OPTIONS}
<div class='tagwords' style='text-align:center;'>
<div style='text-align:justify; width:85%; line-height:250%; margin:0 auto;'>
{TAG_CLOUD}
</div>
</div>";
//##### cloud list --------------------------------------------------
$sc_style['TAG_NUMBER|list']['pre'] = " (";
$sc_style['TAG_NUMBER|list']['post'] = ")";
$TEMPLATE_TAGWORDS['cloudlist_start'] = "<ul>";
$TEMPLATE_TAGWORDS['cloudlist_item'] = "<li>{TAG_WORD} {TAG_NUMBER|list}</li>";
$TEMPLATE_TAGWORDS['cloudlist_end'] = "</ul>";
$TEMPLATE_TAGWORDS['cloudlist'] = "
{TAG_OPTIONS}
<div class='tagwords'>
{TAG_CLOUD|list}
</div>";
//##### menu cloud --------------------------------------------------
$sc_style['TAG_NUMBER|menu']['pre'] = "(";
$sc_style['TAG_NUMBER|menu']['post'] = ") ";
$sc_style['TAG_SEARCH|menu']['pre'] = "<div style='margin-bottom:5px;'>";
$sc_style['TAG_SEARCH|menu']['post'] = "</div>";
$TEMPLATE_TAGWORDS['menu_cloud_start'] = "";
$TEMPLATE_TAGWORDS['menu_cloud_item'] = "{TAG_WORD|menu}{TAG_NUMBER|menu}";
$TEMPLATE_TAGWORDS['menu_cloud_end'] = "";
$TEMPLATE_TAGWORDS['menu_cloud'] = "
<div class='tagwords' style='text-align:center;'>
{TAG_SEARCH|menu}
<div style='text-align:justify; width:90%; line-height:250%; margin:0 auto;'>
{TAG_CLOUD|menu}
</div>
{TAG_LINK|menu}
</div>";
//##### admin -------------------------------------------------------
$TEMPLATE_TAGWORDS['admin_options'] = "
<form method='post' action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."'>
<table style='width:98%' class='fborder'>
<colgroup>
<col width='40%'/>
<col width='60%'/>
</colgroup>
<tr>
<td class='fcaption' colspan='2'>".LAN_TAG_OPT_25."</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_2."</td>
<td class='forumheader3'>{TAG_OPT_MIN}</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_3."</td>
<td class='forumheader3'>{TAG_OPT_CLASS}</td>
</tr>
<tr>
<td class='fcaption' colspan='2'>".LAN_TAG_OPT_16."</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_4."</td>
<td class='forumheader3'>{TAG_OPT_DEFAULT_SORT}</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_7."</td>
<td class='forumheader3'>{TAG_OPT_DEFAULT_STYLE}</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_26."</td>
<td class='forumheader3'>
{TAG_OPT_VIEW_SORT}<br />
{TAG_OPT_VIEW_STYLE}<br />
{TAG_OPT_VIEW_AREA}<br />
{TAG_OPT_VIEW_SEARCH}<br />
{TAG_OPT_VIEW_FREQ}<br />
</td>
</tr>
<tr>
<td class='fcaption' colspan='2'>".LAN_TAG_OPT_17."</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_18."</td>
<td class='forumheader3'>{TAG_OPT_CAPTION|menu}</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_15."</td>
<td class='forumheader3'>{TAG_OPT_MIN|menu}</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_4."</td>
<td class='forumheader3'>{TAG_OPT_DEFAULT_SORT|menu}</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_26."</td>
<td class='forumheader3'>
{TAG_OPT_VIEW_SEARCH|menu}<br />
{TAG_OPT_VIEW_FREQ|menu}<br />
</td>
</tr>
<tr>
<td class='fcaption' colspan='2'>".LAN_TAG_OPT_21."</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_22."</td>
<td class='forumheader3'>{TAG_OPT_SEPERATOR}</td>
</tr>
<tr>
<td class='fcaption' colspan='2'>".LAN_TAG_OPT_23."</td>
</tr>
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_24."</td>
<td class='forumheader3'>{TAG_OPT_ACTIVEAREAS}</td>
</tr>
<tr>
<td class='forumheader' colspan='2' style='text-align:center'>{TAG_OPT_BUTTON}</td>
</tr>
</table>
</form>";
/*
<tr>
<td class='forumheader3'>".LAN_TAG_OPT_26."</td>
<td class='forumheader3'>
{TAG_OPT_VIEW_SORT} ".LAN_TAG_OPT_12."<br />
{TAG_OPT_VIEW_STYLE} ".LAN_TAG_OPT_13."<br />
{TAG_OPT_VIEW_AREA} ".LAN_TAG_OPT_14."<br />
{TAG_OPT_VIEW_SEARCH} ".LAN_TAG_OPT_19."<br />
{TAG_OPT_VIEW_FREQ} ".LAN_TAG_OPT_20."<br />
</td>
</tr>
*/
?>