phpslash-commit Mailing List for phpSlash (Page 87)
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...> - 2002-06-01 15:05:41
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv20464/phpslash-ft/class Modified Files: Author.class functions.inc Log Message: displayOptions Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Author.class 31 May 2002 19:29:24 -0000 1.24 --- Author.class 1 Jun 2002 15:05:39 -0000 1.25 *************** *** 437,463 **** )); ! $optioncnt = count($this->psl[default_author_options]); ! $this->author_templ->set_block("newauthor","each_default_option", "doptions"); ! for ($i =0; $i < $optioncnt; $i++) { ! $this->author_templ->set_var(array( ! 'DOPTION_NAME' => "optionname[]", ! 'DOPTION_NAME_VAL' => $this->psl['default_author_options'][$i]['name'], ! 'DOPTION_VALUE' => "optionval[]", ! 'DOPTION_VALUE_VAL' => $this->psl['default_author_options'][$i]['value'] ! )); ! $this->author_templ->parse("doptions", "each_default_option", true); ! } ! ! $this->author_templ->set_block("newauthor","each_option", "options"); ! $optioncnt = $this->psl[author_optioncount]; ! for ($i =1; $i <= $optioncnt; $i++) { ! $this->author_templ->set_var(array( ! 'OPTION_NAME' => "optionname[$i]", ! 'OPTION_NAME_VAL' => "", ! 'OPTION_VALUE' => "optionval[$i]", ! 'OPTION_VALUE_VAL' => "" ! )); ! $this->author_templ->parse("options", "each_option", true); ! } $this->author_templ->parse('OUT',array("newauthor")); --- 437,441 ---- )); ! $this->author_templ = displayoptions('author', $this->author_templ, "newauthor", ''); $this->author_templ->parse('OUT',array("newauthor")); *************** *** 576,645 **** } ! $optioncnt = count($this->psl[default_author_options]); ! $this->author_templ->set_block($template,"each_default_option", "doptions"); ! for ($i =0; $i < $optioncnt; $i++) { ! if(is_array($temparray)) { ! reset($temparray); ! } ! $dname = $this->psl['default_author_options'][$i]['name']; ! $dvalue = $this->psl['default_author_options'][$i]['value']; ! if(isset($temparray[$dname])) { ! $dvalue = $temparray[$dname]; ! $this->author_templ->set_var(array( ! 'DOPTION_NAME' => "optionname[]", ! 'DOPTION_NAME_VAL' => $dname, ! 'DOPTION_VALUE' => "optionval[]", ! 'DOPTION_VALUE_VAL' => $dvalue ! )); ! unset($temparray[$dname]); ! } else { ! $this->author_templ->set_var(array( ! 'DOPTION_NAME' => "optionname[]", ! 'DOPTION_NAME_VAL' => $dname, ! 'DOPTION_VALUE' => "optionval[]", ! 'DOPTION_VALUE_VAL' => $dvalue ! )); ! } ! $this->author_templ->parse("doptions", "each_default_option", true); ! } ! ! $this->author_templ->set_block($template,"each_option", "options"); ! if (is_array($temparray)) { ! reset($temparray); ! } ! $optioncnt = $this->psl['author_optioncount']; ! $i = 1; ! ! if (is_array($temparray)) { ! for ($i =1; $i <= count($temparray); $i++) { ! $current=each($temparray); ! debug("current", $current); ! ! if ($current) { ! $this->author_templ->set_var(array( ! 'OPTION_NAME' => "optionname[]", ! 'OPTION_NAME_VAL' => $current[0], ! 'OPTION_VALUE' => "optionval[]", ! 'OPTION_VALUE_VAL' => $current[1] ! )); ! } ! $this->author_templ->parse("options", "each_option", true); ! } ! if( (count($temparray) - $optioncnt) >= 0) { ! $optioncnt = $i; // spit out one more; ! } ! } - while ($i <= $optioncnt) { - $this->author_templ->set_var(array( - 'OPTION_NAME' => "optionname[]", - 'OPTION_NAME_VAL' => "", - 'OPTION_VALUE' => "optionval[]", - 'OPTION_VALUE_VAL' => "" - )); - $this->author_templ->parse("options", "each_option", true); - $i++; - } - $this->author_templ->parse('OUT',$template); $this->author_templ->p('OUT'); --- 554,559 ---- } ! $this->author_templ = displayoptions('author', $this->author_templ, $template, $temparray); $this->author_templ->parse('OUT',$template); $this->author_templ->p('OUT'); Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** functions.inc 31 May 2002 19:29:24 -0000 1.104 --- functions.inc 1 Jun 2002 15:05:39 -0000 1.105 *************** *** 1212,1214 **** --- 1212,1302 ---- } + /** + * displayOptions - display option fields + * + * @access private + * @param string module - author, block, story, etc. + * @param object tpl_object - template object + * @param string template - template variable used in set_file + * @param array options_ary - prviously stored options + * + * @return tpl_object + */ + function displayOptions($module, $tpl_object, $template, $options_ary) { + + global $_PSL; + + $default_options = "default_".$module."_options"; + $optioncount = $module."_optioncount"; + + $optioncnt = count($_PSL[$default_options]); + $tpl_object->set_block($template,"each_default_option", "doptions"); + for ($i =0; $i < $optioncnt; $i++) { + if(is_array($options_ary)) { + reset($options_ary); + } + $dname = $_PSL[$default_options][$i]['name']; + $dvalue = $_PSL[$default_options][$i]['value']; + if(isset($options_ary[$dname])) { + $dvalue = $options_ary[$dname]; + $tpl_object->set_var(array( + 'DOPTION_NAME' => "optionname[]", + 'DOPTION_NAME_VAL' => $dname, + 'DOPTION_VALUE' => "optionval[]", + 'DOPTION_VALUE_VAL' => $dvalue + )); + unset($options_ary[$dname]); + } else { + $tpl_object->set_var(array( + 'DOPTION_NAME' => "optionname[]", + 'DOPTION_NAME_VAL' => $dname, + 'DOPTION_VALUE' => "optionval[]", + 'DOPTION_VALUE_VAL' => $dvalue + )); + } + $tpl_object->parse("doptions", "each_default_option", true); + } + + $tpl_object->set_block($template,"each_option", "options"); + if (is_array($options_ary)) { + reset($options_ary); + } + $optioncnt = $_PSL[$optioncount]; + $i = 1; + + if (is_array($options_ary)) { + for ($i =1; $i <= count($options_ary); $i++) { + $current=each($options_ary); + debug("current", $current); + + if ($current) { + $tpl_object->set_var(array( + 'OPTION_NAME' => "optionname[]", + 'OPTION_NAME_VAL' => $current[0], + 'OPTION_VALUE' => "optionval[]", + 'OPTION_VALUE_VAL' => $current[1] + )); + } + $tpl_object->parse("options", "each_option", true); + } + if( (count($options_ary) - $optioncnt) >= 0) { + $optioncnt = $i; // spit out one more; + } + } + + while ($i <= $optioncnt) { + $tpl_object->set_var(array( + 'OPTION_NAME' => "optionname[]", + 'OPTION_NAME_VAL' => "", + 'OPTION_VALUE' => "optionval[]", + 'OPTION_VALUE_VAL' => "" + )); + $tpl_object->parse("options", "each_option", true); + $i++; + } + + return $tpl_object; + + } // end of function displayOptions + ?> |
From: Joe S. <joe...@us...> - 2002-05-31 19:39:57
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv14995/phpslash-ft/public_html/templates/en/basic Modified Files: emailNotifySubmission.tpl Log Message: emailNotify function Index: emailNotifySubmission.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/emailNotifySubmission.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** emailNotifySubmission.tpl 31 May 2002 19:30:28 -0000 1.1 --- emailNotifySubmission.tpl 31 May 2002 19:39:54 -0000 1.2 *************** *** 1,4 **** <!-- BEGIN to_block --> ! "{MAILTONAME}" <{MAILTOADDRESS}> <!-- END to_block --> <!-- BEGIN subject_block --> --- 1,4 ---- <!-- BEGIN to_block --> ! "{SITE_NAME}" <{SITE_OWNER}> <!-- END to_block --> <!-- BEGIN subject_block --> |
From: Joe S. <joe...@us...> - 2002-05-31 19:30:32
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv9588/phpslash-ft/public_html/templates/en/basic Added Files: emailNotifySubmission.tpl emailNotifyComment.tpl Log Message: emailNotify function --- NEW FILE: emailNotifySubmission.tpl --- <!-- BEGIN to_block --> "{MAILTONAME}" <{MAILTOADDRESS}> <!-- END to_block --> <!-- BEGIN subject_block --> New Submittal to {SITE_NAME} <!-- END subject_block --> <!-- BEGIN headers_block --> From: "{SITE_NAME} Robot" <{SITE_OWNER}> X-Sender: {SITE_NAME} <{ROOTURL}> X-Mailer: phpSlash X-Priority: 3 Return-Path: <{SITE_OWNER}> <!-- END headers_block --> <!-- BEGIN body_block --> Notice: A new story has been submitted to {SITE_NAME}. You now need to login and check the Submissions. +=+=+=+=+=+=+=+=+=+=+=+=++=+=+=++=+=+=++=++=+=+=+ From: {NAME} <{EMAIL}> Subject: {SUBJECT} {STORY} <!-- END body_block --> --- NEW FILE: emailNotifyComment.tpl --- <!-- BEGIN to_block --> "{SITE_NAME}" <{SITE_OWNER}> <!-- END to_block --> <!-- BEGIN subject_block --> New Comment on {SITE_NAME} <!-- END subject_block --> <!-- BEGIN headers_block --> From: "{SITE_NAME} Robot" <{SITE_OWNER}> X-Sender: {SITE_NAME} <{ROOTURL}> X-Mailer: phpSlash X-Priority: 3 Return-Path: <{SITE_OWNER}> <!-- END headers_block --> <!-- BEGIN body_block --> Notice: A new comment has been submitted to {SITE_NAME}. {ROOTURL}/comment.php3?submit=view&story_id={STORY_ID}&parent_id={PARENT_ID}. +=+=+=+=+=+=+=+=+=+=+=+=++=+=+=++=+=+=++=++=+=+=+ From: {NAME} <{EMAIL}> Subject: {SUBJECT} {COMMENT_TEXT} <!-- END body_block --> |
From: Joe S. <joe...@us...> - 2002-05-31 19:30:31
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv9588/phpslash-ft/public_html/templates/en/default Added Files: emailNotifySubmission.tpl emailNotifyComment.tpl Log Message: emailNotify function --- NEW FILE: emailNotifySubmission.tpl --- <!-- BEGIN to_block --> "{SITE_NAME}" <{SITE_OWNER}> <!-- END to_block --> <!-- BEGIN subject_block --> New Submittal to {SITE_NAME} <!-- END subject_block --> <!-- BEGIN headers_block --> From: "{SITE_NAME} Robot" <{SITE_OWNER}> X-Sender: {SITE_NAME} <{ROOTURL}> X-Mailer: phpSlash X-Priority: 3 Return-Path: <{SITE_OWNER}> <!-- END headers_block --> <!-- BEGIN body_block --> Notice: A new story has been submitted to {SITE_NAME}. You now need to login and check the Submissions. +=+=+=+=+=+=+=+=+=+=+=+=++=+=+=++=+=+=++=++=+=+=+ From: {NAME} <{EMAIL}> Subject: {SUBJECT} {STORY} <!-- END body_block --> --- NEW FILE: emailNotifyComment.tpl --- <!-- BEGIN to_block --> "{SITE_NAME}" <{SITE_OWNER}> <!-- END to_block --> <!-- BEGIN subject_block --> New Comment on {SITE_NAME} <!-- END subject_block --> <!-- BEGIN headers_block --> From: "{SITE_NAME} Robot" <{SITE_OWNER}> X-Sender: {SITE_NAME} <{ROOTURL}> X-Mailer: phpSlash X-Priority: 3 Return-Path: <{SITE_OWNER}> <!-- END headers_block --> <!-- BEGIN body_block --> Notice: A new comment has been submitted to {SITE_NAME}. {ROOTURL}/comment.php3?submit=view&story_id={STORY_ID}&parent_id={PARENT_ID}. +=+=+=+=+=+=+=+=+=+=+=+=++=+=+=++=+=+=++=++=+=+=+ From: {NAME} <{EMAIL}> Subject: {SUBJECT} {COMMENT_TEXT} <!-- END body_block --> |
From: Joe S. <joe...@us...> - 2002-05-31 19:30:31
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv9588/phpslash-ft/public_html Modified Files: submission.php3 comment.php3 Log Message: emailNotify function Index: submission.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/submission.php3,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** submission.php3 20 May 2002 19:52:48 -0000 1.7 --- submission.php3 31 May 2002 19:30:28 -0000 1.8 *************** *** 36,39 **** --- 36,45 ---- logwrite("Story Submission", "$REMOTE_ADDR submitted a story"); echo pslgetText('Thanks for this submission. We have it and will set our fearless editorial staff upon it right this second.') . "<br>\n"; + // send email for new submission. + if ($_PSL[submitnotify]) { + $ary['tpl'] = "emailNotifySubmission"; + $ary['vars'] = $HTTP_POST_VARS; + $success = emailNotify($ary); + } } else { echo "<FONT COLOR=RED>".pslgetText("Something broke, I'm not sure what though??")."</FONT>\n"; Index: comment.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/comment.php3,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** comment.php3 13 May 2002 18:43:23 -0000 1.12 --- comment.php3 31 May 2002 19:30:28 -0000 1.13 *************** *** 148,151 **** --- 148,157 ---- $comment_ary = $cmt->getCommentArray($id); echo $cmt->formatComment($comment_ary); + // send email for new submission. + if ($_PSL[commentnotify]) { + $mail_ary['tpl'] = "emailNotifyComment"; + $mail_ary['vars'] = $HTTP_POST_VARS + $cmtary; + $success = emailNotify($mail_ary); + } } else { echo pslgetText("Your comment was NOT saved") . "<BR>\n"; |
From: Joe S. <joe...@us...> - 2002-05-31 19:29:27
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv9068/phpslash-ft/class Modified Files: Author.class functions.inc Log Message: emailNotify function Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Author.class 31 May 2002 16:45:56 -0000 1.23 --- Author.class 31 May 2002 19:29:24 -0000 1.24 *************** *** 774,815 **** return false; } ! $this->author_templ->set_var(array( ! 'REMOTE_ADDR' => $REMOTE_ADDR, ! 'CONFIRM' => $confirm_hash, ! 'ROOTURL' => $this->psl['rooturl'], ! 'MAILTONAME' => $this->db->Record['author_realname'], ! 'MAILTOADDRESS' => $this->db->Record['email'], ! 'SITE_NAME' => $this->psl['site_name'], ! 'SITE_OWNER' => $this->psl['site_owner'] ! )); ! // parse the to_block to the mail_to variable ! $this->author_templ->set_block("author-lostpw","to_block","mail_to"); ! $this->author_templ->parse("mail_to", "to_block", true); ! ! $mail_to = trim($this->author_templ->get_var("mail_to")); ! debug("mail_to", $mail_to); ! ! // parse the subject_block to the mail_subject variable ! $this->author_templ->set_block("author-lostpw","subject_block","mail_subject"); ! $this->author_templ->parse("mail_subject", "subject_block", true); ! ! $mail_subject = trim($this->author_templ->get_var("mail_subject")); ! debug("mail_subject", $mail_subject); ! ! // parse the headers_block to the mail_headers variable ! $this->author_templ->set_block("author-lostpw","headers_block","mail_headers"); ! $this->author_templ->parse("mail_headers", "headers_block", true); ! ! $mail_headers = trim($this->author_templ->get_var("mail_headers")); ! debug("mail_headers", $mail_headers); ! ! // parse the body_block to the mail_body variable ! $this->author_templ->set_block("author-lostpw","body_block","mail_body"); ! $this->author_templ->parse("mail_body", "body_block", true); ! ! $mail_body = $this->author_templ->get_var("mail_body"); ! debug("mail_body", $mail_body); ! ! if(mail( $mail_to, $mail_subject, $mail_body, $mail_headers)) { $this->message = "Email Confirmation sent"; $success = true; --- 774,784 ---- return false; } ! $mail_ary['tpl'] = "authorEmailLostPW"; ! $mail_ary['mail_to'] = $this->db->Record['author_realname']; ! $mail_ary['mail_to_address'] = $this->db->Record['email']; ! $mail_ary['vars']['confirm'] = $confirm_hash; ! $mail_ary['vars']['remote_addr'] = $REMOTE_ADDR; ! ! if(emailNotify($mail_ary)) { $this->message = "Email Confirmation sent"; $success = true; Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** functions.inc 30 May 2002 18:26:16 -0000 1.103 --- functions.inc 31 May 2002 19:29:24 -0000 1.104 *************** *** 1124,1126 **** --- 1124,1214 ---- + /** + * emailNotify - send email Notification + * + * + * @access public + * @param $ary - + * ary['tpl'] = template to use ( no .tpl extenstion or path) + * ary['vars'] = additional variables to parse ( HTTP_POST_VARS) + * ary['mail_to'] = optional mail to name + * ary[mail_to_address'] = option mail to address + * + * These variables are also available to the template: + * SITE_NAME, SITE_OWNER, ROOTURL, and REMOTE_ADDR + * + * @return success state + */ + function emailNotify($ary) { + + global $REMOTE_ADDR, $_PSL; + + if(!is_array($ary)){ + return false; + } + + if( file_exists($_PSL['templatedir'] . "/" . basename($ary['tpl']) . ".tpl") ) { + $tpl = basename($ary['tpl']) . ".tpl"; + } else { + debug ( "emailNotify: Template file doesn't exist", $_PSL['templatedir'] . "/" . basename($ary['tpl']) . ".tpl"); + return false; + } + + $template = new Template($_PSL['templatedir'], "remove");; + $template->set_file("emailnotify",$tpl); + + $template->set_var(array( + 'REMOTE_ADDR' => $REMOTE_ADDR, + 'ROOTURL' => $_PSL['rooturl'], + 'MAILTONAME' => $ary['mail_to'], + 'MAILTOADDRESS' => $ary['mail_to_address'], + 'SITE_NAME' => $_PSL['site_name'], + 'SITE_OWNER' => $_PSL['site_owner'] + )); + + // let the template parse any tag variables submitted. + if(is_array($ary['vars'] )) { + while( list( $key, $val) = @each( $ary['vars'] )) { + $template->set_var(strtoupper($key), $ary['vars'][$key]); + } + } + + // parse the to_block to the mail_to variable + $template->set_block("emailnotify","to_block","mail_to"); + $template->parse("mail_to", "to_block", true); + + $mail_to = trim($template->get_var("mail_to")); + // debug("mail_to", $mail_to); + + // parse the subject_block to the mail_subject variable + $template->set_block("emailnotify","subject_block","mail_subject"); + $template->parse("mail_subject", "subject_block", true); + + $mail_subject = trim($template->get_var("mail_subject")); + // debug("mail_subject", $mail_subject); + + // parse the headers_block to the mail_headers variable + $template->set_block("emailnotify","headers_block","mail_headers"); + $template->parse("mail_headers", "headers_block", true); + + $mail_headers = trim($template->get_var("mail_headers")); + // debug("mail_headers", $mail_headers); + + // parse the body_block to the mail_body variable + $template->set_block("emailnotify","body_block","mail_body"); + $template->parse("mail_body", "body_block", true); + + $mail_body = $template->get_var("mail_body"); + // debug("mail_body", $mail_body); + + if(mail( $mail_to, $mail_subject, $mail_body, $mail_headers)) { + // $this->message = "Email Confirmation sent"; + $success = true; + } else { + // $this->message = "Email Confirmation failure"; + $success = false; + } + return $success; + } + ?> |
From: Joe S. <joe...@us...> - 2002-05-31 19:29:27
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv9068/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: emailNotify function Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** phpslash.sgml 31 May 2002 16:45:56 -0000 1.35 --- phpslash.sgml 31 May 2002 19:29:24 -0000 1.36 *************** *** 771,774 **** --- 771,776 ---- authorNew.tpl authorProfile.tpl + emailNotifyComment.tpl + emailNotifySubmission.tpl framedbox.tpl loginblock.tpl *************** *** 1417,1420 **** --- 1419,1424 ---- commentNest.tpl - nested comments commentSubmitForm.tpl - add a comment form + emailNotifyComment.tpl - email format of new comment notification + emailNotifySubmission.tpl - email format of new submittal notification error.tpl - display error message fancybox.tpl - blocks |
From: Joe S. <joe...@us...> - 2002-05-31 19:29:26
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv9068/phpslash-ft Modified Files: CHANGES Log Message: emailNotify function Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.501 retrieving revision 1.502 diff -C2 -d -r1.501 -r1.502 *** CHANGES 31 May 2002 16:45:55 -0000 1.501 --- CHANGES 31 May 2002 19:29:24 -0000 1.502 *************** *** 13,16 **** --- 13,24 ---- 9 - Removal of something (kill -9 :) + 2002-May-31 2:00PM CDT Joe Stewart <joe...@us...> + [FTD] - functions.inc - new function, emailNotify. General function to + email notifications. + Author.class - lostpw uses emailNotify function. + submission.php3, comment.php3, emailNotifySubmission.tpl, + emailNotifyComment.tpl, phpslash.sgml - Site owner can be notified by + email of new submissions and comments. + 2002-May-31 11:00AM CDT Joe Stewart <joe...@us...> [ET] - Author.class, authorNew.tpl, authorProfile.tpl - added extendable |
From: Joe S. <joe...@us...> - 2002-05-31 16:45:59
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv27461/phpslash-ft Modified Files: CHANGES Log Message: author_options Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.500 retrieving revision 1.501 diff -C2 -d -r1.500 -r1.501 *** CHANGES 30 May 2002 21:54:38 -0000 1.500 --- CHANGES 31 May 2002 16:45:55 -0000 1.501 *************** *** 13,16 **** --- 13,22 ---- 9 - Removal of something (kill -9 :) + 2002-May-31 11:00AM CDT Joe Stewart <joe...@us...> + [ET] - Author.class, authorNew.tpl, authorProfile.tpl - added extendable + options to author records ( Similar to block_options). + [S] - slash-all.sql, 65_to_7.sql - added author_option field to psl_author. + [D] - phpslash.sgml - authorNew.tpl changed. + 2002-May-30 4:00PM CDT Joe Stewart <joe...@us...> [D] - phpslash.sgml - Documented block options. |
From: Joe S. <joe...@us...> - 2002-05-31 16:45:59
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv27461/phpslash-ft/public_html/templates/en/basic Modified Files: authorNew.tpl authorProfile.tpl Log Message: author_options Index: authorNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/authorNew.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** authorNew.tpl 23 May 2002 18:43:42 -0000 1.3 --- authorNew.tpl 31 May 2002 16:45:56 -0000 1.4 *************** *** 31,34 **** --- 31,44 ---- <td><input type="password" name="password" value="{PASSWORD}" size="10" /></td> </tr> + <!-- BEGIN each_default_option --> + <tr> + <td class="descr"><input type="hidden" name="{DOPTION_NAME}" value="{DOPTION_NAME_VAL}" size="15" />{DOPTION_NAME_VAL}</td> + <td class="descr"><input type="text" name="{DOPTION_VALUE}" value="{DOPTION_VALUE_VAL}" size="20" /></td> + <!-- END each_default_option --> + <!-- BEGIN each_option --> + <tr> + <td class="descr"><input type="text" name="{OPTION_NAME}" value="{OPTION_NAME_VAL}" size="15" /></td> + <td class="descr"><input type="text" name="{OPTION_VALUE}" value="{OPTION_VALUE_VAL}" size="20" /></td> + <!-- END each_option --> <tr> <td class="descr">Security <span class="must">*</span></td> Index: authorProfile.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/authorProfile.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** authorProfile.tpl 20 May 2002 19:52:48 -0000 1.1 --- authorProfile.tpl 31 May 2002 16:45:56 -0000 1.2 *************** *** 31,34 **** --- 31,40 ---- <td><input type="password" name="password" value="{PASSWORD}" size="10" /></td> </tr> + <!-- BEGIN each_default_option --> + <tr> + <td class="descr"><input type="hidden" name="{DOPTION_NAME}" value="{DOPTION_NAME_VAL}" size="15" />{DOPTION_NAME_VAL}</td> + <td class="descr"><input type="text" name="{DOPTION_VALUE}" value="{DOPTION_VALUE_VAL}" size="20" /></td> + <!-- END each_default_option --> + <tr> </table> <input type="hidden" name="author_id" value="{AUTHOR_ID}" /> |
From: Joe S. <joe...@us...> - 2002-05-31 16:45:59
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv27461/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: author_options Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** phpslash.sgml 30 May 2002 21:54:38 -0000 1.34 --- phpslash.sgml 31 May 2002 16:45:56 -0000 1.35 *************** *** 769,772 **** --- 769,773 ---- authorEmailLostPW.tpl authorList.tpl + authorNew.tpl authorProfile.tpl framedbox.tpl |
From: Joe S. <joe...@us...> - 2002-05-31 16:45:59
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv27461/phpslash-ft/class Modified Files: Author.class Log Message: author_options Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Author.class 24 May 2002 15:25:16 -0000 1.22 --- Author.class 31 May 2002 16:45:56 -0000 1.23 *************** *** 8,11 **** --- 8,22 ---- * This object is how we do anything with authors. * + * optional configuration variables: + * + * $_PSL['author_optioncount'] = integer value for additional author + * information [0]. + * $_PSL['default_author_options'] = array of default values of options for + * all authors. [none] + * example: $default_author_options[] = array( + * 'name' => "ICQ", + * 'value' => "" + * ); + * $_PSL['default_author_options'] = $default_author_options; */ class Author { *************** *** 127,130 **** --- 138,155 ---- $ary['author_realname'] = addslashes(str_replace('\"',""",stripslashes($ary["author_realname"]))); + $optionname_ary = $ary[optionname]; + $optionval_ary = $ary[optionval]; + + for( $i=0 ; $i < count($ary[optionname]) ; $i++) { + + if( $optionname_ary[$i] != "") { + $optname = $optionname_ary[$i]; + $optval = $optionval_ary[$i]; + $author_options_ary[$optname] = $optval; + } + + } + $serial_opts=addslashes(serialize($author_options_ary)); + /* if a record exists, then we update, else we insert a new author! */ *************** *** 150,154 **** email = '$ary[email]', quote = '$ary[quote]', ! perms = '$joined_perms' WHERE author_id = '$ary[author_id]'"; } else { --- 175,180 ---- email = '$ary[email]', quote = '$ary[quote]', ! perms = '$joined_perms', ! author_options = '$serial_opts' WHERE author_id = '$ary[author_id]'"; } else { *************** *** 160,164 **** quote = '$ary[quote]', password = MD5('$ary[author_name]:$ary[password]'), ! perms = '$joined_perms' WHERE author_id = '$ary[author_id]'"; } --- 186,191 ---- quote = '$ary[quote]', password = MD5('$ary[author_name]:$ary[password]'), ! perms = '$joined_perms', ! author_options = '$serial_opts' WHERE author_id = '$ary[author_id]'"; } *************** *** 188,192 **** password, seclev, ! perms) VALUES ('$ary[author_id]', '$ary[author_name]', --- 215,220 ---- password, seclev, ! perms, ! author_options) VALUES ('$ary[author_id]', '$ary[author_name]', *************** *** 197,201 **** MD5('$ary[author_name]:$ary[password]'), '$ary[seclev]', ! '$joined_perms')"; $this->message = "Author Created"; --- 225,230 ---- MD5('$ary[author_name]:$ary[password]'), '$ary[seclev]', ! '$joined_perms', ! '$serial_opts')"; $this->message = "Author Created"; *************** *** 256,259 **** --- 285,302 ---- $ary['author_realname'] = clean($ary["author_realname"]); + $optionname_ary = $ary[optionname]; + $optionval_ary = $ary[optionval]; + + for( $i=0 ; $i < count($ary[optionname]) ; $i++) { + + if( $optionname_ary[$i] != "") { + $optname = $optionname_ary[$i]; + $optval = $optionval_ary[$i]; + $section_options_ary[$optname] = $optval; + } + + } + $serial_opts=addslashes(serialize($section_options_ary)); + $this->db->query("SELECT author_id FROM psl_author *************** *** 267,271 **** url = '$ary[url]', email = '$ary[email]', ! quote = '$ary[quote]' WHERE author_id = '$ary[author_id]'"; } else { --- 310,315 ---- url = '$ary[url]', email = '$ary[email]', ! quote = '$ary[quote]', ! author_options = '$serial_opts' WHERE author_id = '$ary[author_id]'"; } else { *************** *** 276,280 **** email = '$ary[email]', quote = '$ary[quote]', ! password = MD5('$ary[author_name]:$ary[password]') WHERE author_id = '$ary[author_id]'"; } --- 320,325 ---- email = '$ary[email]', quote = '$ary[quote]', ! password = MD5('$ary[author_name]:$ary[password]', ! author_options = '$serial_opts') WHERE author_id = '$ary[author_id]'"; } *************** *** 392,395 **** --- 437,464 ---- )); + $optioncnt = count($this->psl[default_author_options]); + $this->author_templ->set_block("newauthor","each_default_option", "doptions"); + for ($i =0; $i < $optioncnt; $i++) { + $this->author_templ->set_var(array( + 'DOPTION_NAME' => "optionname[]", + 'DOPTION_NAME_VAL' => $this->psl['default_author_options'][$i]['name'], + 'DOPTION_VALUE' => "optionval[]", + 'DOPTION_VALUE_VAL' => $this->psl['default_author_options'][$i]['value'] + )); + $this->author_templ->parse("doptions", "each_default_option", true); + } + + $this->author_templ->set_block("newauthor","each_option", "options"); + $optioncnt = $this->psl[author_optioncount]; + for ($i =1; $i <= $optioncnt; $i++) { + $this->author_templ->set_var(array( + 'OPTION_NAME' => "optionname[$i]", + 'OPTION_NAME_VAL' => "", + 'OPTION_VALUE' => "optionval[$i]", + 'OPTION_VALUE_VAL' => "" + )); + $this->author_templ->parse("options", "each_option", true); + } + $this->author_templ->parse('OUT',array("newauthor")); $this->author_templ->p('OUT'); *************** *** 455,458 **** --- 524,529 ---- )); + $temparray=unserialize($this->db->Record['author_options']); + $allperms_ary = $this->perm->getPerms(); /* *************** *** 499,502 **** --- 570,643 ---- } } + } + + if (is_array($temparray)) { + reset($temparray); + } + + $optioncnt = count($this->psl[default_author_options]); + $this->author_templ->set_block($template,"each_default_option", "doptions"); + for ($i =0; $i < $optioncnt; $i++) { + if(is_array($temparray)) { + reset($temparray); + } + $dname = $this->psl['default_author_options'][$i]['name']; + $dvalue = $this->psl['default_author_options'][$i]['value']; + if(isset($temparray[$dname])) { + $dvalue = $temparray[$dname]; + $this->author_templ->set_var(array( + 'DOPTION_NAME' => "optionname[]", + 'DOPTION_NAME_VAL' => $dname, + 'DOPTION_VALUE' => "optionval[]", + 'DOPTION_VALUE_VAL' => $dvalue + )); + unset($temparray[$dname]); + } else { + $this->author_templ->set_var(array( + 'DOPTION_NAME' => "optionname[]", + 'DOPTION_NAME_VAL' => $dname, + 'DOPTION_VALUE' => "optionval[]", + 'DOPTION_VALUE_VAL' => $dvalue + )); + } + $this->author_templ->parse("doptions", "each_default_option", true); + } + + $this->author_templ->set_block($template,"each_option", "options"); + if (is_array($temparray)) { + reset($temparray); + } + $optioncnt = $this->psl['author_optioncount']; + $i = 1; + + if (is_array($temparray)) { + for ($i =1; $i <= count($temparray); $i++) { + $current=each($temparray); + debug("current", $current); + + if ($current) { + $this->author_templ->set_var(array( + 'OPTION_NAME' => "optionname[]", + 'OPTION_NAME_VAL' => $current[0], + 'OPTION_VALUE' => "optionval[]", + 'OPTION_VALUE_VAL' => $current[1] + )); + } + $this->author_templ->parse("options", "each_option", true); + } + if( (count($temparray) - $optioncnt) >= 0) { + $optioncnt = $i; // spit out one more; + } + } + + while ($i <= $optioncnt) { + $this->author_templ->set_var(array( + 'OPTION_NAME' => "optionname[]", + 'OPTION_NAME_VAL' => "", + 'OPTION_VALUE' => "optionval[]", + 'OPTION_VALUE_VAL' => "" + )); + $this->author_templ->parse("options", "each_option", true); + $i++; } |
From: Joe S. <joe...@us...> - 2002-05-31 16:45:59
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv27461/phpslash-ft/public_html/templates/en/default Modified Files: authorNew.tpl authorProfile.tpl Log Message: author_options Index: authorNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/authorNew.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** authorNew.tpl 23 May 2002 18:43:03 -0000 1.9 --- authorNew.tpl 31 May 2002 16:45:56 -0000 1.10 *************** *** 30,33 **** --- 30,51 ---- <TD><INPUT type="password" name="password" value="{PASSWORD}" SIZE="10"></TD> </TR> + <!-- BEGIN each_default_option --> + <TR> + <TD> + <INPUT TYPE=hidden name={DOPTION_NAME} value="{DOPTION_NAME_VAL}"><B>{DOPTION_NAME_VAL}</B></TD> + <TD> + <INPUT TYPE=text name={DOPTION_VALUE} value="{DOPTION_VALUE_VAL}" size=20> </TD> + </TR> + <!-- END each_default_option --> + <!-- BEGIN each_option --> + <TR> + <TD> + <INPUT TYPE=text name={OPTION_NAME} value="{OPTION_NAME_VAL}" size=20> + </TD> + <TD> + <INPUT TYPE=text name={OPTION_VALUE} value="{OPTION_VALUE_VAL}" size=20> + </TD> + </TR> + <!-- END each_option --> <TR> <TD valign=top><B>Security</B><FONT COLOR=RED>*</FONT></TD> Index: authorProfile.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/authorProfile.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** authorProfile.tpl 20 May 2002 19:52:48 -0000 1.1 --- authorProfile.tpl 31 May 2002 16:45:56 -0000 1.2 *************** *** 30,33 **** --- 30,41 ---- <TD><INPUT type="password" name="password" value="{PASSWORD}" SIZE="10"></TD> </TR> + <!-- BEGIN each_default_option --> + <TR> + <TD> + <INPUT TYPE=hidden name={DOPTION_NAME} value="{DOPTION_NAME_VAL}"><B>{DOPTION_NAME_VAL}</B></TD> + <TD> + <INPUT TYPE=text name={DOPTION_VALUE} value="{DOPTION_VALUE_VAL}" size=20> </TD> + </TR> + <!-- END each_default_option --> </TABLE> <INPUT type="hidden" name="author_id" value="{AUTHOR_ID}"> |
From: Joe S. <joe...@us...> - 2002-05-31 16:45:59
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.7 In directory usw-pr-cvs1:/tmp/cvs-serv27461/phpslash-ft/tables/0.7 Modified Files: slash-all.sql 65_to_7.sql Log Message: author_options Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/slash-all.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** slash-all.sql 24 May 2002 15:26:36 -0000 1.2 --- slash-all.sql 31 May 2002 16:45:56 -0000 1.3 *************** *** 146,168 **** INSERT INTO db_sequence VALUES ('psl_author_group_lut_seq',26); - - # -------------------------------------------------------- - # - # Table structure for table 'psl_author' - # - CREATE TABLE psl_author ( ! author_id int(11) unsigned DEFAULT '0' NOT NULL, ! author_name varchar(50) NOT NULL, ! author_realname varchar(60), ! url varchar(50), ! email varchar(50), ! quote varchar(50), ! password varchar(64) NOT NULL, ! seclev int(11) DEFAULT '0' NOT NULL, ! perms varchar(255), ! PRIMARY KEY (author_id), ! UNIQUE author_name (author_name) ! ); # --- 146,163 ---- INSERT INTO db_sequence VALUES ('psl_author_group_lut_seq',26); CREATE TABLE psl_author ( ! author_id int(11) unsigned NOT NULL default '0', ! author_name varchar(50) NOT NULL default '', ! author_realname varchar(60) default NULL, ! url varchar(50) default NULL, ! email varchar(50) default NULL, ! quote varchar(50) default NULL, ! password varchar(64) NOT NULL default '', ! seclev int(11) NOT NULL default '0', ! perms varchar(255) default NULL, ! author_options text, ! PRIMARY KEY (author_id), ! UNIQUE KEY author_name (author_name) ! ) TYPE=MyISAM; # *************** *** 170,174 **** # ! INSERT INTO psl_author (author_id, author_name, author_realname, url, email, quote, password, seclev, perms) VALUES ( '1', 'god', '', 'http://www.god.com', 'go...@he...', 'God doesn't need a 'quote'!', MD5('god:password'), '1000000', 'root,nobody,user,topic,comment,story,storyeditor,section,submission,block,poll,author,variable,glossary,mailinglist,logging'); # --- 165,169 ---- # ! INSERT INTO psl_author (author_id, author_name, author_realname, url, email, quote, password, seclev, perms, author_options) VALUES ( '1', 'god', '', 'http://www.god.com', 'go...@he...', 'God doesn't need a 'quote'!', MD5('god:password'), '1000000', 'root,nobody,user,topic,comment,story,storyeditor,section,submission,block,poll,author,variable,glossary,mailinglist,logging',''); # Index: 65_to_7.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/65_to_7.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 65_to_7.sql 24 May 2002 15:26:36 -0000 1.3 --- 65_to_7.sql 31 May 2002 16:45:56 -0000 1.4 *************** *** 1,5 **** # ALTER TABLE psl_story ADD story_options TEXT; # ALTER TABLE psl_section ADD section_options TEXT; ! # ALTER TABLE psl_author ADD author_options TEXT; INSERT INTO db_sequence VALUES ('psl_permission_seq',80); INSERT INTO db_sequence VALUES ('psl_group_seq',27); --- 1,5 ---- # ALTER TABLE psl_story ADD story_options TEXT; # ALTER TABLE psl_section ADD section_options TEXT; ! ALTER TABLE psl_author ADD author_options TEXT; INSERT INTO db_sequence VALUES ('psl_permission_seq',80); INSERT INTO db_sequence VALUES ('psl_group_seq',27); |
From: Joe S. <joe...@us...> - 2002-05-30 21:54:41
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv22565/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: documnented block_options Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** phpslash.sgml 30 May 2002 19:37:52 -0000 1.33 --- phpslash.sgml 30 May 2002 21:54:38 -0000 1.34 *************** *** 978,981 **** --- 978,988 ---- <tag/Options/ This is a key/value pair of variables that get passed into the block for parsing. + These block options are built in for all blocks: + <itemize> + <item> column = set the block column ( left, right, or center) (required) + <item> width = set the block width in pixels or percent. (default 100%) + <item> box_type = alternate template. Must be named *box.tpl. Enter only the portion preceding box.tpl in this field. (default fancybox.tpl) + <item> perms = permission required to view this block. (default any perms) + </itemize> </descrip> |
From: Joe S. <joe...@us...> - 2002-05-30 21:54:41
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv22565/phpslash-ft Modified Files: CHANGES Log Message: documnented block_options Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.499 retrieving revision 1.500 diff -C2 -d -r1.499 -r1.500 *** CHANGES 30 May 2002 19:37:52 -0000 1.499 --- CHANGES 30 May 2002 21:54:38 -0000 1.500 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2002-May-30 4:00PM CDT Joe Stewart <joe...@us...> + [D] - phpslash.sgml - Documented block options. + 2002-May-30 2:00PM CDT Joe Stewart <joe...@us...> [D] - phpslash.sgml - Documented temporary fix for phplib page.inc error. |
From: Joe S. <joe...@us...> - 2002-05-30 19:37:55
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv13237/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: documnented fix for phplib error Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** phpslash.sgml 30 May 2002 16:00:16 -0000 1.32 --- phpslash.sgml 30 May 2002 19:37:52 -0000 1.33 *************** *** 467,470 **** --- 467,480 ---- </itemize> + <sect1> Troubleshooting + <p>Here are some things that you may need to manually adjust: + <itemize> + <item>How do I fix "Fatal error: Call to a member function on a non-object in page.inc on line 68"? + <p>This is a phplib error that will be fixed in later versions of phplib. For now the easiest solution is to change line 67 to: + <tscreen><code> + if (is_object($user)) { + </code></tscreen> + </itemize> + <!-- START SECTION: Upgrade --> <sect>Upgrade *************** *** 695,698 **** --- 705,714 ---- font size...) have been removed and placed in the templates. That's where you should do all your presentation customization. + + <item>How do I fix "Fatal error: Call to a member function on a non-object in page.inc on line 68"? + <p>This is a phplib error that will be fixed in later versions of phplib. For now the easiest solution is to change line 67 to: + <tscreen><code> + if (is_object($user)) { + </code></tscreen> </itemize> *************** *** 1538,1541 **** --- 1554,1563 ---- You can also open up the config.php3 file and uncomment the line that require()'s prepend.php3 + + <sect2>How do I fix "Fatal error: Call to a member function on a non-object in page.inc on line 68"? + <p>This is a phplib error that will be fixed in later versions of phplib. For now the easiest solution is to change line 67 to: + <tscreen><code> + if (is_object($user)) { + </code></tscreen> <sect2>Someone told me that if I just hardcode in an include() to phplib's ct_sql.inc class things will work ok. Why can't I do this? |
From: Joe S. <joe...@us...> - 2002-05-30 19:37:55
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv13237/phpslash-ft Modified Files: CHANGES Log Message: documnented fix for phplib error Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.498 retrieving revision 1.499 diff -C2 -d -r1.498 -r1.499 *** CHANGES 30 May 2002 18:26:16 -0000 1.498 --- CHANGES 30 May 2002 19:37:52 -0000 1.499 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2002-May-30 2:00PM CDT Joe Stewart <joe...@us...> + [D] - phpslash.sgml - Documented temporary fix for phplib page.inc error. + 2002-May-30 1:00PM CDT Joe Stewart <joe...@us...> [B] - functions.inc - setSkinTpl now redirects correctly after changing skins. |
From: Joe S. <joe...@us...> - 2002-05-30 18:26:20
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv17862/phpslash-ft/class Modified Files: functions.inc Log Message: redirect on skin change Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** functions.inc 23 May 2002 18:41:59 -0000 1.102 --- functions.inc 30 May 2002 18:26:16 -0000 1.103 *************** *** 1007,1011 **** if( $method == "cookie") { setcookie("skin","$new_skin",time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); ! // header("Location: $_PSL['phpself']"); } } elseif (@is_dir($templatedir . "/" . basename($_PSL['defaultskin']))) { --- 1007,1022 ---- if( $method == "cookie") { setcookie("skin","$new_skin",time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); ! if(strstr($GLOBALS['QUERY_STRING'], "&skin=")) { ! $query_string = substr_replace ($GLOBALS['QUERY_STRING'], '', strpos($GLOBALS['QUERY_STRING'], "&skin=")); ! } elseif(strstr($GLOBALS['QUERY_STRING'], "skin=")) { ! $query_string = substr_replace ($GLOBALS['QUERY_STRING'], '', strpos($GLOBALS['QUERY_STRING'], "skin=")); ! } else { ! $query_string = ''; ! } ! $GLOBALS['QUERY_STRING'] = $query_string; ! if($query_string != '') { ! $query_string = "?" . $query_string; ! } ! header("Location: ".$_PSL[phpself].$query_string); } } elseif (@is_dir($templatedir . "/" . basename($_PSL['defaultskin']))) { |
From: Joe S. <joe...@us...> - 2002-05-30 18:26:20
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv17862/phpslash-ft Modified Files: CHANGES Log Message: redirect on skin change Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.497 retrieving revision 1.498 diff -C2 -d -r1.497 -r1.498 *** CHANGES 30 May 2002 16:00:15 -0000 1.497 --- CHANGES 30 May 2002 18:26:16 -0000 1.498 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2002-May-30 1:00PM CDT Joe Stewart <joe...@us...> + [B] - functions.inc - setSkinTpl now redirects correctly after changing skins. + 2002-May-30 10:00AM CDT Joe Stewart <joe...@us...> [B] - index.php3 - changed to use GLOBAL['QUERY_STRING'] for register_globals |
From: Joe S. <joe...@us...> - 2002-05-30 16:00:21
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv7746/phpslash-ft/public_html/templates/en/basic Modified Files: skinsblock.tpl Log Message: QUERY_STRING tweaks Index: skinsblock.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/skinsblock.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** skinsblock.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- skinsblock.tpl 30 May 2002 16:00:17 -0000 1.3 *************** *** 2,6 **** <ul class="skinsblock"> <!-- BEGIN each_skin --> ! <li><a href="{PHP_SELF}?skin={SKIN}">{SKIN}</a></li> <!-- END each_skin --> </ul> --- 2,6 ---- <ul class="skinsblock"> <!-- BEGIN each_skin --> ! <li><a href="{PHP_SELF}?{QUERYSTRING}skin={SKIN}">{SKIN}</a></li> <!-- END each_skin --> </ul> |
From: Joe S. <joe...@us...> - 2002-05-30 16:00:20
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv7746/phpslash-ft/class Modified Files: Block_render_skin.class Log Message: QUERY_STRING tweaks Index: Block_render_skin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_skin.class,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Block_render_skin.class 5 Mar 2002 16:50:57 -0000 1.5 --- Block_render_skin.class 30 May 2002 16:00:17 -0000 1.6 *************** *** 73,76 **** --- 73,82 ---- } + if( !empty($GLOBALS['QUERY_STRING'])) { + $QUERY_STRING = $GLOBALS['QUERY_STRING']. $this->psl['amp']; + } else { + $QUERY_STRING = ''; + } + $template = new Template($templatedir . "/" . $skin); $template->debug = 0; *************** *** 80,83 **** --- 86,90 ---- $template->set_block ("block", "each_skin", "skin_block"); $template->set_var (array ( + 'QUERYSTRING' => $QUERY_STRING, 'SKIN' => "", 'ROOTDIR' => $this->psl['rooturl'], |
From: Joe S. <joe...@us...> - 2002-05-30 16:00:20
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv7746/phpslash-ft/public_html/templates/en/default Modified Files: skinsblock.tpl Log Message: QUERY_STRING tweaks Index: skinsblock.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/skinsblock.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** skinsblock.tpl 2 Oct 2001 21:01:07 -0000 1.1 --- skinsblock.tpl 30 May 2002 16:00:17 -0000 1.2 *************** *** 2,6 **** <ul> <!-- BEGIN each_skin --> ! <li><a href="{PHP_SELF}?skin={SKIN}">{SKIN}</a><br> <!-- END each_skin --> </ul> --- 2,6 ---- <ul> <!-- BEGIN each_skin --> ! <li><a href="{PHP_SELF}?{QUERYSTRING}skin={SKIN}">{SKIN}</a><br> <!-- END each_skin --> </ul> |
From: Joe S. <joe...@us...> - 2002-05-30 16:00:20
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv7746/phpslash-ft Modified Files: CHANGES Log Message: QUERY_STRING tweaks Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.496 retrieving revision 1.497 diff -C2 -d -r1.496 -r1.497 *** CHANGES 24 May 2002 16:00:25 -0000 1.496 --- CHANGES 30 May 2002 16:00:15 -0000 1.497 *************** *** 13,16 **** --- 13,24 ---- 9 - Removal of something (kill -9 :) + 2002-May-30 10:00AM CDT Joe Stewart <joe...@us...> + [B] - index.php3 - changed to use GLOBAL['QUERY_STRING'] for register_globals + Off. + [BT] - Block_render_skin.class, skinsblock.tpl - Added querystring to url + so skin blocks generated correct links. Thanks to Will Dyson + (willdyson) for submitting a patch ([ 561427 ] Skin block enhancement). + [D] - phpslash.sgml - documented template change and skinsblock. + 2002-May-24 11:00AM CDT Joe Stewart <joe...@us...> [T] - removed unused templates - header.tpl, footer.tpl, admin.tpl, |
From: Joe S. <joe...@us...> - 2002-05-30 16:00:20
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv7746/phpslash-ft/public_html Modified Files: index.php3 Log Message: QUERY_STRING tweaks Index: index.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/index.php3,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** index.php3 5 May 2002 17:23:51 -0000 1.57 --- index.php3 30 May 2002 16:00:16 -0000 1.58 *************** *** 69,76 **** 'index' => $tplfile //"index3col.tpl" )); ! ! // TODO register_globals? ! if( !empty($QUERY_STRING)) { ! $QUERY_STRING = '?'.$QUERY_STRING; } --- 69,77 ---- 'index' => $tplfile //"index3col.tpl" )); ! ! if( !empty($GLOBALS['QUERY_STRING'])) { ! $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; ! } else { ! $QUERY_STRING = ''; } |