You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(48) |
Apr
(45) |
May
(11) |
Jun
(7) |
Jul
|
Aug
(11) |
Sep
(75) |
Oct
(38) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(17) |
Feb
|
Mar
(22) |
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(5) |
Feb
(29) |
Mar
(22) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Shaun M. <sin...@us...> - 2006-02-04 01:38:10
|
Update of /cvsroot/phpwsbb/phpwsbb/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3455 Modified Files: menu.tpl Log Message: Moved 'Add Forum' to above the list of forums instead of admin menu Index: menu.tpl =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/templates/menu.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** menu.tpl 26 Oct 2004 05:14:08 -0000 1.4 --- menu.tpl 4 Feb 2006 01:37:57 -0000 1.5 *************** *** 1,7 **** <!-- BEGIN FORUM_ADMIN --> <div style="text-align:right; border-bottom: 1px solid; margin-bottom:1em"> - <!-- BEGIN ADD_FORUM --> - {ADD_FORUM} | - <!-- END ADD_FORUM --> <!-- BEGIN SETTINGS --> {SETTINGS} --- 1,4 ---- |
From: Shaun M. <sin...@us...> - 2006-02-04 01:37:07
|
Update of /cvsroot/phpwsbb/phpwsbb/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3130 Added Files: forums_menu.tpl Log Message: New menu for list of forums --- NEW FILE: forums_menu.tpl --- <!-- BEGIN ACTIONS --> <!-- BEGIN NEW --> {NEW} <!-- END NEW --> <!-- BEGIN CATEGORIES --> {CATEGORIES} <!-- END CATEGORIES --> <!-- BEGIN PROFILE --> {MYPROFILE} <!-- END PROFILE --> <!-- END ACTIONS --> |
From: Shaun M. <sin...@us...> - 2006-02-04 01:35:42
|
Update of /cvsroot/phpwsbb/phpwsbb/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2671 Modified Files: edit_settings.tpl Log Message: Add Views + LOW_PRIORITY setting Index: edit_settings.tpl =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/templates/edit_settings.tpl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** edit_settings.tpl 26 Oct 2004 05:13:16 -0000 1.11 --- edit_settings.tpl 4 Feb 2006 01:35:31 -0000 1.12 *************** *** 7,10 **** --- 7,14 ---- <label>{SETTINGS_ALLOW_ANON_VIEW} {ANONVIEW_TEXT}</label><br /> + <h3>{STATS_TITLE}</h3> + <label>{SETTINGS_VIEWS} {VIEWS_TEXT}</label> {VIEWS_HELP}<br /> + <label>{SETTINGS_VIEWS_LOWPRI} {VIEWS_LOWPRI_TEXT}</label> {VIEWS_LOWPRI_HELP}<br /> + <h3>{MONITORS_TITLE}</h3> <label>{ADMIN_EMAIL_TEXT}: {SETTINGS_ADMIN_EMAIL}</label> {ADMIN_EMAIL_HELP}<br /> |
From: Shaun M. <sin...@us...> - 2006-02-04 01:33:49
|
Update of /cvsroot/phpwsbb/phpwsbb/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1820 Modified Files: manager.php Log Message: Add Views Index: manager.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/conf/manager.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** manager.php 19 Sep 2004 05:32:41 -0000 1.14 --- manager.php 4 Feb 2006 01:33:42 -0000 1.15 *************** *** 72,84 **** /* The columns to list for my defined 'saved' list and their labels */ ! $threadsColumns = array( 'label'=>$_SESSION['translate']->it('Topic'), ! 'owner'=>$_SESSION['translate']->it('Poster'), ! 'replies'=>$_SESSION['translate']->it('Replies'), ! 'lastpost'=>$_SESSION['translate']->it('Last Post'), ! 'id'=>NULL, ! 'locked'=>NULL, ! 'lastpost_post_id'=>NULL, ! 'sticky'=>NULL ); ! /* The actions to show in the defined 'saved' list and their labels */ $threadsActions = array( 'view'=>'View', --- 72,96 ---- /* The columns to list for my defined 'saved' list and their labels */ ! $result = $GLOBALS['core']->sqlSelect('mod_phpwsbb_settings'); ! if ($result[0]['use_views']) { ! $threadsColumns = array( 'label'=>$_SESSION['translate']->it('Topic'), ! 'owner'=>$_SESSION['translate']->it('Poster'), ! 'replies'=>$_SESSION['translate']->it('Replies'), ! 'views'=>$_SESSION['translate']->it('Views'), ! 'lastpost'=>$_SESSION['translate']->it('Last Post'), ! 'id'=>NULL, ! 'locked'=>NULL, ! 'lastpost_post_id'=>NULL, ! 'sticky'=>NULL ); ! } else { ! $threadsColumns = array( 'label'=>$_SESSION['translate']->it('Topic'), ! 'owner'=>$_SESSION['translate']->it('Poster'), ! 'replies'=>$_SESSION['translate']->it('Replies'), ! 'lastpost'=>$_SESSION['translate']->it('Last Post'), ! 'id'=>NULL, ! 'locked'=>NULL, ! 'lastpost_post_id'=>NULL, ! 'sticky'=>NULL ); ! } /* The actions to show in the defined 'saved' list and their labels */ $threadsActions = array( 'view'=>'View', |
From: Shaun M. <sin...@us...> - 2006-02-04 01:31:07
|
Update of /cvsroot/phpwsbb/phpwsbb/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv705 Modified Files: help.php Log Message: Add Help for 'views' settings Index: help.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/conf/help.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** help.php 3 Oct 2004 23:17:39 -0000 1.13 --- help.php 4 Feb 2006 01:30:58 -0000 1.14 *************** *** 48,50 **** --- 48,55 ---- $remote_avatars_content = 'You can allow users to specify the address of an image that\'s not hosted on your site to be used as an avatar.<br /><br />While this saves you storage space and bandwidth, it also takes the control over what is displayed out of your hands. Users can insert images with large filesizes, jpeg exploits, obscenities, etc..<br /><br />For this reason we recommend that you <u>do not</u> use this feature.'; + $views = 'Record and show number of times a thread is viewed'; + $views_content = 'With this option switched on, each time a thread is viewed a counter is updated. An extra column in the forum view will also be shown to all users.<br /><br />With this option switched off, no statistics are recorded.<br /><br />Please note that you will have to quit your browser session and restart it in order to see any change in the forum view.<br /><br />For better performance on busy systems we reccomend you leave this option off. You may also toggle it off during busy periods for better performance but be aware that the view count will be suspended until you toggle it back on again.'; + + $views_lowpri = 'Use low priority stats updates (MySQL only)'; + $views_lowpri_content = 'This option relies on a feature of the MySQL database to use a less resource hungry method of updating statistics such as the view count. Updates will be delayed until there is nobody reading the forum.<br /><br />We reccomend you switch this option on if you\'re using MySQL. If you\'re on another database, you must leave this option off.'; ?> |
From: Shaun M. <sin...@us...> - 2006-02-04 01:29:58
|
Update of /cvsroot/phpwsbb/phpwsbb/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32652 Added Files: categories.php Log Message: Category view support file --- NEW FILE: categories.php --- <?php $listTags = array(); $listTags['LABEL_LABEL'] = $_SESSION["translate"]->it("Forum"); $listTags['THREADS_LABEL'] = $_SESSION["translate"]->it("Topics"); $listTags['POSTS_LABEL'] = $_SESSION["translate"]->it("Posts"); $listTags['LASTPOST_LABEL'] = $_SESSION["translate"]->it("Last Post"); $class = "PHPWSBB_Forum"; $table = "mod_phpwsbb_forums"; $dbColumns = array("id", "label", "description", "threads", "posts", "lastpost", "editor","lastpost_topic_label", "lastpost_topic_id", "lastpost_post_id" ); $listColumns = array("id", "label", "description", "threads", "posts", "lastpost", "editor","lastpost_topic_label", "lastpost_topic_id", "lastpost_post_id" ); $name = "categories"; $where = "hidden='0'"; $template = "forums"; ?> |
From: Shaun M. <sin...@us...> - 2006-02-04 01:29:10
|
Update of /cvsroot/phpwsbb/phpwsbb/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32301 Added Files: new_forum.png view_tree.png Log Message: New images for 'New Forum' and 'Categories' --- NEW FILE: view_tree.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: new_forum.png --- (This appears to be a binary file; contents omitted.) |
From: Shaun M. <sin...@us...> - 2006-01-30 06:53:18
|
Update of /cvsroot/phpwsbb/phpwsbb/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20524 Removed Files: view_thread.tpl Log Message: This is redundant. Replaced by top/bottom --- view_thread.tpl DELETED --- |
From: Shaun M. <sin...@us...> - 2006-01-30 06:52:36
|
Update of /cvsroot/phpwsbb/phpwsbb/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20270 Removed Files: view_forum.tpl Log Message: This is redundant. Replaced by top/bottom --- view_forum.tpl DELETED --- |
From: Shaun M. <sin...@us...> - 2006-01-27 04:20:18
|
Update of /cvsroot/phpwsbb/phpwsbb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26605 Modified Files: ChangeLog Log Message: Message preview and stop double error messages appearing by nulling the notice. Index: ChangeLog =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/docs/ChangeLog,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** ChangeLog 20 Jul 2005 17:30:28 -0000 1.130 --- ChangeLog 27 Jan 2006 04:20:06 -0000 1.131 *************** *** 6,9 **** --- 6,13 ---- * Changes to 'save' messages and buttons to be in context * Allow 'Re:' to be translated + * Stop double notices appearing + + New Features: + * Preview message before posting *phpwsbb-1.0.3 (23 Mar 2005) |
From: Shaun M. <sin...@us...> - 2006-01-27 04:18:29
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26019 Modified Files: Message.php Log Message: Message preview and stop double error messages appearing by nulling the notice. Index: Message.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Message.php 28 Jul 2005 19:09:50 -0000 1.84 --- Message.php 27 Jan 2006 04:18:16 -0000 1.85 *************** *** 326,329 **** --- 326,334 ---- $tabs++; + /* Preview Button */ + $form->add('Message_preview', 'submit', $_SESSION['translate']->it('Preview')); + $form->setTab('Message_preview', $tabs); + $tabs++; + /* Module Information */ $form->add('module', 'hidden', 'phpwsbb'); *************** *** 369,373 **** $this->PHPWSBB_Message($_POST['PHPWSBB_ITEMS'][0]); if (!empty($this->_id) && !$_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_messages') && !$this->isModerator && ($_SESSION['OBJ_user']->username != $this->getOwner())) { ! $message = $_SESSION['translate']->it('Access to save message [var1] was denied due to lack of proper permissions.', $this->_id); $error = new PHPWS_Error('phpwsbb', 'PHPWSBB_Manager::_accessDenied()', $message, 'exit', 1); $error->message(); --- 374,378 ---- $this->PHPWSBB_Message($_POST['PHPWSBB_ITEMS'][0]); if (!empty($this->_id) && !$_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_messages') && !$this->isModerator && ($_SESSION['OBJ_user']->username != $this->getOwner())) { ! $message = '<div class="errortext">' . $_SESSION['translate']->it('Access to save message [var1] was denied due to lack of proper permissions.', $this->_id) . '</div>'; $error = new PHPWS_Error('phpwsbb', 'PHPWSBB_Manager::_accessDenied()', $message, 'exit', 1); $error->message(); *************** *** 389,395 **** $this->_body = PHPWS_Text::parseInput($_REQUEST['Message_body']); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('You must have a subject for your message.'); $_SESSION['PHPWSBB_Manager']->notice = new PHPWS_Message($message, 'CNT_phpwsbb'); $_REQUEST['PHPWSBB_MESSAGE_OP'] = 'edit'; --- 394,407 ---- $this->_body = PHPWS_Text::parseInput($_REQUEST['Message_body']); + if (isset($_REQUEST['Message_preview'])) { + $message = PHPWS_Text::parseOutput($_REQUEST['Message_body']); + $_SESSION['PHPWSBB_Manager']->notice = new PHPWS_Message($message, 'CNT_phpwsbb'); + $_REQUEST['PHPWSBB_MESSAGE_OP'] = 'edit'; + $this->action(); + return; + } if (PHPWS_Error::isError($error)) { ! $message = '<div class="errortext">' . $_SESSION['translate']->it('You must have a subject for your message.') . '</div>'; $_SESSION['PHPWSBB_Manager']->notice = new PHPWS_Message($message, 'CNT_phpwsbb'); $_REQUEST['PHPWSBB_MESSAGE_OP'] = 'edit'; *************** *** 685,690 **** */ function action() { ! if (PHPWS_Message::isMessage($_SESSION['PHPWSBB_Manager']->notice)) ! $_SESSION['PHPWSBB_Manager']->notice->display(); $forum = NULL; --- 697,704 ---- */ function action() { ! if (PHPWS_Message::isMessage($_SESSION['PHPWSBB_Manager']->notice)) { ! $_SESSION['PHPWSBB_Manager']->notice->display(); ! $_SESSION['PHPWSBB_Manager']->notice = null; ! } $forum = NULL; *************** *** 757,759 **** }// END CLASS PHPWSBB_Message ! ?> \ No newline at end of file --- 771,773 ---- }// END CLASS PHPWSBB_Message ! ?> |
From: Shaun M. <sin...@us...> - 2006-01-27 04:15:21
|
Update of /cvsroot/phpwsbb/phpwsbb/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24932 Modified Files: edit.tpl Log Message: Message preview Index: edit.tpl =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/templates/edit.tpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** edit.tpl 5 Jun 2003 14:22:13 -0000 1.1.1.1 --- edit.tpl 27 Jan 2006 04:15:06 -0000 1.2 *************** *** 22,25 **** <!-- END BODY --> ! {MESSAGE_SAVE} {END_FORM} --- 22,25 ---- <!-- END BODY --> ! {MESSAGE_SAVE}{MESSAGE_PREVIEW} {END_FORM} |
From: Shaun M. <sin...@us...> - 2005-07-28 19:10:00
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5025 Modified Files: Message.php Thread.php Log Message: Reverting out BUG #1209372 - Missed a few &s Index: Thread.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Thread.php,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** Thread.php 20 Jul 2005 17:30:27 -0000 1.78 --- Thread.php 28 Jul 2005 19:09:51 -0000 1.79 *************** *** 376,380 **** $message = str_replace('[name]', '"' . strip_tags($this->getLabel()) . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); foreach ($emails as $email) { --- 376,380 ---- $message = str_replace('[name]', '"' . strip_tags($this->getLabel()) . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); foreach ($emails as $email) { Index: Message.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** Message.php 20 Jul 2005 17:30:26 -0000 1.83 --- Message.php 28 Jul 2005 19:09:50 -0000 1.84 *************** *** 480,484 **** $message = str_replace('[name]', '"' . $this->getLabel() . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $thread->getId(), $message); $mail_object =& Mail::factory('mail'); --- 480,484 ---- $message = str_replace('[name]', '"' . $this->getLabel() . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $thread->getId(), $message); $mail_object =& Mail::factory('mail'); *************** *** 622,627 **** $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; $subject = $_SESSION['translate']->it('Reported BB Post: "[var1]"', $this->getLabel()); ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); ! $message = $_SESSION['translate']->it('A bulletin board user reported a bulletin board post for review. Please visit [var1] to view the post and take action.','http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS[]=' . $this->_tid . '#' . $_REQUEST['Message_id']); $message .= "\n\nReason:\n\n" . $_REQUEST['Message_reason']; $message .= "\n\nOriginal Message:\n\n"; --- 622,627 ---- $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; $subject = $_SESSION['translate']->it('Reported BB Post: "[var1]"', $this->getLabel()); ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); ! $message = $_SESSION['translate']->it('A bulletin board user reported a bulletin board post for review. Please visit [var1] to view the post and take action.','http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS[]=' . $this->_tid . '#' . $_REQUEST['Message_id']); $message .= "\n\nReason:\n\n" . $_REQUEST['Message_reason']; $message .= "\n\nOriginal Message:\n\n"; |
From: Shaun M. <sin...@us...> - 2005-07-20 17:31:09
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22527/class Modified Files: Message.php Thread.php Log Message: * Changes to 'save' messages and buttons to be in context * Allow 'Re:' to be translated Index: Thread.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Thread.php,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** Thread.php 27 May 2005 00:13:45 -0000 1.77 --- Thread.php 20 Jul 2005 17:30:27 -0000 1.78 *************** *** 470,474 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The topic could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 470,477 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! if ($unlock) ! $message = $_SESSION['translate']->it('The topic could not be unlocked.'); ! else ! $message = $_SESSION['translate']->it('The topic could not be locked.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 478,483 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully saved.') . '<br />'; ! $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; $this->action(); --- 481,488 ---- return; } else { ! if ($unlock) ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully unlocked.') . '<br />'; ! else ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully locked.') . '<br />'; $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; $this->action(); *************** *** 512,516 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The topic could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 517,524 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! if ($unstick) ! $message = $_SESSION['translate']->it('The topic could not be unstuck.'); ! else ! $message = $_SESSION['translate']->it('The topic could not be stuck.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 520,524 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully saved.') . '<br />'; $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; --- 528,535 ---- return; } else { ! if ($unstick) ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully unstuck.') . '<br />'; ! else ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully stuck.') . '<br />'; $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; Index: Message.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** Message.php 27 May 2005 00:13:41 -0000 1.82 --- Message.php 20 Jul 2005 17:30:26 -0000 1.83 *************** *** 264,268 **** // Default topic to re: current topic if (is_null($this->getLabel())) { ! $label = 'Re: ' . $thread->getLabel(FALSE); $this->setLabel(PHPWS_Text::parseOutput($label)); } --- 264,268 ---- // Default topic to re: current topic if (is_null($this->getLabel())) { ! $label = $_SESSION['translate']->it('Re') . ': ' . $thread->getLabel(FALSE); $this->setLabel(PHPWS_Text::parseOutput($label)); } *************** *** 315,319 **** /* Save Button */ ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Save')); $form->setTab('Message_save', $tabs); $tabs++; --- 315,326 ---- /* Save Button */ ! if (isset($this->_id)) ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Update Post')); ! else ! if (isset($this->_tid) && !empty($this->_tid)) ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Post Reply')); ! else ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Post')); ! $form->setTab('Message_save', $tabs); $tabs++; *************** *** 439,443 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 446,450 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be posted.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 447,451 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully saved.') . '<br />
'; // Update user statistics --- 454,458 ---- return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully posted.') . '<br />
'; // Update user statistics *************** *** 521,525 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 528,532 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be forked.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 529,533 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully saved.') . '<br />'; // Update old and new thread objects with new statistics --- 536,540 ---- return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully forked.') . '<br />'; // Update old and new thread objects with new statistics *************** *** 648,652 **** /* Save Button */ ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Save')); $form->setTab('Message_save', $tabs); $tabs++; --- 655,659 ---- /* Save Button */ ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Send Report')); $form->setTab('Message_save', $tabs); $tabs++; |
From: Shaun M. <sin...@us...> - 2005-07-20 17:30:40
|
Update of /cvsroot/phpwsbb/phpwsbb/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22527/lang Modified Files: phpwsbb.en.lng Log Message: * Changes to 'save' messages and buttons to be in context * Allow 'Re:' to be translated Index: phpwsbb.en.lng =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/lang/phpwsbb.en.lng,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** phpwsbb.en.lng 26 Oct 2004 05:12:17 -0000 1.22 --- phpwsbb.en.lng 20 Jul 2005 17:30:29 -0000 1.23 *************** *** 85,90 **** --- 85,93 ---- a:|:No topic was deleted from the database.:|:No topic was deleted from the database. a:|:Not recommended:|:Not recommended + a:|:Post:|:Post a:|:Post Reply:|:Post Reply + a:|:Update Post:|:Update Post a:|:Poster:|:Poster + a:|:Re:|:Re a:|:Reason:|:Reason a:|:Remove all monitors:|:Remove all monitors *************** *** 95,98 **** --- 98,102 ---- a:|:STICKY:|:STICKY a:|:Save:|:Save + a:|:Send Report:|:Send Report a:|:Settings:|:Settings a:|:Settings Saved:|:Settings Saved *************** *** 111,118 **** a:|:The forum [var1] was successfully deleted from the database.:|:The forum [var1] was successfully deleted from the database. a:|:The forum could not be saved to the database.:|:The forum could not be saved to the database. ! a:|:The message could not be saved to the database.:|:The message could not be saved to the database. a:|:The topic [var1] was successfully deleted from the database.:|:The topic [var1] was successfully deleted from the database. ! a:|:The topic could not be saved to the database.:|:The topic could not be saved to the database. ! a:|:The topic was successfully saved.:|:The topic was successfully saved. a:|:There is nothing here to see.:|:There is nothing here to see. a:|:There was a problem adding the monitor entry. Please try again or contact the system administrator.:|:There was a problem adding the monitor entry. Please try again or contact the system administrator. --- 115,126 ---- a:|:The forum [var1] was successfully deleted from the database.:|:The forum [var1] was successfully deleted from the database. a:|:The forum could not be saved to the database.:|:The forum could not be saved to the database. ! a:|:The message could not be posted.:|:The message could not be posted. a:|:The topic [var1] was successfully deleted from the database.:|:The topic [var1] was successfully deleted from the database. ! a:|:The topic could not be locked.:|:The topic could not be locked. ! a:|:The topic could not be unlocked.:|:The topic could not be unlocked. ! a:|:The topic was successfully locked.:|:The topic was successfully locked. ! a:|:The topic was successfully unlocked.:|:The topic was successfully unlocked. ! a:|:The topic was successfully stuck.:|:The topic was successfully stuck. ! a:|:The topic was successfully unstuck.:|:The topic was successfully unstuck. a:|:There is nothing here to see.:|:There is nothing here to see. a:|:There was a problem adding the monitor entry. Please try again or contact the system administrator.:|:There was a problem adding the monitor entry. Please try again or contact the system administrator. *************** *** 137,141 **** a:|:You tried to move it to current forum.:|:You tried to move it to current forum. a:|:Your forum was successfully saved.:|:Your forum was successfully saved. ! a:|:Your message was successfully saved.:|:Your message was successfully saved. a:|:Your monitors have been cleared.:|:Your monitors have been cleared. a:|:Your settings have been successfully saved.:|:Your settings have been successfully saved. --- 145,150 ---- a:|:You tried to move it to current forum.:|:You tried to move it to current forum. a:|:Your forum was successfully saved.:|:Your forum was successfully saved. ! a:|:Your message was successfully forked.:|:Your message was successfully forked. ! a:|:Your message could not be forked.:|:Your message could not be forked. a:|:Your monitors have been cleared.:|:Your monitors have been cleared. a:|:Your settings have been successfully saved.:|:Your settings have been successfully saved. |
From: Shaun M. <sin...@us...> - 2005-07-20 17:30:40
|
Update of /cvsroot/phpwsbb/phpwsbb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22527/docs Modified Files: ChangeLog Log Message: * Changes to 'save' messages and buttons to be in context * Allow 'Re:' to be translated Index: ChangeLog =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/docs/ChangeLog,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** ChangeLog 23 Mar 2005 20:42:52 -0000 1.129 --- ChangeLog 20 Jul 2005 17:30:28 -0000 1.130 *************** *** 2,5 **** --- 2,10 ---- # $Id$ + *phpwsbb-1.0.4 (sometime soon) + Bug Fixes: + * Changes to 'save' messages and buttons to be in context + * Allow 'Re:' to be translated + *phpwsbb-1.0.3 (23 Mar 2005) Bug Fixes: |
From: Shaun M. <sin...@us...> - 2005-05-27 00:13:59
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2462 Modified Files: Message.php Thread.php Log Message: BUG1209372 - Missed a few &s (rck000) Also changed message reported to admin to make more sense Index: Thread.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Thread.php,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** Thread.php 22 Mar 2005 18:24:48 -0000 1.76 --- Thread.php 27 May 2005 00:13:45 -0000 1.77 *************** *** 376,380 **** $message = str_replace('[name]', '"' . strip_tags($this->getLabel()) . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); foreach ($emails as $email) { --- 376,380 ---- $message = str_replace('[name]', '"' . strip_tags($this->getLabel()) . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); foreach ($emails as $email) { Index: Message.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** Message.php 22 Mar 2005 18:24:46 -0000 1.81 --- Message.php 27 May 2005 00:13:41 -0000 1.82 *************** *** 473,477 **** $message = str_replace('[name]', '"' . $this->getLabel() . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $thread->getId(), $message); $mail_object =& Mail::factory('mail'); --- 473,477 ---- $message = str_replace('[name]', '"' . $this->getLabel() . '"', $message); // Got rid of the brackets so that the link isn't broken in email messages ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $thread->getId(), $message); $mail_object =& Mail::factory('mail'); *************** *** 615,620 **** $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; $subject = $_SESSION['translate']->it('Reported BB Post: "[var1]"', $this->getLabel()); ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); ! $message = $_SESSION['translate']->it('A bulletin board post reported a bulletin board post for review. Please visit [var1] to view the post and take action.','http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS[]=' . $this->_tid . '#' . $_REQUEST['Message_id']); $message .= "\n\nReason:\n\n" . $_REQUEST['Message_reason']; $message .= "\n\nOriginal Message:\n\n"; --- 615,620 ---- $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; $subject = $_SESSION['translate']->it('Reported BB Post: "[var1]"', $this->getLabel()); ! $message = str_replace('[url]', 'http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS=' . $this->getId(), $message); ! $message = $_SESSION['translate']->it('A bulletin board user reported a bulletin board post for review. Please visit [var1] to view the post and take action.','http://' . PHPWS_HOME_HTTP . 'index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPWS_MAN_ITEMS[]=' . $this->_tid . '#' . $_REQUEST['Message_id']); $message .= "\n\nReason:\n\n" . $_REQUEST['Message_reason']; $message .= "\n\nOriginal Message:\n\n"; |
From: Wendall C. <wen...@us...> - 2005-03-23 20:43:36
|
Update of /cvsroot/phpwsbb/phpwsbb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31794/docs Modified Files: ChangeLog Log Message: version bump Index: ChangeLog =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/docs/ChangeLog,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** ChangeLog 23 Mar 2005 20:36:08 -0000 1.128 --- ChangeLog 23 Mar 2005 20:42:52 -0000 1.129 *************** *** 2,6 **** # $Id$ ! *phpwsbb-1.0.3 (21 Mar 2005) Bug Fixes: * Fixed well formed issue in Forum.php --- 2,6 ---- # $Id$ ! *phpwsbb-1.0.3 (23 Mar 2005) Bug Fixes: * Fixed well formed issue in Forum.php |
From: Wendall C. <wen...@us...> - 2005-03-23 20:43:33
|
Update of /cvsroot/phpwsbb/phpwsbb/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31794/boost Modified Files: update.php Log Message: version bump Index: update.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/boost/update.php,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** update.php 4 Mar 2005 18:19:41 -0000 1.48 --- update.php 23 Mar 2005 20:42:37 -0000 1.49 *************** *** 328,331 **** --- 328,334 ---- $content .= 'Added height and width attributes to all images.<br />'; } + if(version_compare($currentVersion, '1.0.3') < 0) { + $content .= 'Several bug fixes see ChangeLog.<br />'; + } ?> \ No newline at end of file |
From: Wendall C. <wen...@us...> - 2005-03-23 20:43:31
|
Update of /cvsroot/phpwsbb/phpwsbb/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31794/conf Modified Files: boost.php Log Message: version bump Index: boost.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/conf/boost.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** boost.php 4 Mar 2005 18:19:43 -0000 1.40 --- boost.php 23 Mar 2005 20:42:50 -0000 1.41 *************** *** 32,36 **** $admin_mod = 1; $active = 'on'; ! $version = '1.0.2'; $admin_op = '&PHPWSBB_MAN_OP=list'; $mod_class_files = array('Manager.php'); --- 32,36 ---- $admin_mod = 1; $active = 'on'; ! $version = '1.0.3'; $admin_op = '&PHPWSBB_MAN_OP=list'; $mod_class_files = array('Manager.php'); |
From: Wendall C. <wen...@us...> - 2005-03-23 20:37:10
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28487/class Modified Files: ImgLibrary.php Manager.php Log Message: fixed save settings Index: Manager.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Manager.php,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Manager.php 4 Mar 2005 18:19:42 -0000 1.63 --- Manager.php 23 Mar 2005 20:36:05 -0000 1.64 *************** *** 1226,1234 **** case 'saveusersettings': ! if (!isset($_REQUEST['IMGLib_op'])) { ! $result = $this->_saveUserSettings(); ! $GLOBALS['CNT_phpwsbb']['title'] = $result['title']; ! $GLOBALS['CNT_phpwsbb']['content'] .= $result['content']; ! } break; --- 1226,1232 ---- case 'saveusersettings': ! $result = $this->_saveUserSettings(); ! $GLOBALS['CNT_phpwsbb']['title'] = $result['title']; ! $GLOBALS['CNT_phpwsbb']['content'] .= $result['content']; break; Index: ImgLibrary.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/ImgLibrary.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImgLibrary.php 23 Mar 2005 19:33:02 -0000 1.1 --- ImgLibrary.php 23 Mar 2005 20:36:04 -0000 1.2 *************** *** 246,283 **** ! /** ! * Determines & performs the requested PHPWS_IMGLib operation. ! * ! * @author Eloi George <el...@NO...> ! * @param string $op Action to be performed ! * @return none ! * @access public ! */ ! function action ($op='view_gallery') { ! if ($op=='upload_image' && $this->_can_manage_images) ! $this->upload_image(); ! elseif ($op=='delete_image' && $this->_can_manage_images) ! $this->delete_image(); ! elseif ($op=='move_image' && $this->_can_manage_images) ! $this->move_image(); ! elseif ($op=='image_mgmt' && isset($_POST['IMGLib_delete']) && $this->_can_manage_images) ! $this->delete_image(); ! elseif ($op=='create_gallery' && $this->_can_manage_galleries) { ! if (!$this->update_settings(stripslashes($_POST['IMGLib_new_gallery'])) ! || !$this->_current_view = ! array_search(stripslashes($_POST['IMGLib_new_gallery']), $this->_galleries)) { ! reset($this->_galleries); ! $this->_current_view = key($this->_galleries); ! } ! $this->view_gallery(); ! } ! elseif ($op=='delete_gallery' && $this->_can_manage_galleries) ! $this->delete_gallery(); ! elseif ($op=='rename_gallery' && $this->_can_manage_galleries) ! $this->rename_gallery(); ! elseif ($op=='update_settings' && $this->_can_manage_galleries) ! $this->update_settings(); ! else ! $this->view_gallery(); }// END FUNC action() --- 246,298 ---- ! /** ! * Determines & performs the requested PHPWS_IMGLib operation. ! * ! * @author Eloi George <el...@NO...> ! * @param string $op Action to be performed ! * @return none ! * @access public ! */ ! function action ($op='view_gallery') { ! if($this->_can_manage_images) { ! switch($op) { ! case 'upload_image': ! $this->upload_image(); ! break; ! case 'delete_image': ! $this->delete_image(); ! break; ! case 'move_image': ! $this->move_image(); ! break; ! case 'image_mgmt': ! if(isset($_POST['IMGLib_delete'])) ! $this->delete_image(); ! break; ! case 'create_gallery': ! if (!$this->update_settings(stripslashes($_POST['IMGLib_new_gallery'])) ! || !$this->_current_view = ! array_search(stripslashes($_POST['IMGLib_new_gallery']), $this->_galleries)) { ! reset($this->_galleries); ! $this->_current_view = key($this->_galleries); ! } ! $this->view_gallery(); ! break; ! case 'delete_gallery': ! $this->delete_gallery(); ! break; ! case 'rename_gallery': ! $this->rename_gallery(); ! break; ! case 'update_settings': ! $this->update_settings(); ! break; ! case 'Show Gallery': ! $this->view_gallery(); ! break; ! } ! } else { ! $this->view_gallery(); ! } }// END FUNC action() *************** *** 410,413 **** --- 425,429 ---- $tags['IMAGE_SELECT_DLG'] = $vars . PHPWS_Form::formHidden('IMGLib_selected_gallery', $this->_base_dir.'/'.$this->_current_view.'/') + . PHPWS_Form::formHidden('user',$_POST['user']) . $_SESSION['translate']->it('With selected [var1]',$this->_image_type).': ' . PHPWS_Form::formSelect('IMGLib_op', $ops) *************** *** 423,427 **** $tags['GALL_CHOOSE_DLG'] = PHPWS_Form::makeForm('IMGLib_choose_dlg', 'index.php', $form, 'post', 0, TRUE); $tags['GALL_EXIT_LNK'] = '[<a href="index.php?module='.$this->_module ! . '&IMGLib_op=exit&IMGLib_return_data='.$this->_return_data.'">' . $_SESSION['translate']->it('Exit The Gallery').'</a>]'; if ($this->_can_manage_images) { $tags['IMAGE_MGMT_TITLE'] = ucfirst($this->_image_type).' '.$_SESSION['translate']->it('Upload'); --- 439,443 ---- $tags['GALL_CHOOSE_DLG'] = PHPWS_Form::makeForm('IMGLib_choose_dlg', 'index.php', $form, 'post', 0, TRUE); $tags['GALL_EXIT_LNK'] = '[<a href="index.php?module='.$this->_module ! . '&IMGLib_op=exit&user='.$_POST['user'].'&IMGLib_return_data='.$this->_return_data.'">' . $_SESSION['translate']->it('Exit The Gallery').'</a>]'; if ($this->_can_manage_images) { $tags['IMAGE_MGMT_TITLE'] = ucfirst($this->_image_type).' '.$_SESSION['translate']->it('Upload'); *************** *** 516,519 **** --- 532,536 ---- $this->view_gallery(); else { + $str1 = ''; $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library').' - '. $str1 .'!'; $GLOBALS[$this->_block]['content'] = $_SESSION['translate']->it('The [var1] <b>"[var2]"</b> could not be [var3]' |
From: Wendall C. <wen...@us...> - 2005-03-23 20:36:52
|
Update of /cvsroot/phpwsbb/phpwsbb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28487/docs Modified Files: ChangeLog Log Message: fixed save settings Index: ChangeLog =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/docs/ChangeLog,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** ChangeLog 22 Mar 2005 18:24:49 -0000 1.127 --- ChangeLog 23 Mar 2005 20:36:08 -0000 1.128 *************** *** 10,13 **** --- 10,14 ---- * User monitors now work * #1105249 Title in Monitor email wrong + * #1100091 Error in changing Avatar *phpwsbb-1.0.2 (04 Mar 2005) |
From: Wendall C. <wen...@us...> - 2005-03-23 20:36:44
|
Update of /cvsroot/phpwsbb/phpwsbb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28487 Modified Files: index.php Log Message: fixed save settings Index: index.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** index.php 20 Oct 2004 01:33:53 -0000 1.14 --- index.php 23 Mar 2005 20:36:00 -0000 1.15 *************** *** 51,62 **** if (isset($_REQUEST['IMGLib_op']) && $_SESSION['OBJ_user']->user_id) { - /* If this just got called from the profile editing screen, save all data entered so far */ - if (isset($_REQUEST['PHPWSBB_MAN_OP'])) - $_SESSION['PHPWSBB_Manager']->_saveUserSettings(); /* If an image was selected from the library... */ if ($_REQUEST['IMGLib_op']=='select_image') { ! if (isset($_POST['IMGLib_selected_image'])) $_POST['IMGLib_selected_image'] = pos($_POST['IMGLib_selected_image']); ! $_SESSION['PHPWSBB_Manager']->_getUserSettings(); return; } --- 51,63 ---- if (isset($_REQUEST['IMGLib_op']) && $_SESSION['OBJ_user']->user_id) { /* If an image was selected from the library... */ if ($_REQUEST['IMGLib_op']=='select_image') { ! if (isset($_POST['IMGLib_selected_image'])) { $_POST['IMGLib_selected_image'] = pos($_POST['IMGLib_selected_image']); ! $_POST['avatar_dir'] = $_POST['IMGLib_selected_gallery']; ! $_POST['avatar_file'] = $_POST['IMGLib_selected_image']; ! } ! $_SESSION['PHPWSBB_Manager']->_saveUserSettings(); ! $_SESSION['PHPWSBB_Manager']->_getUserSettings($_POST['user']); return; } *************** *** 64,68 **** if ($_REQUEST['IMGLib_op']=='exit') { if ($_REQUEST['IMGLib_return_data']=='edit') ! $_SESSION['PHPWSBB_Manager']->_getUserSettings(); return; } --- 65,69 ---- if ($_REQUEST['IMGLib_op']=='exit') { if ($_REQUEST['IMGLib_return_data']=='edit') ! $_SESSION['PHPWSBB_Manager']->_getUserSettings($_REQUEST['user']); return; } *************** *** 70,74 **** * are already set as POSTs from the calling form. */ ! require_once PHPWS_SOURCE_DIR . 'core/ImgLibrary.php'; $library = new PHPWS_IMGLib($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatars') , $_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatar_galleries') --- 71,75 ---- * are already set as POSTs from the calling form. */ ! require_once PHPWS_SOURCE_DIR . 'mod/phpwsbb/class/ImgLibrary.php'; $library = new PHPWS_IMGLib($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatars') , $_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatar_galleries') |
From: Wendall C. <wen...@us...> - 2005-03-23 19:33:14
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29322 Added Files: ImgLibrary.php Log Message: initial commit --- NEW FILE: ImgLibrary.php --- <?php // Must require classes being used in this class require_once(PHPWS_SOURCE_DIR.'core/Form.php'); require_once(PHPWS_SOURCE_DIR.'core/File.php'); require_once(PHPWS_SOURCE_DIR.'core/Pager.php'); require_once(PHPWS_SOURCE_DIR.'core/WizardBag.php'); require_once(PHPWS_SOURCE_DIR.'core/Template.php'); require_once(PHPWS_SOURCE_DIR.'core/Error.php'); /** * Maintains & retrieves selected URLs from an image library * * This class allows you to easily create & manage a library of images for * your module and allow the user to select a desired image. * * See /docs/developer/Image_Library.txt for usage instructions. * * @version $Id: ImgLibrary.php,v 1.1 2005/03/23 19:33:02 wendall911 Exp $ * @author Eloi George <el...@NO...> * @package Core */ class PHPWS_IMGLib { /** * Name of module this image library belongs to. * Changing this allows you to have more than 1 library per module. * @var string * @access public */ var $_module; /** * Image Library base directory's name. Defaults to "library" * Changing this allows you to have more than 1 library per module. * @var string * @access public */ var $_base_dir; /** * File Path of the library that's being accessed. * @var string * @access public */ var $_library_path; /** * What to call the image ex:"avatar", "mugshot". * @var string * @access public */ var $_image_type; /** * Data to send on exit from the gallery. * @var string * @access public */ var $_return_data; /** * Content_Var to use for displaying data. * @var string * @access public */ var $_block; /** * Denotes that the user can add or delete images. * @var boolean * @access private */ var $_can_manage_images; /** * Denotes that the user can add or delete galleries. * @var boolean * @access private */ var $_can_manage_galleries; /** * Denotes that the user can select images from the galleries. * @var boolean * @access private */ var $_can_select_images; /** * Display=>Directory names of all galleries. * @var array * @access private */ var $_galleries; /** * Currently selected image. * @var string * @access public */ var $_current_image; /** * Currently selected gallery. * @var string * @access public */ var $_current_gallery; /** * Maximum size of uploaded images. In kilobytes. * @var array * @access public */ var $_max_image_size; /** * Maximum height of uploaded images. * @var array * @access public */ var $_max_image_height; /** * Maximum width of uploaded images. * @var array * @access public */ var $_max_image_width; /** * The maximum number of images to show per page. * @var array * @access private */ var $_pager_limit; /** * This flag is set to true whenever an op is ready for external processing. * @var array * @access public */ var $_done; /** * This flag is set to true if a new image library was just created. * @var array * @access public */ var $_created; /** * Constructor for the PHPWS_IMGLib object. * * If all class data is not available as a $_POST variable, PHPWS_IMGLib * will read it from /images/<module name>/library/config.php * core is loaded, it passes the configuration file name * to this function to initialize it. Besides preparing the hub * it can be used to open a branch database as well. * * @author Eloi George <el...@NO...> * @param boolean $can_manage_images Calling module * @param boolean $can_manage_galleries Calling module * @param boolean $can_select_images Calling module * @param string $return_data Data to send on exit from the gallery. * @param string $current_gallery Currently selected gallery * @param string $current_image Currently selected image * @param string $module Calling module * @param string $base_dir Image Library base directory name. "library" * @param string $block Content_Var to use for displaying data. * @param string $image_type What to call the image ex:"avatar" * @param int $max_image_size Maximum size of uploaded images. In kilobytes. * @param int $max_image_height Maximum height of uploaded images. * @param int $max_image_width Maximum width of uploaded images. * @return none * @access public */ function PHPWS_IMGLib ($can_manage_images=false, $can_manage_galleries=false , $can_select_images=true, $return_data, $current_gallery=null, $current_image=null , $module=null, $base_dir='library', $block='CNT_user', $image_type='image' , $max_image_size=26, $max_image_height=400, $max_image_width=400) { $this->_done = $this->_created = false; $this->_galleries = array(); $this->_pager_limit=10; /* Assign parameters to class variables */ $this->_can_manage_images = $can_manage_images; $this->_can_manage_galleries = $can_manage_galleries; if (isset($_REQUEST['IMGLib_can_select_images'])) $this->_can_select_images = $_REQUEST['IMGLib_can_select_images']; else $this->_can_select_images = $can_select_images; if (isset($_REQUEST['IMGLib_return_data'])) /* Decode this string if necessary */ $this->_return_data = $_REQUEST['IMGLib_return_data']; else $this->_return_data = $return_data; if (isset($_REQUEST['IMGLib_current_image'])) $this->_current_image = stripslashes($_REQUEST['IMGLib_current_image']); else $this->_current_image = $current_image; if (isset($_REQUEST['IMGLib_current_gallery'])) $this->_current_gallery = stripslashes($_REQUEST['IMGLib_current_gallery']); else $this->_current_gallery = $current_gallery; if ($module) $this->_module = $module; else $this->_module = $GLOBALS['core']->current_mod; $this->_base_dir = $base_dir; $this->_block = $block; $this->_image_type = $image_type; $this->_max_image_size = $max_image_size; $this->_max_image_height = $max_image_height; $this->_max_image_width = $max_image_width; // PHPWS_HOME_DIR define has been deprecated because it needs to be able to change on the fly for branches and defines cannot do that $this->_library_path = $GLOBALS['core']->home_dir.'images/'.$this->_module.'/'.$this->_base_dir.'/'; /* Pull settings data from textfile */ $config_file = $this->_library_path.'config.php'; if (!file_exists($config_file) && !$this->create_library()) { exit('ERROR (PHPWS_IMGLib): No library settings file found or created!'); } include($config_file); /* Start processing any POSTed current gallery view data */ if (isset($_REQUEST['IMGLib_selected_view'])) $this->_current_view = $_REQUEST['IMGLib_selected_view']; /* If no current view was requested, use the current image's gallery */ elseif(!empty($this->_current_gallery)) { $g = $this->_current_gallery; /* Strip any trailing slashes */ if (substr($g,-1)=='/') $g = substr($g,0,-1); /* Strip any parent directory names & the trailing slash */ if (strrchr($g, '/')) $g = substr(strrchr($g, '/'), 1); /* Make sure that the supplied gallery exists */ if (array_key_exists($g, $this->_galleries)) $this->_current_view = $g; } /* otherwise, just pick the first gallery */ else { reset($this->_galleries); $this->_current_view = key($this->_galleries); } $this->_done = false; if (isset($_REQUEST['PAGER_limit'])) $this->_pager_limit = $_REQUEST['PAGER_limit']; }// END FUNC PHPWS_IMGLib() /** * Determines & performs the requested PHPWS_IMGLib operation. * * @author Eloi George <el...@NO...> * @param string $op Action to be performed * @return none * @access public */ function action ($op='view_gallery') { if ($op=='upload_image' && $this->_can_manage_images) $this->upload_image(); elseif ($op=='delete_image' && $this->_can_manage_images) $this->delete_image(); elseif ($op=='move_image' && $this->_can_manage_images) $this->move_image(); elseif ($op=='image_mgmt' && isset($_POST['IMGLib_delete']) && $this->_can_manage_images) $this->delete_image(); elseif ($op=='create_gallery' && $this->_can_manage_galleries) { if (!$this->update_settings(stripslashes($_POST['IMGLib_new_gallery'])) || !$this->_current_view = array_search(stripslashes($_POST['IMGLib_new_gallery']), $this->_galleries)) { reset($this->_galleries); $this->_current_view = key($this->_galleries); } $this->view_gallery(); } elseif ($op=='delete_gallery' && $this->_can_manage_galleries) $this->delete_gallery(); elseif ($op=='rename_gallery' && $this->_can_manage_galleries) $this->rename_gallery(); elseif ($op=='update_settings' && $this->_can_manage_galleries) $this->update_settings(); else $this->view_gallery(); }// END FUNC action() /** * Updates the library settings file. * * This is also used to create a new image gallery. * * @author Eloi George <el...@NO...> * @param string $new_gallery New gallery to be created * @return none * @access public */ function update_settings ($new_gallery=null) { /* If a new gallery is requested & is not a duplicate... */ $lastnum = true; if (!empty($new_gallery)) { if (array_search($new_gallery, $this->_galleries)!==false) { echo 'ERROR (PHPWS_IMGLib): A Gallery named "'.$new_gallery.'" already exists!<br />'; return false; } /* Determine the last directory id */ if ($dirlist = PHPWS_File::readDirectory($this->_library_path, true)) { asort($dirlist); $lastnum = array_pop($dirlist); } else $lastnum = 0; /* Create a new directory */ $dir = $this->_library_path . ++$lastnum.'/'; if (@mkdir($dir)) { chmod($dir, 0755); $this->_galleries[$lastnum] = $new_gallery; } else { /* exit with an error */ echo 'ERROR (PHPWS_IMGLib): Couldn\'t create directory '.$dir.'<br />'; return false; } } /* Create a new config.php file */ $config_info = "<?php\n"; ksort($this->_galleries); foreach ($this->_galleries as $loc => $name) $config_info .= '$this->_galleries["'.$loc.'"] = stripslashes("'.addslashes($name). "\");\n"; $config_info .= '?>'; if (!PHPWS_File::writeFile($this->_library_path.'config.php', $config_info, TRUE, TRUE)) { echo 'There was an error writing to the file'.$this->_library_path.'config.php <br />'.'Settings have not been changed!<br />'; return false; } return $lastnum; }// END FUNC update_settings() /** * Displays the current gallery and lets the user pick an image. * * @author Eloi George <el...@NO...> * @param none * @return none * @access public */ function view_gallery () { /* Set up persistent image row variables */ $vars = $this->post_class_vars(); if ($this->_can_select_images) $ops = array('select_image'=>'Select'); if ($this->_can_manage_images) { $ops['move_image'] = 'Move'; $ops['delete_image'] = 'Delete'; } /* Make a sorted list of all files in the currently selected gallery */ if (!$result = PHPWS_File::readDirectory($this->_library_path.$this->_current_view,false,true)) { $result = array(); } natcasesort($result); /* Set up paging information */ $pager = new PHPWS_Pager; $pager->makeArray(TRUE); $pager->limit = $this->_pager_limit; $pager->setlinkback('index.php?module='.$this->_module . '&IMGLib_op=view_gallery&IMGLib_can_select_images='.$this->_can_select_images . '&IMGLib_current_image='.$this->_current_image . '&IMGLib_current_gallery='.$this->_current_gallery . '&IMGLib_selected_view='.$this->_current_view . '&IMGLib_return_data='.$this->_return_data); $pager->setData($result); $pager->pageData(); $result = $pager->getData(); $tags['PAGE_BACKWARD_LINK'] = $pager->getBackLink(); $tags['SECTION_LINKS'] = $pager->getSectionLinks(); $tags['PAGE_FORWARD_LINK'] = $pager->getForwardLink(); $tags['SECTION_INFO'] = $pager->getSectionInfo() . ucfirst($this->_image_type); $tags['LIMIT_LINKS'] = $pager->getLimitLinks(); $tags['LIMIT_LINKS_LABEL'] = $_SESSION['translate']->it('Rows to show per page'); /* Get all image information & max H&W */ $maxh = $maxw = 90; $filelist = array(); foreach($result as $f) { $filelist[$f] = getimagesize($this->_library_path.$this->_current_view.'/'.$f); if ($filelist[$f][1] > $maxh) $maxh = $filelist[$f][1]; if ($filelist[$f][0] > $maxw) $maxw = $filelist[$f][0]; } /* Create image row HTML */ $row['IHEIGHT'] = $maxh; $row['HEIGHT'] = $maxh + 30; $row['WIDTH'] = $maxw + 20; $tags['IMAGE_SELECT_LST'] = ''; $bg = null; foreach($filelist as $fname=>$finfo) { $row['BG'] = $bg; // All image access should be relative, http:// was being hard-coded which would break in ssl sites (https://) $row['IMAGE'] = '<img src="./images/'.$this->_module.'/' . $this->_base_dir.'/'.$this->_current_view.'/'.$fname.'" alt="'.$fname.'" title="'.$fname.'" '.$finfo[3].' />'; $row['IMAGE_NAME'] = PHPWS_Form::formCheckBox('IMGLib_selected_image['.$fname.']', $fname) . preg_replace("/[^a-zA-Z0-9]/", ' ', str_replace(strrchr($fname, '.'), '', $fname)); if(strpos($this->_current_gallery, '/'.$this->_current_view) && $fname==$this->_current_image) $row['IMAGE_NAME'] .= '<br />'.$_SESSION['translate']->it('[Currently Selected]'); $tags['IMAGE_SELECT_LST'] .= PHPWS_Template::processTemplate($row,'core','ImgLibrary_view_row.tpl'); PHPWS_WizardBag::toggle($bg, ' class="bg_light"'); } if (empty($filelist)) $tags['IMAGE_SELECT_LST'] = '<br /><br />'.$_SESSION['translate']->it('This gallery is empty!').'<br /><br />'; else $tags['IMAGE_SELECT_DLG'] = $vars . PHPWS_Form::formHidden('IMGLib_selected_gallery', $this->_base_dir.'/'.$this->_current_view.'/') . $_SESSION['translate']->it('With selected [var1]',$this->_image_type).': ' . PHPWS_Form::formSelect('IMGLib_op', $ops) . PHPWS_Form::formSubmit($_SESSION['translate']->it('Go'), 'IMGLib_btn'); /* Populate the rest of the template tags */ $tags['IMAGE_SELECT_LBL'] = $_SESSION['translate']->it('Select An [var1]',ucfirst($this->_image_type)); $form[0] = $vars . PHPWS_Form::formHidden('IMGLib_op', 'view_gallery') . $_SESSION['translate']->it('Choose another [var1] gallery',$this->_image_type).': ' . PHPWS_Form::formSelect('IMGLib_selected_view', $this->_galleries, $this->_galleries[$this->_current_view]) . PHPWS_Form::formSubmit($_SESSION['translate']->it('Go!'), 'IMGLib_btn'); $tags['GALL_CHOOSE_DLG'] = PHPWS_Form::makeForm('IMGLib_choose_dlg', 'index.php', $form, 'post', 0, TRUE); $tags['GALL_EXIT_LNK'] = '[<a href="index.php?module='.$this->_module . '&IMGLib_op=exit&IMGLib_return_data='.$this->_return_data.'">' . $_SESSION['translate']->it('Exit The Gallery').'</a>]'; if ($this->_can_manage_images) { $tags['IMAGE_MGMT_TITLE'] = ucfirst($this->_image_type).' '.$_SESSION['translate']->it('Upload'); $tags['IMAGE_UPLOAD_LBL'] = $_SESSION['translate']->it('Your [var1] must be no bigger than [var2] pixels high by [var3] pixels wide.' , $this->_image_type, $this->_max_image_height, $this->_max_image_width) .'<br />' . $_SESSION['translate']->it('Maximum uploaded [var1] size is [var2]KB.' , $this->_image_type, $this->_max_image_size); $form[0] = PHPWS_Form::formFile('IMGLib_loaded_image', 33, 255) . ' '.$this->gallery_button($_SESSION['translate']->it('Save'), 'upload_image', true); $tags['IMAGE_UPLOAD_DLG'] = PHPWS_Form::makeForm('IMGLib_upload_image_dlg', 'index.php', $form, 'post', 0, TRUE); } if ($this->_can_manage_galleries) { $tags['GALL_MGMT_TITLE'] = $_SESSION['translate']->it('Gallery Management'); $tags['GALL_CREATE_LBL'] = $_SESSION['translate']->it('<b>Create A Gallery:</b> Give your new gallery a name as it will appear in the gallery selection box.'); $tags['GALL_DELETE_LBL'] = $_SESSION['translate']->it('<b>Delete:</b> Click the button below to delete this gallery and all images located inside it.'); $tags['GALL_RENAME_LBL'] = null; $form[0] = PHPWS_Form::formTextField('IMGLib_new_gallery', '', 35, 70) . ' '.$this->gallery_button($_SESSION['translate']->it('Create'), 'create_gallery', true); $tags['GALL_CREATE_DLG'] = PHPWS_Form::makeForm('IMGLib_create_gallery_dlg', 'index.php', $form, 'post', 0, TRUE); $form[0] = PHPWS_Form::formTextField('IMGLib_new_gallery', '', 35, 70, $_SESSION['translate']->it('<b>Rename:</b> Change this gallery\'s name to').': ') . ' '.$this->gallery_button($_SESSION['translate']->it('Rename'), 'rename_gallery', true); $tags['GALL_RENAME_DLG'] = PHPWS_Form::makeForm('IMGLib_rename_gallery_dlg', 'index.php', $form, 'post', 0, TRUE); $tags['GALL_DELETE_DLG'] = $this->gallery_button($_SESSION['translate']->it('Delete This Gallery'), 'delete_gallery'); } $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('[var1] Gallery : [var2]', ucfirst($this->_image_type), str_replace('.','',$this->_galleries[$this->_current_view])); $GLOBALS[$this->_block]['content'] = PHPWS_Template::processTemplate($tags,'core','ImgLibrary_view_gallery.tpl'); }// END FUNC view_gallery() /** * Deletes an image gallery. * * @author Eloi George <el...@NO...> * @param none * @return none * @access public */ function delete_gallery () { if(isset($_POST['IMGLib_yes'])) { $g = $this->_galleries[$this->_current_view]; if (PHPWS_File::rmdir($this->_library_path.$this->_current_view.'/')) { unset($this->_galleries[$this->_current_view]); $this->update_settings(); $str1 = $_SESSION['translate']->it('Gallery Deleted'); $str2 = 'has successfully been'; } else { $str1 = $_SESSION['translate']->it('ERROR'); $str2 = 'could not be'; } $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library').' - '. $str1 .'!'; $content = $_SESSION['translate']->it('The [var1] <b>"[var2]"</b> '.$str2.' [var3]' , $_SESSION['translate']->it('gallery'), $g , '<b>'.$_SESSION['translate']->it('deleted').'</b>!') . '<br /><br />'; $GLOBALS[$this->_block]['content'] = $content .'<br /><br /><center>'. $this->gallery_button().'</center>'; } elseif(isset($_POST['IMGLib_no'])) { $this->view_gallery(); } else { $myform[0] = $this->post_class_vars() . PHPWS_Form::formHidden('IMGLib_op', 'delete_gallery') . PHPWS_Form::formSubmit($_SESSION['translate']->it('Yes'), 'IMGLib_yes') . ' ' . PHPWS_Form::formSubmit($_SESSION['translate']->it('No'), 'IMGLib_no'); $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library') .' - '. $_SESSION['translate']->it('Confirm Action').'!'; $GLOBALS[$this->_block]['content'] = '<br /><br />' . $_SESSION['translate']->it('Are you sure you want to <b>[var1] "[var2]"</b>?' , $_SESSION['translate']->it('delete'), $this->_galleries[$this->_current_view]) . PHPWS_Form::makeForm('IMGLib_confirm_delete', 'index.php', $myform, 'post', 0, 0) . '<br /><br />'; } }// END FUNC delete_gallery() /** * Renames an image gallery. * * @author Eloi George <el...@NO...> * @param none * @return none * @access public */ function rename_gallery () { $this->_galleries[$this->_current_view] = stripslashes($_POST['IMGLib_new_gallery']); if ($this->update_settings()) $this->view_gallery(); else { $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library').' - '. $str1 .'!'; $GLOBALS[$this->_block]['content'] = $_SESSION['translate']->it('The [var1] <b>"[var2]"</b> could not be [var3]' , $_SESSION['translate']->it('gallery'), $this->_galleries[$this->_current_view] , '<b>'.$_SESSION['translate']->it('renamed').'</b>!') . '<br /><br /><center>'. $this->gallery_button().'</center>'; } }// END FUNC rename_gallery() /** * Uploads an image to the current image gallery. * * @author Eloi George <el...@NO...> * @param none * @return none * @access public */ function upload_image () { $image = EZform::saveImage('IMGLib_loaded_image' , $this->_library_path.$this->_current_view.'/' , $this->_max_image_width , $this->_max_image_height , $this->_max_image_size*1024); if (PHPWS_Error::isError($image)) $image->message($this->_block, $_SESSION['translate']->it('Image Upload Failed')); $this->view_gallery(); }// END FUNC upload_image() /** * Deletes an image from the current image gallery. * * @author Eloi George <el...@NO...> * @param none * @return none * @access public */ function delete_image () { if(isset($_POST['IMGLib_yes'])) { foreach($_POST['IMGLib_selected_image'] as $f) $status = @unlink($this->_library_path.$this->_current_view.'/'.$f); if ($status) { $str1 = $_SESSION['translate']->it('Gallery Deleted'); $str2 = 'has successfully been'; $this->_done = true; } else { $str1 = $_SESSION['translate']->it('ERROR'); $str2 = 'could not be'; } $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library').' - '. $str1 .'!'; $content = $_SESSION['translate']->it('The [var1] <b>"[var2]"</b> '.$str2.' [var3]' , $this->_image_type, implode('" & "', $_POST['IMGLib_selected_image']) , '<b>'.$_SESSION['translate']->it('deleted').'</b>!') . '<br /><br />'; $GLOBALS[$this->_block]['content'] = $content .'<br /><br /><center>'. $this->gallery_button().'</center>'; } elseif(isset($_POST['IMGLib_no'])) { $this->view_gallery(); } else { $myform[0] = $this->post_class_vars() . PHPWS_Form::formHidden('IMGLib_op', 'delete_image') . $this->post_array('IMGLib_selected_image', $_POST['IMGLib_selected_image']) . PHPWS_Form::formSubmit($_SESSION['translate']->it('Yes'), 'IMGLib_yes') . ' ' . PHPWS_Form::formSubmit($_SESSION['translate']->it('No'), 'IMGLib_no'); $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library') .' - '. $_SESSION['translate']->it('Confirm Action').'!'; $GLOBALS[$this->_block]['content'] = '<br /><br />' . $_SESSION['translate']->it('Are you sure you want to [var1] "[var2]"?' , $_SESSION['translate']->it('delete'), implode('" & "', $_POST['IMGLib_selected_image'])) . PHPWS_Form::makeForm('IMGLib_confirm_delete', 'index.php', $myform, 'post', 0, 0) . '<br /><br />'; } }// END FUNC delete_image() /** * Moves an image to another image gallery. * * @author Eloi George <el...@NO...> * @param none * @return none * @access public */ function move_image () { if(isset($_POST['IMGLib_yes'])) { if (!isset($_POST['IMGLib_selected_gallery'])) return; $status = true; $from = $this->_library_path.$this->_current_view.'/'; $to = $this->_library_path.$_POST['IMGLib_selected_gallery'].'/'; foreach($_POST['IMGLib_selected_image'] as $f) /* If file copies OK, erase it */ if ($status && $status = PHPWS_File::fileCopy($from.$f, $to, $f, true, true)) { $status = @unlink($from.$f); } if ($status) { $str1 = $_SESSION['translate']->it('File Move Complete'); $str2 = 'has successfully been'; $this->_done = true; } else { $str1 = $_SESSION['translate']->it('ERROR'); $str2 = 'could not be'; } $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library').' - '. $str1 .'!'; $content = $_SESSION['translate']->it('The [var1] <b>"[var2]"</b> '.$str2.' [var3]' , $this->_image_type, implode('" & "', $_POST['IMGLib_selected_image']) , '<b>'.$_SESSION['translate']->it('moved').'</b>!') . '<br /><br />'; $GLOBALS[$this->_block]['content'] = $content .'<br /><br /><center>'. $this->gallery_button().'</center>'; } elseif(isset($_POST['IMGLib_no'])) { $this->view_gallery(); } else { $myform[0] = $this->post_class_vars() . PHPWS_Form::formHidden('IMGLib_op', 'move_image') . $this->post_array('IMGLib_selected_image', $_POST['IMGLib_selected_image']) . PHPWS_Form::formSelect('IMGLib_selected_gallery', $this->_galleries, $this->_galleries[$this->_current_view]) . PHPWS_Form::formSubmit($_SESSION['translate']->it('Move'), 'IMGLib_yes') . ' ' . PHPWS_Form::formSubmit($_SESSION['translate']->it('Cancel'), 'IMGLib_no'); $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library') .' - '. $_SESSION['translate']->it('Confirm Action').'!'; $GLOBALS[$this->_block]['content'] = '<br /><br />' . $_SESSION['translate']->it('Where do you want to move "[var1]" to?' , implode('" & "', $_POST['IMGLib_selected_image'])) . '<br />' . PHPWS_Form::makeForm('IMGLib_confirm_move', 'index.php', $myform, 'post', 0, 0) . '<br /><br />'; } }// END FUNC move_image() /** * Prepares class variables to be passed via $_POST. * * @author Eloi George <el...@NO...> * @param none * @return string HTML for all class variables to be POSTed * @access private */ function post_class_vars () { return PHPWS_Form::formHidden('module', $this->_module) . PHPWS_Form::formHidden('IMGLib_can_select_images', $this->_can_select_images) . PHPWS_Form::formHidden('IMGLib_return_data', $this->_return_data) . PHPWS_Form::formHidden('IMGLib_current_image', $this->_current_image) . PHPWS_Form::formHidden('IMGLib_current_gallery', $this->_current_gallery) . PHPWS_Form::formHidden('PAGER_limit', $this->_pager_limit) . PHPWS_Form::formHidden('IMGLib_selected_view', $this->_current_view); }// END FUNC post_class_vars() /** * Prepares an array to be passed via $_POST. * * @author Eloi George <el...@NO...> * @param string $name Name to give POSTed variable * @param array Array of variables to post * @return string HTML for hidden array to be POSTed * @access private */ function post_array ($name, $array) { if (!is_array($array)) return; foreach($array as $key=>$value) $p .= PHPWS_Form::formHidden($name.'['.$key.']', $value); return $p; }// END FUNC post_class_vars() /** * Returns a form with a "View Gallery" button and class variables. * * @author Eloi George <el...@NO...> * @param string $label Button label text * @param string $action Operation to perform * @param string $in_form Whether this is included in a larger form * @return HTML for a centered button * @access private */ function gallery_button ($label=null, $action=null, $in_form=false) { if (!$label) $label = $_SESSION['translate']->it('View Gallery'); if (!$action) $action = 'view_gallery'; $myform[0] = $this->post_class_vars() . PHPWS_Form::formHidden('IMGLib_op', $action) . PHPWS_Form::formSubmit($label, 'IMGLib_btn'); if ($in_form) return $myform[0]; else return PHPWS_Form::makeForm('IMGLib_button', 'index.php', $myform, 'post', 0, 0); }// END FUNC gallery_button() /** * Creates all files needed for a module's image library. * * @author Eloi George <el...@NO...> * @param None. * @return bool Success or Failiure. * @access private */ function create_library () { /* Create the main library directory */ $the_path = substr($this->_library_path, 0, -1); if(!is_dir($the_path)) { $a=''; foreach(explode('/',$the_path) AS $k) { $a.=$k.'/'; if(!is_dir($a)) { mkdir($a); chmod($a, 0755); } } } if(!is_dir($the_path)) return false; else /* If the settings file & general gallery are successfully created.. */ if ($this->_created = $this->update_settings('.General Images')) { /* Copy any extraneous files that may be in the base directory to the general gallery */ if ($filelist = PHPWS_File::readDirectory($this->_library_path,false,true)) { foreach($filelist as $f) { if ($f != 'config.php' && PHPWS_File::fileCopy($this->_library_path.$f, $this->_library_path.$this->_created.'/', $f, true, true)) @unlink($this->_library_path.$f); } } return true; } }// END FUNC post_class_vars() }//END CLASS: PHPWS_IMGLib ?> |
From: Wendall C. <wen...@us...> - 2005-03-22 18:25:17
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5208/class Modified Files: Message.php Thread.php Log Message: monitor fixes Index: Thread.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Thread.php,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** Thread.php 22 Mar 2005 00:30:58 -0000 1.75 --- Thread.php 22 Mar 2005 18:24:48 -0000 1.76 *************** *** 304,307 **** --- 304,308 ---- function updateThread($new = FALSE, $suppress_sets = FALSE) { if (!empty($this->_id)) { + $new = TRUE; $sql = 'SELECT id FROM ' . $GLOBALS['core']->tbl_prefix . 'mod_phpwsbb_messages WHERE tid=' . $this->getId() . ' ORDER BY created;'; $this->messages = $GLOBALS['core']->getCol($sql); *************** *** 370,374 **** } $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; ! $subject = $_SESSION['translate']->it('Reply to "[var1]"', $this->getLabel()); $message = $_SESSION['PHPWSBB_Manager']->_email_text; // Replace [name] and [url] in $message --- 371,375 ---- } $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; ! $subject = $_SESSION['translate']->it('Reply to "[var1]"', $this->getLabel(0)); $message = $_SESSION['PHPWSBB_Manager']->_email_text; // Replace [name] and [url] in $message Index: Message.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** Message.php 21 Mar 2005 21:29:26 -0000 1.80 --- Message.php 22 Mar 2005 18:24:46 -0000 1.81 *************** *** 468,472 **** $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; ! $subject = $_SESSION['translate']->it('Bulletin Board Post: "[var1]"', PHPWS_Text::parseOutput($this->getLabel())); $message = $_SESSION['PHPWSBB_Manager']->_email_text; // Replace [name] and [url] in $message --- 468,472 ---- $from = '"' . $_SESSION['translate']->it('Bulletin Board Admin') . '" <'.$admin_email.'>'; ! $subject = $_SESSION['translate']->it('Bulletin Board Post: "[var1]"', PHPWS_Text::parseOutput($this->getLabel(0))); $message = $_SESSION['PHPWSBB_Manager']->_email_text; // Replace [name] and [url] in $message |