Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_modules / articles [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
27 Aug 2002 21:32:59postnuke_modules/articlespnadmin.php,1.30,1.31 pnadminapi.php,1.12,1.13 pninit.php,1.23,1.24 pnuser.php,1.49,1.50 pnuserapi.php,1.39,1.40Mike
 stop asking "what do you want" and do something

Update of /home/cvsroot/postnuke_modules/articles
In directory ns7.hostnuke.net:/tmp/cvs-serv24581

Modified Files:
	pnadmin.php pnadminapi.php pninit.php pnuser.php pnuserapi.php 
Log Message:
stop asking "what do you want" and do something


Index: pnadmin.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/articles/pnadmin.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** pnadmin.php	16 Aug 2002 15:52:08 -0000	1.30
--- pnadmin.php	27 Aug 2002 21:32:57 -0000	1.31
***************
*** 30,35 ****
  {
      // Security check : the user must at least be able to edit an item or class
!     if (!pnSecAuthAction(0, 'articles::classification', '::', ACCESS_EDIT) ||
!         !pnSecAuthAction(0, 'articles::item', '::', ACCESS_EDIT)) {
          $msg = pnML('Not authorized to access #(1) module administration',
                      'Articles');
--- 30,34 ----
  {
      // Security check : the user must at least be able to edit an item or class
!     if (!pnSecAuthAction(0, 'articles::', '::', ACCESS_EDIT)) {
[...1016 lines suppressed...]
-     // Menu options
-     $menu['new'] = pnML('New Article');
-     $menu['view'] = pnML('View Articles');
-     $menu['modifyconfig'] = pnML('Articles Configuration');
-     $menu['pubtypes'] = pnML('Publication Types');
- 
-     return $menu;
- }
- 
- /*
-  * category functions below
-  * We just use the standard category functions so just
-  * defer directly to them
-  */
  
- // Not used for now...
- /*
  function articles_admin_newcat()
  {
--- 1553,1557 ----

Index: pnadminapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/articles/pnadminapi.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** pnadminapi.php	10 Aug 2002 13:05:02 -0000	1.12
--- pnadminapi.php	27 Aug 2002 21:32:57 -0000	1.13
***************
*** 28,32 ****
   * @param $args['title'] name of the item (this is the only mandatory argument)
   * @param $args['summary'] summary for this item
-  * @param $args['bodytype'] type of input for this item ('text' or 'file')
   * @param $args['bodytext'] direct input text for this item
   * @param $args['bodyfile'] file input text for this item
--- 28,31 ----
***************
*** 126,134 ****
      }
  
-     // Default body type is text (as opposed to file upload)
-     if (empty($bodytype) || !is_string($bodytype)) {
-         $bodytype = 'text';
-     }
- 
      // Default body text is empty
      if (empty($bodytext) || !is_string($bodytext)) {
--- 125,128 ----
***************
*** 137,142 ****
  
      // Get relevant text
!     if ($bodytype == 'file' && !empty($bodyfile)) {
!         $body = join('', @file($bodyfile));
      } else {
          $body = $bodytext;
--- 131,145 ----
  
      // Get relevant text
!     if (!empty($bodyfile)) {
! // FIXME : pnVarCleanFromInput() with magic_quotes_gpc On clashes with
! //         the tmp_name assigned by PHP on Windows !!!
!         global $HTTP_POST_FILES;
!         $bodyfile = $HTTP_POST_FILES['bodyfile'];
!         // is_uploaded_file() : PHP 4 >= 4.0.3
!         if (is_uploaded_file($bodyfile['tmp_name']) && $bodyfile['size'] < 1000000) {
!             $body = join('', @file($bodyfile['tmp_name']));
!         } else {
!             $body = $bodytext;
!         }
      } else {
          $body = $bodytext;
***************
*** 310,314 ****
   * @param $args['title'] name of the item (mandatory argument)
   * @param $args['summary'] summary of the item
-  * @param $args['bodytype'] type of input for this item
   * @param $args['bodytext'] direct input text for this item
   * @param $args['bodyfile'] file input text for this item
--- 313,316 ----
***************
*** 378,384 ****
      }
  
!     if (isset($bodytype) && $bodytype == 'file' && !empty($bodyfile)) {
!         $body = join('', @file($bodyfile));
!         $sql .= ", pn_body = '" . pnVarPrepForStore($body) . "'";
      } elseif (isset($bodytext)) {
          $body = $bodytext;
--- 380,393 ----
      }
  
!     if (!empty($bodyfile) && is_array($bodyfile) && !empty($bodyfile['size'])) {
! // FIXME : pnVarCleanFromInput() with magic_quotes_gpc On clashes with
! //         the tmp_name assigned by PHP on Windows !!!
!         global $HTTP_POST_FILES;
!         $bodyfile = $HTTP_POST_FILES['bodyfile'];
!         // is_uploaded_file() : PHP 4 >= 4.0.3
!         if (is_uploaded_file($bodyfile['tmp_name']) && $bodyfile['size'] < 1000000) {
!             $body = join('', @file($bodyfile['tmp_name']));
!             $sql .= ", pn_body = '" . pnVarPrepForStore($body) . "'";
!         }
      } elseif (isset($bodytext)) {
          $body = $bodytext;
***************
*** 411,415 ****
          $sql .= ", pn_language = '" . pnVarPrepForStore($language) . "'";
      }
- 
      $sql .= " WHERE pn_aid = " . pnVarPrepForStore($aid);
      $dbconn->Execute($sql);
--- 420,423 ----

Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/articles/pninit.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pninit.php	16 Aug 2002 15:52:08 -0000	1.23
--- pninit.php	27 Aug 2002 21:32:57 -0000	1.24
***************
*** 107,155 ****
      }
  
! // TODO: for .81+, refine according to RFC 1
  
      // Configuration of the different publication types
!     // An empty field means it's (currently) not used for that type
      $config['news'] = array(
!         'title' => pnML('Title'),
!         'summary' => pnML('Introduction'),
!         'authorid' => pnML('Author'),
!         'pubdate' => pnML('Publication Date'),
!         'notes' => pnML('Notes'),
!         'bodytext' => pnML('Body Text'),
!         'bodyfile' => '',
!         'status' => pnML('Status')
      );
      $config['sections'] = array(
!         'title' => pnML('Subject'),
!         'summary' => '',
!         'authorid' => '',
!         'pubdate' => '',
!         'notes' => '',
!         'bodytext' => pnML('Content Text'),
!         'bodyfile' => pnML('Content File Upload'),
!         'status' => ''
      );
  // TODO: adapt/evaluate for reviews
      $config['reviews'] = array(
!         'title' => pnML('Title'),
!         'summary' => pnML('Summary'),
!         'authorid' => pnML('Author'),
!         'pubdate' => pnML('Publication Date'),
!         'notes' => pnML('Notes'),
!         'bodytext' => pnML('Body Text'),
!         'bodyfile' => pnML('Body File Upload'),
!         'status' => pnML('Status')
      );
      $config['faqs'] = array(
!         'title' => pnML('Question'),
!         'summary' => pnML('Details'),
!         'authorid' => '',
!         'pubdate' => '',
!         'notes' => pnML('Submitted by'),
!         'bodytext' => pnML('Answer'),
!         'bodyfile' => '',
!         'status' => ''
      );
      // The list of currently supported publication types
      $values = array(
--- 107,274 ----
      }
  
! // TODO: for .81+, add dynamic fields + refine according to RFC 1
  
      // Configuration of the different publication types
!     // An empty label means it's (currently) not used for that type
! 
      $config['news'] = array(
!         'title' => array('label'  => pnML('Title'),
!                          'format' => 'textbox',
!                          'input'  => 1),
!         'summary' => array('label'  => pnML('Introduction'),
!                          'format' => 'textarea_medium',
!                          'input'  => 1),
!         'authorid' => array('label'  => pnML('Author'),
!                          'format' => 'username',
!                          'input'  => 0),
!         'pubdate' => array('label'  => pnML('Publication Date'),
!                          'format' => 'calendar',
!                          'input'  => 1),
!         'notes' => array('label'  => pnML('Notes'),
!                          'format' => 'textarea_small',
!                          'input'  => 0),
!         'bodytext' => array('label'  => pnML('Body Text'),
!                          'format' => 'textarea_large',
!                          'input'  => 1),
!         'bodyfile' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'status' => array('label'  => pnML('Status'),
!                          'format' => 'status',
!                          'input'  => 0),
      );
      $config['sections'] = array(
!         'title' => array('label'  => pnML('Subject'),
!                          'format' => 'textbox',
!                          'input'  => 1),
!         'summary' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'authorid' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'pubdate' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'notes' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'bodytext' => array('label'  => pnML('Content Text'),
!                          'format' => 'textarea_large',
!                          'input'  => 1),
!         'bodyfile' => array('label'  => pnML('Content File Upload'),
!                          'format' => 'fileupload',
!                          'input'  => 1),
!         'status' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
      );
  // TODO: adapt/evaluate for reviews
      $config['reviews'] = array(
!         'title' => array('label'  => pnML('Title'),
!                          'format' => 'textbox',
!                          'input'  => 1),
!         'summary' => array('label'  => pnML('Summary'),
!                          'format' => 'textarea_medium',
!                          'input'  => 1),
!         'authorid' => array('label'  => pnML('Author'),
!                          'format' => 'username',
!                          'input'  => 0),
!         'pubdate' => array('label'  => pnML('Publication Date'),
!                          'format' => 'calendar',
!                          'input'  => 0),
!         'notes' => array('label'  => pnML('Notes'),
!                          'format' => 'textarea_small',
!                          'input'  => 0),
!         'bodytext' => array('label'  => pnML('Body Text'),
!                          'format' => 'textarea_large',
!                          'input'  => 1),
!         'bodyfile' => array('label'  => pnML('Body File Upload'),
!                          'format' => 'fileupload',
!                          'input'  => 1),
!         'status' => array('label'  => pnML('Status'),
!                          'format' => 'status',
!                          'input'  => 0),
      );
      $config['faqs'] = array(
!         'title' => array('label'  => pnML('Question'),
!                          'format' => 'textbox',
!                          'input'  => 1),
!         'summary' => array('label'  => pnML('Details'),
!                          'format' => 'textarea_small',
!                          'input'  => 1),
!         'authorid' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'pubdate' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'notes' => array('label'  => pnML('Submitted by'),
!                          'format' => 'textbox',
!                          'input'  => 1),
!         'bodytext' => array('label'  => pnML('Answer'),
!                          'format' => 'textarea_large',
!                          'input'  => 0),
!         'bodyfile' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
!         'status' => array('label'  => '',
!                          'format' => 'static',
!                          'input'  => 0),
      );
+     $config['pictures'] = array(
+         'title' => array('label'  => pnML('Title'),
+                          'format' => 'textbox',
+                          'input'  => 1),
+         'summary' => array('label'  => pnML('Thumbnail'),
+                          'format' => 'image',
+                          'input'  => 1),
+         'authorid' => array('label'  => pnML('Author'),
+                          'format' => 'username',
+                          'input'  => 0),
+         'pubdate' => array('label'  => pnML('Publication Date'),
+                          'format' => 'calendar',
+                          'input'  => 0),
+         'notes' => array('label'  => pnML('Comments'),
+                          'format' => 'textarea_small',
+                          'input'  => 1),
+         'bodytext' => array('label'  => pnML('Picture'),
+                          'format' => 'image',
+                          'input'  => 1),
+         'bodyfile' => array('label'  => '',
+                          'format' => 'static',
+                          'input'  => 0),
+         'status' => array('label'  => '',
+                          'format' => 'static',
+                          'input'  => 0),
+     );
+ // TODO: add fields for editorials etc.
+     $config['weblinks'] = array(
+         'title' => array('label'  => pnML('Title'),
+                          'format' => 'textbox',
+                          'input'  => 1),
+         'summary' => array('label'  => pnML('Description'),
+                          'format' => 'textarea_small',
+                          'input'  => 1),
+         'authorid' => array('label'  => pnML('Submitter'),
+                          'format' => 'username',
+                          'input'  => 0),
+         'pubdate' => array('label'  => pnML('Submitted on'),
+                          'format' => 'calendar',
+                          'input'  => 0),
+         'notes' => array('label'  => pnML('Name <e-mail>'),
+                          'format' => 'static',
+                          'input'  => 0),
+         'bodytext' => array('label'  => pnML('Website'),
+                          'format' => 'url',
+                          'input'  => 1),
+         'bodyfile' => array('label'  => '',
+                          'format' => 'static',
+                          'input'  => 0),
+         'status' => array('label'  => pnML('Status'),
+                          'format' => 'status',
+                          'input'  => 0),
+     );
+ 
      // The list of currently supported publication types
      $values = array(
***************
*** 158,165 ****
                      array(2, 'sections', 'Section Documents',
                            serialize($config['sections'])),
!                     array(3, 'reviews', 'Reviews',
!                           serialize($config['reviews'])),
                      array(4, 'faqs', 'FAQs',
                            serialize($config['faqs'])),
                );
  
--- 277,288 ----
                      array(2, 'sections', 'Section Documents',
                            serialize($config['sections'])),
! //                    array(3, 'reviews', 'Reviews',
! //                          serialize($config['reviews'])),
                      array(4, 'faqs', 'FAQs',
                            serialize($config['faqs'])),
+                     array(5, 'pictures', 'Pictures',
+                           serialize($config['pictures'])),
+                     array(6, 'weblinks', 'Web Links',
+                           serialize($config['weblinks'])),
                );
  

Index: pnuser.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/articles/pnuser.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** pnuser.php	16 Aug 2002 15:52:08 -0000	1.49
--- pnuser.php	27 Aug 2002 21:32:57 -0000	1.50
***************
*** 54,57 ****
--- 54,58 ----
           $catid,
           $ptid,
+          $numcols,
           $authorid) = pnVarCleanFromInput('startnum',
                                            'cids',
***************
*** 59,62 ****
--- 60,64 ----
                                            'catid',
[...1193 lines suppressed...]
! //for ($i=0; $i < strlen($name[$cid2]); $i++) {
! //    $names .= substr($name[$cid2],$i,1) . '<br>';
! //}
! $showname = wordwrap($name[$cid2],9,'<br>',1);
              $dump .= '<td valign="top" align="middle"><a href="' . $link . '">' . $showname . '</a></td>';
          }
--- 1123,1127 ----
          foreach ($list as $cid2 => $val) {
              $link = pnModURL('articles','user','view',array('catid' => $cid2));
!             $showname = wordwrap($name[$cid2],9,'<br>',1);
              $dump .= '<td valign="top" align="middle"><a href="' . $link . '">' . $showname . '</a></td>';
          }
***************
*** 1025,1029 ****
          foreach ($list as $cid2 => $val) {
              if ($val > 0) {
- // TODO: support andcids as parameter :-)
                  $cids = array($cid1,$cid2);
                  sort($cids,SORT_NUMERIC);
--- 1134,1137 ----

Index: pnuserapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/articles/pnuserapi.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** pnuserapi.php	16 Aug 2002 15:52:08 -0000	1.39
--- pnuserapi.php	27 Aug 2002 21:32:57 -0000	1.40
***************
*** 399,662 ****
  
  /**
!  * get the name and description of all publication types
   * @returns array
!  * @return array(id => array('name' => name, 'descr' => descr)), or false on
!  *         failure
   */
! function articles_userapi_getpubtypes()
  {
!     static $pubtypes = array();
[...1130 lines suppressed...]
*** 1199,1206 ****
      $args = array();
  
      // Check if we're dealing with an alias here
!     if ($params[0] != 'articles') {
          $alias = pnModGetAlias($params[0]);
!         if ($alias == 'articles') {
              // yup, looks like it
              $pubtypes = pnModAPIFunc('articles','user','getpubtypes');
--- 1524,1533 ----
      $args = array();
  
+     $module = 'articles';
+ 
      // Check if we're dealing with an alias here
!     if ($params[0] != $module) {
          $alias = pnModGetAlias($params[0]);
!         if ($alias == $module) {
              // yup, looks like it
              $pubtypes = pnModAPIFunc('articles','user','getpubtypes');


Directory filter : [ all ] / postnuke_modules / articles [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3