phpslash-commit Mailing List for phpSlash (Page 43)
Brought to you by:
joestewart,
nhruby
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(59) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(52) |
Feb
(77) |
Mar
(118) |
Apr
(76) |
May
(106) |
Jun
(145) |
Jul
(9) |
Aug
(15) |
Sep
(78) |
Oct
(83) |
Nov
(105) |
Dec
(51) |
2003 |
Jan
(105) |
Feb
(100) |
Mar
(111) |
Apr
(149) |
May
(95) |
Jun
(56) |
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(22) |
Nov
(117) |
Dec
(6) |
2004 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(25) |
May
|
Jun
(11) |
Jul
(26) |
Aug
(85) |
Sep
(119) |
Oct
(312) |
Nov
(271) |
Dec
(5) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Joe S. <joe...@us...> - 2003-06-26 19:02:39
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv2082/phpslash-ft/public_html Modified Files: poll.php3 Log Message: poll.php3 - comment mode wasn't being set correctly. Index: poll.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/poll.php3,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** poll.php3 3 Apr 2003 20:08:45 -0000 1.23 --- poll.php3 26 Jun 2003 19:02:36 -0000 1.24 *************** *** 44,48 **** $cmtary['mode'] = $ary['mode']; } else { ! $cmtary['mode'] = ''; } if(!empty($ary['order'])) { --- 44,48 ---- $cmtary['mode'] = $ary['mode']; } else { ! $cmtary['mode'] = $_PSL['comment_defaultmode']; } if(!empty($ary['order'])) { |
From: Joe S. <joe...@us...> - 2003-06-26 18:59:38
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/poll In directory sc8-pr-cvs1:/tmp/cvs-serv1363/phpslash-dev/include/modules/poll Modified Files: index.php Log Message: quickfix to get poll comments working. Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/poll/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 24 Jun 2003 19:32:34 -0000 1.4 --- index.php 26 Jun 2003 18:59:35 -0000 1.5 *************** *** 24,27 **** --- 24,31 ---- } + if (!empty($ary['question_id']) && empty($ary['story_id'])) { + $HTTP_GET_VARS['story_id'] = $ary['question_id']; + } + $as = arg_separator("1"); # Default: = & $poll = pslNew("Poll"); *************** *** 35,39 **** $cmtary['mode'] = $ary['mode']; } else { ! $cmtary['mode'] = ''; } if(!empty($ary['order'])) { --- 39,43 ---- $cmtary['mode'] = $ary['mode']; } else { ! $cmtary['mode'] = $_PSL['comment_defaultmode']; } if(!empty($ary['order'])) { |
From: Joe S. <joe...@us...> - 2003-06-26 18:59:38
|
Update of /cvsroot/phpslash/phpslash-dev/include/templates/en/basic In directory sc8-pr-cvs1:/tmp/cvs-serv1363/phpslash-dev/include/templates/en/basic Modified Files: pollResultPage.tpl Log Message: quickfix to get poll comments working. Index: pollResultPage.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basic/pollResultPage.tpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** pollResultPage.tpl 12 Mar 2003 16:12:52 -0000 1.1.1.1 --- pollResultPage.tpl 26 Jun 2003 18:59:35 -0000 1.2 *************** *** 4,8 **** {RESULT} ! <p>[ <a href="{ROOTURL}/comment.php?submit=post&story_id={QUESTION_ID}&parent_id=0">Post a Comment About this Poll</b></a> ]</p> {COMMENT} --- 4,8 ---- {RESULT} ! <p>[ <a href="{ROOTURL}/poll.php?submit=post&story_id={QUESTION_ID}&parent_id=0">Post a Comment About this Poll</b></a> ]</p> {COMMENT} |
From: Joe S. <joe...@us...> - 2003-06-26 18:59:38
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv1363/phpslash-dev Modified Files: CHANGES Log Message: quickfix to get poll comments working. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** CHANGES 25 Jun 2003 15:16:45 -0000 1.35 --- CHANGES 26 Jun 2003 18:59:35 -0000 1.36 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-June 26 12:30PM CDT Joe Stewart <joe...@us...> + [BT] - comment/index.php, poll/index.php - quickfix to get poll comments working. + pollResultPage.tpl - changed comment.php to poll.php. + 2003-June 25 10:00AM CDT Joe Stewart <joe...@us...> [F] - slash-all.sql - removed Error and Comment sections. |
From: Joe S. <joe...@us...> - 2003-06-26 18:59:38
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/comment In directory sc8-pr-cvs1:/tmp/cvs-serv1363/phpslash-dev/include/modules/comment Modified Files: index.php Log Message: quickfix to get poll comments working. Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/comment/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 25 Jun 2003 15:16:45 -0000 1.2 --- index.php 26 Jun 2003 18:59:35 -0000 1.3 *************** *** 156,159 **** --- 156,160 ---- case "view": + case "viewresults": case "Change": |
From: Joe S. <joe...@us...> - 2003-06-25 15:16:53
|
Update of /cvsroot/phpslash/phpslash-dev/tables/0.7 In directory sc8-pr-cvs1:/tmp/cvs-serv17478/phpslash-dev/tables/0.7 Modified Files: slash-all.sql Log Message: comment block and error page fix Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/tables/0.7/slash-all.sql,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** slash-all.sql 24 Jun 2003 21:08:19 -0000 1.9 --- slash-all.sql 25 Jun 2003 15:16:45 -0000 1.10 *************** *** 121,126 **** INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_submission_lut_seq',13); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_variable_seq',63); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_seq',18); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_block_seq',174); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_author_seq',20); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_infolog',170); --- 121,126 ---- INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_submission_lut_seq',13); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_variable_seq',63); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_seq',16); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_block_seq',170); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_author_seq',20); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_infolog',170); *************** *** 128,132 **** INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_glossary_seq',1); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_blocktype_seq',20); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_block_lut_seq',475); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_permission_seq',82); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_group_seq',27); --- 128,132 ---- INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_glossary_seq',1); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_blocktype_seq',20); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_block_lut_seq',435); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_permission_seq',82); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_group_seq',27); *************** *** 219,223 **** INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (153,12,'Page - public - nav - top',0,'','tpl=navbar','','a:3:{s:6:\"column\";s:3:\"top\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";}',60,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (154,12,'Page - public - nav - foot',0,'','tpl=navbarFooter','','a:3:{s:6:\"column\";s:6:\"bottom\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";}',10,NULL); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (155,18,'Page - public - module',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:5:\"Story\";}',90,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (156,19,'Page - public',0,'','','','a:3:{s:6:\"column\";s:4:\"page\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";}',0,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (157,18,'Page - admin - module',0,'','','','a:2:{s:6:\"column\";s:6:\"center\";s:8:\"box_type\";s:11:\"contentonly\";}',90,1050617309); --- 219,223 ---- INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (153,12,'Page - public - nav - top',0,'','tpl=navbar','','a:3:{s:6:\"column\";s:3:\"top\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";}',60,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (154,12,'Page - public - nav - foot',0,'','tpl=navbarFooter','','a:3:{s:6:\"column\";s:6:\"bottom\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";}',10,NULL); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (155,18,'Page - public - module',0,'','','','a:3:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";}',90,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (156,19,'Page - public',0,'','','','a:3:{s:6:\"column\";s:4:\"page\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";}',0,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (157,18,'Page - admin - module',0,'','','','a:2:{s:6:\"column\";s:6:\"center\";s:8:\"box_type\";s:11:\"contentonly\";}',90,1050617309); *************** *** 231,237 **** INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (161,20,'About page',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:3:\"tpl\";s:5:\"about\";}',90,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (162,18,'Mailinglist',0,'','','','a:3:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:6:\"module\";s:11:\"MailingList\";}',90,NULL); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (170,18,'Module - Comment',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:7:\"Comment\";}',70,NULL); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (172,18,'Module - TopicBar',0,'','','','a:4:{s:6:\"column\";s:3:\"top\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:8:\"TopicBar\";}',80,NULL); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (173,18,'Module - Page Not Found',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:5:\"Error\";}',90,NULL); -- --- 231,235 ---- INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (161,20,'About page',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:3:\"tpl\";s:5:\"about\";}',90,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (162,18,'Mailinglist',0,'','','','a:3:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:6:\"module\";s:11:\"MailingList\";}',90,NULL); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (170,18,'Module - Comment',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:7:\"Comment\";}',80,NULL); -- *************** *** 818,823 **** INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (15,'Submission','Submission Page',NULL,'N;'); INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (16,'Static','static page',NULL,'N;'); ! INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (17,'Comment','comments display',NULL,'N;'); ! INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (18,'Error','error page',NULL,'N;'); -- -- Table structure for table 'psl_section_block_lut' --- 816,820 ---- INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (15,'Submission','Submission Page',NULL,'N;'); INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (16,'Static','static page',NULL,'N;'); ! -- -- Table structure for table 'psl_section_block_lut' *************** *** 968,1005 **** INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (431,139,15); INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (432,156,8); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (434,131,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (435,130,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (436,139,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (437,142,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (438,144,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (439,150,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (440,151,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (441,168,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (442,169,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (443,153,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (444,154,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (445,156,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (453,170,3); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (452,170,17); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (454,170,10); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (457,172,3); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (458,131,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (459,130,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (460,139,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (461,142,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (462,144,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (463,150,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (464,151,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (465,168,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (466,169,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (467,153,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (468,154,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (469,156,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (470,155,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (471,171,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (472,170,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (473,172,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (474,173,18); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (475,174,16); -- --- 965,971 ---- INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (431,139,15); INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (432,156,8); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (433,170,3); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (434,170,4); ! INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (435,170,5); -- |
From: Joe S. <joe...@us...> - 2003-06-25 15:16:52
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv17478/phpslash-dev Modified Files: CHANGES Log Message: comment block and error page fix Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** CHANGES 24 Jun 2003 21:08:19 -0000 1.34 --- CHANGES 25 Jun 2003 15:16:45 -0000 1.35 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2003-June 25 10:00AM CDT Joe Stewart <joe...@us...> + [F] - slash-all.sql - removed Error and Comment sections. + comment.php - comments displayed by comment module block. + comment/index.php - commented duplicate story display. + 2003-June 24 4:00PM CDT Joe Stewart <joe...@us...> [F] - slash-all.sql - db changes to use new error document and comment modules. |
From: Joe S. <joe...@us...> - 2003-06-25 15:16:52
|
Update of /cvsroot/phpslash/phpslash-dev/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv17478/phpslash-dev/public_html Modified Files: comment.php errordocument.php Log Message: comment block and error page fix Index: comment.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/comment.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** comment.php 24 Jun 2003 19:32:34 -0000 1.3 --- comment.php 25 Jun 2003 15:16:45 -0000 1.4 *************** *** 2,7 **** // $Id$ - $HTTP_GET_VARS['section'] = 'Comment'; - require('config.php'); --- 2,5 ---- Index: errordocument.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/errordocument.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** errordocument.php 24 Jun 2003 19:32:34 -0000 1.2 --- errordocument.php 25 Jun 2003 15:16:45 -0000 1.3 *************** *** 2,6 **** // $Id$ ! $HTTP_GET_VARS['section'] = 'Error'; require('config.php'); --- 2,6 ---- // $Id$ ! $HTTP_GET_VARS['module'] = 'Error'; require('config.php'); |
From: Joe S. <joe...@us...> - 2003-06-25 15:16:52
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/comment In directory sc8-pr-cvs1:/tmp/cvs-serv17478/phpslash-dev/include/modules/comment Modified Files: index.php Log Message: comment block and error page fix Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/comment/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 24 Jun 2003 19:38:37 -0000 1.1 --- index.php 25 Jun 2003 15:16:45 -0000 1.2 *************** *** 123,128 **** $ary['replying_to'] = $cmt->formatComment($parent_ary); } else { ! $story = pslNew("Story"); ! $ary['replying_to'] = $story->getStory($ary['story_id'],"full"); } --- 123,128 ---- $ary['replying_to'] = $cmt->formatComment($parent_ary); } else { ! // $story = pslNew("Story"); ! // $ary['replying_to'] = $story->getStory($ary['story_id'],"full"); } |
From: Joe S. <joe...@us...> - 2003-06-24 21:08:22
|
Update of /cvsroot/phpslash/phpslash-dev/tables/0.7 In directory sc8-pr-cvs1:/tmp/cvs-serv10774/phpslash-dev/tables/0.7 Modified Files: slash-all.sql Log Message: db changes to use new error document and comment modules. Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/tables/0.7/slash-all.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** slash-all.sql 6 Jun 2003 17:06:47 -0000 1.8 --- slash-all.sql 24 Jun 2003 21:08:19 -0000 1.9 *************** *** 121,126 **** INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_submission_lut_seq',13); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_variable_seq',63); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_seq',16); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_block_seq',169); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_author_seq',20); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_infolog',170); --- 121,126 ---- INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_submission_lut_seq',13); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_variable_seq',63); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_seq',18); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_block_seq',174); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_author_seq',20); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_infolog',170); *************** *** 128,132 **** INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_glossary_seq',1); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_blocktype_seq',20); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_block_lut_seq',432); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_permission_seq',82); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_group_seq',27); --- 128,132 ---- INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_glossary_seq',1); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_blocktype_seq',20); ! INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_section_block_lut_seq',475); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_permission_seq',82); INSERT INTO db_sequence (seq_name, nextid) VALUES ('psl_group_seq',27); *************** *** 204,208 **** INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (131,5,'PHPSlash Poll',1200,'','','','a:2:{s:5:\"width\";s:3:\"160\";s:6:\"column\";s:5:\"right\";}',20,1052418103); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (139,7,'Sections',3600,'','','','a:2:{s:6:\"column\";s:4:\"left\";s:5:\"width\";s:3:\"160\";}',90,1053009559); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (130,4,'%%',3600,'','','','a:2:{s:6:\"column\";s:5:\"right\";s:5:\"width\";s:3:\"160\";}',89,1052418103); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (140,8,'Interview Topics',3600,'','section=interviews','','a:3:{s:6:\"column\";s:5:\"right\";s:5:\"width\";s:3:\"160\";s:0:\"\";s:0:\"\";}',90,975030554); --- 204,208 ---- INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (131,5,'PHPSlash Poll',1200,'','','','a:2:{s:5:\"width\";s:3:\"160\";s:6:\"column\";s:5:\"right\";}',20,1052418103); ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (139,7,'Sections',3600,'','','','a:2:{s:6:\"column\";s:5:\"right\";s:5:\"width\";s:3:\"160\";}',90,1056484625); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (130,4,'%%',3600,'','','','a:2:{s:6:\"column\";s:5:\"right\";s:5:\"width\";s:3:\"160\";}',89,1052418103); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (140,8,'Interview Topics',3600,'','section=interviews','','a:3:{s:6:\"column\";s:5:\"right\";s:5:\"width\";s:3:\"160\";s:0:\"\";s:0:\"\";}',90,975030554); *************** *** 231,234 **** --- 231,237 ---- INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (161,20,'About page',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:3:\"tpl\";s:5:\"about\";}',90,NULL); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (162,18,'Mailinglist',0,'','','','a:3:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:6:\"module\";s:11:\"MailingList\";}',90,NULL); + INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (170,18,'Module - Comment',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:7:\"Comment\";}',70,NULL); + INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (172,18,'Module - TopicBar',0,'','','','a:4:{s:6:\"column\";s:3:\"top\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:8:\"TopicBar\";}',80,NULL); + INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (173,18,'Module - Page Not Found',0,'','','','a:4:{s:6:\"column\";s:6:\"center\";s:5:\"width\";s:0:\"\";s:8:\"box_type\";s:11:\"contentonly\";s:6:\"module\";s:5:\"Error\";}',90,NULL); -- *************** *** 815,819 **** INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (15,'Submission','Submission Page',NULL,'N;'); INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (16,'Static','static page',NULL,'N;'); ! -- -- Table structure for table 'psl_section_block_lut' --- 818,823 ---- INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (15,'Submission','Submission Page',NULL,'N;'); INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (16,'Static','static page',NULL,'N;'); ! INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (17,'Comment','comments display',NULL,'N;'); ! INSERT INTO psl_section (section_id, section_name, description, artcount, section_options) VALUES (18,'Error','error page',NULL,'N;'); -- -- Table structure for table 'psl_section_block_lut' *************** *** 964,967 **** --- 968,1006 ---- INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (431,139,15); INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (432,156,8); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (434,131,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (435,130,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (436,139,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (437,142,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (438,144,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (439,150,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (440,151,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (441,168,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (442,169,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (443,153,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (444,154,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (445,156,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (453,170,3); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (452,170,17); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (454,170,10); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (457,172,3); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (458,131,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (459,130,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (460,139,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (461,142,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (462,144,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (463,150,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (464,151,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (465,168,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (466,169,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (467,153,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (468,154,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (469,156,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (470,155,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (471,171,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (472,170,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (473,172,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (474,173,18); + INSERT INTO psl_section_block_lut (lut_id, block_id, section_id) VALUES (475,174,16); + -- -- Table structure for table 'psl_section_lut' |
From: Joe S. <joe...@us...> - 2003-06-24 21:08:22
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv10774/phpslash-dev Modified Files: CHANGES Log Message: db changes to use new error document and comment modules. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** CHANGES 24 Jun 2003 19:52:05 -0000 1.33 --- CHANGES 24 Jun 2003 21:08:19 -0000 1.34 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2003-June 24 4:00PM CDT Joe Stewart <joe...@us...> + [F] - slash-all.sql - db changes to use new error document and comment modules. + 2003-June 24 2:00PM CDT Joe Stewart <joe...@us...> [B] - new modules - topicbar, navbar, commnent, error, and auth. |
From: Joe S. <joe...@us...> - 2003-06-24 19:52:43
|
Update of /cvsroot/phpslash/phpslash-dev/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv28749/phpslash-dev/public_html Modified Files: config-dist.php Log Message: various bugfixes and classes into modules Index: config-dist.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/config-dist.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config-dist.php 24 Jun 2003 19:32:34 -0000 1.5 --- config-dist.php 24 Jun 2003 19:52:38 -0000 1.6 *************** *** 26,30 **** */ ! if($_PSL['jpcache.enable'] == 'external') { // if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { --- 26,31 ---- */ ! if(0) { ! // if($_PSL['jpcache.enable'] == 'external') { // if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { *************** *** 239,244 **** addClassRequirement("slashTemplate","template"); addClassRequirement("slashTemplate",$_PSL['classdir'] . "/slashTemplate.class"); ! addClassRequirement("navbar",$_PSL['classdir'] . "/NavBar.class"); ! addClassRequirement("topicbar",$_PSL['classdir'] . "/TopicBar.class"); addLibraryRequirement("phpslash",$_PSL['classdir'] . "/functions.inc"); --- 240,245 ---- addClassRequirement("slashTemplate","template"); addClassRequirement("slashTemplate",$_PSL['classdir'] . "/slashTemplate.class"); ! // addClassRequirement("navbar",$_PSL['classdir'] . "/NavBar.class"); ! // addClassRequirement("topicbar",$_PSL['classdir'] . "/TopicBar.class"); addLibraryRequirement("phpslash",$_PSL['classdir'] . "/functions.inc"); *************** *** 551,554 **** --- 552,556 ---- 'module' => "Glossary" ); + /* $menuitem[] = array( 'name' => "Variable", *************** *** 557,560 **** --- 559,563 ---- 'module' => "Variable" ); + */ $menuitem[] = array( 'name' => "Logging", |
From: Joe S. <joe...@us...> - 2003-06-24 19:52:43
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv28749/phpslash-dev Modified Files: ChangeLog Log Message: various bugfixes and classes into modules Index: ChangeLog =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog 16 May 2003 21:11:42 -0000 1.4 --- ChangeLog 24 Jun 2003 19:52:38 -0000 1.5 *************** *** 1,7 **** 2003-05-16 16:10 joestewart * CHANGES, include/modules/block/blocktypes/Block_render_template.class, ! tables/0.7/slash-all.sql: new template block type 2003-05-16 15:19 joestewart --- 1,39 ---- + 2003-05-20 13:31 joestewart + + * include/modules/block/blocktypes/Block_render_rss.class: sync + with -ft cvs + + 2003-05-20 12:52 joestewart + + * include/modules/block/Block_admin.class: author admin.php missed + path change + + 2003-05-20 12:38 joestewart + + * CHANGES, include/modules/block/blocktypes/Block_render_rss.class: + sync with -ft cvs + + 2003-05-20 12:07 joestewart + + * CHANGES, include/modules/author/index.php, + include/modules/glossary/admin.php, include/modules/poll/admin.php, + include/modules/submission/admin.php: author admin.php missed path + change + + 2003-05-20 11:57 joestewart + + * include/modules/block/admin.php: author admin.php missed path + change + + 2003-05-20 11:40 joestewart + + * CHANGES, include/modules/author/admin.php: author admin.php + missed path change + 2003-05-16 16:10 joestewart * CHANGES, include/modules/block/blocktypes/Block_render_template.class, ! tables/0.7/slash-all.sql, ChangeLog: new template block type 2003-05-16 15:19 joestewart |
From: Joe S. <joe...@us...> - 2003-06-24 19:52:13
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv28685/phpslash-dev Modified Files: CHANGES Log Message: various bugfixes and classes into modules Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** CHANGES 9 Jun 2003 19:10:18 -0000 1.32 --- CHANGES 24 Jun 2003 19:52:05 -0000 1.33 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-June 24 2:00PM CDT Joe Stewart <joe...@us...> + [B] - new modules - topicbar, navbar, commnent, error, and auth. + poll bugfixes. article page being rewritten. + 2003-June 9 2:00PM CDT Joe Stewart <joe...@us...> [B] - submission/index.php - display specific save errors. Closes |
From: Joe S. <joe...@us...> - 2003-06-24 19:38:40
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/error In directory sc8-pr-cvs1:/tmp/cvs-serv26913/phpslash-dev/include/modules/error Added Files: index.php Log Message: various bugfixes and classes into modules --- NEW FILE: index.php --- <?php // $Id: index.php,v 1.1 2003/06/24 19:38:37 joestewart Exp $ global $_PSL, $REDIRECT_URL; $ary = $GLOBALS['ary']; $pagetitle = pslgetText("Page not found"); // The name to be displayed in the header $xsiteobject = pslgetText("Error Document"); // This Defines The META Tag Object Type // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); if(!empty($HTTP_GET_VARS['login'])) { $auth->login_if($HTTP_GET_VARS['login']); } // log 404's if you don't have access server logs in the infolog // logwrite("404", "File Not Found " . $REDIRECT_URL); $template = pslNew("slashTemplate"); $template->debug = 0; $template->set_file('index', "notfound.tpl"); $template->set_var(array( 'ROOTDIR' => $_PSL['rooturl'], 'IMAGEDIR' => $_PSL['imagedir'], 'ERRORURL' => htmlentities($REDIRECT_URL) )); $content = $template->parse(OUT,"index"); return $content; ?> |
From: Joe S. <joe...@us...> - 2003-06-24 19:38:40
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/topicbar In directory sc8-pr-cvs1:/tmp/cvs-serv26913/phpslash-dev/include/modules/topicbar Added Files: TopicBar.class index.php Log Message: various bugfixes and classes into modules --- NEW FILE: TopicBar.class --- <?php /* $Id: TopicBar.class,v 1.1 2003/06/24 19:38:37 joestewart Exp $ */ /* NOTES: * get rid of that last global statement... */ class TopicBar { var $templ, $psl; function TopicBar() { /* Get preferences */ global $_PSL; $this->psl = $_PSL; /* Templates */ $this->templ = pslNew("slashTemplate",$this->psl['templatedir'], "remove"); $this->templ->debug = 0; $this->templ->halt_on_error = "report"; $this->templ->set_file(array( 'topicbar' => "topicBar.tpl" )); } function getTopicBar() { global $pagetitle; $db = pslNew("slashDB"); $this->templ->set_var( array( 'SITENAME' => $this->psl['site_name'], 'SITETITLE' => $this->psl['site_title'], 'PAGETITLE' => $pagetitle )); $this->templ->set_block("topicbar", "each_topic", "block"); $q = "SELECT * FROM psl_topic WHERE onlinkbar != 0 ORDER BY onlinkbar ASC"; $db->query($q); while( $db->next_record() ) { $topic_id = $db->f( "topic_id" ); $image = $db->f( "image" ); // TODO: Use $_PSL[amp] in the following code $this->templ->set_var( array( 'SEARCH_TOPIC' => $this->psl['rooturl'] . "/search.php?topic_id=$topic_id", 'IMAGE_SRC' => $this->psl['topicimageurl'] . "/$image", 'WIDTH' => $db->f( "width" ), 'HEIGHT' => $db->f( "height" ), 'ALT_TEXT' => $db->f( "alt_text" ) )); $this->templ->parse("block", "each_topic", true); } $this->templ->parse( "OUT", "topicbar"); return $this->templ->get( "OUT" ); } function printTopicBar() { $topicbarhtml = $this->getTopicBar(); echo "$topicbarhtml\n"; } } /* End class TopicBar */ ?> --- NEW FILE: index.php --- <?php /* $Id: index.php,v 1.1 2003/06/24 19:38:37 joestewart Exp $ */ global $_PSL; $ary = $GLOBALS['ary']; addClassRequirement("topicbar",$_PSL['moduledir'] ."/". $_PSL['module']['TopicBar'] ."/TopicBar.class"); $topicbar = pslNew("TopicBar"); $content = $topicbar->getTopicBar(); return $content; ?> |
From: Joe S. <joe...@us...> - 2003-06-24 19:38:40
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/navbar In directory sc8-pr-cvs1:/tmp/cvs-serv26913/phpslash-dev/include/modules/navbar Added Files: NavBar.class index.php Log Message: various bugfixes and classes into modules --- NEW FILE: NavBar.class --- <?php /* $Id: NavBar.class,v 1.1 2003/06/24 19:38:37 joestewart Exp $ */ /* * Class: NavBar * * Layer: ??? * Desc.: The navigation bar shown on top of all our pages * * NOTES/TO-DO: Get rid of global's * Make URIs (GET)session-aware (post 0.6?) * */ class NavBar { var $templ; /* * CONSTRUCTORS */ function NavBar () { global $_PSL; $this->psl = $_PSL; /* Templates */ $this->templ = pslNew("slashTemplate",$this->psl['templatedir'], "remove"); $this->templ->debug = false; $this->templ->halt_on_error = "report"; $this->templ->set_file(array( 'navbar' => "navbar.tpl" )); } /* * METHODS */ /* * Internal (private) function only. Should not be used outside this class */ function parse ($text,$link) { $this->templ->set_var( array( 'IMAGEDIR' => $this->psl['imageurl'], 'LINK_NAVBAR' => "$link", 'LINK_NAVBAR_TEXT' => pslgetText($text) )); $this->templ->parse("block", "each_destination" ,true); } /* * Returns the HTML for the NavBar */ function getNavBar ($tpl="", $menu_ary="") { global $auth, $perm; $default_template = "navbar.tpl"; if( $menu_ary == "") { $menu_ary = $this->psl['menuitem']; } if( $tpl == "") { $this->templ->set_file( 'template', $default_template); } elseif ( $this->templ->set_file('template' , basename($tpl) . ".tpl" )) { } else { $this->templ->set_file( 'template', $default_template); } $this->templ->set_block( 'template', "each_destination", "block" ); $this->templ->set_var( array( 'SKIN' => $this->psl['skin'], 'IMAGEDIR' => $this->psl['imageurl'], 'LINK_NAVBAR' => "", 'LINK_NAVBAR_TEXT' => "") ); if($this->psl['show_admin_on_navbar']) { if ($auth->is_authenticated() and $auth->auth["uid"] != "nobody" and is_object($perm)) { $this->parse("Logout " . $auth->auth["uname"], "".$this->psl['rooturl']."/login.php?logout=yes"); } else { $this->parse("Login", "".$this->psl['rooturl']."/login.php?login=yes"); } } for( $i=0 ; $i < count($menu_ary); $i++) { $module = $menu_ary[$i]['module']; if( (!$module) OR ($this->psl['module'][$module])) { if($menu_ary[$i]['perm'] == "nobody") { $this->parse($menu_ary[$i]['name'],$menu_ary[$i]['link'] ); } elseif ($auth->is_authenticated() and is_object($perm) ) { if($perm->have_perm('user') ) { if ($perm->have_perm($menu_ary[$i]['perm'])) { $this->parse($menu_ary[$i]['name'],$menu_ary[$i]['link'] ); } } elseif ($menu_ary[$i]['perm'] == "") { $this->parse($menu_ary[$i]['name'],$menu_ary[$i]['link'] ); } } elseif ($menu_ary[$i]['perm'] == "") { $this->parse($menu_ary[$i]['name'],$menu_ary[$i]['link'] ); } } } $this->templ->parse( "OUT", 'template' ); return $this->templ->get( "OUT" ); } /* * Prints the HTML for the NavBar */ function printNavBar () { $navbarhtml = $this->getNavBar(); echo "$navbarhtml"; } } ?> --- NEW FILE: index.php --- <?php /* $Id: index.php,v 1.1 2003/06/24 19:38:37 joestewart Exp $ */ global $_PSL; $ary = $GLOBALS['ary']; $content = ''; $tpl = ''; if(array_key_exists('tpl', $ary)) { $tpl = $ary['tpl']; } addClassRequirement("navbar",$_PSL['moduledir'] ."/". $_PSL['module']['NavBar'] ."/NavBar.class"); $navbar = pslNew("NavBar"); if (!empty($this->psl[$menu_ary])) { $content = $navbar->getNavBar( $tpl, $this->psl[$menu_ary]); } else { $content = $navbar->getNavBar( $tpl); } return $content; ?> |
From: Joe S. <joe...@us...> - 2003-06-24 19:38:39
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/comment In directory sc8-pr-cvs1:/tmp/cvs-serv26913/phpslash-dev/include/modules/comment Added Files: Comment.class admin.php article.php index.php poll.php Log Message: various bugfixes and classes into modules --- NEW FILE: Comment.class --- <?php /* $Id: Comment.class,v 1.1 2003/06/24 19:38:36 joestewart Exp $ */ /** * Provides an API to the PHPSlash Comment Engine. * * This object is how we do anything with user comments. It also * doesn't depend on any other module and you can easily add a comments * page to anything in a database that you can index. The only thing is * that it must be indexed with our psl_comment_dep_seq so that we can * have a unique ID for anything with comments. Currently the the stories * and polls are indexed with the psl_comment_dep_seq. * */ class Comment { var $ctempl; var $psl; var $db; [...1167 lines suppressed...] } else { $this->message = "(commentEdit Function): you're trying to update a comment but I couldn't find it?"; } } /** * getMessage - returns message text * * simply returns the contents of the message variable * * @access public */ function getMessage() { return pslgetText($this->message); } } // end of Comment Class ?> --- NEW FILE: admin.php --- <?php /* $Id: admin.php,v 1.1 2003/06/24 19:38:36 joestewart Exp $ */ /* TODO: */ global $_PSL, $ary, $sess, $auth, $perm, $HTTP_GET_VARS, $HTTP_POST_VARS; AddClassRequirement("comment",$_PSL['moduledir'] ."/". $_PSL['module']['Comment'] . "/Comment.class"); $pagetitle = pslgetText("Comment Administration"); // The name to be displayed in the header $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type if (!is_object($sess)) { page_open($_PSL['page_features']); } /***************************** START OF PAGE *****************************/ $auth->login_if(!$perm->have_perm('comment')); /* DEBUG */ // debug("HTTP_POST_VARS", $HTTP_POST_VARS); // debug("HTTP_GET_VARS", $HTTP_GET_VARS); // debug("BulkDelete Array", $HTTP_POST_VARS[bulkdel_ary]); /* END DEBUG */ $cmt = pslNew("Comment"); $content = ''; if(!empty($HTTP_POST_VARS['action'])) { $action = clean($HTTP_POST_VARS['action'], true); } elseif (!empty($HTTP_GET_VARS['action'])) { $action = clean($HTTP_GET_VARS['action']); } else { $action = ''; } if($perm->have_perm("comment")) { switch ($action) { case "delete": if ($cmt->delete($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { $content .= pslgetText("The comment was deleted")."<br>\n"; // expire cache for this story_id if(function_exists('jpcache_gc')) { jpcache_gc('string', "-story_id-" . $HTTP_GET_VARS['story_id'], "100"); } } else { $content .= getError($cmt->getMessage()); } break; case pslgetText("Show Pending"): $content .= $cmt->showPending($HTTP_GET_VARS['story_id']); break; case pslgetText("Bulk Delete"): $bulkdel_ary = $HTTP_POST_VARS['bulkdel_ary']; if (count($bulkdel_ary) == 0) { $content .= getMessage("You didn't select any items to delete!"); } else { for ($i = 0 ; $i < count($bulkdel_ary) ; $i++) { if ($cmt->delete($bulkdel_ary[$i], $HTTP_POST_VARS['story_id'])) { $content .= sprintf(pslgetText("Comment # %s has been deleted."), $bulkdel_ary[$i])."\n"; // expire cache for this story_id jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); } else { $content .= pslgetText("There was an ERROR deleting comment #") . $bulkdel_ary[$i] . "\n"; } } } break; case "markpend": $content .= getTitlebar("100%", "Mark Comment Pending"); if ($cmt->markPending($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { $content .= getMessage(sprintf(pslgetText("Marked comment # %s as pending"), $HTTP_GET_VARS['comment_id'])); } else { $content .= getError(sprintf(pslgetText("There was an ERROR marking comment # %s as pending."), $HTTP_GET_VARS['comment_id'])); } break; case "unmarkpend": $content .= getTitlebar("100%","Unmark Pending Comment"); if ($cmt->unmarkPending($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { $content .= getMessage(sprintf(pslgetText("Unmarked pending comment %s"), $HTTP_GET_VARS['comment_id'])); } else { $content .= getError("There was an ERROR unmarking the comment as pending."); } break; case "reparentupone": if ($cmt->reparentUp($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { $content .= getMessage("The comment was moved up one level."); // expire cache for this story_id jpcache_gc('string', "-story_id-" . $HTTP_GET_VARS['story_id'], "100"); } else { $content .= getError($cmt->getMessage()); } break; case "reparentuptop": if ($cmt->reparentTop($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { $content .= getMessage("The comment was moved to the top."); // expire cache for this story_id jpcache_gc('string', "-story_id-" . $HTTP_GET_VARS['story_id'], "100"); } else { $content .= getError($cmt->getMessage()); } break; case "edit": $content .= getTitlebar("100%","Edit Comment"); $returned = $cmt->commentEdit($HTTP_GET_VARS); if($returned) { $content .= $returned; } else { $content .= getError($cmt->getMessage()); } break; case "update": if($cmt->update($HTTP_POST_VARS)) { $content .= getMessage($cmt->getMessage()); // expire cache for this story_id jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); } else { $content .= getError($cmt->getMessage()); } $returned = $cmt->commentEdit(); if($returned) { $content .= $returned; } else { $content .= getError($cmt->getMessage()); } break; default: $content .= getTitlebar("100%", "Error! No Action"); $content .= "This is how the Comment Administration works. You tell the \$action variable what you want to do, and then I go about doing it. You're getting this message because I didn't find an \$action variable that I could use. This is what \$action is right now: '$action'\n"; } } else { $content = getTitlebar("100%","Error! Invalid Privileges"); $content .= "Sorry. You do not have the necessary privilege to view this page."; } return $content; ?> --- NEW FILE: article.php --- <?php /* $Id: article.php,v 1.1 2003/06/24 19:38:37 joestewart Exp $ */ global $_PSL, $ary, $sess, $auth, $perm, $HTTP_GET_VARS, $HTTP_POST_VARS; AddClassRequirement("story_base",$_PSL['moduledir'] . "/story/Story_base.class"); AddClassRequirement("story","story_base"); AddClassRequirement("story",$_PSL['moduledir'] . "/story/Story.class"); AddClassRequirement("comment",$_PSL['moduledir'] ."/". $_PSL['module']['Comment'] . "/Comment.class"); $pagetitle = pslgetText("Comment Display"); # Defines the page title. $xsiteobject = pslgetText("Comment Display"); # Defines The META TAG Page Type // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $auth->login_if(!$perm->have_perm('commentView')); $content = ''; // if ($_PSL['module']['Comment']) { $cmtary['mode'] = $ary['mode']; $cmtary['order'] = $ary['asc']; $cmtary['story_id'] = $ary['story_id']; // $cmtary['parent_id'] = $ary['parent_id']; $cmtary['parent_id'] = 0; // print_r($cmtary); $cmt = pslNew("Comment",$cmtary); $content = $cmt->getAllComments($cmtary); // } return $content; ?> --- NEW FILE: index.php --- <?php /* $Id: index.php,v 1.1 2003/06/24 19:38:37 joestewart Exp $ */ global $_PSL, $sess, $auth, $perm, $HTTP_GET_VARS, $HTTP_POST_VARS; $ary = $GLOBALS['ary']; AddClassRequirement("story_base",$_PSL['moduledir'] . "/story/Story_base.class"); AddClassRequirement("story","story_base"); AddClassRequirement("story",$_PSL['moduledir'] . "/story/Story.class"); AddClassRequirement("comment",$_PSL['moduledir'] ."/". $_PSL['module']['Comment'] . "/Comment.class"); $pagetitle = pslgetText("Comment Display"); # Defines the page title. $xsiteobject = pslgetText("Comment Display"); # Defines The META TAG Page Type $auth->login_if(!$perm->have_perm('commentView')); $content = ''; if(!empty($HTTP_POST_VARS['submit'])) { $submit = $HTTP_POST_VARS['submit']; $ary = clean($HTTP_POST_VARS, true); $name = $ary['name']; $email = $ary['email']; $url = $ary['url']; if(!empty($ary['name'])) { $comment_name = $ary['name']; $comment_email = $ary['email']; $comment_url = $ary['url']; $sess->register("comment_name"); $sess->register("comment_email"); $sess->register("comment_url"); } $cmt = pslNew("Comment",$ary); switch( $submit) { case "preview": // when you are previewing a comment before submitting $ary['ip'] = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR']); /* add the poster's IP addr */ $ary['replying_to'] = $cmt->formatComment($ary); $content .= $cmt->getForm($ary); break; case "save": case "Submit Comment": $content .= "<BR>Click <A HREF=\"" . $return_link . "\">here</A> to go back<BR>\n"; if ($ary['parent_id']) { $content .= "<A HREF=\"" . $_PSL['rooturl'] . "/comment.php?submit=view&story_id=$ary[story_id]&comment_id=$ary[parent_id]&mode=flat\">".pslgetText("View Parent Comment")."</A>\n"; } $content .= getTitlebar("100%", "Submitted Comment"); $ary['ip'] = $HTTP_SERVER_VARS['REMOTE_ADDR']; /* add the poster's IP addr */ $id = $cmt->update($ary); if ($id) { // expire cache for this story_id if(function_exists('jpcache_gc')) { jpcache_gc('string', "-story_id-" . $ary['story_id'], "100"); jpcache_gc('string', "-question_id-" . $ary['story_id'], "100"); } $content .= getMessage($cmt->getMessage()); $comment_ary = $cmt->getCommentArray($id); $content .= $cmt->formatComment($comment_ary); // send email for new submission. if (array_key_exists('commentnotify',$_PSL)) { $mail_ary['tpl'] = "emailNotifyComment"; $ary['comment_id'] = $id; $mail_ary['vars'] = $ary; $success = emailNotify($mail_ary); } } else { $content .= getError($cmt->getMessage()); } header("Location: $return_link"); break; } } elseif (!empty($HTTP_GET_VARS['submit']) || array_key_exists('story_id', $ary)) { $submit = $HTTP_GET_VARS['submit']; $ary = clean($HTTP_GET_VARS); if (empty($HTTP_GET_VARS['submit']) && array_key_exists('story_id', $ary)) { $submit = 'view'; } if (empty($ary['parent_id'])) { $ary['parent_id'] = 0; } if ($sess->is_registered("comment_name")) { $ary['name'] = $comment_name; $ary['email'] = $comment_email; } $cmt = pslNew("Comment",$ary); switch( $submit) { case "post": if( !$perm->have_perm('commentPost')) { $auth->auth['error'] = pslgetText("Login required to post comments"); $auth->login_if(true); } if ($ary['parent_id'] != 0) { $parent_ary = $cmt->getCommentArray($ary['parent_id']); $ary['replying_to'] = $cmt->formatComment($parent_ary); } else { $story = pslNew("Story"); $ary['replying_to'] = $story->getStory($ary['story_id'],"full"); } if ($parent_ary['subject'] == "") { //$ary[subject] = pslgetText("No Subject Given"); } elseif( preg_match ("/Re\:/i",$parent_ary['subject'])) { $ary['subject'] = $parent_ary['subject']; } else { $ary['subject'] = pslgetText("Re: ") . $parent_ary['subject']; } $ary['action_url'] = $_PSL['phpself']; $ary['siteowner'] = $_PSL['site_owner']; // session variables // if(isset($name)) { // $ary['name'] = $name; // } // if(isset($email)) { // $ary['email'] = $email; // } // if(isset($url)) { // $ary['url'] = $url; // } // either start a new object or getForm not reuse template vars. $cmt = pslNew("Comment",$ary); $content .= $cmt->getForm($ary); break; case "view": case "Change": // the basic viewing of the comments $content .= getTitlebar("100%", pslgetText("Comments")); $content .= $cmt->getAllComments($ary); break; } } if($content == '') { // $content = getTitlebar("100%","Comment Error!"); // $content .= getError(pslgetText("You didn't supply a good submit value")); } return $content; ?> --- NEW FILE: poll.php --- <?php /* $Id: poll.php,v 1.1 2003/06/24 19:38:37 joestewart Exp $ */ global $_PSL, $ary, $sess, $auth, $perm, $HTTP_GET_VARS, $HTTP_POST_VARS; AddClassRequirement("comment",$_PSL['moduledir'] ."/". $_PSL['module']['Comment'] . "/Comment.class"); $pagetitle = pslgetText("Comment Display"); # Defines the page title. $xsiteobject = pslgetText("Comment Display"); # Defines The META TAG Page Type // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $auth->login_if(!$perm->have_perm('commentView')); $content = ''; // if ($_PSL['module']['Comment']) { $cmtary['mode'] = $ary['mode']; $cmtary['order'] = $ary['asc']; $cmtary['story_id'] = $ary['story_id']; // $cmtary['parent_id'] = $ary['parent_id']; $cmtary['parent_id'] = 0; // print_r($cmtary); $cmt = pslNew("Comment",$cmtary); $content = $cmt->getAllComments($cmtary); // } return $content; ?> |
From: Joe S. <joe...@us...> - 2003-06-24 19:38:39
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/auth In directory sc8-pr-cvs1:/tmp/cvs-serv26913/phpslash-dev/include/modules/auth Added Files: slashAuthCR.class Log Message: various bugfixes and classes into modules --- NEW FILE: slashAuthCR.class --- <?php /* $Id: slashAuthCR.class,v 1.1 2003/06/24 19:38:36 joestewart Exp $ * * Provides the authorization functions of PHPSlash * * Extends the phplib auth class. * * From the phplib local.inc * * A variation of Auth which uses a Challenge-Response * Authentication. The password never crosses the net in clear, * if the remote system supports JavaScript. Please read the * Documentation section about CR Authentication to understand * what is going on. * */ class slashAuth extends Auth { var $classname = "slashAuth"; // For object health var $lifetime = 15; var $database_class = "slashDB"; var $database_table = "auth_user"; var $magic = "monkeyisnotanape"; var $nobody = true; var $cancel_login = "cancel"; var $mode = "log"; var $psl; var $sess; /** * customizes class names and loads the class definitions * * @param string classnames (as many as you want) * @return void */ function loadClasses() { $arr = func_get_args(); foreach($arr as $class) { $this->$class = pslGetClass($this->$class); loadClass($this->$class); } } /** * functions as a class constructor. * Called from page_open. * * @return void */ function start() { global $_PSL, $HTTP_GET_VARS, $sess; $this->psl = &$_PSL; $this->sess = &$sess; // If the magic word is defined in the config file - use it. if(!empty($_PSL['magic'])) { $this->magic = $_PSL['magic']; } AddClassRequirement("author",$_PSL['moduledir'] ."/". $_PSL['module']['Author'] ."/Author.class"); $this->loadClasses("database_class"); // setup registration mode or login only if (!empty($HTTP_GET_VARS['mode']) && $HTTP_GET_VARS['mode']=='reg') { if( !empty($_PSL['authmode'])) { $this->mode = $_PSL['authmode']; } else { $this->mode='reg'; } } else { $this->mode='log'; } // use preferences if(!empty($this->auth['preferences'])) { // use language preference if ((isset($this->auth['preferences']['lang'])) && ($this->psl['language'] != $this->auth['preferences']['lang']) ) { $_PSL['languagefile'] = setLang($this->auth['preferences']['lang']); $_PSL['templatedir'] = setLangTpl($this->auth['preferences']['lang']); } // use skin preference // if(isset($this->auth['preferences']['skin'])) { if ((isset($this->auth['preferences']['skin'])) && ($this->psl['defaultskin'] != $this->auth['preferences']['skin'])){ $_PSL['templatedir'] = setSkinTpl($this->auth['preferences']['skin'], "userpref"); } } // call underlying phplib auth Auth::start(); } /** * auth_loginform - displays the login form. * * @return void */ function auth_loginform() { global $_PSL, $challenge, $HTTP_GET_VARS, $HTTP_POST_VARS, $sess, $saved_get, $saved_post; // preserve the POST variable through the login process $saved_post = $HTTP_POST_VARS; $saved_get = $HTTP_GET_VARS; $sess->register("saved_post"); $sess->register("saved_get"); // generate a challenge word if needed. if(empty($challenge)) { $challenge = md5(uniqid($this->magic)); $sess->register("challenge"); } // create the template object $templ = pslNew("slashTemplate"); $templ->set_file(array( 'form' => "loginformCR.tpl" )); $templ->set_var( array( // 'ACTION_URL' => $_PSL['rooturl'] . "/login.php", 'ACTION_URL' => $_PSL['phpself'], 'PHP_SELF' => $_PSL['phpself'], 'ROOTURL' => $_PSL['rooturl'], 'CHALLENGE' => $challenge )); // Display the previously used name in the form field if (isset($this->auth["uname"]) && $this->auth["uname"] != "nobody") { $templ->set_var('USERNAME', htmlentities($this->auth["uname"])); } else { $templ->set_var('USERNAME', ""); // $this->auth["error"] = ""; } // Display message string if present if (isset($this->auth["error"])) { $templ->set_var('ERROR', $this->auth["error"]); } else { $templ->set_var('ERROR', ""); } // Link to registration screen if enabled $templ->set_block("form","reg_block","regblock"); if( $_PSL['authmode'] == "reg") { $templ->parse("regblock", "reg_block", true); } // display slashhead("Login", "Login"); if ($this->psl['module']['NavBar']) { addClassRequirement("navbar",$this->psl['moduledir'] ."/". $this->psl['module']['NavBar'] ."/NavBar.class"); $navbar = pslNew("NavBar"); echo $navbar->getNavBar(); } $templ->pparse('OUT',"form"); if ($this->psl['module']['NavBar']) { $navbar = pslNew("NavBar"); echo $navbar->getNavBar("navbarFooter"); } slashfoot(); } /** * auth_preauth - allow for auto login or preference loading. * * @return int */ function auth_preauth() { global $HTTP_COOKIE_VARS, $sess; // debug("auth", "preauth"); // The preauth cookie is called 'user_info' if( !empty($HTTP_COOKIE_VARS['user_info'])){ // generate the challenge we expect $cookie_challenge = md5($this->magic .":". $this->psl['basedir']); // decode the cookie data into an array $cookie_ary = unserialize(base64_decode($HTTP_COOKIE_VARS['user_info'])); # assume the check is gonna fail $uid = false; $q = "SELECT * FROM psl_author WHERE author_name = '$cookie_ary[1]' "; $this->db->query($q); // if the user is not found - apply any preferences if ($this->db->num_rows() == 0) { if(!empty($cookie_ary['preferences'])) { $this->auth['preferences'] = $cookie_ary['preferences']; // use preferences // use language preference if ((isset($this->auth['preferences']['lang'])) && ($this->psl['language'] != $this->auth['preferences']['lang']) ) { $this->psl['languagefile'] = setLang($this->auth['preferences']['lang']); $this->psl['templatedir'] = setLangTpl($this->auth['preferences']['lang']); } // use skin preference if ((isset($this->auth['preferences']['skin'])) && ($this->psl['defaultskin'] != $this->auth['preferences']['skin'])){ $this->psl['templatedir'] = setSkinTpl($this->auth['preferences']['skin'], "userpref"); } } return false; } // user found - now check for correct data while ($this->db->next_record()) { $this->auth["uname"] = $this->db->Record["author_name"]; $this->auth["dname"] = $this->db->Record["author_realname"]; $temparray=unserialize($this->db->Record['author_options']); $md5_pw = $this->db->Record['password']; // this is the raw MD5ed user/pass combo $expected_response = md5("$md5_pw:$cookie_challenge"); // compare the response given in the cookie to expected response if( $expected_response == $cookie_ary[0]) { // preauth successful // debug("preauth", "successful"); $this->auth["url"] = $this->db->Record["url"]; $uid = $this->db->Record["author_id"]; $this->auth["perm"] = $this->get_userperms($uid); // use preferences if(!empty($temparray['preferences'])){ $this->auth['preferences'] = $temparray['preferences']; // use language preference if(isset($this->auth['preferences']['lang'])) { $this->psl['languagefile'] = setLang($this->auth['preferences']['lang']); $this->psl['templatedir'] = setLangTpl($this->auth['preferences']['lang']); } // use skin preference // if(isset($this->auth['preferences']['skin'])) { if ((isset($this->auth['preferences']['skin'])) && ($this->psl['defaultskin'] != $this->auth['preferences']['skin'])){ $this->psl['templatedir'] = setSkinTpl($this->auth['preferences']['skin'],"userpref"); } } // expire cache for this session if(function_exists('jpcache_gc')) { jpcache_gc('string', "-slashSess-" . $sess->id, "100"); } // success is signalled by returning the user's id. return $uid; } else { // preauth failed // debug("preauth", "failed"); return false; } } } else if ($this->nobody) { // no user_info cookie // if public access allowed apply the data for user named 'nobody' loadClass('Author'); $author_ary = Author::getAuthor(array('author_name' => 'nobody')); $this->auth["perm"] = $this->get_userperms($author_ary['author_id']); $this->auth["dname"] = $author_ary['author_realname']; $this->auth["uname"] = $author_ary['author_name']; $this->auth["email"] = $author_ary['email']; $this->auth["url"] = $author_ary['url']; $this->auth['preferences'] = ''; // get rid of session variables and use the db author record. if($this->sess->is_registered("comment_name")) { $this->sess->unregister("comment_name"); $_SESSION['comment_name'] = null; unset($GLOBALS['comment_name']); } if($this->sess->is_registered("comment_email")) { $this->sess->unregister("comment_email"); $_SESSION['comment_email'] = null; unset($GLOBALS['comment_email']); } if($this->sess->is_registered("comment_url")) { $this->sess->unregister("comment_url"); $_SESSION['comment_url'] = null; unset($GLOBALS['comment_url']); } // expire cache for this session if(function_exists('jpcache_gc')) { jpcache_gc('string', "-slashSess-" . $sess->id, "100"); } // return the id for user 'nobody' return $author_ary['author_id']; } } /** * auth_validatelogin - process the login form. * * @return int */ function auth_validatelogin() { global $HTTP_POST_VARS, $HTTP_GET_VARS, $saved_get, $saved_post, $challenge, $sess; // If no POST variables this must be an error or user // abandoned a login form to return to a public area of site if(empty($HTTP_POST_VARS)) { // This will happen when abandoning a login form // need to load the data for the 'nobody' user. if(!empty($this->auth['uid']) && ($this->auth['uid'] == 'nobody' || $this->auth['uid'] == 'form')){ loadClass('Author'); $author_ary = Author::getAuthor(array('author_name' => 'nobody')); $this->auth["perm"] = $this->get_userperms($author_ary['author_id']); $this->auth["dname"] = $author_ary['author_realname']; $this->auth["uname"] = $author_ary['author_name']; $this->auth["email"] = $author_ary['email']; $this->auth["url"] = $author_ary['url']; return $author_ary['author_id']; } return false; } $setcookie = ''; $lostpw = ''; // set form entries to local variables $username = $HTTP_POST_VARS['username']; $password = ''; if(array_key_exists('password', $HTTP_POST_VARS)) { $password = $HTTP_POST_VARS['password']; } // $challenge = $HTTP_POST_VARS['challenge']; // use session variable $response = $HTTP_POST_VARS['response']; if(!empty($HTTP_POST_VARS['setcookie'])) { $setcookie = $HTTP_POST_VARS['setcookie']; } if(!empty($HTTP_POST_VARS['lostpw'])) { $lostpw = $HTTP_POST_VARS['lostpw']; } // missing challenge - shouldn't happen if(empty($HTTP_POST_VARS['challenge'])) { // $this->auth["error"] = "debug only - missing challenge"; return false; } // old loginforms expire - prevents hitting "back" or // "refresh" to login if($challenge != $HTTP_POST_VARS['challenge']) { // $this->auth["error"] = "debug only - wrong challenge"; return false; } // the login form will save the username if(isset($username)) { $this->auth["uname"] = $username; } else if ($this->nobody) { // provides for "default login cancel" loadClass('Author'); $author_ary = Author::getAuthor(array('author_name' => 'nobody')); $this->auth["perm"] = $this->get_userperms($author_ary['author_id']); $this->auth["dname"] = $author_ary['author_realname']; $this->auth["uname"] = $author_ary['author_name']; $this->auth["email"] = $author_ary['email']; $this->auth["url"] = $author_ary['url']; return $author_ary['author_id']; } // check for missing name or other shenanigans if ($username == "" || strstr($username,"'")) { // spit out empty login form $this->auth["error"] = "Either your username or password are invalid.<br>Please try again."; return false; } // If the "Lost password" reminder is checked - call the // method in Author class. if( $lostpw) { $author = pslNew("Author"); $ary['username'] = $username; $success = $author->lostpw($ary); $this->auth["error"] = $author->message; return false; } // assume the check is gonna fail $uid = false; $q = "SELECT * FROM psl_author WHERE author_name = '$username' "; $this->db->query($q); // username not found - return failure if ($this->db->num_rows() == 0) { return false; } // username found while ($this->db->next_record()) { $uid = $this->db->f("author_id"); $this->auth["uid"] = $this->db->Record["author_id"]; $this->auth["uname"] = $this->db->Record["author_name"]; $this->auth["dname"] = $this->db->Record["author_realname"]; $this->auth["url"] = $this->db->Record["url"]; // generate the expected response $md5_pw = $this->db->Record['password']; // this is the raw MD5ed user/pass combo $expected_response = md5("$md5_pw:$challenge"); // True when JS is disabled if ($response == "") { $md5_pw_net = md5("$username:$password"); $response = md5("$md5_pw_net:$challenge"); } // Drop password for safety $password=''; $HTTP_POST_VARS['password'] = ''; // Response is set, JS might be enabled... // compare the responses if ($expected_response != $response) { // failed - return with error message $this->auth["error"] = "Either your username or password are invalid.<br>Please try again."; return false; } else { // success if(!empty($setcookie)){ // set preauth cookie so the user won't have // to log in again $cookie_challenge = md5($this->magic .":". $this->psl['basedir']); $md5_pw = $this->db->Record['password']; // this is the raw MD5ed user/pass combo $cookie_response = md5("$md5_pw:$cookie_challenge"); $cookie_ary[] = $cookie_response; $cookie_ary[] = $this->auth['uname']; $cookie_ary[] = $cookie_challenge; // setcookie( 'user_info', serialize($cookie_ary), time()+31536000, $this->psl['rooturl'], ereg_replace("www.", "", "$SERVER_NAME"), ""); // setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$this->psl['rooturl'] , "" , ""); // strip the rooturl down to its path for the cookie path. $rooturl_ary = parse_url($this->psl['rooturl']); setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$rooturl_ary['path'] , "" , ""); } // apply user's preferences $temparray=unserialize($this->db->Record['author_options']); if(!empty($temparray['preferences'])){ $this->auth['preferences'] = $temparray['preferences']; // use language preference if(isset($this->auth['preferences']['lang'])) { $this->psl['languagefile'] = setLang($this->auth['preferences']['lang']); $this->psl['templatedir'] = setLangTpl($this->auth['preferences']['lang']); } // use skin preference // if(isset($this->auth['preferences']['skin'])) { if ((isset($this->auth['preferences']['skin'])) && ($this->psl['defaultskin'] != $this->auth['preferences']['skin'])){ $this->psl['templatedir'] = setSkinTpl($this->auth['preferences']['skin'],"userpref"); } } // load the user's permissions/group membership $this->auth["perm"] = $this->get_userperms( $uid); // successful - no errors $this->auth["error"] = ""; // restore saved POST variables $HTTP_GET_VARS = $saved_get; $HTTP_POST_VARS = $saved_post; // clear the session variables $saved_get = ''; $saved_post = ''; $challenge = ''; // get rid of session variables and use the db author record. if($this->sess->is_registered("comment_name")) { $this->sess->unregister("comment_name"); $_SESSION['comment_name'] = null; unset($GLOBALS['comment_name']); } if($this->sess->is_registered("comment_email")) { $this->sess->unregister("comment_email"); $_SESSION['comment_email'] = null; unset($GLOBALS['comment_email']); } if($this->sess->is_registered("comment_url")) { $this->sess->unregister("comment_url"); $_SESSION['comment_url'] = null; unset($GLOBALS['comment_url']); } // expire cache for this session if(function_exists('jpcache_gc')) { jpcache_gc('string', "-slashSess-" . $sess->id, "100"); } // signal success by returning user id return $uid; } return false; } $this->auth["error"] = "Either your username or password are invalid.<br>Please try again."; return false; } /** * auth_registerform - displays the registration form. * * @return void */ function auth_registerform() { global $sess; // create the template object $templ = pslNew("slashTemplate"); $templ->set_file(array( form => "registerform.tpl" )); // Fill out any fields already saved $templ->set_var(ACTION_URL,$this->psl['rooturl']."/login.php3?mode=reg"); $templ->set_var(PHP_SELF,$this->psl[phpself]); if (isset($this->auth["uname"])) { $templ->set_var(USERNAME,$this->auth['uname']); } else { $templ->set_var(USERNAME,""); $this->auth["error"] = ""; } if (isset($this->auth["email"])) { $templ->set_var(EMAIL,$this->auth["email"]); } else { $templ->set_var(EMAIL,""); } if (isset($this->auth["realname"])) { $templ->set_var(REALNAME,$this->auth["realname"]); } else { $templ->set_var(REALNAME,""); } if (isset($this->auth["url"])) { $templ->set_var(URL,$this->auth["url"]); } else { $templ->set_var(URL,""); } if (isset($this->auth["quote"])) { $templ->set_var(QUOTE,$this->auth["quote"]); } else { $templ->set_var(QUOTE,""); } if (isset($this->auth["seclev"])) { $templ->set_var(SECLEV,$this->auth["seclev"]); } else { $templ->set_var(SECLEV,""); } if (isset($this->auth["error"])) { $templ->set_var(ERROR,$this->auth["error"]); } else { $templ->set_var(ERROR,""); } // display the form slashhead("Register", "Register"); if ($this->psl['module']['NavBar']) { $navbar = pslNew("NavBar"); echo $navbar->getNavBar(); } $templ->pparse('OUT',"form"); if ($this->psl['module']['NavBar']) { $navbar = pslNew("NavBar"); echo $navbar->getNavBar("navbarFooter"); } slashfoot(); } /** * auth_doregister - validate the registration. * * @return void */ function auth_doregister() { global $HTTP_POST_VARS, $challenge; // if no POST variables, this must be an error if(empty($HTTP_POST_VARS)) { return false; } // save the entered data - to display the form again with data $this->auth["uname"] = $username = $HTTP_POST_VARS['username']; $this->auth["realname"] = $realname = $HTTP_POST_VARS['realname']; $this->auth["email"] = $email = $HTTP_POST_VARS['email']; $this->auth["url"] = $url = $HTTP_POST_VARS['url']; $this->auth["quote"] = $quote = $HTTP_POST_VARS['quote']; $this->auth["seclev"] = $seclev = $HTTP_POST_VARS['seclev']; // password is not saved in the session $pass1 = $HTTP_POST_VARS['pass1']; $pass2 = $HTTP_POST_VARS['pass2']; // if form empty - complain if ($username == "" || $pass1 == ""){ $this->auth["error"] = "Username or password missing. Please try again."; return false; } // $debug = true; // Check the passwords for validity. if ($pass1 != $pass2) { $this->auth["error"] = "Password and repeated password do not match. Please try again."; return false; } if (($pass1 == "") OR ($pass2 == "")) { $this->auth["error"] = "Please enter your password."; return false; } // assume the check is gonna fail $uid = false; $q = "SELECT * FROM psl_author WHERE author_name = '$username' "; // debug ("QUERY", $q); $this->db->query($q); while ($this->db->next_record()) { // If user is present and password matches, silently log // the user in. if ($this->db->f("password") == md5($username .":". $pass1)) { $uid = $this->db->f("author_id"); $this->auth["uid"] = $this->db->f("author_id"); $this->auth["uname"] = $this->db->f("author_name"); // $this->auth["perm"] = $this->db->f("perms"); $this->auth["email"] = $this->db->f("email"); $this->auth["realname"] = $this->db->f("realname"); // $this->auth["perm"] = $this->get_userperms($uid); return $uid; } // If user is present and password does not match, // complain and fail. $this->auth["error"] = "This username is already taken. Please choose a different one."; return false; } // add new user $author = pslNew("Author"); $ary["author_name"] = $username; $ary["password"] = $pass1; $ary["email"] = $email; $ary["url"] = $url; $ary["quote"] = $quote; $ary["author_realname"] = $realname; $ary["seclev"] = $seclev; // temporary kludge to fix registration $perm_ary['nobody'] = 20; $perm_ary['user'] = 21; $ary["permission"] = $perm_ary; // use Author.class saveAuthor for account creation if ($author->saveAuthor($ary)) { // successful account creation // attempt to log in the new user // $password = $pass1; $HTTP_POST_VARS['username'] = $username; $HTTP_POST_VARS['password'] = $pass1; // $HTTP_POST_VARS['challenge'] = md5(uniqid($this->magic)); $HTTP_POST_VARS['challenge'] = $challenge; $HTTP_POST_VARS['response'] = ''; // debug("username", $username); // debug("pass1", $pass1); $uid = $this->auth_validatelogin(); if( $uid == false) { $this->auth["error"] = "Account created, but validation failed"; } return $uid; } else { // account creation failed $this->auth["error"] = "User Registration failed"; return false; } } /** * get_userperms - return an array of the user's group memberships. * * @return array */ function get_userperms($uid) { /* * Get the group perms's for this author into an array */ $q = "SELECT psl_permission.permission_name, psl_group.group_name, psl_group.group_id FROM psl_group, psl_author_group_lut, psl_group_permission_lut, psl_permission WHERE psl_group.group_id = psl_author_group_lut.group_id AND psl_group.group_id = psl_group_permission_lut.group_id AND psl_group_permission_lut.permission_id = psl_permission.permission_id AND psl_author_group_lut.author_id = '$uid' "; // debug("q", $q); $this->db->query($q); while ($this->db->next_record()) { $group_id = $this->db->Record['group_id']; // Load the group and its permissions $this->auth['perm'][$this->db->Record['group_name']][$this->db->Record['permission_name']] = true; // get the available sections for this group $q = "SELECT section_id FROM psl_group_section_lut WHERE group_id = '$group_id' "; $db2 = pslNew("slashDB"); $db2->query($q); while ($db2->next_record()) { $section_perm = "section_id". $db2->Record['section_id']; $this->auth["perm"][$this->db->Record['group_name']][$section_perm] = true; } } /* * Get the group->group perm's for this author into an array */ // first get all the group names in an array $q = "SELECT group_name, group_id FROM psl_group "; // debug("q", $q); $this->db->query($q); while ($this->db->next_record()) { $groups_ary[$this->db->Record['group_id']] = $this->db->Record['group_name']; } // get the group of groups for this user $q = "SELECT psl_group_group_lut.group_id, psl_group_group_lut.childgroup_id FROM psl_author_group_lut, psl_group_group_lut WHERE psl_group_group_lut.group_id = psl_author_group_lut.group_id AND psl_author_group_lut.author_id = '$uid' "; // debug("q", $q); $this->db->query($q); while ($this->db->next_record()) { $group_id = $this->db->Record['group_id']; $childgroup_id = $this->db->Record['childgroup_id']; $group_name = $groups_ary[$group_id]; $childgroup_name = ''; if(!empty($groups_ary[$childgroup_id])) { $childgroup_name = $groups_ary[$childgroup_id]; } if(empty($this->auth['perm'])) { $this->auth['perm'] = array(); } if( array_key_exists($childgroup_name, $this->auth['perm'])) { // We already know the perms for this group $this->auth['perm'][$group_name][$childgroup_name] = $this->auth['perm'][$childgroup_name]; } else { // We don't have the perms for this group so - // query to get group perms $q = "SELECT psl_permission.permission_name FROM psl_group_permission_lut, psl_permission WHERE psl_group_permission_lut.permission_id = psl_permission.permission_id AND psl_group_permission_lut.group_id = '$childgroup_id' "; // debug("q", $q); $db2 = pslNew("slashDB"); $db2->query($q); while ($db2->next_record()) { $this->auth['perm'][$group_name][$childgroup_name][$db2->Record['permission_name']] = true; // get the available sections for this group $q = "SELECT section_id FROM psl_group_section_lut WHERE group_id = '$childgroup_id' "; $db3 = pslNew("slashDB"); $db3->query($q); while ($db3->next_record()) { $section_perm = "section_id". $db3->Record['section_id']; $this->auth["perm"][$group_name][$childgroup_name][$section_perm] = true; } } } // endif } //end while return $this->auth['perm']; } // end of function get_userperms() } ?> |
From: Joe S. <joe...@us...> - 2003-06-24 19:36:21
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/auth In directory sc8-pr-cvs1:/tmp/cvs-serv26612/auth Log Message: Directory /cvsroot/phpslash/phpslash-dev/include/modules/auth added to the repository |
From: Joe S. <joe...@us...> - 2003-06-24 19:35:43
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/comment In directory sc8-pr-cvs1:/tmp/cvs-serv26486/comment Log Message: Directory /cvsroot/phpslash/phpslash-dev/include/modules/comment added to the repository |
From: Joe S. <joe...@us...> - 2003-06-24 19:35:36
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/error In directory sc8-pr-cvs1:/tmp/cvs-serv26455/error Log Message: Directory /cvsroot/phpslash/phpslash-dev/include/modules/error added to the repository |
From: Joe S. <joe...@us...> - 2003-06-24 19:35:22
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/navbar In directory sc8-pr-cvs1:/tmp/cvs-serv26432/navbar Log Message: Directory /cvsroot/phpslash/phpslash-dev/include/modules/navbar added to the repository |
From: Joe S. <joe...@us...> - 2003-06-24 19:35:08
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/topicbar In directory sc8-pr-cvs1:/tmp/cvs-serv26403/topicbar Log Message: Directory /cvsroot/phpslash/phpslash-dev/include/modules/topicbar added to the repository |
From: Joe S. <joe...@us...> - 2003-06-24 19:32:38
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/poll In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/include/modules/poll Modified Files: Poll.class index.php Log Message: various bugfixes and classes into modules Index: Poll.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/poll/Poll.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Poll.class 12 Mar 2003 16:12:54 -0000 1.1.1.1 --- Poll.class 24 Jun 2003 19:32:34 -0000 1.2 *************** *** 650,654 **** $ary['story_id'] = $ary['question_id']; $ary['parent_id'] = 0; ! if ($this->psl['module']['Comment']) { $cmt = pslNew("Comment",$ary); --- 650,654 ---- $ary['story_id'] = $ary['question_id']; $ary['parent_id'] = 0; ! /* if ($this->psl['module']['Comment']) { $cmt = pslNew("Comment",$ary); *************** *** 657,661 **** $comments = ''; } ! # print "$results\n"; --- 657,661 ---- $comments = ''; } ! */ # print "$results\n"; Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/poll/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 15 May 2003 18:19:54 -0000 1.3 --- index.php 24 Jun 2003 19:32:34 -0000 1.4 *************** *** 3,9 **** /* $Id$ */ - global $_PSL; - - $ary = $GLOBALS['ary']; global $_PSL, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS; --- 3,6 ---- *************** *** 12,15 **** --- 9,13 ---- AddClassRequirement("poll",$_PSL['moduledir'] . "/poll/Poll.class"); + // AddClassRequirement("poll",$_PSL['moduledir'] . "/comment/Comment.class"); $pagetitle = pslgetText("Polls"); // The name to be displayed in the header |