1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00

#220 - First batch of forum LAN rewrite: forum, viewforum, viewtopic and post are done. Work in progress! (#6)

This commit is contained in:
Moc 2013-06-12 21:37:54 +02:00
parent 0e75ada2a9
commit ff2c2e5c6d
37 changed files with 666 additions and 442 deletions

View File

@ -1,6 +1,6 @@
global $sql, $e_hide_query, $e_hide_hidden, $e_hide_allowed;
if(!$e_hide_allowed || !isset($e_hide_query) || !$sql->db_Select_gen($e_hide_query))
if(!$e_hide_allowed || !isset($e_hide_query) || !$sql->gen($e_hide_query))
{
if(defined('HIDE_TEXT_HIDDEN'))
{

View File

@ -1,7 +1,6 @@
<?php
/*
* Copyright (c) e107 Inc 2009 - e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id$
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* NEXTPREV shortcode template
*/
@ -107,7 +106,7 @@ $NEXTPREV_TEMPLATE['dropdown_end'] = '
';
//$NEXTPREV_TEMPLATE['default_nav_caption'] = '<span class="nexprev-caption center">{caption}</span>&nbsp;'; XXX - awaiting the new front-end themes & templates
$NEXTPREV_TEMPLATE['default_nav_caption'] = NP_3.'&nbsp;';
$NEXTPREV_TEMPLATE['default_nav_caption'] = LAN_GOPAGE.'&nbsp;';
$NEXTPREV_TEMPLATE['dropdown_nav_first'] = '';
$NEXTPREV_TEMPLATE['dropdown_nav_last'] = '';

View File

@ -2,16 +2,10 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 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_handlers/np_class.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
@ -44,7 +38,7 @@ class nextprev {
}
if ($pages) {
$nppage = NP_3." ";
$nppage = LAN_GOPAGE." ";
if ($pages > 10) {
$current = ($from/$view)+1;

View File

@ -1,48 +1,44 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/English.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* English language file - generic terms and system LAN
*
*/
setlocale(LC_ALL, 'en_GB.UTF-8', 'en_GB.utf8', 'eng_eng.utf8', 'en');
define('CORE_LC', 'en');
define('CORE_LC2', 'gb');
define("CORE_LC", "en");
define("CORE_LC2", "gb");
// define("TEXTDIRECTION","rtl");
// deprecated: all language packs must be UTF-8
//define('CHARSET', 'utf-8'); // for a true multi-language site. :)
define('CORE_LAN1',"Error : theme is missing.\\n\\nChange the used themes in your preferences (admin area) or upload files for the current theme to the server.");
//obsolete define('CORE_LAN2'," \\1 wrote:");// "\\1" represents the username.
//obsolete define('CORE_LAN3', 'file attachment disabled'); // Not used in 0.8
define('CORE_LAN4', 'Please delete install.php from your server');
define('CORE_LAN5', 'if you do not there is a potential security risk to your website');
define('CORE_LAN6', 'The flood protection on this site has been activated and you are warned that if you carry on requesting pages you could be banned.');
define('CORE_LAN7', 'Core is attempting to restore prefs from automatic backup.');
define('CORE_LAN8', 'Core Prefs Error');
define('CORE_LAN9', 'Core could not restore from automatic backup. Execution halted.');
define('CORE_LAN10', 'Corrupted cookie detected - logged out.');
//define("CHARSET", "utf-8"); // for a true multi-language site. :)
define("CORE_LAN1", "Error : theme is missing.\\n\\nChange the used themes in your preferences (admin area) or upload files for the current theme to the server.");
//obsolete define("CORE_LAN2'," \\1 wrote:");// "\\1" represents the username.
//obsolete define("CORE_LAN3", "file attachment disabled"); // Not used in 0.8
define("CORE_LAN4", "Please delete install.php from your server");
define("CORE_LAN5", "if you do not there is a potential security risk to your website");
define("CORE_LAN6", "The flood protection on this site has been activated and you are warned that if you carry on requesting pages you could be banned.");
define("CORE_LAN7", "Core is attempting to restore prefs from automatic backup.");
define("CORE_LAN8", "Core Prefs Error");
define("CORE_LAN9", "Core could not restore from automatic backup. Execution halted.");
define("CORE_LAN10", "Corrupted cookie detected - logged out.");
// Footer
define('CORE_LAN11', 'Render time: ');
define('CORE_LAN12', ' sec (');
define('CORE_LAN13', '% of that for queries) ');
define('CORE_LAN14', '%2.3f cpu sec (%2.2f%% load, %2.3f startup). Clock: ');
define('CORE_LAN15', 'DB queries: ');
define('CORE_LAN16', 'Memory: ');
define("CORE_LAN11", "Render time: ");
define("CORE_LAN12", " sec (");
define("CORE_LAN13", "% of that for queries) ");
define("CORE_LAN14", "%2.3f cpu sec (%2.2f%% load, %2.3f startup). Clock: ");
define("CORE_LAN15", "DB queries: ");
define("CORE_LAN16", "Memory: ");
// img.bb
define('CORE_LAN17', '[ image disabled ]');
define('CORE_LAN18', 'Image: ');
define("CORE_LAN17", "[ image disabled ]");
define("CORE_LAN18", "Image: ");
define('CORE_LAN_B', 'B');
define('CORE_LAN_KB', 'kB');
define('CORE_LAN_MB', 'MB');
define('CORE_LAN_GB', 'GB');
define('CORE_LAN_TB', 'TB');
define("CORE_LAN_B", "B");
define("CORE_LAN_KB", "kB");
define("CORE_LAN_MB", "MB");
define("CORE_LAN_GB", "GB");
define("CORE_LAN_TB", "TB");
define("EMESSLAN_TITLE_INFO", "System Information");
define("EMESSLAN_TITLE_ERROR", "Error");
@ -50,20 +46,22 @@ define("EMESSLAN_TITLE_SUCCESS", "Success");
define("EMESSLAN_TITLE_WARNING", "Warning");
define("EMESSLAN_TITLE_DEBUG", "System Debug");
define('LAN_MORE', 'More..');
define('LAN_WARNING', 'Warning!');
define('LAN_ERROR', 'Error');
define('LAN_ANONYMOUS', 'Anonymous');
define('LAN_EMAIL_SUBS', '-email-');
define('LAN_YES', 'Yes');
define('LAN_NO', 'No');
define('LAN_OK', 'OK');
define('LAN_CONTINUE', 'Continue');
define('LAN_ENTER', 'Enter');
define('LAN_HOOKS', 'Hooks');
define('LAN_ENTER_CODE', "Enter code");
define('LAN_INVALID_CODE', "Incorrect code entered.");
define("LAN_MORE", "More..");
define("LAN_GOPAGE", "Go to page");
define("LAN_GO", "Go");
define("LAN_NONE", "None");
define("LAN_WARNING", "Warning!");
define("LAN_ERROR", "Error");
define("LAN_ANONYMOUS", "Anonymous");
define("LAN_EMAIL_SUBS", "-email-");
define("LAN_YES", "Yes");
define("LAN_NO", "No");
define("LAN_OK", "OK");
define("LAN_CONTINUE", "Continue");
define("LAN_ENTER", "Enter");
define("LAN_HOOKS", "Hooks");
define("LAN_ENTER_CODE", "Enter code");
define("LAN_INVALID_CODE", "Incorrect code entered.");
define("LAN_SEARCH", "Search");
?>

View File

@ -1,14 +1,13 @@
<?php
/*
* Copyright 2008-2010 e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id$
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Nexptrev Shortcode Language File
*/
define('NP_1', 'Previous page');
define('NP_2', 'Next page');
define('NP_3', 'Go to page');
//define('NP_3', 'Go to page'); // Generic
// 0.8
define('LAN_NP_FIRST', 'first');

View File

@ -1,13 +1,9 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_search.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Language file - Search
*
*/
define("PAGE_NAME", "Search");
@ -38,7 +34,7 @@ define("LAN_SEARCH_6", "Match found in extended news text");
define("LAN_SEARCH_7", "Posted by ");
define("LAN_SEARCH_8", " on ");
define("LAN_SEARCH_9", "Untitled");
define("LAN_SEARCH_10", "Go to page:");
//define("LAN_SEARCH_10", "Go to page:"); // Generic
define("LAN_SEARCH_11", "Results");
define("LAN_SEARCH_12", " of ");
define("LAN_SEARCH_13", " in ");

View File

@ -1,13 +1,9 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/languages/English/download.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Language file - download plugin
*
*/
define("PAGE_NAME", "Downloads"); //FIXME use term from English_global.php
@ -95,7 +91,7 @@ define("LAN_dl_73", "Downloads from this mirror: ");
define("LAN_dl_74", "Total downloads from this mirror: ");
define("LAN_dl_75", "no image available ");
define("LAN_dl_76", "Go to page"); //FIXME Use Generic
//define("LAN_dl_76", "Go to page"); //FIXME Use Generic
define("LAN_dl_77", "Downloads"); // Intentional duplicate - some languages need it to be different. This is for number of downloads
define('LAN_dl_78', 'That download has been disabled or discontinued. Please check in the --LINK--downloads</a> area for a more recent version.');

View File

@ -2,15 +2,12 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Check for admin events being triggered
*
* $URL$
* $Id$
*
*/
function plugin_forum_admin_events($type, $parms)
{

View File

@ -8,10 +8,10 @@ function print_item($thread_id)
include_once(e_PLUGIN.'forum/forum_class.php');
$forum = new e107forum;
$thread_info = $forum->thread_get($thread_id,0,999);
$thread_name = $tp -> toHTML($thread_info[0]['thread_name'], TRUE);
$thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE);
$text = "<b>".$thread_name."</b><br />
".$thread_info[0]['user_name'].", ".$gen->convert_date($thread_info[0]['thread_datestamp'], "forum")."<br /><br />
".$tp -> toHTML($thread_info[0]['thread_thread'], TRUE);
".$tp->toHTML($thread_info[0]['thread_thread'], TRUE);
$count = 1;
@ -21,7 +21,7 @@ function print_item($thread_id)
{
$text .= "<br /><br />Re: <b>".$thread_name."</b><br />
".$reply['user_name'].", ".$gen->convert_date($reply['thread_datestamp'], "forum")."<br /><br />
".$tp -> toHTML($reply['thread_thread'], TRUE);
".$tp->toHTML($reply['thread_thread'], TRUE);
}
@ -37,10 +37,10 @@ function email_item($thread_id)
$forum = new e107forum;
$thread_info = $forum->thread_get($thread_id,0,999);
$thread_name = $tp -> toHTML($thread_info[0]['thread_name'], TRUE);
$thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE);
$text = "<b>".$thread_name."</b><br />
".$thread_info[0]['user_name'].", ".$gen->convert_date($thread_info[0]['thread_datestamp'], "forum")."<br /><br />
".$tp -> toHTML($thread_info[0]['thread_thread'], TRUE);
".$tp->toHTML($thread_info[0]['thread_thread'], TRUE);
$count = 1;
@ -49,7 +49,7 @@ function email_item($thread_id)
{
$text .= "<br /><br />Re: <b>".$thread_name."</b><br />
".$reply['user_name'].", ".$gen->convert_date($reply['thread_datestamp'], "forum")."<br /><br />
".$tp -> toHTML($reply['thread_thread'], TRUE);
".$tp->toHTML($reply['thread_thread'], TRUE);
}
return $text;
}

View File

@ -2,11 +2,11 @@
if (!defined('e107_INIT')) { exit; }
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_frontpage.php');
e107::lan('forum', 'English_front');
/**
* @todo - extend array to allow selection of any main forum, as well as the forum front page
*/
$front_page['forum'] = array('page' => $PLUGINS_DIRECTORY.'forum/forum.php', 'title' => FOR_FP_1);
$front_page['forum'] = array('page' => $PLUGINS_DIRECTORY.'forum/forum.php', 'title' => LAN_FORUM_0001);
?>

View File

@ -7,7 +7,7 @@ class forum_latest // include plugin-folder in the name.
function config()
{
$sql = e107::getDb();
$reported_posts = $sql->db_Count('generic', '(*)', "WHERE gen_type='reported_post' OR gen_type='Reported Forum Post'");
$reported_posts = $sql->count('generic', '(*)', "WHERE gen_type='reported_post' OR gen_type='Reported Forum Post'");
$var[0]['icon'] = E_16_FORUM;
$var[0]['title'] = ADLAN_LAT_6;

View File

@ -2,14 +2,10 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
@ -17,9 +13,9 @@ if (!defined('e107_INIT')) { exit; }
// Usage: sublink_type[x]['title'].
// x should be the same as the plugin folder.
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_admin.php');
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_admin.php'); // FIXME needs changing after forum lan rewrite
$sublink_type['forum']['title'] = FORLAN_155; // "News Categories";
$sublink_type['forum']['title'] = FORLAN_155; // "News Categories"; // FIXME needs changing after forum lan rewrite
$sublink_type['forum']['table'] = 'forum';
$sublink_type['forum']['query'] = "forum_parent !='0' ORDER BY forum_order ASC";
$sublink_type['forum']['url'] = "{e_PLUGIN}forum/forum_viewforum.php?#";

View File

@ -2,22 +2,19 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Forum plugin notify configuration
*
* $URL$
* $Id$
*
*/
if (!defined('e107_INIT')) { exit; }
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
{
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php');
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php'); // FIXME needs changing after forum lan rewrite
$config_category = FORUM_NT_1;
$config_events = array(
'forum_nt' => FORUM_NT_NEWTHREAD,

View File

@ -1,7 +1,7 @@
<?php
if (!defined('e107_INIT')) { exit(); }
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_search.php');
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_search.php'); // FIXME needs changing after forum lan rewrite
$search_info[] = array(
'sfile' => e_PLUGIN.'forum/search/search_parser.php',

View File

@ -7,7 +7,7 @@ class forum_status // include plugin-folder in the name.
function config()
{
$sql = e107::getDb();
$forum_posts = $sql->db_Count('forum_post');
$forum_posts = $sql->count('forum_post');
$var[0]['icon'] = E_16_FORUM;
$var[0]['title'] = ADLAN_113;

View File

@ -24,7 +24,7 @@ if (!$e107->isInstalled('forum'))
exit;
}
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php');
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); // using English_front.php now
require_once(e_PLUGIN.'forum/forum_class.php');
$forum = new e107forum;
@ -62,42 +62,43 @@ if(isset($_GET['f']))
$fVars = new e_vars;
$gen = new convert;
$fVars->FORUMTITLE = LAN_46;
$fVars->THREADTITLE = LAN_47;
$fVars->REPLYTITLE = LAN_48;
$fVars->LASTPOSTITLE = LAN_49;
$fVars->INFOTITLE = LAN_191;
$fVars->FORUMTITLE = LAN_FORUM_0001;
$fVars->THREADTITLE = LAN_FORUM_0002;
$fVars->REPLYTITLE = LAN_FORUM_0003;
$fVars->LASTPOSTITLE = LAN_FORUM_0004;
$fVars->INFOTITLE = LAN_FORUM_0009;
$fVars->LOGO = IMAGE_e;
$fVars->NEWTHREADTITLE = LAN_424;
$fVars->POSTEDTITLE = LAN_423;
$fVars->NEWTHREADTITLE = LAN_FORUM_0075;
$fVars->POSTEDTITLE = LAN_FORUM_0074;
$fVars->NEWIMAGE = IMAGE_new_small;
$fVars->TRACKTITLE = LAN_397;
$fVars->TRACKTITLE = LAN_FORUM_0073;
$rules_text = forum_rules('check');
$fVars->USERINFO = "<a href='".e_BASE."top.php?0.top.forum.10'>".LAN_429."</a> | <a href='".e_BASE."top.php?0.active'>".LAN_430."</a>";
$fVars->USERINFO = "<a href='".e_BASE."top.php?0.top.forum.10'>".LAN_FORUM_0010."</a> | <a href='".e_BASE."top.php?0.active'>".LAN_FORUM_0011."</a>";
if(USER)
{
$fVars->USERINFO .= " | <a href='".e_BASE.'userposts.php?0.forums.'.USERID."'>".LAN_431."</a> | <a href='".e_BASE."usersettings.php'>".LAN_432."</a> | <a href='".e_BASE."user.php?id.".USERID."'>".LAN_435."</a>";
$fVars->USERINFO .= " | <a href='".e_BASE.'userposts.php?0.forums.'.USERID."'>".LAN_FORUM_0012."</a> | <a href='".e_BASE."usersettings.php'>".LAN_FORUM_0013."</a> | <a href='".e_BASE."user.php?id.".USERID."'>".LAN_FORUM_0014."</a>";
if($forum->prefs->get('attach') && (check_class($pref['upload_class']) || getperms('0')))
{
$fVars->USERINFO .= " | <a href='".e_PLUGIN."forum/forum_uploads.php'>".FORLAN_442."</a>";
$fVars->USERINFO .= " | <a href='".e_PLUGIN."forum/forum_uploads.php'>".LAN_FORUM_0015."</a>";
}
}
if($rules_text != '')
{
$fVars->USERINFO .= " | <a href='".$e107->url->create('forum/forum/rules')."'>".LAN_433.'</a>';
$fVars->USERINFO .= " | <a href='".$e107->url->create('forum/forum/rules')."'>".LAN_FORUM_0016.'</a>';
}
$total_topics = $sql->count("forum_thread", "(*)");
$total_replies = $sql->count("forum_post", "(*)");
$total_members = $sql->count("user");
$newest_member = $sql->select("user", "*", "user_ban='0' ORDER BY user_join DESC LIMIT 0,1");
list($nuser_id, $nuser_name) = $sql->db_Fetch();
list($nuser_id, $nuser_name) = $sql->fetch(); // FIXME $nuser_id & $user_name return empty even though print_a($newest_member); returns proper result.
if(!defined('e_TRACKING_DISABLED'))
{
$member_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id!='0' ");
$guest_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id='0' ");
$users = $member_users+$guest_users;
$fVars->USERLIST = LAN_426;
$fVars->USERLIST = LAN_FORUM_0036.": ";
global $listuserson;
$c = 0;
if(is_array($listuserson))
@ -109,30 +110,30 @@ if(!defined('e_TRACKING_DISABLED'))
$fVars->USERLIST .= "<a href='".e_BASE."user.php?id.$oid'>$oname</a>".($c == MEMBERS_ONLINE ? "." :", ");
}
}
$fVars->USERLIST .= "<br /><a rel='external' href='".e_BASE."online.php'>".LAN_427."</a> ".LAN_436;
$fVars->USERLIST .= "<br /><a rel='external' href='".e_BASE."online.php'>".LAN_FORUM_0037."</a> ".LAN_FORUM_0038;
}
$fVars->STATLINK = "<a href='".e_PLUGIN."forum/forum_stats.php'>".LAN_441."</a>\n";
$fVars->STATLINK = "<a href='".e_PLUGIN."forum/forum_stats.php'>".LAN_FORUM_0017."</a>\n";
$fVars->ICONKEY = "
<table style='width:100%'>\n<tr>
<td style='width:2%'>".IMAGE_new_small."</td>
<td style='width:10%'><span class='smallblacktext'>".LAN_79."</span></td>
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0039."</span></td>
<td style='width:2%'>".IMAGE_nonew_small."</td>
<td style='width:10%'><span class='smallblacktext'>".LAN_80."</span></td>
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0040."</span></td>
<td style='width:2%'>".IMAGE_closed_small."</td>
<td style='width:10%'><span class='smallblacktext'>".LAN_394."</span></td>
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0041."</span></td>
</tr>\n</table>\n";
$fVars->SEARCH = "
<form method='get' class='form-search form-inline input-append' action='".e_BASE."search.php'>
<form method='get' class='form-inline input-append' action='".e_BASE."search.php'>
<input class='tbox search-query' type='text' name='q' size='20' value='' maxlength='50' />
<button class='btn button' type='submit' name='s' value='".LAN_180."' />".LAN_180."</button>
<input class='tbox' type='text' name='q' size='20' value='' maxlength='50' />
<input class='btn button' type='submit' name='s' value='".LAN_SEARCH."' />
<input type='hidden' name='r' value='0' />
<input type='hidden' name='ref' value='forum' />
</form>\n";
$fVars->PERMS = (USER == TRUE || ANON == TRUE ? LAN_204." - ".LAN_206." - ".LAN_208 : LAN_205." - ".LAN_207." - ".LAN_209);
$fVars->PERMS = (USER == TRUE || ANON == TRUE ? LAN_FORUM_0043." - ".LAN_FORUM_0045." - ".LAN_FORUM_0047 : LAN_FORUM_0044." - ".LAN_FORUM_0046." - ".LAN_FORUM_0048);
$fVars->INFO = "";
if (USER == TRUE)
@ -140,7 +141,7 @@ if (USER == TRUE)
$total_new_threads = $sql->count('forum_thread', '(*)', "WHERE thread_datestamp>'".USERLV."' ");
if (USERVIEWED != "")
{
$tmp = explode(".", USERVIEWED); // List of numbers, separated by single period
$tmp = explode(".", USERVIEWED); // List of numbers, separated by single period
$total_read_threads = count($tmp);
}
else
@ -148,60 +149,62 @@ if (USER == TRUE)
$total_read_threads = 0;
}
$fVars->INFO = LAN_30." ".USERNAME."<br />";
$fVars->INFO = LAN_FORUM_0018." ".USERNAME."<br />";
$lastvisit_datestamp = $gen->convert_date(USERLV, 'long');
$datestamp = $gen->convert_date(time(), "long");
if (!$total_new_threads)
{
$fVars->INFO .= LAN_31;
$fVars->INFO .= LAN_FORUM_0019." ";
}
elseif($total_new_threads == 1)
{
$fVars->INFO .= LAN_32;
$fVars->INFO .= LAN_FORUM_0020;
}
else
{
$fVars->INFO .= LAN_33." ".$total_new_threads." ".LAN_34." ";
$fVars->INFO .= LAN_FORUM_0021." ".$total_new_threads." ".LAN_FORUM_0022." ";
}
$fVars->INFO .= LAN_35;
$fVars->INFO .= LAN_FORUM_0023;
if ($total_new_threads == $total_read_threads && $total_new_threads != 0 && $total_read_threads >= $total_new_threads)
{
$fVars->INFO .= LAN_198;
$fVars->INFO .= LAN_FORUM_0029;
$allread = TRUE;
}
elseif($total_read_threads != 0)
{
$fVars->INFO .= " (".LAN_196.$total_read_threads.LAN_197.")";
$fVars->INFO .= " (".LAN_FORUM_0027." ".$total_read_threads." ".LAN_FORUM_0028.")";
}
$fVars->INFO .= "<br />
".LAN_36." ".$lastvisit_datestamp."<br />
".LAN_37." ".$datestamp;
".LAN_FORUM_0024." ".$lastvisit_datestamp."<br />
".LAN_FORUM_0025." ".$datestamp;
}
else
{
$fVars->INFO .= '';
if (ANON == TRUE)
{
$fVars->INFO .= LAN_410.'<br />'.LAN_44." <a href='".e_SIGNUP."'>".LAN_437."</a> ".LAN_438;
$fVars->INFO .= LAN_FORUM_0049.'<br />'.LAN_FORUM_0050." <a href='".e_SIGNUP."'>".LAN_FORUM_0051."</a> ".LAN_FORUM_0052;
}
elseif(USER == FALSE)
{
$fVars->INFO .= LAN_410.'<br />'.LAN_45." <a href='".e_SIGNUP."'>".LAN_439."</a> ".LAN_440;
$fVars->INFO .= LAN_FORUM_0049.'<br />'.LAN_FORUM_0053." <a href='".e_SIGNUP."'>".LAN_FORUM_0054."</a> ".LAN_FORUM_0055;
}
}
if (USER && vartrue($allread) != TRUE && $total_new_threads && $total_new_threads >= $total_read_threads)
{
$fVars->INFO .= "<br /><a href='".e_SELF."?mark.all.as.read'>".LAN_199.'</a>'.(e_QUERY != 'new' ? ", <a href='".e_SELF."?new'>".LAN_421."</a>" : '');
$fVars->INFO .= "<br /><a href='".e_SELF."?mark.all.as.read'>".LAN_FORUM_0057.'</a>'.(e_QUERY != 'new' ? ", <a href='".e_SELF."?new'>".LAN_FORUM_0058."</a>" : '');
}
if (USER && varsettrue($forum->prefs->get('track')) && e_QUERY != 'track')
{
$fVars->INFO .= "<br /><a href='".e_SELF."?track'>".LAN_393.'</a>';
$fVars->INFO .= "<br /><a href='".e_SELF."?track'>".LAN_FORUM_0030.'</a>';
}
$fVars->FORUMINFO = LAN_192.($total_topics+$total_replies).' '.LAN_404." ($total_topics ".($total_topics == 1 ? LAN_411 : LAN_413).", $total_replies ".($total_replies == 1 ? LAN_412 : LAN_414).").".(!defined("e_TRACKING_DISABLED") ? "" : "<br />".$users." ".($users == 1 ? LAN_415 : LAN_416)." (".$member_users." ".($member_users == 1 ? LAN_417 : LAN_419).", ".$guest_users." ".($guest_users == 1 ? LAN_418 : LAN_420).")<br />".LAN_42.$total_members."<br />".LAN_41."<a href='".e_BASE."user.php?id.".$nuser_id."'>".$nuser_name."</a>.\n");
$fVars->FORUMINFO =
str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_topics ".($total_topics == 1 ? LAN_FORUM_0032 : LAN_FORUM_0033).", $total_replies ".($total_replies == 1 ? LAN_FORUM_0034 : LAN_FORUM_0035).")
".(!defined("e_TRACKING_DISABLED") ? "" : "<br />".$users." ".($users == 1 ? LAN_FORUM_0059 : LAN_FORUM_0060)." (".$member_users." ".($member_users == 1 ? LAN_FORUM_0061 : LAN_FORUM_0062).", ".$guest_users." ".($guest_users == 1 ? LAN_FORUM_0063 : LAN_FORUM_0064).")<br />".LAN_FORUM_0066." ".$total_members."<br />".LAN_FORUM_0065." <a href='".e_BASE."user.php?id.".$nuser_id."'>".$nuser_name."</a>.\n"); // FIXME cannot find other references to e_TRACKING_DISABLED, use pref?
if (!isset($FORUM_MAIN_START))
{
@ -240,7 +243,7 @@ $newflag_list = $forum->forumGetUnreadForums();
if (!$forumList)
{
$ns->tablerender(PAGE_NAME, "<div style='text-align:center'>".LAN_51.'</div>', array('forum', '51'));
$ns->tablerender(PAGE_NAME, "<div style='text-align:center'>".LAN_FORUM_0067.'</div>', array('forum', '51'));
require_once(FOOTERF);
exit;
}
@ -256,7 +259,7 @@ foreach ($forumList['parents'] as $parent)
$forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT, $pVars);
if (!count($forumList['forums'][$parent['forum_id']]))
{
$text .= "<td colspan='5' style='text-align:center' class='forumheader3'>".LAN_52."</td>";
$text .= "<td colspan='5' style='text-align:center' class='forumheader3'>".LAN_FORUM_0068."</td>";
}
else
{
@ -265,19 +268,19 @@ foreach ($forumList['parents'] as $parent)
{
if ($f['forum_class'] == e_UC_ADMIN && ADMIN)
{
$forum_string .= parse_forum($f, LAN_406);
$forum_string .= parse_forum($f, LAN_FORUM_0005);
}
elseif($f['forum_class'] == e_UC_MEMBER && USER)
{
$forum_string .= parse_forum($f, LAN_407);
$forum_string .= parse_forum($f, LAN_FORUM_0006);
}
elseif($f['forum_class'] == e_UC_READONLY)
{
$forum_string .= parse_forum($f, LAN_408);
$forum_string .= parse_forum($f, LAN_FORUM_0007);
}
elseif($f['forum_class'] && check_class($f['forum_class']))
{
$forum_string .= parse_forum($f, LAN_409);
$forum_string .= parse_forum($f, LAN_FORUM_0008);
}
elseif(!$f['forum_class'])
{
@ -295,7 +298,7 @@ function parse_parent($parent)
{
if(!check_class($parent['forum_postclass']))
{
$status = '( '.LAN_405.' )';
$status = '('.LAN_FORUM_0056.')';
}
return vartrue($status);
}
@ -343,7 +346,7 @@ function parse_forum($f, $restricted_string = '')
{
list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
$ret = parse_subs($forumList['subs'][$f['forum_id']], $lastpost_datestamp);
$fVars->FORUMSUBFORUMS = "<br /><div class='smalltext'>".FORLAN_444.": {$ret['text']}</div>";
$fVars->FORUMSUBFORUMS = "<br /><div class='smalltext'>".LAN_FORUM_0069.": {$ret['text']}</div>";
$fVars->THREADS += $ret['threads'];
$fVars->REPLIES += $ret['replies'];
if(isset($ret['lastpost_info']))
@ -432,7 +435,7 @@ if (e_QUERY == 'track')
$url = $e107->url->create('forum/thread/view', $row); // configs will be able to map thread_* vars to the url
$trackVars->TRACKPOSTNAME = "<a href='{$url}'>".$tp->toHTML($row['thread_name']).'</a>';
$trackVars->UNTRACK = "<a href='".e_SELF."?untrack.".$row['thread_id']."'>".LAN_392."</a>";
$trackVars->UNTRACK = "<a href='".e_SELF."?untrack.".$row['thread_id']."'>".LAN_FORUM_0070."</a>";
$forum_trackstring .= $tp->simpleParse($FORUM_TRACK_MAIN, $trackVars);
}
}
@ -473,7 +476,7 @@ if (e_QUERY == 'new')
if (!$newThreadList)
{
$nVars->NEWSPOSTNAME = LAN_198;
$nVars->NEWSPOSTNAME = LAN_FORUM_0029;
$forum_newstring = $tp->simpleParse($FORUM_NEWPOSTS_MAIN, $nVars);
}
@ -527,9 +530,9 @@ function forum_rules($action = 'check')
}
else
{
$rules_text = FORLAN_441;
$rules_text = LAN_FORUM_0072;
}
e107::getRender()->tablerender(LAN_433, "<div style='text-align:center'>{$rules_text}</div>", array('forum', 'forum_rules'));
e107::getRender()->tablerender(LAN_FORUM_0071, "<div style='text-align:center'>{$rules_text}</div>", array('forum', 'forum_rules'));
}
?>

View File

@ -10,6 +10,8 @@
*
*/
// TODO LAN
/* Forum Header File */
if (!defined('e107_INIT')) { exit; }
@ -1556,7 +1558,7 @@ class e107forum
$FORUM_CRUMB['sitename']['value'] = str_replace($search, $replace, $FORUM_CRUMB['sitename']['value']);
$search = array('{FORUMS_TITLE}', '{FORUMS_HREF}');
$replace = array(LAN_01, e107::getUrl()->create('forum/forum/main'));
$replace = array(LAN_FORUM_0001, e107::getUrl()->create('forum/forum/main'));
$FORUM_CRUMB['forums']['value'] = str_replace($search, $replace, $FORUM_CRUMB['forums']['value']);
$search = '{PARENT_TITLE}';
@ -1591,7 +1593,7 @@ class e107forum
else
{
$dfltsep = ' :: ';
$BREADCRUMB = "<a class='forumlink' href='".e_BASE."index.php'>".SITENAME."</a>".$dfltsep."<a class='forumlink' href='".e_PLUGIN."forum/forum.php'>".LAN_01."</a>".$dfltsep;
$BREADCRUMB = "<a class='forumlink' href='".e_BASE."index.php'>".SITENAME."</a>".$dfltsep."<a class='forumlink' href='".e_PLUGIN."forum/forum.php'>".LAN_FORUM_0001."</a>".$dfltsep;
if($forumInfo['sub_parent'])
{
$forum_sub_parent = (substr($forumInfo['sub_parent'], 0, 1) == '*' ? substr($forumInfo['sub_parent'], 1) : $forumInfo['sub_parent']);

View File

@ -15,6 +15,7 @@ define('NAVIGATION_ACTIVE','forum');
$e107 = e107::getInstance();
$tp = e107::getParser();
$ns = e107::getRender();
$mes = e107::getMessage();
if (!$e107->isInstalled('forum'))
{
@ -73,12 +74,13 @@ switch($action)
if (!$forum->checkPerm($forumId, 'post'))
{
require_once(HEADERF);
$ns->tablerender(LAN_20, "<div style='text-align:center'>".LAN_399.'</div>');
$mes->addError(LAN_FORUM_3001);
$ns->tablerender(LAN_FORUM_1001, $mes->render());
require_once(FOOTERF);
exit;
}
define('MODERATOR', USER && $forum->isModerator(USERID));
require_once(e_HANDLER.'ren_help.php');
require_once(e_HANDLER.'ren_help.php'); // FIXME deprecated
//e107::getScBatch('view', 'forum'); //XXX FIXME Conflicting shortcode names. Find a solution without renaming them.
$sc = e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', vartrue($threadInfo));
@ -91,13 +93,14 @@ $e107 = e107::getInstance();
if ($action != 'nt' && !$threadInfo['thread_active'] && !MODERATOR)
{
require_once(HEADERF);
$ns->tablerender(LAN_20, "<div style='text-align:center'>".LAN_397.'</div>');
$mes->addError(LAN_FORUM_3002);
$ns->tablerender(LAN_FORUM_1001, $mes->render());
require_once(FOOTERF);
exit;
}
$forumInfo['forum_name'] = $tp->toHTML($forumInfo['forum_name'], true);
define('e_PAGETITLE', ($action == 'rp' ? LAN_02.$threadInfo['thread_name'] : LAN_03).' / '.$forumInfo['forum_name'].' / '.LAN_01);
define('e_PAGETITLE', ($action == 'rp' ? LAN_FORUM_3003.": ".$threadInfo['thread_name'] : LAN_FORUM_1018).' / '.$forumInfo['forum_name'].' / '.LAN_FORUM_1001);
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -110,7 +113,7 @@ if($forum->prefs->get('attach'))
$max_upload_size = set_max_size($a_filetypes, $max_upload_size);
$max_upload_size = $e107->parseMemorySize($max_upload_size, 0);
$a_filetypes = array_keys($a_filetypes);
$allowed_filetypes = implode(' | ', $a_filetypes);
$allowed_filetypes = implode(', ', $a_filetypes);
}
if (isset($_POST['submitpoll']))
@ -145,7 +148,7 @@ if (isset($_POST['fpreview']))
}
else
{
$poster = ($_POST['anonname']) ? $_POST['anonname'] : LAN_311;
$poster = ($_POST['anonname']) ? $_POST['anonname'] : LAN_FORUM_3004;
}
$postdate = $gen->convert_date(time(), "forum");
$tsubject = $tp->post_toHTML($_POST['subject'], true);
@ -176,7 +179,7 @@ if (isset($_POST['fpreview']))
{
$ns->tablerender($_POST['poll_title'], $poll_text);
}
$ns->tablerender(LAN_323, $text);
$ns->tablerender(LAN_FORUM_3005, $text);
$anonname = $tp->post_toHTML($_POST['anonname'], FALSE);
$post = $tp->post_toForm($_POST['post']);
@ -313,7 +316,7 @@ if (isset($_POST['newthread']) || isset($_POST['reply']))
if($postResult === -1) //Duplicate post
{
require_once(HEADERF);
$ns->tablerender('', LAN_FORUM_2);
$ns->tablerender('', LAN_FORUM_3007);
require_once(FOOTERF);
exit;
}
@ -374,14 +377,15 @@ if (isset($_POST['update_thread']))
// exit;
if (!$_POST['subject'] || !$_POST['post'])
{
$error = "<div style='text-align:center'>".LAN_27."</div>";
$error = "<div style='text-align:center'>".LAN_FORUM_3007."</div>"; // TODO $mes
}
else
{
if (!isAuthor())
{
require_once(HEADERF);
$ns->tablerender(LAN_95, "<div style='text-align:center'>".LAN_96.'</div>');
$mes->addError(LAN_FORUM_3009);
$ns->tablerender(LAN_FORUM_3008, $mes->render());
require_once(FOOTERF);
exit;
}
@ -418,14 +422,15 @@ if (isset($_POST['update_reply']))
{
if (!$_POST['post'])
{
$error = "<div style='text-align:center'>".LAN_27.'</div>';
$error = "<div style='text-align:center'>".LAN_FORUM_3007.'</div>'; // TODO $mes
}
else
{
if (!isAuthor())
{
require_once(HEADERF);
$ns->tablerender(LAN_95, "<div style='text-align:center'>".LAN_96.'</div>');
$mes->addError(LAN_FORUM_3009);
$ns->tablerender(LAN_FORUM_3008, $mes->render());
require_once(FOOTERF);
exit;
}
@ -445,17 +450,17 @@ require_once(HEADERF);
if (vartrue($error))
{
$ns->tablerender(LAN_20, $error);
$ns->tablerender(EMESSLAN_TITLE_ERROR, $error); // LAN?
}
if ($action == 'edit' || $action == 'quote')
{
if ($action == 'edit')
{
if (!isAuthor())
{
$ns->tablerender(LAN_95, "<div style='text-align:center'>".LAN_96.'</div>');
$mes->addError(LAN_FORUM_3009);
$ns->tablerender(LAN_FORUM_3008, $mes->render());
require_once(FOOTERF);
exit;
}
@ -544,12 +549,12 @@ function forumjump()
{
global $forum;
$jumpList = $forum->forumGetAllowed('view');
$text = "<form method='post' action='".e_SELF."'><p>".LAN_401.": <select name='forumjump' class='tbox'>";
$text = "<form method='post' action='".e_SELF."'><p>".LAN_FORUM_1017.": <select name='forumjump' class='tbox'>";
foreach($jumpList as $key => $val)
{
$text .= "\n<option value='".$key."'>".$val."</option>";
}
$text .= "</select> <input class='btn button' type='submit' name='fjsubmit' value='".LAN_387."' /></p></form>";
$text .= "</select> <input class='btn button' type='submit' name='fjsubmit' value='".LAN_GO."' /></p></form>";
return $text;
}
@ -568,7 +573,7 @@ function process_upload()
if(!is_dir($attachmentDir))
{
mkdir($attachmentDir,0755);
mkdir($attachmentDir, 0755);
}
// $thumbDir = e_PLUGIN.'forum/attachments/thumb/';

View File

@ -37,14 +37,14 @@ $total_topics = $sql->count('forum_thread');
$total_replies = $total_posts - $total_topics;
$total_views = 0;
$query = 'SELECT sum(thread_views) AS total FROM `#forum_thread` ';
if ($sql -> db_Select_gen($query))
if ($sql->gen($query))
{
$row = $sql->db_Fetch();
$row = $sql->fetch();
$total_views = $row['total'];
}
$firstpost = $sql -> db_Select('forum_post', 'post_datestamp', 'post_datestamp > 0 ORDER BY post_datestamp ASC LIMIT 0,1', 'default');
$fp = $sql->db_Fetch();
$firstpost = $sql->select('forum_post', 'post_datestamp', 'post_datestamp > 0 ORDER BY post_datestamp ASC LIMIT 0,1', 'default');
$fp = $sql->fetch();
$open_ds = $fp['post_datestamp'];
$open_date = $gen->convert_date($open_ds, 'long');
@ -74,7 +74,7 @@ WHERE ft.thread_active > 0
AND f.forum_class IN (".USERCLASS_LIST.")
ORDER BY ft.thread_total_replies DESC LIMIT 0,10";
$sql->gen($query);
$most_activeArray = $sql -> db_getList();
$most_activeArray = $sql->db_getList();
$query = "
SELECT ft.*, f.forum_class, u.user_name, u.user_id FROM #forum_thread as ft
@ -84,7 +84,7 @@ WHERE f.forum_class IN (".USERCLASS_LIST.")
ORDER BY ft.thread_views DESC LIMIT 0,10";
$sql->gen($query);
$most_viewedArray = $sql -> db_getList();
$most_viewedArray = $sql->db_getList();
/*$sql->db_Select("user", "user_id, user_name, user_forums", "ORDER BY user_forums DESC LIMIT 0, 10", "no_where");
$posters = $sql -> db_getList();
@ -102,7 +102,7 @@ LEFT JOIN #user AS u ON fp.post_user = u.user_id
GROUP BY fp.post_user
ORDER BY post_count DESC LIMIT 0,10";
$sql->gen($query);
$top_repliers_data = $sql -> db_getList('ALL', false, false, 'user_id');
$top_repliers_data = $sql->db_getList('ALL', false, false, 'user_id');
// build top posters meanwhile
$top_posters = array();
@ -122,7 +122,7 @@ LEFT JOIN #user AS u ON ft.thread_user = u.user_id
WHERE u.user_id IN ({$ids})
GROUP BY ft.thread_user";
$sql->gen($query);
$top_repliers_data_c = $sql -> db_getList('ALL', false, false, 'user_id');
$top_repliers_data_c = $sql->db_getList('ALL', false, false, 'user_id');
$top_repliers = array();
foreach($top_repliers_data as $uid => $poster)
@ -150,7 +150,7 @@ LEFT JOIN #user AS u ON ft.thread_user = u.user_id
GROUP BY ft.thread_user
ORDER BY thread_count DESC LIMIT 0,10";
$sql->gen($query);
$top_topic_starters_data = $sql -> db_getList();
$top_topic_starters_data = $sql->db_getList();
$top_topic_starters = array();
foreach($top_topic_starters_data as $poster)
{
@ -410,9 +410,7 @@ $text .= '</table>
</div>
';
$ns -> tablerender(FSLAN_23, $text);
require_once(FOOTERF);
?>

View File

@ -21,6 +21,7 @@ if(!USER)
header("location:".e_BASE.$PLUGINS_DIRECTORY."forum/forum.php");
exit;
}
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_uploads.php');
if(is_array($_POST['delete']))
@ -53,7 +54,7 @@ if($msg)
$fi = new e_file;
$mask = ".*_".USERID."_FT.*";
$fileList = $fi->get_files(e_UPLOAD, $mask);
if($sql->db_Select('forum_thread','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'"))
if($sql->db_Select('forum_thread','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'")) // FIXME new forum db structure
{
$threadList = $sql->db_getList();
}

View File

@ -2,15 +2,12 @@
/*
* e107 website system
*
* Copyright (C) 2008-2011 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* View specific forums
*
* $URL$
* $Id$
*
*/
require_once('../../class2.php');
@ -20,13 +17,10 @@ if (!$e107->isInstalled('forum'))
header('Location: '.SITEURL);
exit;
}
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_viewforum.php');
//include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_viewforum.php'); // now uses English_front.php
define('NAVIGATION_ACTIVE','forum');
if (isset($_POST['fjsubmit']))
{
// TODO - load from DB and find forum_name
@ -52,11 +46,11 @@ $threadFrom = ($page - 1) * $view;
global $forum_info, $FORUM_CRUMB;
$fVars = new e_vars;
$fVars->STARTERTITLE = LAN_54;
$fVars->THREADTITLE = LAN_53;
$fVars->REPLYTITLE = LAN_55;
$fVars->LASTPOSTITLE = LAN_57;
$fVars->VIEWTITLE = LAN_56;
$fVars->STARTERTITLE = LAN_FORUM_1004;
$fVars->THREADTITLE = LAN_FORUM_1003;
$fVars->REPLYTITLE = LAN_FORUM_0003;
$fVars->LASTPOSTITLE = LAN_FORUM_0004;
$fVars->VIEWTITLE = LAN_FORUM_1005;
$forumId = (int)$_REQUEST['id'];
@ -118,7 +112,7 @@ $forumInfo['forum_name'] = $tp->toHTML($forumInfo['forum_name'], true, 'no_hook,
$forumInfo['forum_description'] = $tp->toHTML($forumInfo['forum_description'], true, 'no_hook');
$_forum_name = (substr($forumInfo['forum_name'], 0, 1) == '*' ? substr($forumInfo['forum_name'], 1) : $forumInfo['forum_name']);
define('e_PAGETITLE', $_forum_name.' / '.LAN_01);
define('e_PAGETITLE', $_forum_name.' / '.LAN_FORUM_1001);
// SEO - meta description (auto)
if(!empty($forumInfo['forum_description']))
@ -217,11 +211,11 @@ if(substr($forum_info['sub_parent'], 0, 1) == '*')
$forum->set_crumb(true, '', $fVars); // set $BREADCRUMB (and $BACKLINK)
$fVars->FORUMTITLE = $forumInfo['forum_name'];
$fVars->MODERATORS = LAN_404.': '.implode(', ', $modArray);
$fVars->MODERATORS = LAN_FORUM_1009.': '.implode(', ', $modArray);
$fVars->BROWSERS = '';
if(varset($pref['track_online']))
{
$fVars->BROWSERS = $users.' '.($users == 1 ? LAN_405 : LAN_406).' ('.$member_users.' '.($member_users == 1 ? LAN_407 : LAN_409).", ".$guest_users." ".($guest_users == 1 ? LAN_408 : LAN_410).')';
$fVars->BROWSERS = $users.' '.($users == 1 ? LAN_FORUM_0059 : LAN_FORUM_0060).' ('.$member_users.' '.($member_users == 1 ? LAN_FORUM_0061 : LAN_FORUM_0062).", ".$guest_users." ".($guest_users == 1 ? LAN_FORUM_0063 : LAN_FORUM_0064).')';
}
@ -229,23 +223,23 @@ $fVars->ICONKEY = "
<table style='width:100%'>
<tr>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_new_small."</td>
<td style='width:10%' class='smallblacktext'>".LAN_79."</td>
<td style='width:10%' class='smallblacktext'>".LAN_FORUM_0039."</td>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_nonew_small."</td>
<td style='width:10%' class='smallblacktext'>".LAN_80."</td>
<td style='width:10%' class='smallblacktext'>".LAN_FORUM_0040."</td>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_sticky_small."</td>
<td style='width:10%' class='smallblacktext'>".LAN_202."</td>
<td style='width:10%' class='smallblacktext'>".LAN_FORUM_1011."</td>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_announce_small."</td>
<td style='width:10%' class='smallblacktext'>".LAN_396."</td>
<td style='width:10%' class='smallblacktext'>".LAN_FORUM_1013."</td>
</tr>
<tr>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_new_popular_small."</td>
<td style='width:2%' class='smallblacktext'>".LAN_79." ".LAN_395."</td>
<td style='width:2%' class='smallblacktext'>".LAN_FORUM_0039." ".LAN_FORUM_1010."</td>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_nonew_popular_small."</td>
<td style='width:10%' class='smallblacktext'>".LAN_80." ".LAN_395."</td>
<td style='width:10%' class='smallblacktext'>".LAN_FORUM_0040." ".LAN_FORUM_1010."</td>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_stickyclosed_small."</td>
<td style='width:10%' class='smallblacktext'>".LAN_203."</td>
<td style='width:10%' class='smallblacktext'>".LAN_FORUM_1012."</td>
<td style='vertical-align:middle; text-align:center; width:2%'>".IMAGE_closed_small."</td>
<td style='width:10%' class='smallblacktext'>".LAN_81."</td>
<td style='width:10%' class='smallblacktext'>".LAN_FORUM_1014."</td>
</tr>
</table>";
@ -253,7 +247,7 @@ $fVars->SEARCH = "
<form method='get' class='form-inline input-append' action='".e_BASE."search.php'>
<p>
<input class='tbox' type='text' name='q' size='20' value='' maxlength='50' />
<button class='btn button' type='submit' name='s' >".LAN_180."</button>
<button class='btn button' type='submit' name='s' >".LAN_SEARCH."</button>
<input type='hidden' name='r' value='0' />
<input type='hidden' name='ref' value='forum' />
</p>
@ -261,11 +255,11 @@ $fVars->SEARCH = "
if($forum->checkPerm($forumId, 'post'))
{
$fVars->PERMS = LAN_204.' - '.LAN_206.' - '.LAN_208;
$fVars->PERMS = LAN_FORUM_0043.' - '.LAN_FORUM_0045.' - '.LAN_FORUM_0047;
}
else
{
$fVars->PERMS = LAN_205.' - '.LAN_207.' - '.LAN_209;
$fVars->PERMS = LAN_FORUM_0044.' - '.LAN_FORUM_0046.' - '.LAN_FORUM_0048;
}
$sticky_threads = 0;
@ -313,7 +307,7 @@ if (count($threadList) )
}
else
{
$forum_view_forum .= "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_411."</b></span></td></tr>";
$forum_view_forum .= "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_FORUM_1006."</b></span></td></tr>";
}
$stuck = true;
}
@ -329,7 +323,7 @@ if (count($threadList) )
}
else
{
$forum_view_forum .= "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_412."</b></span></td></tr>";
$forum_view_forum .= "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_FORUM_1007."</b></span></td></tr>";
}
$unstuck = true;
}
@ -338,11 +332,11 @@ if (count($threadList) )
}
else
{
$forum_view_forum .= "<tr><td class='forumheader' colspan='6'>".LAN_58."</td></tr>";
$forum_view_forum .= "<tr><td class='forumheader' colspan='6'>".LAN_FORUM_1008."</td></tr>";
}
$fVars->FORUMJUMP = forumjump();
$fVars->TOPLINK = "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_02.'</a>';
$fVars->TOPLINK = "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_GOTO.'</a>'; // FIXME - TOPLINK not used anymore?
if($container_only)
{
@ -366,7 +360,7 @@ else
echo "<script type=\"text/javascript\">
function confirm_(thread_id)
{
return confirm(\"".$tp->toJS(LAN_434)."\");
return confirm(\"".$tp->toJS(LAN_FORUM_1019)."\");
}
</script>";
@ -411,8 +405,8 @@ function parse_thread($thread_info)
}
else
{
$tVars->LASTPOST = FORLAN_19;
$tVars->LASTPOSTUSER = FORLAN_19;
$tVars->LASTPOST = LAN_FORUM_1015;
$tVars->LASTPOSTUSER = LAN_FORUM_1015;
}
}
$tVars->LASTPOST .= '<br />'.$lastpost_datestamp;
@ -435,12 +429,12 @@ function parse_thread($thread_info)
if ($thread_info['thread_sticky'] == 1)
{
$tVars->ICON = ($thread_info['thread_active'] ? IMAGE_sticky : IMAGE_stickyclosed);
$tVars->THREADTYPE = '['.LAN_202.']<br />';
$tVars->THREADTYPE = '['.LAN_FORUM_1011.']<br />';
}
elseif($thread_info['thread_sticky'] == 2)
{
$tVars->ICON = IMAGE_announce;
$tVars->THREADTYPE = '['.LAN_396.']<br />';
$tVars->THREADTYPE = '['.LAN_FORUM_1013.']<br />';
}
elseif(!$thread_info['thread_active'])
{
@ -450,7 +444,7 @@ function parse_thread($thread_info)
$thread_name = strip_tags($tp->toHTML($thread_info['thread_name'], false, 'no_hook, emotes_off'));
if(isset($thread_info['thread_options']['poll']))
{
$thread_name = '['.FORLAN_23.'] ' . $thread_name;
$thread_name = '['.LAN_FORUM_1016.'] ' . $thread_name;
}
// if (strtoupper($THREADTYPE) == strtoupper(substr($thread_name, 0, strlen($THREADTYPE))))
// {
@ -509,7 +503,7 @@ function parse_thread($thread_info)
$tVars->PAGES .= "<a href='{$url}'>{$aa}</a>";
}
}
$tVars->PAGES = LAN_316.' [&nbsp;'.$tVars->PAGES.'&nbsp;]';
$tVars->PAGES = LAN_GOTO.' [&nbsp;'.$tVars->PAGES.'&nbsp;]';
}
else
{
@ -551,13 +545,13 @@ function parse_thread($thread_info)
}
else
{
$tVars->POSTER = FORLAN_19;
$tVars->POSTER = LAN_FORUM_1015;
}
}
if (!$tVars->REPLIES)
{
$tVars->REPLIES = LAN_317; // 'None'
$tVars->REPLIES = '0';
$tVars->REPLIESX = "<span class='badge'>0</span>";
$tVars->LASTPOST = ' - ';
$tVars->LASTPOSTDATE = ' - ';
@ -659,12 +653,12 @@ function forumjump()
{
global $forum;
$jumpList = $forum->forumGetAllowed('view');
$text = "<form method='post' action='".e_SELF."'><p>".LAN_403.": <select name='forumjump' class='tbox'>";
$text = "<form method='post' action='".e_SELF."'><p>".LAN_FORUM_1017.": <select name='forumjump' class='tbox'>";
foreach($jumpList as $key => $val)
{
$text .= "\n<option value='".$key."'>".$val."</option>";
}
$text .= "</select> <input class='btn button' type='submit' name='fjsubmit' value='".LAN_03."' /></form>";
$text .= "</select> <input class='btn button' type='submit' name='fjsubmit' value='".LAN_GO."' /></form>";
return $text;
}
@ -732,7 +726,7 @@ function fpages($thread_info, $replies)
$text .= $text ? ' ' : '';
$urlparms['page'] = $aa;
$url = e107::getUrl()->create('forum/thread/view', $urlparms);
$opts[] = "<a class='btn btn-mini' data-toggle='tooltip' title=\"Go to Page $aa\" href='{$url}'>{$aa}</a>";
$opts[] = "<a class='btn btn-mini' data-toggle='tooltip' title=\"Go to Page $aa\" href='{$url}'>{$aa}</a>"; //FIXME LAN_GOPAGE syntax?
}
$text .= ' ... ';
for($a = $pages-3; $a <= $pages-1; $a++)
@ -741,7 +735,7 @@ function fpages($thread_info, $replies)
$text .= $text ? ' ' : '';
$urlparms['page'] = $aa;
$url = e107::getUrl()->create('forum/thread/view', $urlparms);
$opts[] = "<a class='btn btn-mini' data-toggle='tooltip' title=\"Go to Page $aa\" href='{$url}'>{$aa}</a>";
$opts[] = "<a class='btn btn-mini' data-toggle='tooltip' title=\"Go to Page $aa\" href='{$url}'>{$aa}</a>"; //FIXME LAN_GOPAGE syntax?
}
}
else
@ -752,7 +746,7 @@ function fpages($thread_info, $replies)
$text .= $text ? ' ' : '';
$urlparms['page'] = $aa;
$url = e107::getUrl()->create('forum/thread/view', $urlparms);
$opts[] = "<a class='btn btn-mini' data-toggle='tooltip' title=\"Go to Page $aa\" href='{$url}'>{$aa}</a>";
$opts[] = "<a class='btn btn-mini' data-toggle='tooltip' title=\"Go to Page $aa\" href='{$url}'>{$aa}</a>"; //FIXME LAN_GOPAGE syntax?
}
}
@ -782,7 +776,7 @@ function newthreadjump($url)
global $forum;
$jumpList = $forum->forumGetAllowed('view');
$text = '<div class="btn-group">
<a href="'.$url.'" class="btn btn-primary">New Thread</a>
<a href="'.$url.'" class="btn btn-primary">'.LAN_FORUM_1018.'</a>
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
@ -791,7 +785,7 @@ function newthreadjump($url)
foreach($jumpList as $key => $val)
{
$text .= '<li><a href="'.$key.'">Go to: '.$val.'</a></li>';
$text .= '<li><a href="'.$key.'">'.LAN_FORUM_1017.': '.$val.'</a></li>';
}
$text .= '

View File

@ -38,8 +38,6 @@ if (!e_QUERY)
// include_lan(e_PLUGIN . 'forum/languages/'.e_LANGUAGE.'/lan_forum_viewtopic.php');
include_once (e_PLUGIN . 'forum/forum_class.php');
@ -108,7 +106,7 @@ if (USER && (USERID != $thread->threadInfo['thread_user'] || $thread->threadInfo
$forum->threadIncview($thread->threadInfo['thread_id']);
}
define('e_PAGETITLE', strip_tags($tp->toHTML($thread->threadInfo['thread_name'], true, 'no_hook, emotes_off')).' / '.$tp->toHTML($thread->threadInfo['forum_name'], true, 'no_hook, emotes_off').' / '.LAN_01);
define('e_PAGETITLE', strip_tags($tp->toHTML($thread->threadInfo['thread_name'], true, 'no_hook, emotes_off')).' / '.$tp->toHTML($thread->threadInfo['forum_name'], true, 'no_hook, emotes_off').' / '.LAN_FORUM_1001);
$forum->modArray = $forum->forumGetMods($thread->threadInfo['forum_moderators']);
define('MODERATOR', (USER && $forum->isModerator(USERID)));
@ -119,7 +117,7 @@ e107::getScBatch('view', 'forum')->setScVar('forum', $forum);
if (MODERATOR && isset($_POST['mod']))
{
require_once (e_PLUGIN . 'forum/forum_mod.php');
require_once(e_PLUGIN."forum/forum_mod.php");
$thread->message = forum_thread_moderate($_POST);
$thread->threadInfo = $forum->threadGet($thread->threadId);
}
@ -200,9 +198,9 @@ $forum->set_crumb(true, '', $tVars); // Set $BREADCRUMB (and BACKLINK)
//$tVars->BACKLINK = $tVars->BREADCRUMB;
//$tVars->FORUM_CRUMB = $crumbs['forum_crumb'];
$tVars->THREADNAME = $tp->toHTML($thread->threadInfo['thread_name'], true, 'no_hook, emotes_off');
$tVars->NEXTPREV = "<a class='btn btn-small' href='" . $e107->url->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>&laquo; " . LAN_389 . "</a>";
// $tVars->NEXTPREV .= ' | ';
$tVars->NEXTPREV .= "<a class='btn btn-small' href='" . $e107->url->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>" . LAN_390 . " &raquo;</a>";
$tVars->NEXTPREV = "<a class='btn btn-small' href='" . $e107->url->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>&laquo; " . LAN_FORUM_2001 . "</a>";
$tVars->NEXTPREV .= ' | '; // enabled to make it look better on v1 templates
$tVars->NEXTPREV .= "<a class='btn btn-small' href='" . $e107->url->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>" . LAN_FORUM_2002 . " &raquo;</a>";
if ($forum->prefs->get('track') && USER)
{
@ -230,9 +228,9 @@ if ($forum->prefs->get('track') && USER)
}
$tVars->MODERATORS = LAN_321 . implode(', ', $forum->modArray);
$tVars->MODERATORS = LAN_FORUM_2003.": ". implode(', ', $forum->modArray);
$tVars->THREADSTATUS = (!$thread->threadInfo['thread_active'] ? LAN_66 : '');
$tVars->THREADSTATUS = (!$thread->threadInfo['thread_active'] ? LAN_FORUM_2004 : '');
if ($thread->pages > 1)
{
@ -268,15 +266,15 @@ function forumbuttons($thread)
if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread->threadInfo['thread_active'])
{
$replyUrl = "<a class='btn btn-primary' href='" . e107::getUrl()->create('forum/thread/reply', array('id' => $thread->threadId)) . "'>Post a Reply</a>";
$replyUrl = "<a class='btn btn-primary' href='".e107::getUrl()->create('forum/thread/reply', array('id' => $thread->threadId))."'>".LAN_FORUM_2006."</a>";
}
if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'thread'))
{
$options[] = " <a href='" . e107::getUrl()->create('forum/thread/new', array('id' => $thread->threadInfo['thread_forum_id'])) . "'>Create New Thread</a>";
$options[] = " <a href='".e107::getUrl()->create('forum/thread/new', array('id' => $thread->threadInfo['thread_forum_id']))."'>".LAN_FORUM_2005."</a>";
}
$options[] = "<a href='" . e107::getUrl()->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>Go to " . LAN_389 . "</a>"; //FIXME LAN
$options[] = "<a href='" . e107::getUrl()->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>Go to " . LAN_390 . "</a>"; //FIXME LAN
$options[] = "<a href='" . e107::getUrl()->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>".LAN_FORUM_1017." ".LAN_FORUM_2001."</a>";
$options[] = "<a href='" . e107::getUrl()->create('forum/thread/prev', array('id' => $thread->threadId)) . "'>".LAN_FORUM_1017." ".LAN_FORUM_2002."</a>";
@ -300,7 +298,7 @@ function forumbuttons($thread)
foreach($jumpList as $key=>$val)
{
$text .= '<li><a href ="'.$key.'">Go to '.$val.'</a></li>';
$text .= '<li><a href ="'.$key.'">'.LAN_FORUM_1017." ".$val.'</a></li>';
}
$text .= '
@ -341,7 +339,7 @@ foreach ($postList as $postInfo)
//TODO: Look into fixing this, to limit to a single query per pageload
$threadId = $thread->threadInfo['thread_id'];
$e_hide_query = "SELECT post_id FROM `#forum_post` WHERE (`post_thread` = {$threadId} AND post_user= " . USERID . ' LIMIT 1';
$e_hide_hidden = FORLAN_HIDDEN;
$e_hide_hidden = LAN_FORUM_2008;
$e_hide_allowed = USER;
if ($tnum > 1)
@ -381,14 +379,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread
$tVars->QUICKREPLY = "
<form action='" . $e107->url->create('forum/thread/reply', array('id' => $thread->threadId)) . "' method='post'>
<textarea cols='80' placeholder=\"Post a quick reply\" rows='4' id='forum-quickreply-text' class='tbox input-xxlarge' name='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea>
<textarea cols='80' placeholder='".LAN_FORUM_2007."' rows='4' id='forum-quickreply-text' class='tbox input-xxlarge' name='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea>
<div class='center'>
<input type='submit' data-forum-insert='".$ajaxInsert."' data-forum-post='".$thread->threadInfo['thread_forum_id']."' data-forum-thread='".$threadId."' data-forum-action='quickreply' name='reply' value='" . LAN_395 . "' class='btn btn-success button' />
<input type='submit' data-forum-insert='".$ajaxInsert."' data-forum-post='".$thread->threadInfo['thread_forum_id']."' data-forum-thread='".$threadId."' data-forum-action='quickreply' name='reply' value='".LAN_FORUM_2006. "' class='btn btn-success button' />
<input type='hidden' name='thread_id' value='$thread_parent' />
</div>
</form>";
// Preview should be reserved for the full 'Post reply' page. <input type='submit' name='fpreview' value='" . LAN_394 . "' class='btn button' /> &nbsp;
// Preview should be reserved for the full 'Post reply' page. <input type='submit' name='fpreview' value='" . Preview . "' class='btn button' /> &nbsp;
}
else
{
@ -414,7 +412,7 @@ require_once (HEADERF);
if ($forum->prefs->get('enclose'))
{
$ns->tablerender(LAN_01, $forumstring, $mes->render(). array('forum_viewtopic', 'main'));
$ns->tablerender(LAN_FORUM_1001, $forumstring, $mes->render(). array('forum_viewtopic', 'main'));
}
else
{
@ -426,9 +424,9 @@ else
echo "<script type=\"text/javascript\">
function confirm_(mode, forum_id, thread_id, thread) {
if (mode == 'Thread') {
return confirm(\"" . $tp->toJS(LAN_409) . "\");
return confirm(\"" . $tp->toJS(LAN_FORUM_2009) . "\");
} else {
return confirm(\"" . $tp->toJS(LAN_410) . " [ " . $tp->toJS(LAN_411) . "\" + thread + \" ]\");
return confirm(\"" . $tp->toJS(LAN_FORUM_2010) . " [ " . $tp->toJS(LAN_FORUM_0074) . " \" + thread + \" ]\");
}
}
</script>";
@ -479,12 +477,12 @@ function forumjump()
{
global $forum;
$jumpList = $forum->forumGetAllowed();
$text = "<form method='post' action='" . e_SELF . "'><p>" . LAN_65 . ": <select name='forumjump' class='tbox'>";
$text = "<form method='post' action='".e_SELF."'><p>".LAN_FORUM_1017.": <select name='forumjump' class='tbox'>";
foreach ($jumpList as $key => $val)
{
$text .= "\n<option value='" . $key . "'>" . $val . "</option>";
}
$text .= "</select> <input class='btn button' type='submit' name='fjsubmit' value='" . LAN_03 . "' /></p></form>";
$text .= "</select> <input class='btn button' type='submit' name='fjsubmit' value='" . LAN_GO . "' /></p></form>";
return $text;
}
@ -699,7 +697,7 @@ class e107ForumThread
header("location: {$url}");
exit;
}
$this->message = LAN_405;
$this->message = LAN_FORUM_2013;
break;
case 'prev': // FIXME - nextprev thread detection not working
@ -710,7 +708,7 @@ class e107ForumThread
header("location: {$url}");
exit;
}
$this->message = LAN_404;
$this->message = LAN_FORUM_2012;
break;
case 'report':
@ -724,51 +722,45 @@ class e107ForumThread
if ($forum->prefs->get('reported_post_email'))
{
require_once (e_HANDLER . 'mail.php');
$report = LAN_422 . SITENAME . " : " . (substr(SITEURL, -1) == "/" ? SITEURL : SITEURL . "/") . $e107->getFolder('plugins') . "forum/forum_viewtopic.php?" . $this->threadId . ".post\n" . LAN_425 . USERNAME . "\n" . $report_add;
$subject = LAN_421 . " " . SITENAME;
$report = LAN_FORUM_2018." ".SITENAME." : ".(substr(SITEURL, -1) == "/" ? SITEURL : SITEURL."/") . $e107->getFolder('plugins') . "forum/forum_viewtopic.php?" . $this->threadId . ".post\n
".LAN_FORUM_2019.": ".USERNAME. "\n" . $report_add;
$subject = LAN_FORUM_2020." ". SITENAME;
sendemail(SITEADMINEMAIL, $subject, $report);
}
// no reference of 'head' $threadInfo['head']['thread_name']
$sql->insert('generic', "0, 'reported_post', " . time() . ", '" . USERID . "', '{$this->threadInfo['thread_name']}', " . intval($this->threadId) . ", '{$report_add}'");
define('e_PAGETITLE', LAN_01 . " / " . LAN_428);
define('e_PAGETITLE', LAN_FORUM_1001 . " / " . LAN_FORUM_2021);
$url = $e107->url->create('forum/thread/post', array('id' => $postId, 'name' => $postInfo['thread_name'], 'thread' => $threadId)); // both post info and thread info contain thread name
$text = LAN_424 . "<br /><br /><a href='{$url}'>" . LAN_429 . '</a>';
return $ns->tablerender(LAN_414, $text, array('forum_viewtopic', 'report'), true);
$text = LAN_FORUM_2021 . "<br /><br /><a href='{$url}'>".LAN_FORUM_2022.'</a>';
return $ns->tablerender(LAN_FORUM_2023, $text, array('forum_viewtopic', 'report'), true);
}
else
{
$thread_name = e107::getParser()->toHTML($postInfo['thread_name'], true, 'no_hook, emotes_off');
define('e_PAGETITLE', LAN_01 . ' / ' . LAN_426 . ' ' . $thread_name);
define('e_PAGETITLE', LAN_FORUM_1001.' / '.LAN_FORUM_2024.': '.$thread_name);
$url = $e107->url->create('forum/thread/post', array('id' => $postId, 'name' => $postInfo['thread_name'], 'thread' => $threadId));
$actionUrl = $e107->url->create('forum/thread/report', "id={$threadId}&post={$postId}");
$text = "<form action='".$actionUrl."' method='post'>
<table style='width:100%'>
<tr>
<td style='width:50%' >
" . LAN_415 . ': ' . $thread_name . " <a href='".$url."'><span class='smalltext'>" . LAN_420 . " </span>
</a>
</td>
<td style='text-align:center;width:50%'>
</td>
<td style='width:50%'>
".LAN_FORUM_2025.': '.$thread_name." <a href='".$url."'><span class='smalltext'>".LAN_FORUM_2026."</span></a>
</td>
<td style='text-align:center;width:50%'></td>
</tr>
<tr>
<td>" . LAN_417 . "<br />" . LAN_418 . "
</td>
<td>".LAN_FORUM_2027."<br />".str_replace(array('[', ']'), array('<b>', '</b>'), LAN_FORUM_2028)."</td>
</tr>
<tr>
<td style='text-align:center;'>
<textarea cols='40' rows='10' class='tbox' name='report_add'></textarea>
</td>
<td style='text-align:center;'><textarea cols='40' rows='10' class='tbox' name='report_add'></textarea></td>
</tr>
<tr>
<td colspan='2' style='text-align:center;'><br />
<input class='btn button' type='submit' name='report_thread' value='" . LAN_419 . "' />
</td>
<td colspan='2' style='text-align:center;'><br /><input class='btn button' type='submit' name='report_thread' value='".LAN_FORUM_2029."' /></td>
</tr>
</table>";
return e107::getRender()->tablerender(LAN_414, $text, array('forum_viewtopic', 'report2'), true);
return e107::getRender()->tablerender(LAN_FORUM_2023, $text, array('forum_viewtopic', 'report2'), true);
}
// require_once (FOOTERF);
exit;
break;

View File

@ -2,14 +2,10 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $URL$
* $Id$
*/
header("location: forum.php");

View File

@ -1,19 +1,263 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/languages/English/lan_forum.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Forum plugin - frontend language file
*
*/
define("e_PAGETITLE", "Forum");
// MAJOR REWRITE IN PROGRESS BY MOC, DO NOT EDIT THIS FILE UNTIL THIS MESSAGE HAS BEEN REMOVED PLEASE!
/*
Even though all the forum LAN's are shared accross the entire plugin, here's some general direction:
- 0xxx => forum.php
- 1xxx => forum_viewforum.php
- 2xxx => forum_viewtopic.php
- 3xxx => forum_post.php
This is done to offer flexibility when changing or adding in new LAN defines.
vf, vt, etc. in the comments refer to the LAN defined in the previously separate language files:
vf = viewforum, vt = viewtopic, p = post, etc.
*/
define("e_PAGETITLE", "Forum");
// forum.php (forum_template)
define("LAN_FORUM_0001", "Forum"); // LAN_46
define("LAN_FORUM_0002", "Topics"); // LAN_47 / FORLAN_21
define("LAN_FORUM_0003", "Replies"); // LAN_48 / LAN_55
define("LAN_FORUM_0004", "Last Post"); // LAN_49 / FORLAN_22 / LAN_57
define("LAN_FORUM_0005", "This forum is restricted to administrators only"); // LAN_406
define("LAN_FORUM_0006", "This forum is restricted to members only"); // LAN_407
define("LAN_FORUM_0007", "This is a read-only forum"); // LAN_408
define("LAN_FORUM_0008", "This is a class restricted forum"); // LAN_409
define("LAN_FORUM_0009", "Information"); // LAN_191
define("LAN_FORUM_0010", "Top Posters"); // LAN_429
define("LAN_FORUM_0011", "Most Active Topics"); // LAN_430
define("LAN_FORUM_0012", "My Posts"); // LAN_431
define("LAN_FORUM_0013", "My Settings"); // LAN_432
define("LAN_FORUM_0014", "My Profile"); // LAN_435
define("LAN_FORUM_0015", "My Uploads"); // FORLAN_442
define("LAN_FORUM_0016", "Forum Rules"); // LAN_433
define("LAN_FORUM_0017", "View forum statistics"); // LAN_441
define("LAN_FORUM_0018", "Welcome"); // LAN_30
define("LAN_FORUM_0019", "There are no new posts"); // LAN_31
define("LAN_FORUM_0020", "There is one new post "); // LAN_32
define("LAN_FORUM_0021", "There are"); // LAN_33
define("LAN_FORUM_0022", "new posts"); // LAN_34
define("LAN_FORUM_0023", "since your last visit."); // LAN_35
define("LAN_FORUM_0024", "You last visited at "); // LAN_36
define("LAN_FORUM_0025", "It is now"); // LAN_37
//define("LAN_FORUM_0026", ", all times are "); // LAN_38
define("LAN_FORUM_0027", "You have read"); // LAN_196
define("LAN_FORUM_0028", "of these posts."); // LAN_197
define("LAN_FORUM_0029", "All new posts have been read."); // LAN_198
define("LAN_FORUM_0030", "List tracked topics"); // LAN_393
define("LAN_FORUM_0031", "The users of this forum have made a total of [x] posts."); // LAN_192 and LAN_404
define("LAN_FORUM_0032", "topic"); // LAN_411
define("LAN_FORUM_0033", "topics"); // LAN_413
define("LAN_FORUM_0034", "reply"); // LAN_412
define("LAN_FORUM_0035", "replies"); // LAN_414
define("LAN_FORUM_0036", "Who's Online"); // LAN_426
define("LAN_FORUM_0037", "View detailed list"); // LAN_427
define("LAN_FORUM_0038", "(Will open in a new window)"); // LAN_436
define("LAN_FORUM_0039", "New posts"); // LAN_79 // LAN_79 (vf)
define("LAN_FORUM_0040", "No new posts"); // LAN_80 / LAN_80 (vf)
define("LAN_FORUM_0041", "Closed forum"); // LAN_394
//define("LAN_FORUM_0042", "Search"); /// LAN_180 => Generic term, moved to e107_languages/English.php LAN_SEARCH
define("LAN_FORUM_0043", "You can start new topics"); // LAN_204 // FIXME "can / cannot" in bold? 0043-0048
define("LAN_FORUM_0044", "You cannot start new topics"); // LAN_205
define("LAN_FORUM_0045", "You can post replies"); // LAN_206
define("LAN_FORUM_0046", "You cannot post replies"); // LAN_207
define("LAN_FORUM_0047", "You can edit your posts"); // LAN_208
define("LAN_FORUM_0048", "You cannot edit your posts"); // LAN_209
// FIXME LAN - check if this section (0049 - 0055) could use some LAN optimization
define("LAN_FORUM_0049", "Welcome guest"); // LAN_410
define("LAN_FORUM_0050", "These forums can be used by non-registered users, but please be aware that your IP address will be logged if you make a post.<br />To access the full features of this forum you will need to"); // LAN_44 // FIXME <br />
define("LAN_FORUM_0051", "register"); // LAN_437
define("LAN_FORUM_0052", "and login."); // LAN_438
define("LAN_FORUM_0053", "These forums can only be posted to by registered and logged in members, please click"); // LAN_45
define("LAN_FORUM_0054", "here"); // LAN_438
define("LAN_FORUM_0055", "to go to the registration page."); // LAN_440
define("LAN_FORUM_0056", "Restricted Access"); // LAN_405
define("LAN_FORUM_0057", "Mark all posts as read"); // LAN_199
define("LAN_FORUM_0058", "Show new posts"); // LAN_421
// FIXME LAN - check if this section (0059 - 0064) could use some LAN optimization
define("LAN_FORUM_0059", "user is browsing the forums at the moment"); // LAN_415 / LAN_405 (vf)
define("LAN_FORUM_0060", "users are browsing the forums at the moment"); //LAN_416 / LAN_406 (vf)
define("LAN_FORUM_0061", "member"); // LAN_417 / LAN_407 (vf)
define("LAN_FORUM_0062", "members"); // LAN_419 / LAN_409 (vf)
define("LAN_FORUM_0063", "guest"); // LAN_418 / LAN_408 (vf)
define("LAN_FORUM_0064", "guests"); // LAN_420 / LAN_410 (vf)
define("LAN_FORUM_0065", "Newest member:"); // LAN_41
define("LAN_FORUM_0066", "Registered members:"); // LAN_42
define("LAN_FORUM_0067", "No forums yet, please check back soon."); // LAN_51
define("LAN_FORUM_0068", "No forums in this section yet, please check back soon."); // LAN_52
define('LAN_FORUM_0069', 'Sub-forums'); // FORLAN_444
define("LAN_FORUM_0070", "Cancel Topic Tracking"); // LAN_392
define("LAN_FORUM_0071", "Forum Rules"); // LAN_433
define("LAN_FORUM_0072", "No rules defined."); // FORLAN_441
define("LAN_FORUM_0073", "Tracked topics"); // LAN_397
define("LAN_FORUM_0074", "Posted by"); // LAN_423
define("LAN_FORUM_0075", "New topics"); // LAN_424
// starting at LAN_FORUM_1xxx => forum_viewforum.php
define("LAN_FORUM_1001", "Forums"); // LAN_01
define("LAN_FORUM_1002", "Sub-forum"); // FORLAN_20
define("LAN_FORUM_1003", "Topic"); // LAN_55
define("LAN_FORUM_1004", "Starter"); // LAN_54
define("LAN_FORUM_1005", "Views"); // LAN_56
define("LAN_FORUM_1006", "Important Topics"); // LAN_411 (vf)
define("LAN_FORUM_1007", "Forum Topics"); // LAN_412 (vf)
define("LAN_FORUM_1008", "There are no topics in this forum yet."); // LAN_58
define("LAN_FORUM_1009", "This forum is moderated by"); // LAN_404
define("LAN_FORUM_1010", "[popular]"); // LAN_395 (vf)
define("LAN_FORUM_1011", "Sticky"); // LAN_202
define("LAN_FORUM_1012", "Sticky/Closed"); // LAN_203
define("LAN_FORUM_1013", "Announcement"); // LAN_396
define("LAN_FORUM_1014", "Closed thread"); // LAN_81
define("LAN_FORUM_1015", "[user deleted]"); // FORLAN_19 (vf)
define("LAN_FORUM_1016", "Poll"); // FORLAN_23
define("LAN_FORUM_1017", "Go to"); // LAN_401 (p?)
define("LAN_FORUM_1018", "New topic");
define("LAN_FORUM_1019", "Are you sure?"); // new
// starting at LAN_FORUM_2xxx => forum_viewtopic.php
define("LAN_FORUM_2001", "Previous topic"); // LAN_389
define("LAN_FORUM_2002", "Next topic"); // LAN_390
define("LAN_FORUM_2003", "Moderator(s)"); // LAN_321
define("LAN_FORUM_2004", "This topic is now closed"); // LAN_66
define("LAN_FORUM_2005", "Create a new topic"); // new
define("LAN_FORUM_2006", "Post a reply"); // new
define("LAN_FORUM_2007", "Post a quick reply"); // new
define("LAN_FORUM_2008", "HIDDEN - LOGIN AND REPLY TO REVEAL"); // FORLAN_HIDDEN - used in [hide] bbcode?
define("LAN_FORUM_2009", "Are you sure you want to delete this topic and any replies?"); // LAN_409
define("LAN_FORUM_2010", "Are you sure you want to delete this reply?"); // LAN_410
//define("LAN_FORUM_2011", "posted by"); // LAN_410 // LAN_FORUM_0074
define("LAN_FORUM_2012", "No previous topic"); // LAN_404 (vt)
define("LAN_FORUM_2013", "No next topic"); // LAN_405 (vt)
define("LAN_FORUM_2014", "Author"); // LAN_402 (vt)
define("LAN_FORUM_2015", "Post"); // LAN_403 (vt)
define("LAN_FORUM_2016", "Edited"); // LAN_29
define("LAN_FORUM_2017", "by"); // FORLAN_BY
define("LAN_FORUM_2018", "This post has been reported from site"); // LAN_422 (vt)
define("LAN_FORUM_2019", "Message from"); // LAN_425 (vt)
define("LAN_FORUM_2020", "Forum topic report from"); // LAN_421 (vt)
define("LAN_FORUM_2021", "Post has been reported"); // LAN_428
define("LAN_FORUM_2022", "Click here to return to the forum"); // LAN_429
define("LAN_FORUM_2023", "Report this topic to a moderator"); // LAN_414 (vt)
define("LAN_FORUM_2024", "Reporting post in topic"); // LAN_426
define("LAN_FORUM_2025", "Topic title"); // LAN_415
define("LAN_FORUM_2026", "Click to view post"); // LAN_420
define("LAN_FORUM_2027", "The moderator(s) will be made aware of this topic. You may post a message explaining what you found to be objectionable."); // LAN_417
define("LAN_FORUM_2028", "[Do not] use this form to contact the admin for any other reason."); // LAN_418 - [ and ] are replaced by <b> </b>
define("LAN_FORUM_2029", "Send Report"); // LAN_419
// shortcodes/bach/view_shortcodes.php
define("LAN_FORUM_2030", "Back to top"); // LAN_10
define("LAN_FORUM_2031", "Joined"); // LAN_06
define("LAN_FORUM_2032", "Posts"); // LAN_67
define("LAN_FORUM_2033", "Visits to site since registration"); // LAN_09
define("LAN_FORUM_2034", "Website"); // LAN_08
define("LAN_FORUM_2035", "Registered Member"); // LAN_195
define("LAN_FORUM_2036", "Send Private Message"); // new / LAN_399
define("LAN_FORUM_2037", "Post deleted on"); // new
define("LAN_FORUM_2038", "Reason"); // new
define("LAN_FORUM_2039", "Edit"); // LAN_400
define("LAN_FORUM_2040", "Delete"); // LAN_435 (vf)?
define("LAN_FORUM_2041", "Quote"); // LAN_401
define("LAN_FORUM_2042", "Move"); // FORCONF_25 ?
define("LAN_FORUM_2043", "Split"); // new
define("LAN_FORUM_2044", "Email"); // FORLAN_101
define("LAN_FORUM_2045", "Print"); // FORLAN_102
define("LAN_FORUM_2046", "Report"); // LAN_413
// starting at LAN_FORUM_3xxx => forum_post.php
define("LAN_FORUM_3001", "You are not authorized to post to this forum."); // LAN_399 (p)
define("LAN_FORUM_3002", "This topic is locked."); // LAN_397
define("LAN_FORUM_3003", "Replying to"); // LAN_02 (p)
define("LAN_FORUM_3004", "Anonymous"); // LAN_311
define("LAN_FORUM_3005", "Preview"); // LAN_323
define("LAN_FORUM_3006", "Duplicate post"); // LAN_FORUM_2
define("LAN_FORUM_3007", "You left required field(s) blank"); // LAN_27
define("LAN_FORUM_3008", "Unauthorised"); // LAN_95
define("LAN_FORUM_3009", "You are not authorised to edit this forum post."); //LAN_96
define("LAN_FORUM_3010", "Your name"); // LAN_61
define("LAN_FORUM_3011", "Subject"); // LAN_62
define("LAN_FORUM_3012", "Attach file / image"); // LAN_390
define("LAN_FORUM_3013", "Attach file"); // LAN_416
define("LAN_FORUM_3014", "File to attach"); // LAN_392
define("LAN_FORUM_3015", "[Please note]"); // LAN_393 1st half - [ and ] are replaced by <b> </b>
define("LAN_FORUM_3016", "Allowed file types"); // LAN_393 2nd half
define("LAN_FORUM_3017", "Any other file types uploaded will be instantly deleted."); // LAN_394
define("LAN_FORUM_3018", "Maximum file size"); // LAN_395
define("LAN_FORUM_3019", "bytes"); // LAN_396
define("LAN_FORUM_3020", "Add another attachment"); // LAN_417
define("LAN_FORUM_3021", "Uploads disabled: [x] directory is not writable"); // LAN_FORUM_1 - [x] will be replaced automatically
define("LAN_FORUM_3022", "Latest [y] replies"); // LAN_101 and LAN_102 - [y] will be replaced automatically
// shortcodes/bach/post_shortcodes.php
define("LAN_FORUM_3023", "Update topic"); // LAN_77
define("LAN_FORUM_3024", "Update reply"); // LAN_78
define("LAN_FORUM_3025", "Type"); // new
define("LAN_FORUM_3026", "Post topic as"); // LAN_400 (p)
//define("LAN_FORUM_3027", "Type"); // new
// poll - partly in e107_plugins/poll/poll_class.php
define("LAN_FORUM_3028", "Add Poll"); // new
define("LAN_FORUM_3029", "If you do not wish to add a poll to your topic, leave the fields blank."); // LAN_386
define("LAN_FORUM_3030", "Poll question"); // LAN_5
define("LAN_FORUM_3031", "Poll answer"); // LAN_391
define("LAN_FORUM_3032", "Add another answer"); // LAN_6
define("LAN_FORUM_3033", "Allow multiple choices?"); // LAN_506
define("LAN_FORUM_3034", "Vote storage method"); // POLLAN_16
define("LAN_FORUM_3035", "Cookie"); // POLLAN_17
define("LAN_FORUM_3036", "IP address"); // POLLAN_18
define("LAN_FORUM_3037", "User ID (only members can vote)"); // POLLAN_19
define("LAN_FORUM_3038", "Normal"); // LAN_1
define("LAN_FORUM_3039", "Sticky"); // LAN_2
define("LAN_FORUM_3040", "Announcement"); // LAN_3
define("LAN_FORUM_3041", "Deactivate emoticons for this post"); // LAN_FORUMPOST_EMOTES
define("LAN_FORUM_3042", "Enable email tracking (email sent when reply is posted)"); // LAN_380
/* THIS WILL BE DELETED ONCE THE REWRITE IS DONE
==================================================
define("LAN_01", "Forums");
define("LAN_02", "Go to page");
define("LAN_03", "Go");
@ -157,7 +401,7 @@ define("LAN_402", "This forum is read only");
define("LAN_403", "No posts yet");
define("LAN_404", "posts");
define("LAN_405", "Restricted Access");
define("LAN_406", "This forum is restricted to administrators only");
define("LAN_407", "This forum is restricted to members only");
@ -315,6 +559,6 @@ define("LAN_FORUM_1", "Uploads disabled: ".e_FILE."public directory is not writa
define("LAN_FORUM_2", "Duplicate post");
define('LAN_FORUMPOST_EMOTES', 'Deactivate emoticons for this post');
*/
?>

View File

@ -9,6 +9,9 @@
| $Author$
+----------------------------------------------------------------------------+
*/
// DEPRECATED, SUBJECT TO REMOVAL
define("FORCONF_5", "Poll deleted.");
define("FORCONF_6", "Thread deleted");
define("FORCONF_7", "replies deleted");
@ -41,4 +44,5 @@ define("FORCONF_31", "Rename to:");
define("FORCONF_32", "Rename thread options:");
?>

View File

@ -10,6 +10,8 @@
+----------------------------------------------------------------------------+
*/
define("FOR_FP_1", "Forum");
// DEPRECATED - up for removal
//define("FOR_FP_1", "Forum");
?>

View File

@ -9,6 +9,10 @@
| $Author$
+----------------------------------------------------------------------------+
*/
// DEPRECATED, SUBJECT TO REMOVAL
/*
define("PAGE_NAME", "Forum");
define("LAN_01", "Forums");
@ -112,5 +116,5 @@ define("LAN_FORUM_1", "Uploads disabled: ".e_FILE."public directory is not writa
define("LAN_FORUM_2", "Duplicate post");
define('LAN_FORUMPOST_EMOTES', 'Deactivate emoticons for this post');
*/
?>

View File

@ -9,9 +9,10 @@
| $Author$
+----------------------------------------------------------------------------+
*/
// DEPRECATED, MOVED TO ENGLISH_FRONT.PHP - THIS WILL BE REMOVED SOON!
/*
define("PAGE_NAME", "Forum");
// define("LAN_79", "New posts");
//define("LAN_80", " No new posts");
// define("LAN_81", "Closed thread");
@ -58,6 +59,7 @@ define("LAN_396", "Announcement");
//define("LAN_435", "Delete thread");
//v.617
define("FORLAN_CLOSE", "Thread closed.");
define("FORLAN_OPEN", "Thread reopened.");
define("FORLAN_STICK", "Thread made sticky.");
@ -81,5 +83,5 @@ define('FORLAN_20', 'Sub-forum');
define('FORLAN_21', 'Threads');
define('FORLAN_22', 'Last Post');
define('FORLAN_23', 'Poll');
*/
?>

View File

@ -1,5 +1,5 @@
<?php
/*
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
@ -9,6 +9,7 @@
| $Author$
+----------------------------------------------------------------------------+
*/
define("PAGE_NAME", "Forum");
// DEPRECATED, UP FOR REMOVAL AFTER REWRITE
//define("PAGE_NAME", "Forum");
?>

View File

@ -1,4 +1,11 @@
<?php
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Forum plugin - post shortcodess
*
*/
if (!defined('e107_INIT')) { exit; }
class plugin_forum_post_shortcodes extends e_shortcode
@ -71,7 +78,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
function sc_posttype()
{
global $action;
return ($action == 'nt' ? LAN_63 : LAN_73);
return ($action == 'nt' ? LAN_FORUM_2015 : LAN_FORUM_2006);
}
function sc_postbox()
@ -92,14 +99,14 @@ class plugin_forum_post_shortcodes extends e_shortcode
function sc_buttons()
{
global $action, $eaction;
$ret = "<input class='btn button' type='submit' name='fpreview' value='".LAN_323."' /> ";
$ret = "<input class='btn button' type='submit' name='fpreview' value='".LAN_FORUM_3005."' /> ";
if ($action != 'nt')
{
$ret .= ($eaction ? "<input class='btn btn-primary button' type='submit' name='update_reply' value='".LAN_78."' />" : "<input class='btn btn-primary button' type='submit' name='reply' value='".LAN_74."' />");
$ret .= ($eaction ? "<input class='btn btn-primary button' type='submit' name='update_reply' value='".LAN_FORUM_3024."' />" : "<input class='btn btn-primary button' type='submit' name='reply' value='".LAN_FORUM_2006."' />");
}
else
{
$ret .= ($eaction ? "<input class='btn button btn-primary' type='submit' name='update_thread' value='".LAN_77."' />" : "<input class='btn btn-primary button' type='submit' name='newthread' value='".LAN_64."' />");
$ret .= ($eaction ? "<input class='btn button btn-primary' type='submit' name='update_thread' value='".LAN_FORUM_3023."' />" : "<input class='btn btn-primary button' type='submit' name='newthread' value='".LAN_FORUM_2005."' />");
}
return $ret;
}
@ -121,7 +128,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
{
if(!$fileattach_alert)
{
$fileattach_alert = "<tr><td colspan='2' class='nforumcaption2'>".(e107::getPref('image_post') ? LAN_390 : LAN_416)."</td></tr><tr><td colspan='2' class='forumheader3'>".LAN_FORUM_1."</td></tr>\n";
$fileattach_alert = "<tr><td colspan='2' class='nforumcaption2'>".(e107::getPref('image_post') ? LAN_FORUM_3012 : LAN_FORUM_3013)."</td></tr><tr><td colspan='2' class='forumheader3'>".str_replace('[x]', e_FILE."public", LAN_FORUM_3021)."</td></tr>\n";
}
return $fileattach_alert;
}
@ -137,19 +144,17 @@ class plugin_forum_post_shortcodes extends e_shortcode
//. <div>".($pref['image_post'] ? "Attach file / image" : "Attach file")."</div>
$tooltip = "Allowed file types | ".vartrue($allowed_filetypes).". Any other file type will be deleted instantly.
Maximum file size: ".(vartrue($max_upload_size) ? $max_upload_size."bytes" : ini_get('upload_max_filesize'));
//$tooltip = "Allowed file types | ".vartrue($allowed_filetypes).". Any other file type will be deleted instantly. Maximum file size: ".(vartrue($max_upload_size) ? $max_upload_size."bytes" : ini_get('upload_max_filesize'));
$tooltip = LAN_FORUM_3016.": ".vartrue($allowed_filetypes)." <br />".LAN_FORUM_3017."<br />".LAN_FORUM_3018.": ".(vartrue($max_upload_size) ? $max_upload_size." ".LAN_FORUM_3019 : ini_get('upload_max_filesize')); // FIXME <br /> in tooltip, no value $allowed_filetypes on v2/bootstrap
$fileattach = "
<div>
<div id='fiupsection'>
<span id='fiupopt'>
<input class='tbox e-tip' title=\"".$tooltip."\" name='file_userfile[]' type='file' size='47' />
</span>
</div>
<input class='btn button' type='button' name='addoption' value=\"Add Another\" onclick=\"duplicateHTML('fiupopt','fiupsection')\" />
<input class='btn button' type='button' name='addoption' value=".LAN_FORUM_3020." onclick=\"duplicateHTML('fiupopt','fiupsection')\" />
</div>
";
@ -169,17 +174,17 @@ class plugin_forum_post_shortcodes extends e_shortcode
$text = "
<ul class='nav nav-tabs'>
<li class='active'><a href='#type' data-toggle='tab'>Type</a></li>";
<li class='active'><a href='#type' data-toggle='tab'>".LAN_FORUM_3025."</a></li>";
$text .= ($poll) ? "<li><a href='#poll' data-toggle='tab'>Poll</a></li>\n" : "";
$text .= ($attach) ? "<li><a href='#attach' data-toggle='tab'>Attachment</a></li>\n" : "";
$text .= ($poll) ? "<li><a href='#poll' data-toggle='tab'>".LAN_FORUM_1016."</a></li>\n" : "";
$text .= ($attach) ? "<li><a href='#attach' data-toggle='tab'>".LAN_FORUM_3012."</a></li>\n" : "";
$text .= "
</ul>
<div class='tab-content text-left'>
<div class='tab-pane active' id='type'>
<div class='control-group'>
<label class='control-label'>Post thread as:</label>
<label class='control-label'>".LAN_FORUM_3026."</label>
<div class='controls'>
".$type."
</div>
@ -236,7 +241,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
}
return "<tr><td><a href='#pollform' class='e-expandit'>Add Poll</a></td><td>
return "<tr><td><a href='#pollform' class='e-expandit'>".LAN_FORUM_3028."</a></td><td>
<div id='pollform' style='display:none'>
<table class='table table-striped'>".$poll_form."</table></div></td></tr>";
}
@ -252,7 +257,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
{
$thread_sticky = (isset($_POST['threadtype']) ? $_POST['threadtype'] : vartrue($threadInfo['thread_sticky'],0)); // no reference of 'head' $threadInfo['head']['thread_sticky']
$opts = array(0 => "Normal", 1 => "Sticky", 2 => "Announcement");
$opts = array(0 => LAN_FORUM_3038, 1 => LAN_FORUM_3039, 2 => LAN_FORUM_3038);
return e107::getForm()->radio('threadtype',$opts, $thread_sticky);
@ -267,14 +272,14 @@ class plugin_forum_post_shortcodes extends e_shortcode
global $forum, $threadInfo, $eaction, $action;
$_tmp = new e_vars();
// no reference of 'head' $threadInfo['head']['thread_name']
$forum->set_crumb(true, ($action == 'nt' ? ($eaction ? LAN_77 : LAN_60) : ($eaction ? LAN_78 : LAN_406.' '.$threadInfo['thread_name'])), $_tmp);
$forum->set_crumb(true, ($action == 'nt' ? ($eaction ? LAN_FORUM_3023 : LAN_FORUM_1018) : ($eaction ? LAN_FORUM_3024 : $threadInfo['thread_name'])), $_tmp);
return $_tmp->BREADCRUMB;
}
function sc_noemotes()
{
if(vartrue($eaction) == true) { return ; }
return "<input type='checkbox' name='no_emote' value='1' />&nbsp;<span class='defaulttext'>".LAN_FORUMPOST_EMOTES.'</span>';
return "<input type='checkbox' name='no_emote' value='1' />&nbsp;<span class='defaulttext'>".LAN_FORUM_3041.'</span>';
}
function sc_emailnotify()
@ -304,7 +309,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
$chk = ($pref['notify_on'] ? "checked='checked'" : '');
}
}
return "<br /><input type='checkbox' name='notify' value='1' {$chk} />&nbsp;<span class='defaulttext'>".LAN_380."</span>";
return "<br /><input type='checkbox' name='notify' value='1' {$chk} />&nbsp;<span class='defaulttext'>".LAN_FORUM_3042."</span>";
}
return '';
}

View File

@ -1,4 +1,11 @@
<?php
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Forum plugin - view shortcodess
*
*/
if (!defined('e107_INIT')) { exit; }
class plugin_forum_view_shortcodes extends e_shortcode
@ -14,7 +21,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
function sc_top($parm='')
{
$text = ($parm == 'caret') ? "<span class='caret'></span>" : LAN_10;
$text = ($parm == 'caret') ? "<span class='caret'></span>" : LAN_FORUM_2030;
return "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".$text.'</a>';
}
@ -25,7 +32,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
$gen = e107::getDate();
if ($this->postInfo['post_user'])
{
return LAN_06.': '.$gen->convert_date($this->postInfo['user_join'], 'forum').'<br />';
return LAN_FORUM_2031.': '.$gen->convert_date($this->postInfo['user_join'], 'forum').'<br />';
}
}
@ -73,8 +80,8 @@ class plugin_forum_view_shortcodes extends e_shortcode
{
$info = unserialize($this->postInfo['post_options']);
return "
Post delete on: {$info['deldate']}<br />
reason: {$info['delreason']}
".LAN_FORUM_2037.": {$info['deldate']}<br />
".LAN_FORUM_2038.": {$info['delreason']}
";
$ret = '<pre>'.print_r($info, true).'</pre>';
}
@ -206,7 +213,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
{
if($this->postInfo['thread_start'])
{
return e107::getParser()->parseTemplate("{EMAIL_ITEM=".FORLAN_101."^plugin:forum.{$this->postInfo['post_thread']}}");
return e107::getParser()->parseTemplate("{EMAIL_ITEM=".LAN_FORUM_2044."^plugin:forum.{$this->postInfo['post_thread']}}");
}
}
@ -214,7 +221,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
{
if($this->postInfo['thread_start'])
{
return e107::getParser()->parseTemplate("{PRINT_ITEM=".FORLAN_102."^plugin:forum.{$this->postInfo['post_thread']}}");
return e107::getParser()->parseTemplate("{PRINT_ITEM=".LAN_FORUM_2045."^plugin:forum.{$this->postInfo['post_thread']}}");
}
}
@ -252,7 +259,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
{
if ($this->postInfo['post_user'])
{
return LAN_67.': '.(int)$this->postInfo['user_plugin_forum_posts'].'<br />';
return LAN_FORUM_2032.': '.(int)$this->postInfo['user_plugin_forum_posts'].'<br />';
}
}
@ -260,7 +267,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
{
if ($this->postInfo['user_name'])
{
return LAN_09.': '.$this->postInfo['user_visits'].'<br />';
return LAN_FORUM_2033.': '.$this->postInfo['user_visits'].'<br />';
}
}
@ -275,7 +282,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
function sc_website()
{
if ($this->postInfo['user_homepage']) {
return LAN_08.': '.$this->postInfo['user_homepage'].'<br />';
return LAN_FORUM_2034.': '.$this->postInfo['user_homepage'].'<br />';
}
}
@ -319,7 +326,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
function sc_memberid()
{
if (!$this->postInfo['post_user']) { return FALSE; }
return "<span class='smalltext'>".LAN_195.' #'.$this->postInfo['post_user'].'</span>';
return "<span class='smalltext'>".LAN_FORUM_2035.' #'.$this->postInfo['post_user'].'</span>';
}
function sc_level($parm)
@ -436,7 +443,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
if(plugInstalled('pm') && ($this->postInfo['post_user'] > 0))
{
$text .= "<li><a href='".e_PLUGIN_ABS."pm/pm.php?send.{$this->postInfo['post_user']}'>Send Private Message</a></li>";
$text .= "<li><a href='".e_PLUGIN_ABS."pm/pm.php?send.{$this->postInfo['post_user']}'>".LAN_FORUM_2036."</a></li>";
}
if($website = $this->sc_website())
@ -468,24 +475,24 @@ class plugin_forum_view_shortcodes extends e_shortcode
<ul class="dropdown-menu pull-right">';
$text .= "<li><a href='".e_HTTP."email.php?plugin:forum.".$this->postInfo['post_thread']."'>".FORLAN_101." <i class='icon-envelope'></i></a></li>";
$text .= "<li><a href='".e_HTTP."print.php?plugin:forum.".$this->postInfo['post_thread']."'>Print <i class='icon-print'></i></a></li>";
$text .= "<li><a href='".e_HTTP."email.php?plugin:forum.".$this->postInfo['post_thread']."'>".LAN_FORUM_2044." <i class='icon-envelope'></i></a></li>";
$text .= "<li><a href='".e_HTTP."print.php?plugin:forum.".$this->postInfo['post_thread']."'>".LAN_FORUM_2045." <i class='icon-print'></i></a></li>"; // FIXME
if (USER) // Report
{
$text .= "<li><a href='".$this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}")."'>Report <i class='icon-flag'></i></a></li>";
$text .= "<li><a href='".$this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}")."'>".LAN_FORUM_2046." <i class='icon-flag'></i></a></li>";
}
// Edit
if ( (USER && $this->postInfo['post_user'] == USERID && $this->thread->threadInfo['thread_active']))
{
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>Edit <i class='icon-edit'></i></a></li>";
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2039." <i class='icon-edit'></i></a></li>";
}
if($this->forum->checkperm($this->postInfo['post_forum'], 'post'))
{
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_id']))."'>Quote <i class='icon-share-alt'></i></a></li>";
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2041." <i class='icon-share-alt'></i></a></li>";
}
@ -496,18 +503,18 @@ class plugin_forum_view_shortcodes extends e_shortcode
if ((USER && $this->postInfo['post_user'] != USERID && $this->thread->threadInfo['thread_active']))
{
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>Edit <i class='icon-edit'></i></a></li>";
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2039." <i class='icon-edit'></i></a></li>";
}
$text .= "<li><a href='".e_REQUEST_URI."' data-forum-action='deletepost' data-forum-post='".$this->postInfo['post_id']."'>Delete (fixme) <i class='icon-trash'></i></a></li>";
$text .= "<li><a href='".e_REQUEST_URI."' data-forum-action='deletepost' data-forum-post='".$this->postInfo['post_id']."'>".LAN_FORUM_2040." (fixme) <i class='icon-trash'></i></a></li>"; // FIXME
if ($type == 'thread')
{
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/move', array('id' => $this->postInfo['post_id']))."'>Move <i class='icon-move'></i></a></a></li>";
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/move', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2042." <i class='icon-move'></i></a></a></li>";
}
else
{
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/split', array('id' => $this->postInfo['post_id']))."'>Split</a></li>";
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/split', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2043."</a></li>";
}
}

View File

@ -2,19 +2,17 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Forum icons template - default
*
* $URL$
* $Id$
*/
if ( ! defined('e107_INIT')) { exit(); }
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_viewforum.php');
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_viewforum.php'); // now uses English_front.php
// Thread info

View File

@ -2,13 +2,10 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
@ -19,7 +16,7 @@ if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
if(!vartrue($userbox))
{
$userbox = "<tr>
<td class='forumheader2' style='width:20%'>".LAN_61."</td>
<td class='forumheader2' style='width:20%'>".LAN_FORUM_3010."</td>
<td class='forumheader2' style='width:80%'>
<input class='tbox' type='text' name='anonname' size='71' value='".vartrue($anonname)."' maxlength='20' style='width:95%' />
</td>
@ -29,7 +26,7 @@ $userbox = "<tr>
if(!vartrue($subjectbox))
{
$subjectbox = "<tr>
<td class='forumheader2' style='width:20%'>".LAN_62."</td>
<td class='forumheader2' style='width:20%'>".LAN_FORUM_3011."</td>
<td class='forumheader2' style='width:80%'>
<input class='tbox' type='text' name='subject' size='71' value='".vartrue($subject)."' maxlength='100' style='width:95%' />
</td>
@ -51,18 +48,18 @@ if(!vartrue($fileattach))
{
$fileattach = "
<tr>
<td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_390 : LAN_416)."</td>
<td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_FORUM_3012 : LAN_FORUM_3013)."</td>
</tr>
<tr>
<td style='width:20%' class='forumheader3'>".LAN_392."</td>
<td style='width:80%' class='forumheader3'>".LAN_393." | ".vartrue($allowed_filetypes)." |<br />".LAN_394."<br />".LAN_395.": ".(vartrue($max_upload_size) ? $max_upload_size.LAN_396 : ini_get('upload_max_filesize'))."
<td style='width:20%' class='forumheader3'>".LAN_FORUM_3014."</td>
<td style='width:80%' class='forumheader3'>".str_replace(array('[', ']'), array('<b>', '</b>'), LAN_FORUM_3015)."<br>".LAN_FORUM_3016.": ".vartrue($allowed_filetypes)." <br />".LAN_FORUM_3017."<br />".LAN_FORUM_3018.": ".(vartrue($max_upload_size) ? $max_upload_size." ".LAN_FORUM_3019 : ini_get('upload_max_filesize'))."
<br />
<div id='fiupsection'>
<span id='fiupopt'>
<input class='tbox' name='file_userfile[]' type='file' size='47' />
</span>
</div>
<input class='btn button' type='button' name='addoption' value='".LAN_417."' onclick=\"duplicateHTML('fiupopt','fiupsection')\" />
<input class='btn button' type='button' name='addoption' value='".LAN_FORUM_3020."' onclick=\"duplicateHTML('fiupopt','fiupsection')\" />
</td>
</tr>
";
@ -74,10 +71,10 @@ if(!vartrue($fileattach_alert))
{
$fileattach_alert = "
<tr>
<td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_390 : LAN_416)."</td>
<td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_FORUM_3012 : LAN_FORUM_3013)."</td>
</tr>
<tr>
<td colspan='2' class='forumheader3'>".LAN_FORUM_1."</td>
<td colspan='2' class='forumheader3'>".str_replace('[x]', e_FILE."public", LAN_FORUM_3021)."</td>
</tr>\n";
}
// ------------
@ -181,9 +178,7 @@ if(!vartrue($LATESTPOSTS_START))
$LATESTPOSTS_START = "
<table style='".USER_WIDTH."' class='fborder table'>
<tr>
<td colspan='2' class='fcaption' style='vertical-align:top'>".
LAN_101."{LATESTPOSTSCOUNT}".LAN_102."
</td>
<td colspan='2' class='fcaption' style='vertical-align:top'>".str_replace('[y]', "{LATESTPOSTSCOUNT}", LAN_FORUM_3022)."</td>
</tr>";
}
@ -193,7 +188,7 @@ $LATESTPOSTS_POST = "
<tr>
<td class='forumheader3' style='width:20%;vertical-align:top'><b>{POSTER}</b></td>
<td class='forumheader3' style='width:80%'>
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." ".LAN_322."{THREADDATESTAMP}</div>
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." {THREADDATESTAMP}</div>
{POST}
</td>
</tr>
@ -212,12 +207,13 @@ if(!vartrue($THREADTOPIC_REPLY))
$THREADTOPIC_REPLY = "
<table style='".USER_WIDTH."' class='fborder table'>
<tr>
<td colspan='2' class='fcaption' style='vertical-align:top'>".LAN_100."</td>
<td colspan='2' class='fcaption' style='vertical-align:top'>".LAN_FORUM_1003."</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%;vertical-align:top'><b>{POSTER}</b></td>
<td class='forumheader3' style='width:80%'>
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." ".LAN_322."{THREADDATESTAMP}</div>{POST}
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." {THREADDATESTAMP}</div>
{POST}
</td>
</tr>
</table>

View File

@ -2,13 +2,10 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
@ -102,9 +99,9 @@ $FORUM_TEMPLATE['main-start'] = "<div class='row'>
$FORUM_TEMPLATE['main-parent'] = "<tr>
<th colspan='2'>{PARENTNAME} {PARENTSTATUS}</th>
<th>".LAN_55."</th>
<th>".FORLAN_21."</th>
<th>".FORLAN_22."</th>
<th>".LAN_FORUM_0003."</th>
<th>".LAN_FORUM_0002."</th>
<th>".LAN_FORUM_0004."</th>
</tr>";

View File

@ -2,13 +2,10 @@
/*
* e107 website system
*
* Copyright (C) 2008-2011 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
@ -219,10 +216,10 @@ if (!$FORUM_VIEW_SUB_START)
<table style='width:100%'>
<tr>
<td class='fcaption' style='width: 5%'>&nbsp;</td>
<td class='fcaption' style='width: 45%'>".FORLAN_20."</td>
<td class='fcaption' style='width: 10%'>".FORLAN_21."</td>
<td class='fcaption' style='width: 10%'>".LAN_55."</td>
<td class='fcaption' style='width: 30%'>".FORLAN_22."</td>
<td class='fcaption' style='width: 45%'>".LAN_FORUM_1002."</td>
<td class='fcaption' style='width: 10%'>".LAN_FORUM_0002."</td>
<td class='fcaption' style='width: 10%'>".LAN_FORUM_0003."</td>
<td class='fcaption' style='width: 30%'>".LAN_FORUM_0004."</td>
</tr>
";
}
@ -249,11 +246,12 @@ if (!$FORUM_VIEW_SUB_END) {
}
if (!$FORUM_IMPORTANT_ROW) {
$FORUM_IMPORTANT_ROW = "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_411."</b></span></td></tr>";
$FORUM_IMPORTANT_ROW = "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_FORUM_1006."</b></span></td></tr>";
}
if (!$FORUM_NORMAL_ROW) {
$FORUM_NORMAL_ROW = "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_412."</b></span></td></tr>";
$FORUM_NORMAL_ROW = "<tr><td class='forumheader'>&nbsp;</td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_FORUM_1007."</b></span></td></tr>";
}
@ -304,7 +302,7 @@ $FORUM_VIEWFORUM_TEMPLATE['item-sticky'] = $FORUMVIEW['item'] ; // "<tr><td>{T
$FORUM_VIEWFORUM_TEMPLATE['item-announce'] = $FORUMVIEW['item'] ; // "<tr><td>{THREADNAME}</td></tr>\n";
$FORUM_VIEWFORUM_TEMPLATE['sub-header'] = "<tr><th colspan='2'>".FORLAN_20."</th><th>".LAN_55."</th><th>".FORLAN_21."</th><th>".FORLAN_22."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['sub-header'] = "<tr><th colspan='2'>".LAN_FORUM_1002."</th><th>".LAN_FORUM_0003."</th><th>".LAN_FORUM_0002."</th><th>".LAN_FORUM_0004."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['sub-item'] = "<tr><td>{NEWFLAG}</td>
<td><div>{SUB_FORUMTITLE}</div><small>{SUB_DESCRIPTION}</small></td>
<td>{SUB_REPLIESX}</td>
@ -315,8 +313,8 @@ $FORUM_VIEWFORUM_TEMPLATE['sub-item'] = "<tr><td>{NEWFLAG}</td>
$FORUM_VIEWFORUM_TEMPLATE['sub-footer'] = "";
$FORUM_VIEWFORUM_TEMPLATE['divider-important'] = "<tr><th colspan='2'>".LAN_411."</th><th>".LAN_55."</th><th>".LAN_56."</th><th>".LAN_57."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['divider-normal'] = "<tr><th colspan='2'>".LAN_412."</th><th>".LAN_55."</th><th>".LAN_56."</th><th>".LAN_57."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['divider-important'] = "<tr><th colspan='2'>".LAN_FORUM_1006."</th><th>".LAN_FORUM_0003."</th><th>".LAN_FORUM_1005."</th><th>".LAN_FORUM_0004."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['divider-normal'] = "<tr><th colspan='2'>".LAN_FORUM_1007."</th><th>".LAN_FORUM_0003."</th><th>".LAN_FORUM_1005."</th><th>".LAN_FORUM_0004."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['footer'] = "</table>
<div class='row-fluid'>

View File

@ -11,9 +11,9 @@
if (!defined('e107_INIT')) { exit; }
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%;margin-left:auto;margin-right:auto"); }
$sc_style['LASTEDIT']['pre'] = LAN_29.' ';
$sc_style['LASTEDIT']['pre'] = LAN_FORUM_2016.' ';
$sc_style['LASTEDITBY']['pre'] = ' '.FORLAN_BY.' ';
$sc_style['LASTEDITBY']['pre'] = ' '.LAN_FORUM_2017.' ';
$sc_style['LASTEDITBY']['post'] = '';
$sc_style['LEVEL']['pre'] = "";
@ -89,10 +89,10 @@ $FORUMSTART = "<a id='top'></a><div style='text-align:center'>
<table style='".USER_WIDTH."' class='fborder table'>
<tr>
<td style='width:20%; text-align:center' class='fcaption'>
".LAN_402."
".LAN_FORUM_2014."
</td>
<td style='width:80%; text-align:center' class='fcaption'>
".LAN_403."
".LAN_FORUM_2015."
</td>
</tr>";

View File

@ -596,18 +596,19 @@ class poll
// echo "MODE=".$mode;
//XXX New v2.x default for front-end. Currently used by forum-post in bootstrap mode.
// TODO Moc - Needs a more generic LAN rewrite when used on another area than forum
if ($mode == 'front')
{
$text = "
<div class='alert alert-info'>
<small >".LAN_386."</small>
<small >".LAN_FORUM_3029."</small>
</div>
<div class='control-group'>
<div>
<input class='tbox input-xxlarge' placeholder=\"Poll Question\" type='text' name='poll_title' size='70' value='".$tp->post_toForm(vartrue($_POST['poll_title']))."' maxlength='200' />
<input class='tbox input-xxlarge' placeholder='".LAN_FORUM_3030."' type='text' name='poll_title' size='70' value='".$tp->post_toForm(vartrue($_POST['poll_title']))."' maxlength='200' />
</div>";
$option_count = vartrue($_POST['poll_option']) ? count($_POST['poll_option']) : 2;
@ -621,25 +622,25 @@ class poll
// break;
}
$opt = ($count==1) ? "id='pollopt' class='btn-group input-append' " : "";
$text .="<span {$opt}><input placeholder=\"Poll Answer\" class='tbox' type='text' name='poll_option[]' size='40' value=\"".$_POST['poll_option'][($count-1)]."\" maxlength='200' />";
$text .="<span {$opt}><input placeholder='".LAN_FORUM_3031."' class='tbox' type='text' name='poll_option[]' size='40' value=\"".$_POST['poll_option'][($count-1)]."\" maxlength='200' />";
$text .= "</span><br />";
}
$text .="</div>
<div class='control-group'>
<input class='btn' type='button' name='addoption' value='".LAN_6."' onclick=\"duplicateHTML('pollopt','pollsection')\" /><br />
<input class='btn' type='button' name='addoption' value='".LAN_FORUM_3032."' onclick=\"duplicateHTML('pollopt','pollsection')\" /><br />
</div>
</div>";
//FIXME - get this looking good with Bootstrap CSS only.
$opts = array(1=> "yes", 0=> "no");
$opts = array(1 => LAN_YES, 0=> LAN_NO);
// Set to IP address.. Can add a pref to Poll admin for 'default front-end storage method' if demand is there for it.
$text .= "
<div class='form-horizontal control-group'>
<label class='control-label'>".POLL_506."</label>
<label class='control-label'>".LAN_FORUM_3033."</label>
<div class='controls'>
". $frm->radio('multipleChoice',$opts, vartrue($_POST['multipleChoice'], 0) ).$frm->hidden('storageMethod',1)."
</div>
@ -681,52 +682,54 @@ class poll
//TODO Hardcoded FORUM code needs to be moved somewhere.
if ($mode == 'forum')
{
$text = "<tr>
<td colspan='2' class='nforumcaption2'>".LAN_4."</td>
$text = "
<tr>
<td colspan='2'><span class='smalltext'>".LAN_FORUM_3029."</span></td>
</tr>
<tr>
<td colspan='2'>
<span class='smalltext'>".LAN_386."</span>
</td>
</tr>
<tr><td style='width:20%'><div class='normaltext'>".LAN_5."</div></td><td style='width:80%'class='forumheader3'><input class='tbox' type='text' name='poll_title' size='70' value='".$tp->post_toForm(vartrue($_POST['poll_title']))."' maxlength='200' /></td></tr>";
<td style='width:20%'><div class='normaltext'>".LAN_FORUM_3030.": </div></td>
<td style='width:80%'class='forumheader3'><input class='tbox' type='text' name='poll_title' size='70' value='".$tp->post_toForm(vartrue($_POST['poll_title']))."' maxlength='200' /></td>
</tr>";
$option_count = (count(vartrue($_POST['poll_option'])) ? count($_POST['poll_option']) : 1);
$text .= "<tr>
<td style='width:20%'>".LAN_391."</td>
<td style='width:80%'>
<div id='pollsection'>";
for($count = 1; $count <= $option_count; $count++)
{
if ($count != 1 && $_POST['poll_option'][($count-1)] =="")
{
break;
}
$opt = ($count==1) ? "id='pollopt'" : "";
$text .="<span {$opt}><input class='tbox' type='text' name='poll_option[]' size='40' value=\"".$_POST['poll_option'][($count-1)]."\" maxlength='200' />";
$text .= "</span><br />";
}
$text .="</div><input class='btn' type='button' name='addoption' value='".LAN_6."' onclick=\"duplicateHTML('pollopt','pollsection')\" /><br />
</td></tr>
$text .= "
<tr>
<td style='width:20%'>".POLL_506."</td>
<td style='width:80%'>
<input type='radio' name='multipleChoice' value='1'".(vartrue($_POST['multipleChoice']) ? " checked='checked'" : "")." /> ".POLL_507."&nbsp;&nbsp;
<input type='radio' name='multipleChoice' value='0'".(!$_POST['multipleChoice'] ? " checked='checked'" : "")." /> ".POLL_508."
<td style='width:20%'>".LAN_FORUM_3031."</td>
<td style='width:80%'>
<div id='pollsection'>";
for($count = 1; $count <= $option_count; $count++)
{
if ($count != 1 && $_POST['poll_option'][($count-1)] =="")
{
break;
}
$opt = ($count==1) ? "id='pollopt'" : "";
$text .="<span {$opt}><input class='tbox' type='text' name='poll_option[]' size='40' value=\"".$_POST['poll_option'][($count-1)]."\" maxlength='200' />";
$text .= "</span><br />";
}
$text .="
</div>
<input class='btn button' type='button' name='addoption' value='".LAN_FORUM_3032."' onclick=\"duplicateHTML('pollopt','pollsection')\" /><br />
</td>
</tr>
<tr>
<td style='width:20%'>".LAN_FORUM_3033."</td>
<td style='width:80%'>
<input type='radio' name='multipleChoice' value='1'".(vartrue($_POST['multipleChoice']) ? " checked='checked'" : "")." /> ".LAN_YES."&nbsp;&nbsp;
<input type='radio' name='multipleChoice' value='0'".(!$_POST['multipleChoice'] ? " checked='checked'" : "")." /> ".LAN_NO."
</td>
</tr>
<tr>
<td style='width:30%'>".POLLAN_16."</td>
<td>
<input type='radio' name='storageMethod' value='0'".(!vartrue($_POST['storageMethod']) ? " checked='checked'" : "")." /> ".POLLAN_17."<br />
<input type='radio' name='storageMethod' value='1'".($_POST['storageMethod'] == 1 ? " checked='checked'" : "")." /> ".POLLAN_18."<br />
<input type='radio' name='storageMethod' value='2'".($_POST['storageMethod'] ==2 ? " checked='checked'" : "")." /> ".POLLAN_19."
</td></tr>
<td style='width:30%'>".LAN_FORUM_3034."</td>
<td>
<input type='radio' name='storageMethod' value='0'".(!vartrue($_POST['storageMethod']) ? " checked='checked'" : "")." /> ".LAN_FORUM_3035."<br />
<input type='radio' name='storageMethod' value='1'".($_POST['storageMethod'] == 1 ? " checked='checked'" : "")." /> ".LAN_FORUM_3036."<br />
<input type='radio' name='storageMethod' value='2'".($_POST['storageMethod'] ==2 ? " checked='checked'" : "")." /> ".LAN_FORUM_3037."
</td>
</tr>
";