Update of /cvsroot/phpslash/phpslash-ft/public_html
In directory usw-pr-cvs1:/tmp/cvs-serv26650/public_html
Modified Files:
config.php3 search.php3
Log Message:
Add comment search
Index: config.php3
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v
retrieving revision 1.117
retrieving revision 1.118
diff -C2 -d -r1.117 -r1.118
*** config.php3 2001/11/18 01:07:48 1.117
--- config.php3 2001/11/24 14:02:12 1.118
***************
*** 16,20 ****
// 1.1 Uncomment this only if you can't use a local php.ini or .htaccess
! //require('/home/nathan/webDevel/phplib-7.2c/php/prepend.php3');
// 1.11) Global Variables. (Don't add trailing slashes)
--- 16,20 ----
// 1.1 Uncomment this only if you can't use a local php.ini or .htaccess
! require('/home/nathan/webDevel/php-lib-stable/php/prepend.php3');
// 1.11) Global Variables. (Don't add trailing slashes)
***************
*** 34,38 ****
// $basedir -> Complete filesystem path to the pages
! $_PSL[basedir] = '/home/httpd/htdocs/phpslash-ft/public_html';
// $templatedir -> Path to the templates directory
--- 34,38 ----
// $basedir -> Complete filesystem path to the pages
! $_PSL[basedir] = '/home/nathan/webDevel/phpslash-ft/public_html';
// $templatedir -> Path to the templates directory
***************
*** 40,47 ****
// $classdir -> Path to the class directory
! $_PSL[classdir] = '/home/httpd/htdocs/phpslash-ft/class';
// $rooturl -> The base URL for the phpslash site
! $_PSL[rooturl] = 'http://superstar.odc.net/phpslash-ft/public_html';
// $adminurl -> The base URL for the admin pages
--- 40,47 ----
// $classdir -> Path to the class directory
! $_PSL[classdir] = '/home/nathan/webDevel/phpslash-ft/class';
// $rooturl -> The base URL for the phpslash site
! $_PSL[rooturl] = 'http://fatboy.mystic/ft';
// $adminurl -> The base URL for the admin pages
***************
*** 68,74 ****
$_PSL[DB_Host] = "localhost";
! $_PSL[DB_Database] = "authperm";
! $_PSL[DB_User] = "root";
! $_PSL[DB_Password] = "";
$_PSL[module][Glossary] = true;
--- 68,74 ----
$_PSL[DB_Host] = "localhost";
! $_PSL[DB_Database] = "phpslash";
! $_PSL[DB_User] = "phpslash";
! $_PSL[DB_Password] = "bar";
$_PSL[module][Glossary] = true;
***************
*** 137,140 ****
--- 137,142 ----
$_PSL[search_maxresults] = 20; /* the number of results to return when searching */
+
+ $_PSL[allow_comment_search] = TRUE; /* Do we allow search od the comments as well? */
/* if set to true then when you click "edit as story", the submission
Index: search.php3
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/public_html/search.php3,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** search.php3 2001/09/11 16:38:53 1.38
--- search.php3 2001/11/24 14:02:12 1.39
***************
*** 10,13 ****
--- 10,19 ----
$maxsearchresults = $_PSL[search_maxresults];
+ if ($HTTP_GET_VARS[use_comments] == 'on' && $_PSL[allow_comment_search]) {
+ $search_comments = TRUE;
+ } else {
+ $search_comments = FALSE;
+ }
+
$topic_image_id = "18";
$topic_image_name = "";
***************
*** 310,313 ****
--- 316,323 ----
psl_commentcount commentcount";
+ if ($search_comments) {
+ $q .= ",psl_comment";
+ }
+
if ($search_section_id != "") {
$q .= ",psl_section_lut sections ";
***************
*** 319,329 ****
$q .="\n WHERE story.user_id = psl_author.author_id
AND story.story_id = commentcount.count_id
! AND '$now' >= time ";
! if ($query != "")
$q .= " AND (story.title LIKE \"%$query%\"
OR story.intro_text LIKE \"%$query%\"
! OR story.body_text LIKE \"%$query%\"
! ) ";
if ($search_author_id != "")
$q .= " AND psl_author.author_id = \"$search_author_id\" ";
--- 329,346 ----
$q .="\n WHERE story.user_id = psl_author.author_id
AND story.story_id = commentcount.count_id
! AND '$now' >= time \n";
! if ($query != "") {
$q .= " AND (story.title LIKE \"%$query%\"
OR story.intro_text LIKE \"%$query%\"
! OR story.body_text LIKE \"%$query%\"";
! /* Here is the comment search clause */
! if ($search_comments) {
! $q .= " OR psl_comment.comment_text LIKE \"%$query%\"";
! }
!
! $q .= ") ";
! }
!
if ($search_author_id != "")
$q .= " AND psl_author.author_id = \"$search_author_id\" ";
|