You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(193) |
Nov
(393) |
Dec
(347) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(401) |
Feb
(232) |
Mar
(343) |
Apr
(129) |
May
(129) |
Jun
(116) |
Jul
(189) |
Aug
(129) |
Sep
(68) |
Oct
(172) |
Nov
(298) |
Dec
(148) |
| 2003 |
Jan
(264) |
Feb
(210) |
Mar
(322) |
Apr
(309) |
May
(234) |
Jun
(188) |
Jul
(215) |
Aug
(161) |
Sep
(234) |
Oct
(163) |
Nov
(110) |
Dec
(7) |
| 2004 |
Jan
(95) |
Feb
(107) |
Mar
(55) |
Apr
(3) |
May
(49) |
Jun
(35) |
Jul
(57) |
Aug
(43) |
Sep
(56) |
Oct
(40) |
Nov
(25) |
Dec
(21) |
| 2005 |
Jan
(93) |
Feb
(25) |
Mar
(22) |
Apr
(72) |
May
(45) |
Jun
(24) |
Jul
(29) |
Aug
(20) |
Sep
(50) |
Oct
(93) |
Nov
(69) |
Dec
(183) |
| 2006 |
Jan
(185) |
Feb
(143) |
Mar
(402) |
Apr
(260) |
May
(322) |
Jun
(367) |
Jul
(234) |
Aug
(299) |
Sep
(206) |
Oct
(288) |
Nov
(338) |
Dec
(307) |
| 2007 |
Jan
(296) |
Feb
(250) |
Mar
(261) |
Apr
(434) |
May
(539) |
Jun
(274) |
Jul
(440) |
Aug
(190) |
Sep
(128) |
Oct
(249) |
Nov
(86) |
Dec
(51) |
| 2008 |
Jan
(177) |
Feb
(67) |
Mar
(61) |
Apr
(48) |
May
(56) |
Jun
(97) |
Jul
(60) |
Aug
(64) |
Sep
(151) |
Oct
(79) |
Nov
(109) |
Dec
(123) |
| 2009 |
Jan
(70) |
Feb
(70) |
Mar
(73) |
Apr
(80) |
May
(22) |
Jun
(193) |
Jul
(191) |
Aug
(181) |
Sep
(120) |
Oct
(48) |
Nov
(24) |
Dec
|
|
From: Paul S. O. <ps...@us...> - 2001-11-09 13:15:38
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv12253/templates/subSilver
Modified Files:
profile_add_body.tpl posting_body.tpl privmsgs_body.tpl
privmsgs_preview.tpl error_body.tpl
Log Message:
Altered templates so preview/errors are sent as 'boxes' rather than pparsed and output directly, greater control for designer
Index: profile_add_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/profile_add_body.tpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** profile_add_body.tpl 2001/10/11 22:01:11 1.6
--- profile_add_body.tpl 2001/11/09 13:15:36 1.7
***************
*** 1,4 ****
--- 1,6 ----
<form action="{S_PROFILE_ACTION}" enctype="multipart/form-data" method="post">
+ {ERROR_BOX}
+
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
***************
*** 6,9 ****
--- 8,12 ----
</tr>
</table>
+
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
Index: posting_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/posting_body.tpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** posting_body.tpl 2001/11/03 16:59:19 1.6
--- posting_body.tpl 2001/11/09 13:15:36 1.7
***************
*** 187,190 ****
--- 187,194 ----
</script>
<form action="{S_POST_ACTION}" method="post" name="post" onSubmit="return checkForm(this)">
+
+ {POST_PREVIEW_BOX}
+ {ERROR_BOX}
+
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
***************
*** 193,196 ****
--- 197,201 ----
</tr>
</table>
+
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
***************
*** 429,432 ****
--- 434,438 ----
</tr>
</table>
+
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
***************
*** 435,438 ****
--- 441,445 ----
</table>
</form>
+
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
Index: privmsgs_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/privmsgs_body.tpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** privmsgs_body.tpl 2001/11/01 20:25:05 1.3
--- privmsgs_body.tpl 2001/11/09 13:15:36 1.4
***************
*** 12,15 ****
--- 12,16 ----
}
</script>
+
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
<tr>
***************
*** 53,57 ****
</tr>
</table>
! <br />
<form method="post" name="privmsg_list" action="{S_PRIVMSGS_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
--- 54,60 ----
</tr>
</table>
!
! <br clear="all" />
!
<form method="post" name="privmsg_list" action="{S_PRIVMSGS_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
***************
*** 66,69 ****
--- 69,73 ----
</tr>
</table>
+
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
***************
*** 100,103 ****
--- 104,108 ----
</tr>
</table>
+
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
***************
*** 113,116 ****
--- 118,122 ----
</table>
</form>
+
<table width="100%" border="0">
<tr>
Index: privmsgs_preview.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/privmsgs_preview.tpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** privmsgs_preview.tpl 2001/10/01 23:22:18 1.1
--- privmsgs_preview.tpl 2001/11/09 13:15:36 1.2
***************
*** 24,26 ****
--- 24,27 ----
</tr>
</table>
+
<br clear="all" />
Index: error_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/error_body.tpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** error_body.tpl 2001/10/01 23:22:18 1.2
--- error_body.tpl 2001/11/09 13:15:36 1.3
***************
*** 17,18 ****
--- 17,20 ----
</tr>
</table>
+
+ <br clear="all" />
|
|
From: Paul S. O. <ps...@us...> - 2001-11-09 13:15:38
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv12253
Modified Files:
profile.php privmsg.php posting.php
Log Message:
Altered templates so preview/errors are sent as 'boxes' rather than pparsed and output directly, greater control for designer
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.126
retrieving revision 1.127
diff -C2 -r1.126 -r1.127
*** profile.php 2001/11/08 06:12:53 1.126
--- profile.php 2001/11/09 13:15:35 1.127
***************
*** 1463,1467 ****
"ERROR_MESSAGE" => $error_msg)
);
! $template->pparse("reg_header");
}
--- 1463,1467 ----
"ERROR_MESSAGE" => $error_msg)
);
! $template->assign_var_from_handle("ERROR_BOX", "reg_header");
}
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** privmsg.php 2001/11/08 06:06:54 1.39
--- privmsg.php 2001/11/09 13:15:35 1.40
***************
*** 1294,1298 ****
"L_POSTED" => $lang['Posted'])
);
! $template->pparse("preview");
}
--- 1294,1298 ----
"L_POSTED" => $lang['Posted'])
);
! $template->assign_var_from_handle("POST_PREVIEW_BOX", "preview");
}
***************
*** 1308,1312 ****
"ERROR_MESSAGE" => $error_msg)
);
! $template->pparse("reg_header");
}
//
--- 1308,1312 ----
"ERROR_MESSAGE" => $error_msg)
);
! $template->assign_var_from_handle("ERROR_BOX", "reg_header");
}
//
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -r1.89 -r1.90
*** posting.php 2001/11/08 06:06:54 1.89
--- posting.php 2001/11/09 13:15:35 1.90
***************
*** 30,33 ****
--- 30,438 ----
// Page specific functions
//
+ function clean_words($entry, &$stopword_list, &$synonym_list)
+ {
+ $init_match = array("^", "$", "&", "(", ")", "<", ">", "`", "'", "|", ",", "@", "_", "?", "%");
+ $init_replace = array(" ", " ", " ", " ", " ", " ", " ", " ", "", " ", " ", " ", " ", " ", " ");
+
+ $later_match = array("-", "~", "+", ".", "[", "]", "{", "}", ":", "\\", "/", "=", "#", "\"", ";", "*", "!");
+ $later_replace = array(" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ");
+
+ $entry = " " . stripslashes(strip_tags(strtolower($entry))) . " ";
+
+ $entry = preg_replace("/[\n\r]/is", " ", $entry);
+ $entry = preg_replace("/\b[a-z0-9]+:\/\/[a-z0-9\.\-]+(\/[a-z0-9\?\.%_\-\+=&\/]+)?/si", " ", $entry);
+
+ $entry = str_replace($init_match, $init_replace, $entry);
+
+ $entry = preg_replace("/\[code:[0-9]+:[0-9a-z]{10,}\].*?\[\/code:[0-9]+:[0-9a-z]{10,}\]/is", " ", $entry);
+ $entry = preg_replace("/\[img\].*?\[\/img\]/is", " ", $entry);
+ $entry = preg_replace("/\[\/?[a-z\*=\+\-]+[0-9a-z]?(\:[a-z0-9]+)?:[a-z0-9]{10,}(\:[a-z0-9]+)?=?.*?\]/si", " ", $entry);
+ $entry = preg_replace("/\[\/?[a-z\*]+[=\+\-]?[0-9a-z]+?:[a-z0-9]{10,}[=.*?]?\]/si", " ", $entry);
+ $entry = preg_replace("/\[\/?url(=.*?)?\]/si", " ", $entry);
+ $entry = preg_replace("/\b[0-9]+\b/si", " ", $entry);
+ $entry = preg_replace("/\b&[a-z]+;\b/is", " ", $entry);
+ $entry = preg_replace("/\b[a-z0-9]{1,2}?\b/si", " ", $entry);
+ $entry = preg_replace("/\b[a-z0-9]{50,}?\b/si", " ", $entry);
+
+ $entry = str_replace($later_match, $later_replace, $entry);
+
+ if( !empty($stopword_list) )
+ {
+ for ($j = 0; $j < count($stopword_list); $j++)
+ {
+ $filter_word = trim(strtolower($stopword_list[$j]));
+ $entry = preg_replace("/\b" . preg_quote($filter_word, "/") . "\b/is", " ", $entry);
+ }
+ }
+
+ if( !empty($synonym_list) )
+ {
+ for ($j = 0; $j < count($synonym_list); $j++)
+ {
+ list($replace_synonym, $match_synonym) = split(" ", trim(strtolower($synonym_list[$j])));
+ $entry = preg_replace("/\b" . preg_quote(trim($match_synonym), "/") . "\b/is", " " . trim($replace_synonym) . " ", $entry);
+ }
+ }
+
+ return $entry;
+ }
+
+ function split_words(&$entry)
+ {
+ preg_match_all("/\b(\w[\w']*\w+|\w+?)\b/", $entry, $split_entries);
+
+ return $split_entries[1];
+ }
+
+ function remove_old( $post_id )
+ {
+ global $db;
+
+ if( count($word_id_list) )
+ {
+ $word_id_sql = "";
+ for($i = 0; $i < count($word_id_list); $i++ )
+ {
+ if( $word_id_sql != "" )
+ {
+ $word_id_sql .= ", ";
+ }
+ $word_id_sql .= $word_id_list[$i]['word_id'];
+ }
+ $word_id_sql = " AND sl.word_id IN ($word_id_sql)";
+ }
+ else
+ {
+ $word_id_sql = "";
+ }
+
+ }
+
+ function remove_common($percent, $word_id_list = array())
+ {
+ global $db;
+
+ if( count($word_id_list) )
+ {
+ $word_id_sql = "";
+ for($i = 0; $i < count($word_id_list); $i++ )
+ {
+ if( $word_id_sql != "" )
+ {
+ $word_id_sql .= ", ";
+ }
+ $word_id_sql .= $word_id_list[$i]['word_id'];
+ }
+ $word_id_sql = " AND sl.word_id IN ($word_id_sql)";
+
+ $sql = "SELECT sl.word_id, SUM(sm.word_count) AS post_occur_count
+ FROM phpbb_search_wordlist sl, phpbb_search_wordmatch sm
+ WHERE sl.word_id = sm.word_id
+ $word_id_sql
+ GROUP BY sl.word_id
+ ORDER BY post_occur_count DESC";
+ if( !$result = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain search word sums", "", __LINE__, __FILE__, $sql);
+ }
+
+ if( $post_count = $db->sql_numrows($result) )
+ {
+ $rowset = $db->sql_fetchrowset($result);
+
+ $sql = "SELECT COUNT(post_id) AS total_posts
+ FROM phpbb_posts";
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain post count", "", __LINE__, __FILE__, $sql);
+ }
+
+ $row = $db->sql_fetchrow($result);
+
+ $words_removed = 0;
+
+ for($i = 0; $i < $post_count; $i++)
+ {
+ if( ( $rowset[$i]['post_occur_count'] / $row['total_posts'] ) >= $percent )
+ {
+ $sql = "DELETE FROM phpbb_search_wordlist
+ WHERE word_id = " . $rowset[$i]['word_id'];
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete word list entry", "", __LINE__, __FILE__, $sql);
+ }
+
+ $sql = "DELETE FROM phpbb_search_wordmatch
+ WHERE word_id = " . $rowset[$i]['word_id'];
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete word match entry", "", __LINE__, __FILE__, $sql);
+ }
+
+ $words_removed++;
+ }
+ }
+ }
+ }
+
+ return $words_removed;
+ }
+
+ function remove_old_words($post_id)
+ {
+ global $db, $phpbb_root_path, $board_config, $lang;
+
+ $stopword_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_stopwords.txt");
+ $synonym_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_synonyms.txt");
+
+ $sql = "SELECT post_text
+ FROM " . POSTS_TEXT_TABLE . "
+ WHERE post_id = $post_id";
+ if( $result = $db->sql_query($sql) )
+ {
+ $row = $db->sql_fetchrow($result);
+ // print_r($row);
+
+ $search_text = clean_words($row['post_text'], $stopword_array, $synonym_array);
+ $search_matches = split_words($search_text);
+
+ if( count($search_matches) )
+ {
+ $word = array();
+ $word_count = array();
+ $phrase_string = $text;
+
+ $sql_in = "";
+ for ($j = 0; $j < count($search_matches); $j++)
+ {
+ $this_word = strtolower(trim($search_matches[$j]));
+
+ if( empty($word_count[$this_word]) )
+ {
+ $word_count[$this_word] = 1;
+ }
+
+ $new_word = true;
+ for($k = 0; $k < count($word); $k++)
+ {
+ if( $this_word == $word[$k] )
+ {
+ $new_word = false;
+ $word_count[$this_word]++;
+ }
+ }
+
+ if( $new_word )
+ {
+ $word[] = $this_word;
+ }
+ }
+
+ for($j = 0; $j < count($word); $j++)
+ {
+ if( $word[$j] )
+ {
+ if( $sql_in != "" )
+ {
+ $sql_in .= ", ";
+ }
+ $sql_in .= "'" . $word[$j] . "'";
+ }
+ }
+
+ $sql = "SELECT word_id, word_text
+ FROM phpbb_search_wordlist
+ WHERE word_text IN ($sql_in)";
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't select words", "", __LINE__, __FILE__, $sql);
+ }
+
+ if( $word_check_count = $db->sql_numrows($result) )
+ {
+ $check_words = $db->sql_fetchrowset($result);
+
+ // print_r($check_words);
+
+ $word_id_sql = "";
+ for($i = 0; $i < count($check_words); $i++ )
+ {
+ if( $word_id_sql != "" )
+ {
+ $word_id_sql .= ", ";
+ }
+ $word_id_sql .= $check_words[$i]['word_id'];
+ }
+ $word_id_sql = "word_id IN ($word_id_sql)";
+
+ $sql = "SELECT word_id, COUNT(post_id) AS post_occur_count
+ FROM phpbb_search_wordmatch
+ WHERE $word_id_sql
+ GROUP BY word_id
+ ORDER BY post_occur_count DESC";
+ if( !$result = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain search word sums", "", __LINE__, __FILE__, $sql);
+ }
+
+ if( $post_count = $db->sql_numrows($result) )
+ {
+ $rowset = $db->sql_fetchrowset($result);
+
+ // print_r($rowset);
+
+ for($i = 0; $i < $post_count; $i++)
+ {
+ // echo $rowset[$i]['post_occur_count'] . "<BR>";
+ if( $rowset[$i]['post_occur_count'] == 1 )
+ {
+ $sql = "DELETE FROM phpbb_search_wordlist
+ WHERE word_id = " . $rowset[$i]['word_id'];
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete word list entry", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ }
+ }
+
+ $sql = "DELETE FROM phpbb_search_wordmatch
+ WHERE post_id = $post_id";
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete word match entry for this post", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain post text", "", __LINE__, __FILE__, $sql);
+ }
+
+ return;
+ }
+
+ function add_search_words($post_id, $text)
+ {
+ global $db, $phpbb_root_path, $board_config, $lang;
+
+ $stopword_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_stopwords.txt");
+ $synonym_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_synonyms.txt");
+
+ $search_text = clean_words($text, $stopword_array, $synonym_array);
+ $search_matches = split_words($search_text);
+
+ if( count($search_matches) )
+ {
+ $word = array();
+ $word_count = array();
+ $phrase_string = $text;
+
+ $sql_in = "";
+ for ($j = 0; $j < count($search_matches); $j++)
+ {
+ $this_word = strtolower(trim($search_matches[$j]));
+
+ if( empty($word_count[$this_word]) )
+ {
+ $word_count[$this_word] = 1;
+ }
+
+ $new_word = true;
+ for($k = 0; $k < count($word); $k++)
+ {
+ if( $this_word == $word[$k] )
+ {
+ $new_word = false;
+ $word_count[$this_word]++;
+ }
+ }
+
+ if( $new_word )
+ {
+ $word[] = $this_word;
+ }
+ }
+
+ for($j = 0; $j < count($word); $j++)
+ {
+ if( $word[$j] )
+ {
+ if( $sql_in != "" )
+ {
+ $sql_in .= ", ";
+ }
+ $sql_in .= "'" . $word[$j] . "'";
+ }
+ }
+
+ $sql = "SELECT word_id, word_text
+ FROM phpbb_search_wordlist
+ WHERE word_text IN ($sql_in)";
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't select words", "", __LINE__, __FILE__, $sql);
+ }
+
+ if( $word_check_count = $db->sql_numrows($result) )
+ {
+ $check_words = $db->sql_fetchrowset($result);
+ }
+
+ for ($j = 0; $j < count($word); $j++)
+ {
+ if( $word[$j] )
+ {
+ $new_match = true;
+
+ if( $word_check_count )
+ {
+ for($k = 0; $k < $word_check_count; $k++)
+ {
+ if( $word[$j] == $check_words[$k]['word_text'] )
+ {
+ $new_match = false;
+ $word_id = $check_words[$k]['word_id'];
+ }
+ }
+ }
+
+ if( $new_match )
+ {
+ $sql = "INSERT INTO phpbb_search_wordlist (word_text)
+ VALUES ('". addslashes($word[$j]) . "')";
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't insert new word", "", __LINE__, __FILE__, $sql);
+ }
+
+ $word_id = $db->sql_nextid();
+ }
+
+ $sql = "INSERT INTO phpbb_search_wordmatch (post_id, word_id, word_count, title_match)
+ VALUES ($post_id, $word_id, " . $word_count[$word[$j]] . ", 0)";
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't insert new word match", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ }
+ }
+
+ remove_common(0.25, $check_words);
+
+ return;
+ }
+
function topic_review($topic_id, $is_inline_review)
{
***************
*** 908,912 ****
$result = ($mode == "reply") ? $db->sql_query($sql, BEGIN_TRANSACTION) : $db->sql_query($sql);
! if($result)
{
$new_post_id = $db->sql_nextid();
--- 1313,1317 ----
$result = ($mode == "reply") ? $db->sql_query($sql, BEGIN_TRANSACTION) : $db->sql_query($sql);
! if( $result )
{
$new_post_id = $db->sql_nextid();
***************
*** 915,919 ****
VALUES ($new_post_id, '$post_subject', '$post_message')";
! if($db->sql_query($sql))
{
$sql = "UPDATE " . TOPICS_TABLE . "
--- 1320,1324 ----
VALUES ($new_post_id, '$post_subject', '$post_message')";
! if( $db->sql_query($sql) )
{
$sql = "UPDATE " . TOPICS_TABLE . "
***************
*** 925,933 ****
$sql .= " WHERE topic_id = $new_topic_id";
! if($db->sql_query($sql))
{
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
! if($mode == "newtopic")
{
$sql .= ", forum_topics = forum_topics + 1";
--- 1330,1338 ----
$sql .= " WHERE topic_id = $new_topic_id";
! if( $db->sql_query($sql) )
{
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
! if( $mode == "newtopic" )
{
$sql .= ", forum_topics = forum_topics + 1";
***************
*** 936,940 ****
$sql .= " WHERE forum_id = $forum_id";
! if($db->sql_query($sql))
{
$sql = "UPDATE " . USERS_TABLE . "
--- 1341,1345 ----
$sql .= " WHERE forum_id = $forum_id";
! if( $db->sql_query($sql) )
{
$sql = "UPDATE " . USERS_TABLE . "
***************
*** 942,947 ****
WHERE user_id = " . $userdata['user_id'];
! if($db->sql_query($sql, END_TRANSACTION))
{
//
// Email users who are watching this topic
--- 1347,1354 ----
WHERE user_id = " . $userdata['user_id'];
! if( $db->sql_query($sql, END_TRANSACTION))
{
+ add_search_words($new_post_id, stripslashes($post_message));
+
//
// Email users who are watching this topic
***************
*** 1248,1255 ****
if( $delete || $mode == "delete" )
{
$sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
WHERE post_id = $post_id";
-
if($db->sql_query($sql, BEGIN_TRANSACTION))
{
--- 1655,1662 ----
if( $delete || $mode == "delete" )
{
+ remove_old_words($post_id);
$sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
WHERE post_id = $post_id";
if($db->sql_query($sql, BEGIN_TRANSACTION))
{
***************
*** 1258,1262 ****
if($db->sql_query($sql))
{
-
if( $is_last_post_topic && $is_first_post_topic )
{
--- 1665,1668 ----
***************
*** 1379,1383 ****
$message = $lang['Deleted'];
! if( !$is_first_post_topic && !$is_last_post_topic )
{
$template->assign_vars(array(
--- 1785,1789 ----
$message = $lang['Deleted'];
! if( !$is_first_post_topic || !$is_last_post_topic )
{
$template->assign_vars(array(
***************
*** 1473,1480 ****
}
$sql = "UPDATE " . POSTS_TABLE . "
SET bbcode_uid = '$bbcode_uid', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . "
WHERE post_id = $post_id";
-
if($db->sql_query($sql, BEGIN_TRANSACTION))
{
--- 1879,1887 ----
}
+ remove_old_words($post_id);
+
$sql = "UPDATE " . POSTS_TABLE . "
SET bbcode_uid = '$bbcode_uid', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . "
WHERE post_id = $post_id";
if($db->sql_query($sql, BEGIN_TRANSACTION))
{
***************
*** 1487,1490 ****
--- 1894,1899 ----
if( $db->sql_query($sql) )
{
+ add_search_words($post_id, stripslashes($post_message));
+
//
// Update topics table here
***************
*** 1605,1615 ****
}
}
- else
- {
-
- }
}
else
{
if( $db->sql_query($sql, END_TRANSACTION) )
{
--- 2014,2023 ----
}
}
}
else
{
+ remove_old_words($post_id);
+ add_search_words($post_id, stripslashes($post_message));
+
if( $db->sql_query($sql, END_TRANSACTION) )
{
***************
*** 1951,1955 ****
}
! $post_message = preg_replace("/(|\:1)\:$post_bbcode_uid(|\:[a-z])/si", "", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
--- 2359,2363 ----
}
! $post_message = preg_replace("/\:$post_bbcode_uid(|\:[a-z])/si", "", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
***************
*** 2140,2145 ****
"L_POSTED" => $lang['Posted'])
);
! $template->pparse("preview");
!
}
//
--- 2548,2552 ----
"L_POSTED" => $lang['Posted'])
);
! $template->assign_var_from_handle("POST_PREVIEW_BOX", "preview");
}
//
***************
*** 2158,2162 ****
"ERROR_MESSAGE" => $error_msg)
);
! $template->pparse("reg_header");
}
//
--- 2565,2569 ----
"ERROR_MESSAGE" => $error_msg)
);
! $template->assign_var_from_handle("ERROR_BOX", "reg_header");
}
//
|
|
From: Paul S. O. <ps...@us...> - 2001-11-09 13:05:56
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv8934
Modified Files:
viewtopic.php
Log Message:
I really dispise ), someone should ban them immediately
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -r1.130 -r1.131
*** viewtopic.php 2001/11/09 12:32:23 1.130
--- viewtopic.php 2001/11/09 13:05:54 1.131
***************
*** 501,505 ****
for($i = 0; $i < count($words); $i++)
{
! if( trim($words[$i] != "" )
{
$highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
--- 501,505 ----
for($i = 0; $i < count($words); $i++)
{
! if( trim($words[$i]) != "" )
{
$highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
|
|
From: Paul S. O. <ps...@us...> - 2001-11-09 13:00:06
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv6988/templates/subSilver
Modified Files:
search_body.tpl search_results_topics.tpl
Log Message:
New search system, this isn't final, needs alterations, etc. can redeem this against the full priced version with included coupon
Index: search_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/search_body.tpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** search_body.tpl 2001/10/01 23:22:18 1.2
--- search_body.tpl 2001/11/09 13:00:04 1.3
***************
*** 28,32 ****
</tr>
<tr>
! <td class="catSides" colspan="4" align="center" height="28"><b><span class="gen">{L_SEARCH_OPTIONS}</span></b></td>
</tr>
<tr>
--- 28,32 ----
</tr>
<tr>
! <th class="thHead" colspan="4" height="25">{L_SEARCH_OPTIONS}</th>
</tr>
<tr>
***************
*** 62,72 ****
<td class="row1" align="right" nowrap="nowrap"><span class="gen">{L_DISPLAY_RESULTS}: </span></td>
<td class="row2" nowrap="nowrap">
! <input type="radio" name="showresults" value="posts" checked />
<span class="genmed">{L_POSTS}
! <input type="radio" name="showresults" value="topics" />
{L_TOPICS}</span></td>
<td class="row1" align="right" nowrap="nowrap"><span class="gen">{L_SEARCH_PREVIOUS}: </span></td>
<td class="row2" valign="middle"><span class="genmed">
! <select class="post" name="sortby">{S_TIME_OPTIONS}
</select>
</span></td>
--- 62,72 ----
<td class="row1" align="right" nowrap="nowrap"><span class="gen">{L_DISPLAY_RESULTS}: </span></td>
<td class="row2" nowrap="nowrap">
! <input type="radio" name="showresults" value="posts" />
<span class="genmed">{L_POSTS}
! <input type="radio" name="showresults" value="topics" checked="checked" />
{L_TOPICS}</span></td>
<td class="row1" align="right" nowrap="nowrap"><span class="gen">{L_SEARCH_PREVIOUS}: </span></td>
<td class="row2" valign="middle"><span class="genmed">
! <select class="post" name="resultdays">{S_TIME_OPTIONS}
</select>
</span></td>
***************
*** 74,78 ****
<tr>
<td class="catBottom" colspan="4" align="center" height="28">{S_HIDDEN_FIELDS}
! <input class="liteoption" type="submit" name="submit" value="{L_SEARCH}" />
</td>
</tr>
--- 74,78 ----
<tr>
<td class="catBottom" colspan="4" align="center" height="28">{S_HIDDEN_FIELDS}
! <input class="liteoption" type="submit" value="{L_SEARCH}" />
</td>
</tr>
Index: search_results_topics.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/search_results_topics.tpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** search_results_topics.tpl 2001/10/01 23:22:18 1.3
--- search_results_topics.tpl 2001/11/09 13:00:04 1.4
***************
*** 26,30 ****
<td class="row1" align="center" valign="middle">{searchresults.FOLDER}</td>
<td class="row1"><span class="forumlink"><a href="{searchresults.U_VIEW_FORUM}" class="forumlink">{searchresults.FORUM_NAME}</a></span></td>
! <td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><span class="gensmall"> {searchresults.GOTO_PAGE}</span></td>
<td class="row1" align="center" valign="middle"><span class="postdetails">{searchresults.REPLIES}</span></td>
<td class="row2" align="center" valign="middle"><span class="name"><a href="{searchresults.U_TOPIC_POSTER_PROFILE}" class="name">{searchresults.TOPIC_POSTER}</a></span></td>
--- 26,30 ----
<td class="row1" align="center" valign="middle">{searchresults.FOLDER}</td>
<td class="row1"><span class="forumlink"><a href="{searchresults.U_VIEW_FORUM}" class="forumlink">{searchresults.FORUM_NAME}</a></span></td>
! <td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
<td class="row1" align="center" valign="middle"><span class="postdetails">{searchresults.REPLIES}</span></td>
<td class="row2" align="center" valign="middle"><span class="name"><a href="{searchresults.U_TOPIC_POSTER_PROFILE}" class="name">{searchresults.TOPIC_POSTER}</a></span></td>
|
|
From: Paul S. O. <ps...@us...> - 2001-11-09 13:00:06
|
Update of /cvsroot/phpbb/phpBB2 In directory usw-pr-cvs1:/tmp/cvs-serv6988 Modified Files: search.php Log Message: New search system, this isn't final, needs alterations, etc. can redeem this against the full priced version with included coupon Index: search.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/search.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** search.php 2001/10/16 14:43:03 1.22 --- search.php 2001/11/09 13:00:03 1.23 *************** *** 21,30 **** ***************************************************************************/ - // - // Massive overhaul for phpBB2, originally based on search code - // I knocked together for my own website - // - // PSO : 2001 - // $phpbb_root_path = "./"; include($phpbb_root_path . 'extension.inc'); [...1278 lines suppressed...] $template->assign_vars(array( ! "PAGINATION" => generate_pagination($base_url, $total_match_count, $per_page, $start), ! "ON_PAGE" => floor( $start / $per_page ) + 1, ! "TOTAL_PAGES" => ceil( $total_match_count / $per_page ), "L_OF" => $lang['of'], *************** *** 1099,1103 **** // $previous_days = array(0, 1, 7, 14, 30, 90, 180, 364); ! $previous_days_text = array($lang['All'], "1 " . $lang['Day'], "7 " . $lang['Days'], "2 " . $lang['Weeks'], "1 " . $lang['Month'], "3 ". $lang['Months'], "6 " . $lang['Months'], "1 " . $lang['Year']); $s_time = ""; --- 1110,1114 ---- // $previous_days = array(0, 1, 7, 14, 30, 90, 180, 364); ! $previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']); $s_time = ""; |
|
From: Paul S. O. <ps...@us...> - 2001-11-09 13:00:06
|
Update of /cvsroot/phpbb/phpBB2/develop
In directory usw-pr-cvs1:/tmp/cvs-serv6988/develop
Added Files:
search_fill.php
Log Message:
New search system, this isn't final, needs alterations, etc. can redeem this against the full priced version with included coupon
--- NEW FILE ---
<?php
function clean_words($entry, &$stopword_list, &$synonym_list)
{
$init_match = array("^", "$", "&", "(", ")", "<", ">", "`", "'", "|", ",", "@", "_", "?", "%");
$init_replace = array(" ", " ", " ", " ", " ", " ", " ", " ", "", " ", " ", " ", " ", " ", " ");
$later_match = array("-", "~", "+", ".", "[", "]", "{", "}", ":", "\\", "/", "=", "#", "\"", ";", "*", "!");
$later_replace = array(" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ");
$entry = " " . stripslashes(strip_tags(strtolower($entry))) . " ";
$entry = preg_replace("/[\n\r]/is", " ", $entry);
$entry = preg_replace("/\b[a-z0-9]+:\/\/[a-z0-9\.\-]+(\/[a-z0-9\?\.%_\-\+=&\/]+)?/si", " ", $entry);
$entry = str_replace($init_match, $init_replace, $entry);
$entry = preg_replace("/\[code:[0-9]+:[0-9a-z]{10,}\].*?\[\/code:[0-9]+:[0-9a-z]{10,}\]/is", " ", $entry);
$entry = preg_replace("/\[img\].*?\[\/img\]/is", " ", $entry);
$entry = preg_replace("/\[\/?[a-z\*=\+\-]+[0-9a-z]?(\:[a-z0-9]+)?:[a-z0-9]{10,}(\:[a-z0-9]+)?=?.*?\]/si", " ", $entry);
$entry = preg_replace("/\[\/?[a-z\*]+[=\+\-]?[0-9a-z]+?:[a-z0-9]{10,}[=.*?]?\]/si", " ", $entry);
$entry = preg_replace("/\[\/?url(=.*?)?\]/si", " ", $entry);
$entry = preg_replace("/\b[0-9]+\b/si", " ", $entry);
$entry = preg_replace("/\b&[a-z]+;\b/is", " ", $entry);
$entry = preg_replace("/\b[a-z0-9]{1,2}?\b/si", " ", $entry);
$entry = preg_replace("/\b[a-z0-9]{50,}?\b/si", " ", $entry);
$entry = str_replace($later_match, $later_replace, $entry);
if( !empty($stopword_list) )
{
for ($j = 0; $j < count($stopword_list); $j++)
{
$filter_word = trim(strtolower($stopword_list[$j]));
$entry = preg_replace("/\b" . preg_quote($filter_word, "/") . "\b/is", " ", $entry);
}
}
if( !empty($synonym_list) )
{
for ($j = 0; $j < count($synonym_list); $j++)
{
list($replace_synonym, $match_synonym) = split(" ", trim(strtolower($synonym_list[$j])));
$entry = preg_replace("/\b" . preg_quote(trim($match_synonym), "/") . "\b/is", " " . trim($replace_synonym) . " ", $entry);
}
}
return $entry;
}
function split_words(&$entry)
{
preg_match_all("/\b(\w[\w']*\w+|\w+?)\b/", $entry, $split_entries);
return $split_entries[1];
}
function remove_common($percent)
{
global $db;
$sql = "SELECT sl.word_id, SUM(sm.word_count) AS post_occur_count
FROM phpbb_search_wordlist sl, phpbb_search_wordmatch sm
WHERE sl.word_id = sm.word_id
GROUP BY sl.word_id
ORDER BY post_occur_count DESC";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't obtain search word sums", "", __LINE__, __FILE__, $sql);
}
$post_count = $db->sql_numrows($result);
$rowset = $db->sql_fetchrowset($result);
$sql = "SELECT COUNT(post_id) AS total_posts
FROM phpbb_posts";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't obtain post count", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$words_removed = 0;
for($i = 0; $i < $post_count; $i++)
{
if( ($rowset[$i]['post_occur_count'] / $row['total_posts'] ) >= $percent )
{
$sql = "DELETE FROM phpbb_search_wordlist
WHERE word_id = " . $rowset[$i]['word_id'];
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't delete word list entry", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM phpbb_search_wordmatch
WHERE word_id = " . $rowset[$i]['word_id'];
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't delete word match entry", "", __LINE__, __FILE__, $sql);
}
$words_removed++;
}
}
return $words_removed;
}
set_time_limit(2400);
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
//
// Try and load stopword and synonym files
//
//$stopword_array = file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_stopwords.txt");
//$synonym_array = file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_synonyms.txt");
$stopword_array = file($phpbb_root_path . "language/lang_english/search_stopwords.txt");
$synonym_array = file($phpbb_root_path . "language/lang_english/search_synonyms.txt");
//
// Build search ...
//
$start = ( isset($HTTP_GET_VARS['start']) ) ? $HTTP_GET_VARS['start'] : 0;
$sql = "SELECT *
FROM " . POSTS_TEXT_TABLE . "
ORDER BY post_id ASC
LIMIT $start, 200";
$result = $db->sql_query($sql);
if( !$result )
{
$error = $db->sql_error();
die("Couldn't select words :: " . $sql . " :: " . $error['message']);
}
$rowset = $db->sql_fetchrowset($result);
if( $post_rows = $db->sql_numrows($result) )
{
// $sql = "LOCK TABLES phpbb_posts_text WRITE";
// $result = $db->sql_query($sql);
for($i = 0; $i < $post_rows; $i++ )
{
$matches = array();
$post_id = $rowset[$i]['post_id'];
$data = $rowset[$i]['post_text'];
$text = clean_words($data, $stopword_array, $synonym_array);
$matches = split_words($text);
if( count($matches) )
{
$word = array();
$word_count = array();
$phrase_string = $text;
$sql_in = "";
for ($j = 0; $j < count($matches); $j++)
{
$this_word = strtolower(trim($matches[$j]));
if( empty($word_count[$this_word]) )
{
$word_count[$this_word] = 1;
}
$new_word = true;
for($k = 0; $k < count($word); $k++)
{
if( $this_word == $word[$k] )
{
$new_word = false;
$word_count[$this_word]++;
}
}
if( $new_word )
{
$word[] = $this_word;
}
}
for($j = 0; $j < count($word); $j++)
{
if( $word[$j] )
{
if( $sql_in != "" )
{
$sql_in .= ", ";
}
$sql_in .= "'" . $word[$j] . "'";
}
}
$sql = "SELECT word_id, word_text
FROM phpbb_search_wordlist
WHERE word_text IN ($sql_in)";
$result = $db->sql_query($sql);
if( !$result )
{
$error = $db->sql_error();
die("Couldn't select words :: " . $sql . " :: " . $error['message']);
}
if( $word_check_count = $db->sql_numrows($result) )
{
$check_words = $db->sql_fetchrowset($result);
}
for ($j = 0; $j < count($word); $j++)
{
if( $word[$j] )
{
$new_match = true;
if( $word_check_count )
{
for($k = 0; $k < $word_check_count; $k++)
{
if( $word[$j] == $check_words[$k]['word_text'] )
{
$new_match = false;
$word_id = $check_words[$k]['word_id'];
}
}
}
if( $new_match )
{
$sql = "INSERT INTO phpbb_search_wordlist (word_text)
VALUES ('". addslashes($word[$j]) . "')";
$result = $db->sql_query($sql);
if( !$result )
{
$error = $db->sql_error();
die("Couldn't insert new word :: " . $sql . " :: " . $error['message']);
}
$word_id = $db->sql_nextid();
}
$sql = "INSERT INTO phpbb_search_wordmatch (post_id, word_id, word_count, title_match)
VALUES ($post_id, $word_id, " . $word_count[$word[$j]] . ", 0)";
$result = $db->sql_query($sql);
if( !$result )
{
$error = $db->sql_error();
die("Couldn't insert new word match :: " . $sql . " :: " . $error['message']);
}
$phrase_string = preg_replace("/\b" . preg_quote($word[$j], "/") . "\b/is", $word_id, $phrase_string);
}
}
/*
$phrase_string = trim(preg_replace("/ {2,}/s", " ", str_replace(array("*", "'"), " ", $phrase_string)));
$sql = "INSERT INTO phpbb_search_phrasematch (post_id, phrase_list)
VALUES ($post_id, '$phrase_string')";
$result = $db->sql_query($sql);
if( !$result )
{
$error = $db->sql_error();
die("Couldn't insert new phrase match :: " . $sql . " :: " . $error['message']);
}
*/
}
}
// $sql = "UNLOCK TABLES";
// $result = $db->sql_query($sql);
}
if( $post_rows == 200 )
{
header("Location: search_fill.php?start=" . ($start+200) . "&total=" . ($start + $post_rows));
}
?>
<html>
<body>
<?php
$total_rows = ( $HTTP_GET_VARS['total'] ) ? $HTTP_GET_VARS['total'] : $post_rows;
echo "<BR><BR>Total posts = " . $total_rows . "<BR><BR>";
echo remove_common(0.4);
exit;
?>
</body>
</html>
|
|
From: Paul S. O. <ps...@us...> - 2001-11-09 12:32:26
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv25448
Modified Files:
viewtopic.php
Log Message:
Corrected for space within highlighted words, this is the version running on the main site
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.129
retrieving revision 1.130
diff -C2 -r1.129 -r1.130
*** viewtopic.php 2001/11/09 12:24:36 1.129
--- viewtopic.php 2001/11/09 12:32:23 1.130
***************
*** 501,509 ****
for($i = 0; $i < count($words); $i++)
{
! $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
! $highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
}
! $highlight_active = ( count($words) ) ? true : false;
}
--- 501,512 ----
for($i = 0; $i < count($words); $i++)
{
! if( trim($words[$i] != "" )
! {
! $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
! $highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
! }
}
! $highlight_active = ( count($highlight_match) ) ? true : false;
}
|
|
From: Paul S. O. <ps...@us...> - 2001-11-09 12:24:40
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv20357
Modified Files:
viewtopic.php
Log Message:
The way message is output for unset topic/post was correct, changing back
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.128
retrieving revision 1.129
diff -C2 -r1.128 -r1.129
*** viewtopic.php 2001/11/09 09:12:01 1.128
--- viewtopic.php 2001/11/09 12:24:36 1.129
***************
*** 46,50 ****
if( !isset($topic_id) && !isset($post_id) )
{
! message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist'], $lang['Error'], __LINE__, __FILE__);
}
--- 46,50 ----
if( !isset($topic_id) && !isset($post_id) )
{
! message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
|
|
From: James A. <th...@us...> - 2001-11-09 09:12:04
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv9086
Modified Files:
viewtopic.php
Log Message:
Fixed bug #478505 also added code to retain highlight though pagination on viewtopic
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.127
retrieving revision 1.128
diff -C2 -r1.127 -r1.128
*** viewtopic.php 2001/11/09 08:57:36 1.127
--- viewtopic.php 2001/11/09 09:12:01 1.128
***************
*** 497,501 ****
// Split words and phrases
//
! $words = explode(" ", $HTTP_GET_VARS['highlight']);
for($i = 0; $i < count($words); $i++)
--- 497,501 ----
// Split words and phrases
//
! $words = explode(" ", trim(urldecode($HTTP_GET_VARS['highlight'])));
for($i = 0; $i < count($words); $i++)
***************
*** 1034,1039 ****
}
$template->assign_vars(array(
! "PAGINATION" => generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start),
"PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $total_replies / $board_config['posts_per_page'] )),
--- 1034,1051 ----
}
+ //
+ // If we've got a hightlight set pass it on to pagination, I get annoyed when I lose my highlight after the first page.
+ //
+ if(isset($HTTP_GET_VARS['highlight']))
+ {
+ $pagination = generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&highlight=" . $HTTP_GET_VARS['highlight'], $total_replies, $board_config['posts_per_page'], $start);
+ }
+ else
+ {
+ $pagination = generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start);
+ }
+
$template->assign_vars(array(
! "PAGINATION" => $pagination,
"PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $total_replies / $board_config['posts_per_page'] )),
|
|
From: James A. <th...@us...> - 2001-11-09 08:57:40
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv3015/admin
Modified Files:
admin_db_utilities.php admin_groups.php admin_mass_email.php
Log Message:
Checked all calls to message_die and made sure that if they would be outputted to a user
without a major error that they got their error string from the lang file
Also made sure all calls had the right arguments in teh right place
Index: admin_db_utilities.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_db_utilities.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** admin_db_utilities.php 2001/10/14 15:46:53 1.26
--- admin_db_utilities.php 2001/11/09 08:57:37 1.27
***************
*** 957,962 ****
if(!$result && ( !(SQL_LAYER == 'postgres' && eregi("drop table", $sql) ) ) )
{
! include('page_header_admin.'.$phpEx);
! echo "~~$sql~~";
message_die(GENERAL_ERROR, "Error importing backup file", "", __LINE__, __FILE__, $sql);
}
--- 957,962 ----
if(!$result && ( !(SQL_LAYER == 'postgres' && eregi("drop table", $sql) ) ) )
{
! //include('page_header_admin.'.$phpEx);
! // echo "~~$sql~~";
message_die(GENERAL_ERROR, "Error importing backup file", "", __LINE__, __FILE__, $sql);
}
Index: admin_groups.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_groups.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** admin_groups.php 2001/11/03 19:17:06 1.13
--- admin_groups.php 2001/11/09 08:57:37 1.14
***************
*** 64,68 ****
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, "That user group does not exist");
}
$group_info = $db->sql_fetchrow($result);
--- 64,68 ----
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
$group_info = $db->sql_fetchrow($result);
***************
*** 200,204 ****
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, "That user group does not exist");
}
$group_info = $db->sql_fetchrow($result);
--- 200,204 ----
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
$group_info = $db->sql_fetchrow($result);
Index: admin_mass_email.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_mass_email.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** admin_mass_email.php 2001/10/14 15:46:53 1.6
--- admin_mass_email.php 2001/11/09 08:57:37 1.7
***************
*** 44,48 ****
// Set VERBOSE to 1 for debugging info..
//
! define("VERBOSE", 0);
//
--- 44,55 ----
// Set VERBOSE to 1 for debugging info..
//
! if(DEBUG)
! {
! define("VERBOSE", 1);
! }
! else
! {
! define("VERBOSE", 0);
! }
//
***************
*** 89,92 ****
--- 96,100 ----
$email_headers .= $g_list[$i]['user_email'];
}
+
mail($board_config['board_email'],$HTTP_POST_VARS["$f_title"],$HTTP_POST_VARS["$f_msg"],$email_headers);
$notice = $lang['Messages'].' '.$lang['Sent'].'!';
|
|
From: James A. <th...@us...> - 2001-11-09 08:57:40
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv3015/language/lang_english Modified Files: lang_main.php Log Message: Checked all calls to message_die and made sure that if they would be outputted to a user without a major error that they got their error string from the lang file Also made sure all calls had the right arguments in teh right place Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** lang_main.php 2001/11/07 21:44:07 1.27 --- lang_main.php 2001/11/09 08:57:37 1.28 *************** *** 147,150 **** --- 147,151 ---- $lang['Newest_user'] = "The newest registered user is <b>%s%s%s</b>"; // username + $lang['No_new_posts_last_visit'] = "No new posts since your last visit"; $lang['No_new_posts'] = "No new posts"; $lang['New_posts'] = "New posts"; *************** *** 556,559 **** --- 557,563 ---- $lang['Non_member_groups'] = "Non-member groups"; $lang['Memberships_pending'] = "Memberships pending"; + + $lang['No_groups_exist'] = "No Groups Exist"; + $lang['Group_not_exist'] = "That user group does not exist"; $lang['Join_group'] = "Join Group"; |
|
From: James A. <th...@us...> - 2001-11-09 08:57:40
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv3015
Modified Files:
groupcp.php viewtopic.php
Log Message:
Checked all calls to message_die and made sure that if they would be outputted to a user
without a major error that they got their error string from the lang file
Also made sure all calls had the right arguments in teh right place
Index: groupcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/groupcp.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** groupcp.php 2001/11/03 19:17:06 1.17
--- groupcp.php 2001/11/09 08:57:36 1.18
***************
*** 513,517 ****
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, "That user group does not exist");
}
$group_info = $db->sql_fetchrow($result);
--- 513,517 ----
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
$group_info = $db->sql_fetchrow($result);
***************
*** 994,998 ****
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, "No groups exist");
}
$group_list = $db->sql_fetchrowset($result);
--- 994,998 ----
if( !$db->sql_numrows($result) )
{
! message_die(GENERAL_MESSAGE, $lang['No_groups_exist']);
}
$group_list = $db->sql_fetchrowset($result);
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.126
retrieving revision 1.127
diff -C2 -r1.126 -r1.127
*** viewtopic.php 2001/10/26 01:09:08 1.126
--- viewtopic.php 2001/11/09 08:57:36 1.127
***************
*** 46,50 ****
if( !isset($topic_id) && !isset($post_id) )
{
! message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
--- 46,50 ----
if( !isset($topic_id) && !isset($post_id) )
{
! message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist'], $lang['Error'], __LINE__, __FILE__);
}
***************
*** 76,80 ****
if( !($row = $db->sql_fetchrow($result)) )
{
! message_die(GENERAL_MESSAGE, 'No new posts since your last visit');
}
else
--- 76,80 ----
if( !($row = $db->sql_fetchrow($result)) )
{
! message_die(GENERAL_MESSAGE, $lang['No_new_posts_last_visit']);
}
else
|
|
From: Nathan C. <na...@us...> - 2001-11-08 06:12:55
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv18361
Modified Files:
profile.php
Log Message:
Fixed bug where more than 2 dots in email not allowed in registration
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.125
retrieving revision 1.126
diff -C2 -r1.125 -r1.126
*** profile.php 2001/11/05 01:24:26 1.125
--- profile.php 2001/11/08 06:12:53 1.126
***************
*** 50,54 ****
if($email != "")
{
! if( preg_match("/^[a-z0-9\.\-_]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)?[a-z]+$/is", $email) )
{
$sql = "SELECT ban_email
--- 50,54 ----
if($email != "")
{
! if( preg_match("/^[a-z0-9\.\-_]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is", $email) )
{
$sql = "SELECT ban_email
|
|
From: Nathan C. <na...@us...> - 2001-11-08 06:06:57
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv17318
Modified Files:
posting.php privmsg.php
Log Message:
fixed code:1 bbcode bug.
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -r1.88 -r1.89
*** posting.php 2001/11/05 02:40:41 1.88
--- posting.php 2001/11/08 06:06:54 1.89
***************
*** 1951,1955 ****
}
! $post_message = preg_replace("/\:$post_bbcode_uid(|\:[a-z])/si", "", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
--- 1951,1955 ----
}
! $post_message = preg_replace("/(|\:1)\:$post_bbcode_uid(|\:[a-z])/si", "", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** privmsg.php 2001/11/02 22:35:31 1.38
--- privmsg.php 2001/11/08 06:06:54 1.39
***************
*** 1179,1183 ****
$to_userid = $privmsg['user_id'];
! $privmsg_message = preg_replace("/\:$post_bbcode_uid(|\:[a-z])/si", "", $privmsg_message);
$privmsg_message = str_replace("<br />", "\n", $privmsg_message);
$privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
--- 1179,1183 ----
$to_userid = $privmsg['user_id'];
! $privmsg_message = preg_replace("/(|\:1)\:$post_bbcode_uid(|\:[a-z])/si", "", $privmsg_message);
$privmsg_message = str_replace("<br />", "\n", $privmsg_message);
$privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
|
|
From: Jonathan H. <the...@us...> - 2001-11-07 21:44:11
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv17089/admin
Modified Files:
admin_smilies.php
Log Message:
Adding capability for "smiley packs" import/export
Index: admin_smilies.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_smilies.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** admin_smilies.php 2001/11/01 19:37:47 1.10
--- admin_smilies.php 2001/11/07 21:44:07 1.11
***************
*** 39,44 ****
//
$phpbb_root_dir = "./../";
require('pagestart.inc');
!
//
// Check to see what mode we should operate in.
--- 39,48 ----
//
$phpbb_root_dir = "./../";
+ if( $HTTP_GET_VARS['mode'] == 'export' && $HTTP_GET_VARS['send_file'] == 1 )
+ {
+ $no_page_header = 1;
+ }
require('pagestart.inc');
! $delimeter = '=+:';
//
// Check to see what mode we should operate in.
***************
*** 62,66 ****
if( !@is_dir($phpbb_root_path . $board_config['smilies_path'] . '/' . $file) )
{
! $smiley_images[] = $file;
}
}
--- 66,77 ----
if( !@is_dir($phpbb_root_path . $board_config['smilies_path'] . '/' . $file) )
{
! if( !is_null(@getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file)) )
! {
! $smiley_images[] = $file;
! }
! elseif(eregi('.pak$', $file) )
! {
! $smiley_paks[] = $file;
! }
}
}
***************
*** 73,76 ****
--- 84,269 ----
switch($mode)
{
+ case 'import':
+ //
+ // Import a list a "Smiley Pack"
+ //
+ $smile_pak = ( !empty($HTTP_POST_VARS['smile_pak']) ) ? $HTTP_POST_VARS['smile_pak'] : $HTTP_GET_VARS['smile_pak'];
+ $clear_current = ( !empty($HTTP_POST_VARS['clear_current']) ) ? $HTTP_POST_VARS['clear_current'] : $HTTP_GET_VARS['clear_current'];
+ $replace_existing = ( ! empty($HTTP_POST_VARS['replace']) ) ? $HTTP_POST_VARS['replace'] : $HTTP_GET_VARS['replace'];
+ if ( !empty($smile_pak) )
+ {
+ //
+ // The user has already selected a smile_pak file.. Import it.
+ //
+ if( $clear_current == 'Y' )
+ {
+ $sql = "DELETE FROM " . SMILIES_TABLE;
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete current smilies", "", __LINE__, __FILE__, $sql);
+ }
+
+ }
+ else
+ {
+ $sql = "SELECT code FROM ". SMILIES_TABLE;
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't get current smilies", "", __LINE__, __FILE__, $sql);
+ }
+
+ $cur_smilies = $db->sql_fetchrowset($result);
+ for( $i = 0; $i < count($cur_smilies); $i++ )
+ {
+ $k = $cur_smilies[$i]['code'];
+ $smiles[$k] = 1;
+ }
+ }
+ $fcontents = @file($phpbb_root_path . $board_config['smilies_path'] . '/'. $smile_pak);
+ if( empty($fcontents) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't read smiley pak file", "", __LINE__, __FILE__, $sql);
+ }
+ for( $i = 0; $i < count($fcontents); $i++ )
+ {
+ if( !get_magic_quotes_runtime() )
+ {
+ $fcontents[$i] = addslashes($fcontents[$i]);
+ }
+ $smile_data = explode($delimeter, trim($fcontents[$i]));
+ for( $j = 2; $j < count($smile_data); $j++)
+ {
+ $k = $smile_data[$j];
+ if( $smiles[$k] == 1 )
+ {
+ if( $replace_existing == 'Y' )
+ {
+ $sql = "UPDATE " . SMILIES_TABLE . "
+ SET smile_url = '$smile_data[0]',
+ emoticon = '$smile_data[1]'
+ WHERE code = '$smile_data[$j]'";
+
+ }
+ else
+ {
+ $sql = '';
+ }
+ }
+ else
+ {
+ $sql = "INSERT INTO " . SMILIES_TABLE . " (
+ code,
+ smile_url,
+ emoticon )
+ VALUES(
+ '$smile_data[$j]',
+ '$smile_data[0]',
+ '$smile_data[1]')";
+
+ }
+ if( $sql != '' )
+ {
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't update smilies!", "", __LINE__, __FILE__, $sql);
+ }
+
+ }
+ }
+ }
+ //
+ // Ok the smilies have been imported do something...
+ //
+ $template->set_filenames(array(
+ "body" => "admin/admin_message_body.tpl")
+ );
+ $template->assign_vars(array(
+ "MESSAGE_TITLE" => $lang['smiley_title'],
+ "MESSAGE_TEXT" => $lang['smiley_import_success'])
+ );
+ $template->pparse("body");
+
+ }
+ else
+ {
+ //
+ // Display the script to get the smile_pak cfg file...
+ //
+ $smile_paks_select = "<SELECT NAME='smile_pak'><option value=''>".$lang['Select_pak']."</option>";
+ while( list($key, $value) = each($smiley_paks) )
+ {
+ if ( !empty($value) )
+ {
+ $smile_paks_select .= "<option>".$value."</option>";
+ }
+ }
+ $smile_paks_select .= "</select>";
+ $replace_opt = "<input type='radio' name='replace' value='Y'> ".$lang['replace_existing'];
+ $keep_opt = "<input type='radio' name='replace' value='N'> ".$lang['keep_existing'];
+ $del_exist = "<input type='checkbox' name='clear_current' value='Y'>";
+ $hidden_vars = "<input type='hidden' name='mode' value='import'>";
+ $template->set_filenames(array(
+ "body" => "admin/smile_import_body.tpl")
+ );
+ $template->assign_vars(array(
+ "S_SMILEY_ACTION" => $PHPSELF,
+ "L_SMILEY_TITLE" => $lang['smiley_title'],
+ "L_SMILEY_EXPLAIN" => $lang['smiley_import_inst'],
+ "L_SMILEY_IMPORT" => $lang['smiley_import'],
+ "L_SELECT_LBL" => $lang['choose_smile_pak'],
+ "S_SMILE_SELECT" => $smile_paks_select,
+ "L_IMPORT" => $lang['import'],
+ "L_CONFLICTS" => $lang['smile_conflicts'],
+ "S_REPLACE_OPT" => $replace_opt,
+ "S_KEEP_OPT" => $keep_opt,
+ "L_DEL_EXISTING" => $lang['del_existing_smileys'],
+ "S_DEL_EXISTING" => $del_exist,
+ "S_HIDDEN_FIELDS" => $hidden_vars)
+ );
+ $template->pparse("body");
+ }
+ break;
+
+ case 'export':
+ //
+ // Export our smiley config as a smiley pak...
+ //
+ if ( $send_file == 1 )
+ {
+ $smile_pak = '';
+ $sql = "SELECT * FROM " . SMILIES_TABLE;
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
+ }
+
+ $resultset = $db->sql_fetchrowset($result);
+ for($i = 0; $i < count($resultset); $i++ )
+ {
+ $smile_pak .= $resultset[$i]['smile_url'] . $delimeter;
+ $smile_pak .= $resultset[$i]['emoticon'] . $delimeter;
+ $smile_pak .= $resultset[$i]['code'] . "\n";
+ }
+ header("Content-Type: text/x-delimtext; name=\"smiles.pak\"");
+ header("Content-disposition: attachment; filename=smiles.pak");
+ echo $smile_pak;
+ exit;
+ }
+ $template->set_filenames(array(
+ "body" => "admin/admin_message_body.tpl")
+ );
+
+ $template->assign_vars(array(
+ "MESSAGE_TITLE" => $lang['smiley_title'],
+ "MESSAGE_TEXT" => $lang['export_smiles'])
+ );
+ $template->pparse('body');
+
+ break;
+
case 'delete':
//
***************
*** 292,296 ****
$s_hidden_fields = '<input type="hidden" name="mode" value="add">';
!
$template->assign_vars(array(
"L_ACTION" => $lang['Action'],
--- 485,490 ----
$s_hidden_fields = '<input type="hidden" name="mode" value="add">';
! $s_import = '<a href="' . $PHPSELF . '?mode=import"><input type="button" value="'. $lang['import_smile_pack'] . '"></a>';
! $s_export = '<a href="' . $PHPSELF . '?mode=export"><input type="button" value="'. $lang['export_smile_pack'] . '"></a>';
$template->assign_vars(array(
"L_ACTION" => $lang['Action'],
***************
*** 302,308 ****
"L_CODE" => $lang['Code'],
"L_EMOT" => $lang['Emotion'],
! "L_SMILE" => $lang['Smile'],
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"))
);
--- 496,504 ----
"L_CODE" => $lang['Code'],
"L_EMOT" => $lang['Emotion'],
! "L_SMILE" => $lang['Smile'],
"S_HIDDEN_FIELDS" => $s_hidden_fields,
+ "S_IMPORT" => $s_import,
+ "S_EXPORT" => $s_export,
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"))
);
|
|
From: Jonathan H. <the...@us...> - 2001-11-07 21:44:11
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv17089/language/lang_english Modified Files: lang_main.php Log Message: Adding capability for "smiley packs" import/export Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** lang_main.php 2001/11/07 11:17:55 1.26 --- lang_main.php 2001/11/07 21:44:07 1.27 *************** *** 968,972 **** $lang['Smile'] = "Smile"; $lang['Emotion'] = "Emotion"; ! // --- 968,984 ---- $lang['Smile'] = "Smile"; $lang['Emotion'] = "Emotion"; ! $lang['Select_pak'] = "Select Pak File"; ! $lang['replace_existing'] = "Replace Existing Smiley"; ! $lang['keep_existing'] = "Keep Existing Smiley"; ! $lang['smiley_import_inst'] = "You should unzip the smiley package and upload all files to the proper Smiley directory for your installation. Then select the correct information in this form to import the smiley pack."; ! $lang['smiley_import'] = "Smiley Pack Import"; ! $lang['choose_smile_pak'] = "Choose the correct Smile Pack .pak file"; ! $lang['import'] = "Import Smileys"; ! $lang['smile_conflicts'] = "What should be done in case of conflicts"; ! $lang['del_existing_smileys'] = "Delete all existing smileys before import"; ! $lang['import_smile_pack'] = "Import Smiley Pack"; ! $lang['export_smile_pack'] = "Create Smiley Pack"; ! $lang['export_smiles'] = "To create a smiley pack from your currently installed smileys, <a href='admin_smilies.php?mode=export&send_file=1'>Click Here</a> to download the smiles.pak file. Name this file appropriately making sure to keep the .pak file extension. Then create a zip file containing all of your smiley images plus this .pak configuration file."; ! $lang['smiley_import_success'] = "The smiley pack was imported successfully!"; // |
|
From: Jonathan H. <the...@us...> - 2001-11-07 21:44:11
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver/admin
In directory usw-pr-cvs1:/tmp/cvs-serv17089/templates/subSilver/admin
Modified Files:
smile_list_body.tpl
Added Files:
smile_import_body.tpl
Log Message:
Adding capability for "smiley packs" import/export
--- NEW FILE ---
<h1>{L_SMILEY_TITLE}</h1>
<p>{L_SMILEY_EXPLAIN}</p>
<form method="post" action="{S_SMILEY_ACTION}"><table class="forumline" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th class="thHead" colspan="2">{L_SMILEY_IMPORT}</th>
</tr>
<tr>
<td class="row2">{L_SELECT_LBL}</td>
<td class="row2">{S_SMILE_SELECT}</td>
</tr>
<tr>
<td class="row1">{L_CONFLICTS}</td>
<td class="row1">{S_REPLACE_OPT}<br>{S_KEEP_OPT}</td>
</tr>
<tr>
<td class="row2">{L_DEL_EXISTING}</td>
<td class="row2">{S_DEL_EXISTING}</td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="mainoption" type="submit" value="{L_IMPORT}" /></td>
</tr>
</table></form>
Index: smile_list_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/admin/smile_list_body.tpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** smile_list_body.tpl 2001/10/14 15:55:50 1.3
--- smile_list_body.tpl 2001/11/07 21:44:07 1.4
***************
*** 21,25 ****
<!-- END smiles -->
<tr>
! <td class="catBottom" colspan="5" align="center">{S_HIDDEN_FIELDS}<input type="submit" value="{L_SMILEY_ADD}" class="mainoption" /></td>
</tr>
</table></form>
--- 21,25 ----
<!-- END smiles -->
<tr>
! <td class="catBottom" colspan="5" align="center">{S_HIDDEN_FIELDS}<input type="submit" value="{L_SMILEY_ADD}" class="mainoption" />{S_IMPORT}{S_EXPORT}
</tr>
</table></form>
|
|
From: Bart v. B. <ba...@us...> - 2001-11-07 14:45:13
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv16445
Modified Files:
admin_styles.php
Log Message:
Fixed query that wasn't using CONSTANT table name
Index: admin_styles.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_styles.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** admin_styles.php 2001/11/07 11:17:54 1.5
--- admin_styles.php 2001/11/07 14:45:07 1.6
***************
*** 728,732 ****
default:
! $sql = "SELECT themes_id, template_name, style_name FROM phpbb_themes ORDER BY template_name";
if(!$result = $db->sql_query($sql))
{
--- 728,732 ----
default:
! $sql = "SELECT themes_id, template_name, style_name FROM ".THEMES_TABLE." ORDER BY template_name";
if(!$result = $db->sql_query($sql))
{
***************
*** 771,773 ****
}
! ?>
\ No newline at end of file
--- 771,773 ----
}
! ?>
|
|
From: James A. <th...@us...> - 2001-11-07 11:17:58
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv29872/language/lang_english Modified Files: lang_main.php Log Message: Added some code to keep the admin from deleteing the forums default style Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** lang_main.php 2001/11/07 11:10:56 1.25 --- lang_main.php 2001/11/07 11:17:55 1.26 *************** *** 1197,1200 **** --- 1197,1201 ---- $lang['Theme_updated'] = "The selected theme has been updated. Don't forget to export the new theme settings to the theme configuration file!"; $lang['Theme_created'] = "Theme created! Don't forget to export the new theme settings to the theme configuration file!"; + $lang['Cannot_remove_style'] = "The style you have selected is the current forum wide default style. Therefor, you cannot remove it. Please change the default style and try again."; |
|
From: James A. <th...@us...> - 2001-11-07 11:17:58
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv29872/admin
Modified Files:
admin_styles.php
Log Message:
Added some code to keep the admin from deleteing the forums default style
Index: admin_styles.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_styles.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** admin_styles.php 2001/11/07 11:10:56 1.4
--- admin_styles.php 2001/11/07 11:17:54 1.5
***************
*** 670,673 ****
--- 670,678 ----
if(!$confirm)
{
+ if($style_id == $board_config['default_style'])
+ {
+ message_die(GENERAL_MESSAGE, $lang['Cannot_remove_style'], $lang['Error']);
+ }
+
$hidden_fields = '<input type="hidden" name="mode" value="'.$mode.'" /><input type="hidden" name="style_id" value="'.$style_id.'" />';
|
|
From: James A. <th...@us...> - 2001-11-07 11:10:59
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv28005/admin
Modified Files:
admin_styles.php
Log Message:
Theme edit/create in place. Damn it took way to long to do that form.
Still needs the themes_name code, but I'll do that tommorow
Index: admin_styles.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_styles.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** admin_styles.php 2001/10/25 08:57:39 1.3
--- admin_styles.php 2001/11/07 11:10:56 1.4
***************
*** 187,191 ****
--- 187,548 ----
case "create":
case "edit":
+ $submit = (isset($HTTP_POST_VARS['submit'])) ? 1 : 0;
+ if($submit)
+ {
+ //
+ // DAMN! Thats alot of data to validate...
+ //
+ $updated['style_name'] = $HTTP_POST_VARS['style_name'];
+ $updated['template_name'] = $HTTP_POST_VARS['template_name'];
+ $updated['head_stylesheet'] = $HTTP_POST_VARS['head_stylesheet'];
+ $updated['body_background'] = $HTTP_POST_VARS['body_background'];
+ $updated['body_bgcolor'] = $HTTP_POST_VARS['body_bgcolor'];
+ $updated['body_link'] = $HTTP_POST_VARS['body_link'];
+ $updated['body_vlink'] = $HTTP_POST_VARS['body_vlink'];
+ $updated['body_alink'] = $HTTP_POST_VARS['body_alink'];
+ $updated['body_hlink'] = $HTTP_POST_VARS['body_hlink'];
+ $updated['tr_color1'] = $HTTP_POST_VARS['tr_color1'];
+ $updated_name['tr_color1_name'] = $HTTP_POST_VARS['tr_color1_name'];
+ $updated['tr_color2'] = $HTTP_POST_VARS['tr_color2'];
+ $updated_name['tr_color2_name'] = $HTTP_POST_VARS['tr_color2_name'];
+ $updated['tr_color3'] = $HTTP_POST_VARS['tr_color3'];
+ $updated_name['tr_color3_name'] = $HTTP_POST_VARS['tr_color3_name'];
+ $updated['tr_class1'] = $HTTP_POST_VARS['tr_class1'];
+ $updated_name['tr_class1_name'] = $HTTP_POST_VARS['tr_class1_name'];
+ $updated['tr_class2'] = $HTTP_POST_VARS['tr_class2'];
+ $updated_name['tr_class2_name'] = $HTTP_POST_VARS['tr_class2_name'];
+ $updated['tr_class3'] = $HTTP_POST_VARS['tr_class3'];
+ $updated_name['tr_class3_name'] = $HTTP_POST_VARS['tr_class3_name'];
+ $updated['th_color1'] = $HTTP_POST_VARS['th_color1'];
+ $updated_name['th_color1_name'] = $HTTP_POST_VARS['th_color1_name'];
+ $updated['th_color2'] = $HTTP_POST_VARS['th_color2'];
+ $updated_name['th_color2_name'] = $HTTP_POST_VARS['th_color2_name'];
+ $updated['th_color3'] = $HTTP_POST_VARS['th_color3'];
+ $updated_name['th_color3_name'] = $HTTP_POST_VARS['th_color3_name'];
+ $updated['th_class1'] = $HTTP_POST_VARS['th_class1'];
+ $updated_name['th_class1_name'] = $HTTP_POST_VARS['th_class1_name'];
+ $updated['td_color1'] = $HTTP_POST_VARS['td_color1'];
+ $updated_name['td_color1_name'] = $HTTP_POST_VARS['td_color1_name'];
+ $updated['td_color2'] = $HTTP_POST_VARS['td_color2'];
+ $updated_name['td_color2_name'] = $HTTP_POST_VARS['td_color2_name'];
+ $updated['td_color3'] = $HTTP_POST_VARS['td_color3'];
+ $updated_name['td_color3_name'] = $HTTP_POST_VARS['td_color3_name'];
+ $updated['td_class1'] = $HTTP_POST_VARS['td_class1'];
+ $updated_name['td_class1_name'] = $HTTP_POST_VARS['td_class1_name'];
+ $updated['td_class2'] = $HTTP_POST_VARS['td_class2'];
+ $updated_name['td_class2_name'] = $HTTP_POST_VARS['td_class2_name'];
+ $updated['td_class3'] = $HTTP_POST_VARS['td_class3'];
+ $updated_name['td_class3_name'] = $HTTP_POST_VARS['td_class3_name'];
+ $updated['fontface1'] = $HTTP_POST_VARS['fontface1'];
+ $updated_name['fontface1_name'] = $HTTP_POST_VARS['fontface1_name'];
+ $updated['fontface2'] = $HTTP_POST_VARS['fontface2'];
+ $updated_name['fontface2_name'] = $HTTP_POST_VARS['fontface2_name'];
+ $updated['fontface3'] = $HTTP_POST_VARS['fontface3'];
+ $updated_name['fontface3_name'] = $HTTP_POST_VARS['fontface3_name'];
+ $updated['fontsize1'] = intval($HTTP_POST_VARS['fontsize1']);
+ $updated_name['fontsize1_name'] = $HTTP_POST_VARS['fontsize1_name'];
+ $updated['fontsize2'] = intval($HTTP_POST_VARS['fontsize2']);
+ $updated_name['fontsize2_name'] = $HTTP_POST_VARS['fontsize2_name'];
+ $updated['fontsize3'] = intval($HTTP_POST_VARS['fontsize3']);
+ $updated_name['fontsize3_name'] = $HTTP_POST_VARS['fontsize3_name'];
+ $updated['fontcolor1'] = $HTTP_POST_VARS['fontcolor1'];
+ $updated_name['fontcolor1_name'] = $HTTP_POST_VARS['fontcolor1_name'];
+ $updated['fontcolor2'] = $HTTP_POST_VARS['fontcolor2'];
+ $updated_name['fontcolor2_name'] = $HTTP_POST_VARS['fontcolor2_name'];
+ $updated['fontcolor3'] = $HTTP_POST_VARS['fontcolor3'];
+ $updated_name['fontcolor3_name'] = $HTTP_POST_VARS['fontcolor3_name'];
+ $updated['span_class1'] = $HTTP_POST_VARS['span_class1'];
+ $updated_name['span_class1_name'] = $HTTP_POST_VARS['span_class1_name'];
+ $updated['span_class2'] = $HTTP_POST_VARS['span_class2'];
+ $updated_name['span_class2_name'] = $HTTP_POST_VARS['span_class2_name'];
+ $updated['span_class3'] = $HTTP_POST_VARS['span_class3'];
+ $updated_name['span_class3_name'] = $HTTP_POST_VARS['span_class3_name'];
+ $style_id = intval($HTTP_POST_VARS['style_id']);
+ //
+ // Wheeeew! Thank heavens for copy and paste and search and replace :D
+ //
+
+ if($mode == "edit")
+ {
+ $sql = "UPDATE " . THEMES_TABLE . " SET ";
+ $count = 0;
+ while(list($key, $val) = each($updated))
+ {
+ if($count != 0)
+ {
+ $sql .= ", ";
+ }
+ // I don't like this but it'll keep MSSQL from throwing an error and save me alot of typing
+ if(stristr($key, "fontsize"))
+ {
+ $sql .= "$key = $val";
+ }
+ else
+ {
+ $sql .= "$key = '$val'";
+ }
+ $count++;
+ }
+
+ $sql .= " WHERE themes_id = $style_id";
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not update themes table!", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ //
+ // Do names stuff here!
+ //
+
+
+ message_die(GENERAL_MESSAGE, $lang['Theme_updated'], $lang['Success']);
+ }
+ else
+ {
+ while(list($key, $val) = each($updated))
+ {
+ $field_names[] = $key;
+
+ if(stristr($key, "fontsize"))
+ {
+ $values[] = "$val";
+ }
+ else
+ {
+ $values[] = "'$val'";
+ }
+ }
+
+ $sql = "INSERT INTO " . THEMES_TABLE . " (";
+ for($i = 0; $i < count($field_names); $i++)
+ {
+ if($i != 0)
+ {
+ $sql .= ", ";
+ }
+ $sql .= $field_names[$i];
+ }
+
+ $sql .= ") VALUES (";
+ for($i = 0; $i < count($values); $i++)
+ {
+ if($i != 0)
+ {
+ $sql .= ", ";
+ }
+ $sql .= $values[$i];
+ }
+ $sql .= ")";
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not update themes table!", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ //
+ // Do names stuff here!
+ //
+
+
+ message_die(GENERAL_MESSAGE, $lang['Theme_created'], $lang['Success']);
+
+ }
+
+
+
+
+
+
+
+
+ }
+ else
+ {
+ if($mode == "edit")
+ {
+ $themes_title = $lang['Edit_theme'];
+ $themes_explain = $lang['Edit_theme_explain'];
+
+ $style_id = $HTTP_GET_VARS['style_id'];
+
+ //
+ // Fetch the Theme Info from the db
+ //
+ $sql = "SELECT * FROM " . THEMES_TABLE . " WHERE themes_id = $style_id";
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not get data from themes table", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ $selected = $db->sql_fetchrow($result);
+
+ $s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />';
+ }
+ else
+ {
+ $themes_title = $lang['Create_theme'];
+ $themes_explain = $lang['Create_theme_explain'];
+ }
+
+ $template->set_filenames(array(
+ "body" => "admin/styles_edit_body.tpl")
+ );
+
+
+ if($dir = opendir($phpbb_root_path . 'templates/'))
+ {
+ $s_template_select = '<select name="template_name">';
+ while($file = readdir($dir))
+ {
+ if($file != "." && $file != ".." && $file != "CVS")
+ {
+ if($file == $selected['template_name'])
+ {
+ $s_template_select .= '<option value="' . $file . '" selected="1">' . $file . "</option>\n";
+ }
+ else
+ {
+ $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
+ }
+ }
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, $lang['No_template_dir'], $lang['Error'], __LINE__, __FILE__);
+ }
+
+ $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
+ $template->assign_vars(array(
+ "L_THEMES_TITLE" => $themes_title,
+ "L_THEMES_EXPLAIN" => $themes_explain,
+ "S_THEME_ACTION" => append_sid("$PHP_SELF"),
+ "L_THEME_NAME" => $lang['Theme_name'],
+ "L_TEMPLATE" => $lang['Template'],
+ "L_THEME_SETTINGS" => $lang['Theme_settings'],
+ "L_THEME_ELEMENT" => $lang['Theme_element'],
+ "L_SIMPLE_NAME" => $lang['Simple_name'],
+ "L_VALUE" => $lang['Value'],
+ "L_STYLESHEET" => $lang['Stylesheet'],
+ "L_BACKGROUND_IMAGE" => $lang['Background_image'],
+ "L_BACKGROUND_COLOR" => $lang['Background_color'],
+ "L_BODY_LINK" => $lang['Link_color'],
+ "L_BODY_VLINK" => $lang['VLink_color'],
+ "L_BODY_ALINK" => $lang['ALink_color'],
+ "L_BODY_HLINK" => $lang['HLink_color'],
+ "L_TR_COLOR1" => $lang['Tr_color1'],
+ "L_TR_COLOR2" => $lang['Tr_color2'],
+ "L_TR_COLOR3" => $lang['Tr_color3'],
+ "L_TR_CLASS1" => $lang['Tr_class1'],
+ "L_TR_CLASS2" => $lang['Tr_class2'],
+ "L_TR_CLASS3" => $lang['Tr_class3'],
+ "L_TH_COLOR1" => $lang['Th_color1'],
+ "L_TH_COLOR2" => $lang['Th_color2'],
+ "L_TH_COLOR3" => $lang['Th_color3'],
+ "L_TH_CLASS1" => $lang['Th_class1'],
+ "L_TH_CLASS2" => $lang['Th_class2'],
+ "L_TH_CLASS3" => $lang['Th_class3'],
+ "L_TD_COLOR1" => $lang['Td_color1'],
+ "L_TD_COLOR2" => $lang['Td_color2'],
+ "L_TD_COLOR3" => $lang['Td_color3'],
+ "L_TD_CLASS1" => $lang['Td_class1'],
+ "L_TD_CLASS2" => $lang['Td_class2'],
+ "L_TD_CLASS3" => $lang['Td_class3'],
+ "L_FONTFACE_1" => $lang['fontface1'],
+ "L_FONTFACE_2" => $lang['fontface2'],
+ "L_FONTFACE_3" => $lang['fontface3'],
+ "L_FONTSIZE_1" => $lang['fontsize1'],
+ "L_FONTSIZE_2" => $lang['fontsize2'],
+ "L_FONTSIZE_3" => $lang['fontsize3'],
+ "L_FONTCOLOR_1" => $lang['fontcolor1'],
+ "L_FONTCOLOR_2" => $lang['fontcolor2'],
+ "L_FONTCOLOR_3" => $lang['fontcolor3'],
+ "L_SPAN_CLASS_1" => $lang['span_class1'],
+ "L_SPAN_CLASS_2" => $lang['span_class2'],
+ "L_SPAN_CLASS_3" => $lang['span_class3'],
+
+ "S_TEMPLATE_SELECT" => $s_template_select,
+ "THEME_NAME" => $selected['style_name'],
+ "HEAD_STYLESHEET" => $selected['head_stylesheet'],
+ "BODY_BACKGROUND" => $selected['body_background'],
+ "BODY_BGCOLOR" => $selected['body_bgcolor'],
+ "BODY_LINK" => $selected['body_link'],
+ "BODY_VLINK" => $selected['body_vlink'],
+ "BODY_ALINK" => $selected['body_alink'],
+ "BODY_HLINK" => $selected['body_hlink'],
+ "TR_COLOR1" => $selected['tr_color1'],
+ "TR_COLOR2" => $selected['tr_color2'],
+ "TR_COLOR3" => $selected['tr_color3'],
+ "TR_CLASS1" => $selected['tr_class1'],
+ "TR_CLASS2" => $selected['tr_class2'],
+ "TR_CLASS3" => $selected['tr_class3'],
+ "TH_COLOR1" => $selected['th_color1'],
+ "TH_COLOR2" => $selected['th_color2'],
+ "TH_COLOR3" => $selected['th_color3'],
+ "TH_CLASS1" => $selected['th_class1'],
+ "TH_CLASS2" => $selected['th_class2'],
+ "TH_CLASS3" => $selected['th_class3'],
+ "TD_COLOR1" => $selected['td_color1'],
+ "TD_COLOR2" => $selected['td_color2'],
+ "TD_COLOR3" => $selected['td_color3'],
+ "TD_CLASS1" => $selected['td_class1'],
+ "TD_CLASS2" => $selected['td_class2'],
+ "TD_CLASS3" => $selected['td_class3'],
+ "FONTFACE1" => $selected['fontface1'],
+ "FONTFACE2" => $selected['fontface2'],
+ "FONTFACE3" => $selected['fontface3'],
+ "FONTSIZE1" => $selected['fontsize1'],
+ "FONTSIZE2" => $selected['fontsize2'],
+ "FONTSIZE3" => $selected['fontsize3'],
+ "FONTCOLOR1" => $selected['fontcolor1'],
+ "FONTCOLOR2" => $selected['fontcolor2'],
+ "FONTCOLOR3" => $selected['fontcolor3'],
+ "SPAN_CLASS1" => $selected['span_class1'],
+ "SPAN_CLASS2" => $selected['span_class2'],
+ "SPAN_CLASS3" => $selected['span_class3'],
+
+ "TR_COLOR1_NAME" => $selected['tr_color1_name'],
+ "TR_COLOR2_NAME" => $selected['tr_color2_name'],
+ "TR_COLOR3_NAME" => $selected['tr_color3_name'],
+ "TR_CLASS1_NAME" => $selected['tr_class1_name'],
+ "TR_CLASS2_NAME" => $selected['tr_class2_name'],
+ "TR_CLASS3_NAME" => $selected['tr_class3_name'],
+ "TH_COLOR1_NAME" => $selected['th_color1_name'],
+ "TH_COLOR2_NAME" => $selected['th_color2_name'],
+ "TH_COLOR3_NAME" => $selected['th_color3_name'],
+ "TH_CLASS1_NAME" => $selected['th_class1_name'],
+ "TH_CLASS2_NAME" => $selected['th_class2_name'],
+ "TH_CLASS3_NAME" => $selected['th_class3_name'],
+ "TD_COLOR1_NAME" => $selected['td_color1_name'],
+ "TD_COLOR2_NAME" => $selected['td_color2_name'],
+ "TD_COLOR3_NAME" => $selected['td_color3_name'],
+ "TD_CLASS1_NAME" => $selected['td_class1_name'],
+ "TD_CLASS2_NAME" => $selected['td_class2_name'],
+ "TD_CLASS3_NAME" => $selected['td_class3_name'],
+ "FONTFACE1_NAME" => $selected['fontface1_name'],
+ "FONTFACE2_NAME" => $selected['fontface2_name'],
+ "FONTFACE3_NAME" => $selected['fontface3_name'],
+ "FONTSIZE1_NAME" => $selected['fontsize1_name'],
+ "FONTSIZE2_NAME" => $selected['fontsize2_name'],
+ "FONTSIZE3_NAME" => $selected['fontsize3_name'],
+ "FONTCOLOR1_NAME" => $selected['fontcolor1_name'],
+ "FONTCOLOR2_NAME" => $selected['fontcolor2_name'],
+ "FONTCOLOR3_NAME" => $selected['fontcolor3_name'],
+ "SPAN_CLASS1_NAME" => $selected['span_class1_name'],
+ "SPAN_CLASS2_NAME" => $selected['span_class2_name'],
+ "SPAN_CLASS3_NAME" => $selected['span_class3_name'],
+
+ "S_HIDDEN_FIELDS" => $s_hidden_fields)
+ );
+
+
+ $template->pparse("body");
+
+
+
+
+ }
break;
|
|
From: James A. <th...@us...> - 2001-11-07 11:10:59
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver/admin
In directory usw-pr-cvs1:/tmp/cvs-serv28005/templates/subSilver/admin
Added Files:
styles_edit_body.tpl
Log Message:
Theme edit/create in place. Damn it took way to long to do that form.
Still needs the themes_name code, but I'll do that tommorow
--- NEW FILE ---
<h1>{L_THEMES_TITLE}</h1>
<p>{L_THEMES_EXPLAIN}</p>
<form action="{S_THEME_ACTION}" method="POST"><table width="99%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="3">{L_THEME_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_THEME_NAME}:</td>
<td class="row2" colspan="2"><input type="text" size="25" maxlength="100" name="style_name" value="{THEME_NAME}"></td>
</tr>
<tr>
<td class="row1">{L_TEMPLATE}:</td>
<td class="row2" colspan="2">{S_TEMPLATE_SELECT}</td>
</tr>
<tr>
<td class="cattitle">{L_THEME_ELEMENT}</td>
<td class="cattitle">{L_VALUE}</td>
<td class="cattitle">{L_SIMPLE_NAME}</td>
</tr>
<tr>
<td class="row1">{L_STYLESHEET}:<br /><span class="gensmall">Filename for CSS stylesheet to use for this theme.</span></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="head_stylesheet" value="{HEAD_STYLESHEET}"></td>
<td class="row2"> </td>
</tr>
<tr>
<td class="row1">{L_BACKGROUND_IMAGE}:</td>
<td class="row2" ><input type="text" size="25" maxlength="100" name="body_background" value="{BODY_BACKGROUND}"></td>
<td class="row2"> </td>
</tr>
<tr>
<td class="row1">{L_BACKGROUND_COLOR}:</td>
<td class="row2" ><input type="text" size="25" maxlength="100" name="body_bgcolor" value="{BODY_BGCOLOR}"></td>
<td class="row2"> </td>
</tr>
<tr>
<td class="row1">{L_BODY_LINK}:</td>
<td class="row2" ><input type="text" size="25" maxlength="100" name="body_link" value="{BODY_LINK}"></td>
<td class="row2"> </td>
</tr>
<tr>
<td class="row1">{L_BODY_VLINK}:</td>
<td class="row2" ><input type="text" size="25" maxlength="100" name="body_vlink" value="{BODY_VLINK}"></td>
<td class="row2"> </td>
</tr>
<tr>
<td class="row1">{L_BODY_ALINK}:</td>
<td class="row2" ><input type="text" size="25" maxlength="100" name="body_alink" value="{BODY_ALINK}"></td>
<td class="row2"> </td>
</tr>
<tr>
<td class="row1">{L_BODY_HLINK}:</td>
<td class="row2" ><input type="text" size="25" maxlength="100" name="body_hlink" value="{BODY_HLINK}"></td>
<td class="row2"> </td>
</tr>
<tr>
<td class="row1">{L_TR_COLOR1}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="tr_color1" value="{TR_COLOR1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="tr_color1_name" value="{TR_COLOR1_NAME}">
</tr>
<tr>
<td class="row1">{L_TR_COLOR2}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="tr_color2" value="{TR_COLOR2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="tr_color2_name" value="{TR_COLOR2_NAME}">
</tr>
<tr>
<td class="row1">{L_TR_COLOR3}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="tr_color3" value="{TR_COLOR3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="tr_color3_name" value="{TR_COLOR3_NAME}">
</tr>
<tr>
<td class="row1">{L_TR_CLASS1}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="tr_class1" value="{TR_CLASS1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="tr_class1_name" value="{TR_CLASS1_NAME}">
</tr>
<tr>
<td class="row1">{L_TR_CLASS2}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="tr_class2" value="{TR_CLASS2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="tr_class2_name" value="{TR_CLASS2_NAME}">
</tr>
<tr>
<td class="row1">{L_TR_CLASS3}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="tr_class3" value="{TR_CLASS3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="tr_class3_name" value="{TR_CLASS3_NAME}">
</tr>
<tr>
<td class="row1">{L_TH_COLOR1}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="th_color1" value="{TH_COLOR1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="th_color1_name" value="{TH_COLOR1_NAME}">
</tr>
<tr>
<td class="row1">{L_TH_COLOR2}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="th_color2" value="{TH_COLOR2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="th_color2_name" value="{TH_COLOR2_NAME}">
</tr>
<tr>
<td class="row1">{L_TH_COLOR3}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="th_color3" value="{TH_COLOR3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="th_color3_name" value="{TH_COLOR3_NAME}">
</tr>
<tr>
<td class="row1">{L_TH_CLASS1}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="th_class1" value="{TH_CLASS1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="th_class1_name" value="{TH_CLASS1_NAME}">
</tr>
<tr>
<td class="row1">{L_TH_CLASS2}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="th_class2" value="{TH_CLASS2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="th_class2_name" value="{TH_CLASS2_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_CLASS3}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="th_class3" value="{TD_CLASS3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="th_class3_name" value="{TD_CLASS3_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_COLOR1}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="td_color1" value="{TD_COLOR1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="td_color1_name" value="{TD_COLOR1_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_COLOR2}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="td_color2" value="{TD_COLOR2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="td_color2_name" value="{TD_COLOR2_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_COLOR3}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="td_color3" value="{TD_COLOR3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="td_color3_name" value="{TD_COLOR3_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_CLASS1}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="td_class1" value="{TD_CLASS1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="td_class1_name" value="{TD_CLASS1_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_CLASS2}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="td_class2" value="{TD_CLASS2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="td_class2_name" value="{TD_CLASS2_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_CLASS3}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="td_class3" value="{TD_CLASS3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="td_class3_name" value="{TD_CLASS3_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTFACE_1}:</td>
<td class="row2"><input type="text" size="25" maxlength="50" name="fontface1" value="{FONTFACE1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontface1_name" value="{FONTFACE1_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTFACE_2}:</td>
<td class="row2"><input type="text" size="25" maxlength="50" name="fontface2" value="{FONTFACE2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontface2_name" value="{FONTFACE2_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTFACE_3}:</td>
<td class="row2"><input type="text" size="25" maxlength="50" name="fontface3" value="{FONTFACE3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontface3_name" value="{FONTFACE3_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTSIZE_1}:</td>
<td class="row2"><input type="text" size="4" maxlength="4" name="fontsize1" value="{FONTSIZE1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontsize1_name" value="{FONTSIZE1_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTSIZE_2}:</td>
<td class="row2"><input type="text" size="4" maxlength="4" name="fontsize2" value="{FONTSIZE2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontsize2_name" value="{FONTSIZE2_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTSIZE_3}:</td>
<td class="row2"><input type="text" size="4" maxlength="4" name="fontsize3" value="{FONTSIZE3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontsize3_name" value="{FONTSIZE3_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTCOLOR_1}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="fontcolor1" value="{FONTCOLOR1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontcolor1_name" value="{FONTCOLOR1_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTCOLOR_2}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="fontcolor2" value="{FONTCOLOR2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontcolor2_name" value="{FONTCOLOR2_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTCOLOR_3}:</td>
<td class="row2"><input type="text" size="6" maxlength="6" name="fontcolor3" value="{FONTCOLOR3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="fontcolor3_name" value="{FONTCOLOR3_NAME}">
</tr>
<tr>
<td class="row1">{L_SPAN_CLASS_1}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="span_class1" value="{SPAN_CLASS1}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="span_class1_name" value="{SPAN_CLASS1_NAME}">
</tr>
<tr>
<td class="row1">{L_SPAN_CLASS_2}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="span_class2" value="{SPAN_CLASS2}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="span_class2_name" value="{SPAN_CLASS2_NAME}">
</tr>
<tr>
<td class="row1">{L_SPAN_CLASS_3}:</td>
<td class="row2"><input type="text" size="25" maxlength="25" name="span_class3" value="{SPAN_CLASS3}"></td>
<td class="row2"><input type="text" size="25" maxlength="100" name="span_class3_name" value="{SPAN_CLASS3_NAME}">
</tr>
<tr>
<td class="catBottom" colspan="3" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="Save Settings" class="mainoption" />
</td>
</tr>
</table></form>
<br clear="all">
|
|
From: James A. <th...@us...> - 2001-11-07 11:10:59
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv28005/language/lang_english Modified Files: lang_main.php Log Message: Theme edit/create in place. Damn it took way to long to do that form. Still needs the themes_name code, but I'll do that tommorow Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** lang_main.php 2001/11/06 16:54:15 1.24 --- lang_main.php 2001/11/07 11:10:56 1.25 *************** *** 1149,1152 **** --- 1149,1202 ---- $lang['Select_template'] = "Select a Template"; $lang['Theme_info_saved'] = "The theme information for the selected template has been saved. You should now return the permissions on the theme_info.cfg and/or selected template directory to READ ONLY."; + $lang['Edit_theme'] = "Edit Theme"; + $lang['Edit_theme_explain'] = "In the form below you can edit the settings for the selected theme."; + $lang['Create_theme'] = "Create Theme"; + $lang['Create_theme_explain'] = "Use the form below to create a new theme for a selected template. When referancing color HEX codes DO NOT include the pound sign (#), ie: CCCCCC is valid, #CCCCCC is NOT."; + $lang['Theme_settings'] = "Theme Settings"; + $lang['Theme_element'] = "Theme Element"; + $lang['Simple_name'] = "Simple Name"; + $lang['Value'] = "Value"; + $lang['Stylesheet'] = "CSS Stylesheet"; + $lang['Background_image'] = "Background Image"; + $lang['Background_color'] = "Background Color"; + $lang['Theme_name'] = "Theme Name"; + $lang['Link_color'] = "Link Color"; + $lang['VLink_color'] = "Visited Link Color"; + $lang['ALink_color'] = "Active Link Color"; + $lang['HLink_color'] = "Hilighted Link Color"; + $lang['Tr_color1'] = "Table Row Color 1"; + $lang['Tr_color2'] = "Table Row Color 2"; + $lang['Tr_color3'] = "Table Row Color 3"; + $lang['Tr_class1'] = "Table Row Class 1"; + $lang['Tr_class2'] = "Table Row Class 2"; + $lang['Tr_class3'] = "Table Row Class 3"; + $lang['Th_color1'] = "Table Header Color 1"; + $lang['Th_color2'] = "Table Header Color 2"; + $lang['Th_color3'] = "Table Header Color 3"; + $lang['Th_class1'] = "Table Header Class 1"; + $lang['Th_class2'] = "Table Header Class 2"; + $lang['Th_class3'] = "Table Header Class 3"; + $lang['Td_color1'] = "Table Cell Color 1"; + $lang['Td_color2'] = "Table Cell Color 2"; + $lang['Td_color3'] = "Table Cell Color 3"; + $lang['Td_class1'] = "Table Cell Class 1"; + $lang['Td_class2'] = "Table Cell Class 2"; + $lang['Td_class3'] = "Table Cell Class 3"; + $lang['fontface1'] = "Font Face 1"; + $lang['fontface2'] = "Font Face 2"; + $lang['fontface3'] = "Font Face 3"; + $lang['fontsize1'] = "Font Size 1"; + $lang['fontsize2'] = "Font Size 2"; + $lang['fontsize3'] = "Font Size 3"; + $lang['fontcolor1'] = "Font Color 1"; + $lang['fontcolor2'] = "Font Color 2"; + $lang['fontcolor3'] = "Font Color 3"; + $lang['span_class1'] = "Span Class 1"; + $lang['span_class2'] = "Span Class 2"; + $lang['span_class3'] = "Span Class 3"; + $lang['Theme_updated'] = "The selected theme has been updated. Don't forget to export the new theme settings to the theme configuration file!"; + $lang['Theme_created'] = "Theme created! Don't forget to export the new theme settings to the theme configuration file!"; + + // // That's all Folks! |
|
From: Jonathan H. <the...@us...> - 2001-11-06 16:54:18
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv26369/templates/subSilver
Modified Files:
install.tpl
Log Message:
Update to "merge" upgrade with Install... (Not fully tested since current upgrade not in CVS)
Index: install.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/install.tpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** install.tpl 2001/10/18 14:56:40 1.4
--- install.tpl 2001/11/06 16:54:15 1.5
***************
*** 117,121 ****
</tr>
<tr>
! <td width="100%"><form action="{S_FORM_ACTION}" method="post"><table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<!-- BEGIN switch_stage_one_install -->
<tr>
--- 117,121 ----
</tr>
<tr>
! <td width="100%"><form action="{S_FORM_ACTION}" name="install_form" method="post"><table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<!-- BEGIN switch_stage_one_install -->
<tr>
***************
*** 129,132 ****
--- 129,136 ----
<td class="row1" align="right"><span class="gen">{L_DBMS}: </span></td>
<td class="row2">{S_DBMS_SELECT}</td>
+ </tr>
+ <tr>
+ <td class="row1" align="right"><span class="gen">{L_UPGRADE}:</span></td>
+ <td class="row2">{S_UPGRADE_SELECT}</td>
</tr>
<!-- tr>
|
|
From: Jonathan H. <the...@us...> - 2001-11-06 16:54:18
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv26369
Modified Files:
install.php
Log Message:
Update to "merge" upgrade with Install... (Not fully tested since current upgrade not in CVS)
Index: install.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/install.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** install.php 2001/11/01 10:43:30 1.11
--- install.php 2001/11/06 16:54:15 1.12
***************
*** 160,163 ****
--- 160,164 ----
$ftp_user = ( !empty($HTTP_POST_VARS['ftp_user']) ) ? $HTTP_POST_VARS['ftp_user'] : "";
$ftp_pass = ( !empty($HTTP_POST_VARS['ftp_pass']) ) ? $HTTP_POST_VARS['ftp_pass'] : "";
+ $upgrade = ( !empty($HTTP_POST_VARS['upgrade']) ) ? $HTTP_POST_VARS['upgrade']: '';
include($phpbb_root_path.'includes/sql_parse.'.$phpEx);
***************
*** 174,177 ****
--- 175,184 ----
$template = new Template($phpbb_root_path . "templates/" . $default_template);
+ if( $upgrade == 1 )
+ {
+ require('upgrade.'.$phpEx);
+ $install_step = 1;
+ }
+
//
// Load default template for install
***************
*** 360,363 ****
--- 367,383 ----
$dbms_options .= '</select>';
+ $upgrade_option = '<select name="upgrade"';
+ $upgrade_option .= 'onchange="if(this.options[this.selectedIndex].value==1)
+ {
+ document.install_form.dbms.selectedIndex=0;
+ document.install_form.dbms.disabled=1;
+ }
+ else
+ {
+ document.install_form.dbms.disabled=0;
+ }">';
+ $upgrade_option .= '<option value="0">'.$lang['Install'].'</option>';
+ $upgrade_option .= '<option value="1">'.$lang['Upgrade'].'</option></select>';
+
$s_hidden_fields = '<input type="hidden" name="install_step" value="1" />';
***************
*** 377,381 ****
"L_DB_PASSWORD" => $lang['Database'] . ' ' . $lang['Password'],
"L_DB_PREFIX" => $lang['Table_Prefix'],
!
"L_ADMIN_USERNAME" => $lang['Administrator'] . ' ' . $lang['Username'],
"L_ADMIN_PASSWORD" => $lang['Administrator'] . ' ' . $lang['Password'],
--- 397,401 ----
"L_DB_PASSWORD" => $lang['Database'] . ' ' . $lang['Password'],
"L_DB_PREFIX" => $lang['Table_Prefix'],
! "L_UPGRADE" => $lang['Install_Method'],
"L_ADMIN_USERNAME" => $lang['Administrator'] . ' ' . $lang['Username'],
"L_ADMIN_PASSWORD" => $lang['Administrator'] . ' ' . $lang['Password'],
***************
*** 392,396 ****
"S_LANG_SELECT" => $lang_options,
"S_DBMS_SELECT" => $dbms_options,
! "S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_FORM_ACTION" => "install.$phpEx")
);
--- 412,417 ----
"S_LANG_SELECT" => $lang_options,
"S_DBMS_SELECT" => $dbms_options,
! "S_HIDDEN_FIELDS" => $s_hidden_fields,
! "S_UPGRADE_SELECT" => $upgrade_option,
"S_FORM_ACTION" => "install.$phpEx")
);
***************
*** 430,434 ****
if( $install_step == 1 )
{
! if($dbms != 'odbc')
{
//
--- 451,455 ----
if( $install_step == 1 )
{
! if($dbms != 'odbc' && $upgrade != 1)
{
//
|