BitKeeper patch
Ashley Jones <ajones-tp0iMJ/[email protected]> Mon, 22 Nov 2004 11:52:00 -0800
| Newsgroups | gmane.comp.cms.xaraya.patches |
|---|---|
| Message-ID | <[email protected]> |
This BitKeeper patch contains the following changesets: ajones-V/[email protected]|ChangeSet|20041122194004|11895 ajones-V/[email protected]|ChangeSet|20041122193856|38177 # ID: [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b # User: ajones # Host: schwabfoundation.org # Root: /home/ajones/vanilla-module # Patch vers: 1.3 # Patch type: REGULAR == ChangeSet == [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b [email protected]|ChangeSet|20041122190342|34824 D 1.1420 04/11/22 11:38:56-08:00 ajones-V/[email protected] +15 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 38177 P ChangeSet ------------------------------------------------ 0a0 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/updatestory.php|20040519165034|31970|94bfd8a6d57ed857 ajones-V/[email protected]|newsletter/xaradmin/updatestory.php|20041122193850|34328 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xarinit.php|20040519165036|29934|c1652f51dfed7296 ajones-V/[email protected]|newsletter/xarinit.php|20041122193850|34879 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-viewstory.xd|20040519165038|50464|7a4994e6a394d49 ajones-V/[email protected]|newsletter/xartemplates/admin-viewstory.xd|20041122193850|28353 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/createstory.php|20040519165033|00089|7a86107cd4e31738 ajones-V/[email protected]|newsletter/xaradmin/createstory.php|20041122193850|19303 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/get.php|20040519165039|49187|691263ba9b138e05 ajones-V/[email protected]|newsletter/xaruserapi/get.php|20041122193850|61480 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/getissuestories.php|20040519165039|03940|5355d36cdd7d0288 ajones-V/[email protected]|newsletter/xaruserapi/getissuestories.php|20041122193850|01515 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/newstory.php|20040519165034|48708|4bc0d1dceb026125 ajones-V/[email protected]|newsletter/xaradmin/newstory.php|20041122193850|20859 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-newstory.xd|20040519165038|16976|66bda4697cf48c84 ajones-V/[email protected]|newsletter/xartemplates/admin-newstory.xd|20041122193850|55485 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/viewstory.php|20040519165035|18911|a1b5634172ae6622 ajones-V/[email protected]|newsletter/xaradmin/viewstory.php|20041122193850|32394 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradminapi/updatestory.php|20040519165036|01271|5e90d6dab048e1d3 ajones-V/[email protected]|newsletter/xaradminapi/updatestory.php|20041122193850|07147 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradminapi/createstory.php|20040519165035|52590|4bd1658447799c05 ajones-V/[email protected]|newsletter/xaradminapi/createstory.php|20041122193850|39421 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/getstory.php|20040519165039|32146|fa88bc7e55d4458b ajones-V/[email protected]|newsletter/xaruserapi/getstory.php|20041122193850|31499 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/modifystory.php|20040519165034|28149|94c5eea30212ee7 ajones-V/[email protected]|newsletter/xaradmin/modifystory.php|20041122193850|54566 > caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-modifystory.xd|20040519165037|28838|b88665742db79811 ajones-V/[email protected]|newsletter/xartemplates/admin-modifystory.xd|20041122193850|62688 > [email protected]|BitKeeper/etc/logging_ok|20020928141157|31740|a891b4fe9b65f332 ajones-V/[email protected]|BitKeeper/etc/logging_ok|20041122193856|03526 ajones-V/[email protected]|ChangeSet|20041122193856|38177 D 1.1421 04/11/22 11:40:04-08:00 ajones-V/[email protected] +2 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c added two files to help choose an article to use in place of a story in newsletter K 11895 P ChangeSet ------------------------------------------------ 0a0 > ajones-V/[email protected]|newsletter/xartemplates/admin-choosearticle.xd|20041122194003|49948|bc1ab830266ae130 ajones-V/[email protected]|newsletter/xartemplates/admin-choosearticle.xd|20041122194004|47460 > ajones-V/[email protected]|newsletter/xaradmin/choosearticle.php|20041122194003|45641|b3c3a2c0fd44832c ajones-V/[email protected]|newsletter/xaradmin/choosearticle.php|20041122194004|24714 == newsletter/xaradmin/choosearticle.php == New file: newsletter/xaradmin/choosearticle.php f e 4 V 4 ajones-V/[email protected]|newsletter/xaradmin/choosearticle.php|20041122194003|45641|b3c3a2c0fd44832c D 1.0 04/11/22 11:40:03-08:00 ajones-V/[email protected] +0 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b c BitKeeper file /home/ajones/vanilla-module/newsletter/xaradmin/choosearticle.php K 45641 P newsletter/xaradmin/choosearticle.php R b3c3a2c0fd44832c X 0x821 ------------------------------------------------ ajones-V/[email protected]|newsletter/xaradmin/choosearticle.php|20041122194003|45641|b3c3a2c0fd44832c D 1.1 04/11/22 11:40:03-08:00 ajones-V/[email protected] +161 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C F 1 K 24714 O -rw-rw-r-- P newsletter/xaradmin/choosearticle.php ------------------------------------------------ I0 161 <?php /* * File: $Id: $ * * Newsletter * * @package Xaraya eXtensible Management System * @copyright (C) 2003-2004 by the Xaraya Development Team * @link http://www.xaraya.com * * @subpackage newsletter module * @author Richard Cave <[email protected]> */ \ \ /** * Add a new Newsletter story * * @public * @author Richard Cave * @param 'publicationId' the publication id of the story (0 = no publication) * @returns array * @return $data */ function newsletter_admin_choosearticle() { // Security check // if(!xarSecurityCheck('AddNewsletter')) return; \ \ xarVarFetch('publicationId', 'int:0:', $data['publicationId'], NULL, XARVAR_NOT_REQUIRED); xarVarFetch('issueId', 'int:0:', $data['issueId'], NULL, XARVAR_NOT_REQUIRED); \ // get input parameters. These allow the user // to use an article in place of a story. The first three (pubtypeid, catfilter, status) reduce // the number of articles shown to the user to choose from. ie article must be of this pubtype, // in this category and of this status. // we may not have gotten the article vars from the form, they may need to be pulled from the // database. the previous xarModAPIFunc('newsletter','user','getstory',) call has what we need. Do this // in the fourth xarVarFetch argument which will make the db value default if the form is empty. xarVarFetch('pubtypeid', 'int:0:', $vars['pubtypeid'], NULL, XARVAR_NOT_REQUIRED); xarVarFetch('catfilter', 'int:0:', $vars['catfilter'], NULL, XARVAR_NOT_REQUIRED); xarVarFetch('status', 'int:0:', $vars['status'], NULL, XARVAR_NOT_REQUIRED); xarVarFetch('articleid', 'int', $vars['articleid'], NULL, XARVAR_NOT_REQUIRED); xarVarFetch('id', 'id', $data['id'], NULL, XARVAR_NOT_REQUIRED); xarVarFetch('notNew', 'string', $data['notNew'], NULL, XARVAR_NOT_REQUIRED); \ \ $data['canUseArticles']=true; \ \ \ // set the defautls of the variables for the first time this page is run. // this scenario covers when there was nothing pulled from the // database and nothing pulled from the form if (empty($vars['pubtypeid'])) {$vars['pubtypeid'] = '0';} if (empty($vars['catfilter'])) {$vars['catfilter'] = '0';} if (empty($vars['status'])) {$vars['status'] = '0';} if (empty($vars['itemlimit'])) {$vars['itemlimit'] = 0;} if (empty($vars['toptype'])) {$vars['toptype'] = 'date';} if (empty($vars['articleid'])) {$vars['articleid'] = 0;} \ // choose which fields for each article we want to retrieve $vars['fields'] = array('aid', 'title'); \ // set status array to be vars sub status, and check if it's an array. $statusarray = $vars['status']; if (!is_array($vars['status'])) { $statusarray = array($vars['status']); // if it's set to 0, then they want all the articles, set the article filter status array to be // equal to both front page and approved IDs if ($vars['status']==0){ $statusarray=array(2,3); } } // set cids array to be vars sub catfilter, and check if it's an empty. $cidsarray = array(); if(!empty($vars['catfilter'])) { $cidsarray = array($vars['catfilter']); } \ // Create array based on modifications $article_args = array(); \ // Only include pubtype if a specific pubtype is selected if (!empty($vars['pubtypeid'])) { $article_args['ptid'] = $vars['pubtypeid']; } \ // If itemlimit is set to 0, then don't pass to getall if ($vars['itemlimit'] != 0 ) { $article_args['numitems'] = $vars['itemlimit']; } // Add the rest of the arguments into article_args so that wehn we call the modAPIFunc // below, we only get the articles the user wants $article_args['cids'] = $cidsarray; $article_args['enddate'] = time(); $article_args['status'] = $statusarray; $article_args['fields'] = $vars['fields']; $article_args['sort'] = $vars['toptype']; // get all the articles based on the users filter set (article_args) $vars['filtereditems'] = xarModAPIFunc( 'articles', 'user', 'getall', $article_args ); \ // Check for exceptions from our API call if (!isset($vars['filtereditems']) && xarCurrentErrorType() != XAR_NO_EXCEPTION) return; // throw back \ // Try to keep the additional headlines select list width less than 50 characters for ($idx = 0; $idx < count($vars['filtereditems']); $idx++) { if (strlen($vars['filtereditems'][$idx]['title']) > 50) { $vars['filtereditems'][$idx]['title'] = substr($vars['filtereditems'][$idx]['title'], 0, 47) . '...'; } } \ // get all the pubtypes, categories and status options so that we can have a drop // down for the user to choose from all the available articles filter options $vars['pubtypes'] = xarModAPIFunc('articles', 'user', 'getpubtypes'); $vars['categorylist'] = xarModAPIFunc('categories', 'user', 'getcat'); $vars['statusoptions'] = array( array('id' => '0', 'name' => xarML('All Published')), array('id' => '3', 'name' => xarML('Frontpage')), array('id' => '2', 'name' => xarML('Approved')) ); // push all the variables we've just set into the teplate by // populating the array $data['categorylist'] =$vars['categorylist']; $data['catfilter'] =$vars['catfilter']; $data['articleid'] =$vars['articleid']; $data['filtereditems'] =$vars['filtereditems']; $data['statusoptions'] =$vars['statusoptions']; $data['pubtypes'] = $vars['pubtypes']; $data['status'] =$vars['status']; $data['pubtypeid'] =$vars['pubtypeid']; \ \ \ // Generate a one-time authorisation code for this operation // $data['authid'] = xarSecGenAuthKey(); \ echo xarTplModule('newsletter','admin','choosearticle', $data,NULL); exit(); // Return the template variables defined in this function // return $data; } \ ?> == newsletter/xartemplates/admin-choosearticle.xd == New file: newsletter/xartemplates/admin-choosearticle.xd f e 4 V 4 ajones-V/[email protected]|newsletter/xartemplates/admin-choosearticle.xd|20041122194003|49948|bc1ab830266ae130 D 1.0 04/11/22 11:40:03-08:00 ajones-V/[email protected] +0 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b c BitKeeper file /home/ajones/vanilla-module/newsletter/xartemplates/admin-choosearticle.xd K 49948 P newsletter/xartemplates/admin-choosearticle.xd R bc1ab830266ae130 X 0x821 ------------------------------------------------ ajones-V/[email protected]|newsletter/xartemplates/admin-choosearticle.xd|20041122194003|49948|bc1ab830266ae130 D 1.1 04/11/22 11:40:03-08:00 ajones-V/[email protected] +129 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C F 1 K 47460 O -rw-rw-r-- P newsletter/xartemplates/admin-choosearticle.xd ------------------------------------------------ N0 129 <html> <head> \ </head> <body> <div class="xar-mod-head"> <!-- <span class="xar-mod-title">#$menutitle#</span> --> </div> <div class="xar-mod-body"><h2><xar:mlstring>Choose Article</xar:mlstring></h2><br /> <div style="text-align: left;margin: auto;"> <form action="#xarModURL('newsletter', 'admin', 'choosearticle')#" method="post" enctype="application/x-www-form-urlencoded" name="chooseArticleForm"> \ \ <input type="hidden" name="authid" id="authid" value="#$authid#" /> <input type="hidden" name="publicationId" id="publicationId" value="#$publicationId#" /> <input type="hidden" name="issueId" id="issueId" value="#$issueId#" /> <input type="hidden" name="id" id="id" value="#$id#" /> <input type="hidden" name="notNew" id="notNew" value="#$notNew#" /> \ \ <table border="0" cellpadding="5"> \ <xar:if condition="$canUseArticles"> <tr bgcolor="#DDDDDD"> <td valign="bottom"> <xar:mlstring>Publication Type</xar:mlstring> </td> <td> Selecting an article to be used in place of this story's title and content. If you enter a title or content below, the article's title or content will be over ridden by it.<br/> <select name="pubtypeid" id="pubtypeid" onChange="this.form.submit();"> <option value="0"><xar:mlstring>All</xar:mlstring></option> <xar:foreach in="$pubtypes" key="$pubid" value="$pubtype"> <xar:if condition="!empty($pubtypeid) and $pubtypeid eq $pubid"> <option value="#$pubid#" selected="selected">#$pubtype['descr']#</option> <xar:else /> <option value="#$pubid#">#$pubtype['descr']#</option> </xar:if> </xar:foreach> </select> </td> </tr> <tr bgcolor="#DDDDDD"> <td> <xar:mlstring>Category</xar:mlstring> </td> <td> <select name="catfilter" id="catfilter" onChange="this.form.submit();"> <option value="0"><xar:mlstring>All</xar:mlstring></option> <xar:foreach in="$categorylist" value="$catlistx"> <xar:if condition="!empty($catfilter) and $catfilter eq $catlistx['cid']"> <option value="#$catlistx['cid']#" selected="selected">#$catlistx['name']#</option> <xar:else /> <option value="#$catlistx['cid']#">#$catlistx['name']#</option> </xar:if> </xar:foreach> </select> </td> </tr> <tr bgcolor="#DDDDDD"> <td> <xar:mlstring>Status</xar:mlstring> </td> <td> <select name="status" id="status'" size="1" onChange="this.form.submit();"> <xar:foreach in="$statusoptions" value="$statusoption"> <xar:if condition="!empty($status) and $status eq $statusoption['id']"> <option value="#$statusoption['id']#" selected="selected">#$statusoption['name']#</option> <xar:else /> <option value="#$statusoption['id']#">#$statusoption['name']#</option> </xar:if> </xar:foreach> </select> </td> </tr> <tr bgcolor="#DDDDDD"> <td> <xar:mlstring>Featured Article</xar:mlstring> </td> <td> <select name="articleid" id="articleid" size="1"> <xar:set name="$noarticleSelected">$noarticleSelected="";</xar:set> <xar:if condition="$articleid eq 0"> <xar:set name="$noarticleSelected">$noarticleSelected="selected=\"selected\"";</xar:set> </xar:if> <xar:foreach in="$filtereditems" value="$filtereditem"> <xar:if condition="$articleid eq $filtereditem['aid']"> <option value="#$filtereditem['aid']#" selected="selected">#$filtereditem['title']#</option> <xar:else /> <option value="#$filtereditem['aid']#">#$filtereditem['title']#</option> </xar:if> </xar:foreach> </select> </td> </tr> </xar:if> <tr> <td colspan="2" align="center"> <br /><br /> <!-- <a HREF="javascript:void(0);" onClick="window.opener.location.href = '#xarModURL('newsletter', 'admin', 'newstory')#'+ '&articleid='+document.chooseArticleForm.articleid.value;self.close();">test</A> --> <xar:if condition="!empty($notNew)"> <a HREF="javascript:void(0);" onClick="window.opener.location.href = '#xarModURL('newsletter', 'admin', 'modifystory')#'+'&id=#$id#&articleid='+document.chooseArticleForm.articleid.value;self.close();">Use Selected</A> <xar:else/> <a HREF="javascript:void(0);" onClick="window.opener.location.href = '#xarModURL('newsletter', 'admin', 'newstory')#'+'&publicationId=#$publicationId#&issueId=#$issueId#&articleid='+document.chooseArticleForm.articleid.value;self.close();">Use Selected</A> </xar:if> - <a HREF="javascript:void(0);" onClick="self.close();">Cancel</A> </td> </tr> </form> </table> </div> </div> </body> </html> == newsletter/xaradmin/createstory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/createstory.php|20040519165033|00089|7a86107cd4e31738 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/createstory.php|20041028185822|33567 D 1.7 04/11/22 11:38:50-08:00 ajones-V/[email protected] +31 -17 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 19303 O -rw-rw-r-- P newsletter/xaradmin/createstory.php ------------------------------------------------ I38 1 * @param 'articleid' articleid to use with story I43 2 \ D47 3 I49 1 $formErrorMsg['owner'] .= xarML('You must select an owner name.'); I54 4 if (!xarVarFetch('source', 'str:1:', $source, '')) return; xarVarFetch('articleid', 'int:0', $articleid, 0); xarVarFetch('title', 'str', $title); xarVarFetch('content', 'str', $content); D56 1 I56 1 if (empty($title) && ($articleid==0)) { D58 3 I60 4 $formErrorMsg['title'] = xarML('You must enter a title for the story'); if (xarModIsAvailable('articles')){ $formErrorMsg['title'] .= xarML(' or select an article to use.'); } D63 2 I64 1 if (empty($content) && ($articleid==0)) { D66 3 I68 4 $formErrorMsg['content'] = xarML('You must provide content for the story '); if (xarModIsAvailable('articles')){ $formErrorMsg['content'] .= xarML('or select an article to use.'); } D83 1 I83 1 if (!xarVarFetch('submitValue', 'str:1:', $submitbutton, '')) return; D89 3 I91 1 $formErrorMsg['comment'] = xarML('You must enter a commentary source for the commentary.'); I93 9 // see if an error was found above. if so, put it in the data array and send them back to the form if (!empty($formErrorMsg)){ $_sendBackData = array_merge(array('formErrorMsg'=>$formErrorMsg),$_REQUEST); // go back to create story // return xarModFunc('newsletter','admin','newstory',array('formErrorMsg'=>$formErrorMsg,'content'=>$content)); \ return xarModFunc('newsletter','admin','newstory',$_sendBackData); } D155 1 I155 2 'tstmpDatePublished' => $tstmpDatePublished, 'articleid' => $articleid)); == newsletter/xaradmin/modifystory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/modifystory.php|20040519165034|28149|94c5eea30212ee7 [email protected]|newsletter/xaradmin/modifystory.php|20040706225429|29115 D 1.4 04/11/22 11:38:50-08:00 ajones-V/[email protected] +102 -21 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 54566 O -rw-rw-r-- P newsletter/xaradmin/modifystory.php ------------------------------------------------ I22 1 * @param 'articleid' id of an article used in place of a story D26 1 I26 1 function newsletter_admin_modifystory($args=array()) I27 11 // set a default value for form error messages // this will get overwritten w/ the extract call if formErrorMsg was passed in args $formErrorMsg=array(); $story=array(); // get the arguments passed to us extract($args); D30 1 I30 1 I33 30 if (empty($story)){ // call the user API function to retrieve all the content // for the story with the matching id ($id) $story = xarModAPIFunc('newsletter', 'user', 'getstory', array('id' => $id)); } else{ // call the user API function to retrieve all the content // for the story with the matching id ($id) $_storyDB = xarModAPIFunc('newsletter', 'user', 'getstory', array('id' => $id)); // put the story we just got in the form into the proper story format // set the data from the form over the db pull $_storyDB['articleid']=$story['articleid']; $_storyDB['title']=$story['title']; $_storyDB['source']=$story['source']; $_storyDB['altDate']=$story['altDate']; $_storyDB['content']=$story['content']; $_storyDB['fullTextLink']=$story['fullTextLink']; $_storyDB['commentary']=$story['commentary']; $_storyDB['commentarySource']=$story['commentarySource']; // now make them the same for all the shared code below $story = $_storyDB; D35 10 I44 27 } // set what we'll return to be an array and populate it depending on // if we use articles or stories $templateVarArray = array(); // default is to not use articles $templateVarArray['canUseArticles']=false; // only do this step if they have the articles module loaded up if (xarModIsAvailable('articles')){ // get input parameters. These allow the user // to use an article in place of a story. The first three (pubtypeid, catfilter, status) reduce // the number of articles shown to the user to choose from. ie article must be of this pubtype, // in this category and of this status. // we may not have gotten the article vars from the form, they may need to be pulled from the // database. the previous xarModAPIFunc('newsletter','user','getstory',) call has what we need. Do this // in the fourth xarVarFetch argument which will make the db value default if the form is empty. xarVarFetch('articleid', 'int:0:', $vars['articleid'], $story['articleid'], XARVAR_NOT_REQUIRED); $templateVarArray['canUseArticles']=true; } // get an array of all the publication from the database. we'll to put in the drop down // to choose a publication for the story to use. D51 1 I51 1 // Check for exceptions from the xarMadAPIFunc call I53 6 // Check for exceptions if (!isset($story) && xarCurrentErrorType() != XAR_NO_EXCEPTION) return; // throw back \ D83 1 I83 1 $storyCategory = xarM0dAPIFunc('categories', D183 7 I189 23 \ if (isset($vars['articleid']) && $vars['articleid']!=0){ $templateVarArray['articleid']=$vars['articleid']; // get all the articles based on the users filter set (article_args) $_articlearray = xarModAPIFunc( 'articles', 'user', 'get', array("aid"=>$templateVarArray['articleid'] )); // truncate the article title and put it back $templateVarArray['articletitle']=substr($_articlearray['title'],0,50); } \ // if we were passed an auth id from updatestory, use it instead $templateVarArray['authid'] = xarSecGenAuthKey(); if (!empty($authid)){ $templateVarArray['authid']= $authid; } \ // Set template array with all story based info $templateVarArray['updatebutton'] = xarVarPrepForDisplay(xarML('Update Story')); $templateVarArray['menu'] = $menu; $templateVarArray['hooks'] = $hooks; $templateVarArray['story'] = $story; $templateVarArray['formErrorMsg'] = $formErrorMsg; == newsletter/xaradmin/newstory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/newstory.php|20040519165034|48708|4bc0d1dceb026125 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/newstory.php|20041028184656|06808 D 1.5 04/11/22 11:38:50-08:00 ajones-V/[email protected] +49 -2 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 20859 O -rw-rw-r-- P newsletter/xaradmin/newstory.php ------------------------------------------------ D25 1 I25 1 function newsletter_admin_newstory($args) I26 8 // set a default value for form error messages // this will get overwritten w/ the extract call if formErrorMsg was passed in args $formErrorMsg=array(); // get the arguments passed to us //extract($args); \ D30 1 I30 1 // Get input parameters as defaults for new story I34 9 if (!xarVarFetch('articleid', 'int:0:', $articleid, NULL,XARVAR_NOT_REQUIRED)) return; // get input if they have an error and need the form repopulated if (!xarVarFetch('content', 'str:0:', $content, NULL,XARVAR_NOT_REQUIRED)) return; if (!xarVarFetch('altDate', 'str:0:', $altDate, NULL,XARVAR_NOT_REQUIRED)) return; // see if there was an error and they're passing back some vars //xarVarFetch('content', 'str:0:', $data['content'], NULL,XARVAR_NOT_REQUIRED); I38 12 // see if we had anything passed to us if (!empty($args) && is_array($args)){ // loop through all the args passed and put them in a form accessible array while (list($key, $val) = each($args)) { // get it the traditional xar way xarVarFetch($key, 'str:0:', $value, NULL,XARVAR_NOT_REQUIRED); // put it in the form array $data[$key]=$val; } } I52 18 } \ // default is to not use articles $data['canUseArticles']=false; // only do this step if they have the articles module loaded up if (xarModIsAvailable('articles')){ $data['canUseArticles']=true; if (isset($articleid) && $articleid!=0){ $data['articleid']=$articleid; // get all the articles based on the users filter set (article_args) $_articlearray = xarModAPIFunc( 'articles', 'user', 'get', array("aid"=>$data['articleid'] )); // truncate the article title and put it back $data['articletitle']=substr($_articlearray['title'],0,50); } == newsletter/xaradmin/updatestory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/updatestory.php|20040519165034|31970|94bfd8a6d57ed857 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/updatestory.php|20041028185822|36359 D 1.8 04/11/22 11:38:50-08:00 ajones-V/[email protected] +40 -24 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 34328 O -rw-rw-r-- P newsletter/xaradmin/updatestory.php ------------------------------------------------ I56 1 if (!xarVarFetch('articleid', 'int:0:', $articleid,0)) return; I57 2 // make sure they're the owner D60 3 I62 1 $formErrorMsg['owner'] .= xarML('You must select an owner name.'); I64 1 D66 18 I97 23 if (!xarVarFetch('categoryId', 'id', $categoryId, 0)) return; if (!xarVarFetch('source', 'str:1:', $source, '')) return; xarVarFetch('title', 'str:0:', $title,NULL); xarVarFetch('content', 'str:0:', $content,NULL); \ // they must enter a title, unless they have selected an article if (empty($title) && ($articleid==0)) { xarErrorFree(); $formErrorMsg['title'] = xarML('You must enter a title for the story'); if (xarModIsAvailable('articles')){ $formErrorMsg['title'] .= xarML(' or select an article to use.'); } } // they must enter content, unless they have selected an article if (empty($content) && ($articleid==0)) { xarErrorFree(); $formErrorMsg['content'] = xarML('You must provide content for the story '); if (xarModIsAvailable('articles')){ $formErrorMsg['content'] .= xarML('or select an article to use.'); } } \ \ D103 3 I105 1 $formErrorMsg['comment'] = xarML('You must enter a commentary source for the commentary.'); I107 10 // see if an error was found above. if so, put it in the data array and send them back to the form if (!empty($formErrorMsg)){ // get the auth id to pas back into the modify story xarVarFetch('authid', 'str:1:', $authid); $_sendBackData=array_merge(array('formErrorMsg'=>$formErrorMsg),array('story'=>$_REQUEST)); // go back to modify story return xarModFunc('newsletter','admin','modifystory',$_sendBackData); } I173 1 'articleid' => $articleid, == newsletter/xaradmin/viewstory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/viewstory.php|20040519165035|18911|a1b5634172ae6622 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradmin/viewstory.php|20040519174052|32384 D 1.3 04/11/22 11:38:50-08:00 ajones-V/[email protected] +1 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 32394 O -rw-rw-r-- P newsletter/xaradmin/viewstory.php ------------------------------------------------ I30 1 \ == newsletter/xaradminapi/createstory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradminapi/createstory.php|20040519165035|52590|4bd1658447799c05 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradminapi/createstory.php|20041029004840|30547 D 1.8 04/11/22 11:38:50-08:00 ajones-V/[email protected] +6 -3 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 39421 O -rw-rw-r-- P newsletter/xaradminapi/createstory.php ------------------------------------------------ I35 1 * @param $args['articleid'] article ID for the story D117 2 I118 3 xar_commentarysrc, xar_articleid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; D135 1 I135 2 (string) $commentarySource, (int) $articleid); == newsletter/xaradminapi/updatestory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradminapi/updatestory.php|20040519165036|01271|5e90d6dab048e1d3 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaradminapi/updatestory.php|20041028184657|61536 D 1.7 04/11/22 11:38:50-08:00 ajones-V/[email protected] +4 -1 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 7147 O -rw-rw-r-- P newsletter/xaradminapi/updatestory.php ------------------------------------------------ I36 1 * @param $args['articleid'] id of the article to use in place of the story D96 1 I96 2 xar_commentarysrc = ?, xar_articleid = ? I113 1 (int) $articleid, == newsletter/xarinit.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xarinit.php|20040519165036|29934|c1652f51dfed7296 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xarinit.php|20041120005809|28614 D 1.11 04/11/22 11:38:50-08:00 ajones-V/[email protected] +3 -2 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 34879 O -rw-rw-r-- P newsletter/xarinit.php ------------------------------------------------ D195 1 I195 1 'xar_linkexpiration' => array('type'=>'integer','null'=>FALSE,'default'=>'0'), D197 1 I197 2 'xar_commentarysrc' => array('type'=>'varchar','size'=>255,'null'=>TRUE), 'xar_articleid' => array('type'=>'integer','null'=>TRUE,'default'=>'0') == newsletter/xartemplates/admin-modifystory.xd == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-modifystory.xd|20040519165037|28838|b88665742db79811 [email protected]|newsletter/xartemplates/admin-modifystory.xd|20040706225429|22453 D 1.3 04/11/22 11:38:50-08:00 ajones-V/[email protected] +89 -42 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 62688 O -rw-rw-r-- P newsletter/xartemplates/admin-modifystory.xd ------------------------------------------------ I0 9 <SCRIPT language="JavaScript"> \ \ function newwindow(urlGoto,windowName,widthPassed,heightPassed) { window.open(urlGoto,windowName,'width='+widthPassed+',height='+heightPassed+',resizable=yes'); } \ </SCRIPT> I8 5 <xar:if condition="!empty($formErrorMsg)"> <br/><font color="Red">There is an a problem with your story. Please see details in red below.</font><br/> </xar:if> D16 1 I16 1 <option value="0">Choose Publication</option> I26 7 D31 6 I36 30 <input type="hidden" name="publicationId" id="publicationId" value="#$story['publicationId']#" /> <xar:if condition="$canUseArticles"> <tr > <td valign="top"> <xar:mlstring>Use Article</xar:mlstring>: </td> <td> <xar:if condition="isSet($articletitle)"> #$articletitle# <br> <a href="#xarModURL('newsletter', 'admin', 'modifystory')#&id=#$story['id']#&articleid=0" tabindex="2">None</a> - <a href="javascript:newwindow('#xarModURL('articles', 'user', 'display', array('aid' => $articleid))#?theme=print')" tabindex="3" >Preview</a> - <input type="hidden" name="articleid" id="articleid" value="#$articleid#" /> </xar:if> <a href="javascript:newwindow('#xarModURL('newsletter', 'admin', 'choosearticle')#&id=#$story['id']#¬New=true')" tabindex="4" >Choose</a> </td> </tr> </xar:if> <xar:if condition="!empty($hooks)"> <tr> <td colspan="2"> #$hooks# </td> </tr> </xar:if> D42 1 I42 1 <select name="ownerId" tabindex="5"> I50 3 <xar:if condition="!empty($formErrorMsg['owner'])"> <br/><font color="Red">#$formErrorMsg['owner']#</font><br/> </xar:if> D59 1 I59 1 <select name="categoryId" tabindex="6"> D74 1 I74 1 <td valign="top"> D78 1 I78 4 <input type="text" name="title" id="title" value="#xarVarPrepForDisplay($story['title'])#" size="50" maxlength="255" tabindex="7" /> <xar:if condition="!empty($formErrorMsg['title'])"> <br/><font color="Red">#$formErrorMsg['title']#</font><br/> </xar:if> D86 1 I86 1 <input type="text" name="source" id="source" value="#xarVarPrepForDisplay($story['source'])#" size="50" maxlength="255" tabindex="8" /> D94 1 I94 1 <input type="text" name="storyDateMon" id="storyDateMon" value="#$story['storyDate']['mon']#" size="2" maxlength="2" tabindex="9" /> D96 1 I96 1 <input type="text" name="storyDateDay" id="storyDateDay" value="#$story['storyDate']['day']#" size="2" maxlength="2" tabindex="10" /> D98 1 I98 1 <input type="text" name="storyDateYear" id="storyDateYear" value="#$story['storyDate']['year']#" size="4" maxlength="4" tabindex="11" /> D108 1 I108 1 <input type="text" name="altDate" id="altDate" value="#xarVarPrepForDisplay($story['altDate'])#" size="50" maxlength="255" tabindex="12" /> D116 1 I116 4 <textarea name="content" rows="15" cols="50" tabindex="12">#xarVarPrepForDisplay($story['content'])#</textarea> <xar:if condition="!empty($formErrorMsg['content'])"> <br/><font color="Red">#$formErrorMsg['content']#</font><br/> </xar:if> D124 1 I124 1 <input type="text" name="fullTextLink" id="fullTextLink" value="#xarVarPrepForDisplay($story['fullTextLink'])#" size="50" maxlength="255" tabindex="13" /> I126 1 D133 1 I133 1 <input type="checkbox" name="registerLink" value="1" checked tabindex="14" /> D135 1 I135 1 <input type="checkbox" name="registerLink" value="1" tabindex="15" /> D145 1 I145 1 <input type="text" name="linkExpiration" id="linkExpiration" value="#$story['linkExpiration']#" size="4" maxlength="4" tabindex="16" /> I148 2 D154 1 I154 1 <textarea name="commentary" rows="8" cols="50" tabindex="17">#xarVarPrepForDisplay($story['commentary'])#</textarea> D162 12 I173 3 <input type="text" name="commentarySource" id="commentarySource" size="50" maxlength="255" value="#xarVarPrepForDisplay($story['commentarySource'])#" tabindex="18" /> <xar:if condition="!empty($formErrorMsg['comment'])"> <br/><font color="Red">#$formErrorMsg['comment']#</font><br/> D175 3 I179 2 \ \ D186 1 I186 1 <input type="text" name="datePublishedMon" id="datePublishedMon" value="#$story['datePublished']['mon']#" size="2" maxlength="2" tabindex="19" /> D188 1 I188 1 <input type="text" name="datePublishedDay" id="datePublishedDay" value="#$story['datePublished']['day']#" size="2" maxlength="2" tabindex="20" /> D190 1 I190 1 <input type="text" name="datePublishedYear" id="datePublishedYear" value="#$story['datePublished']['year']#" size="4" maxlength="4" tabindex="21" /> D198 1 I198 1 <input type="submit" value="#$updatebutton#" tabindex="22" /> D204 1 I204 1 </div> == newsletter/xartemplates/admin-newstory.xd == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-newstory.xd|20040519165038|16976|66bda4697cf48c84 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-newstory.xd|20040519165039|09307 D 1.2 04/11/22 11:38:50-08:00 ajones-V/[email protected] +108 -22 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 55485 O -rw-rw-r-- P newsletter/xartemplates/admin-newstory.xd ------------------------------------------------ I0 11 \ <SCRIPT language="JavaScript"> \ \ function newwindow(urlGoto,windowName,widthPassed,heightPassed) { window.open(urlGoto,windowName,'width='+widthPassed+',height='+heightPassed+',resizable=yes'); } \ </SCRIPT> \ D6 1 I6 1 <form action="#xarModURL('newsletter', 'admin', 'createstory')#" method="post" enctype="application/x-www-form-urlencoded" name="newstoryForm"> D9 1 I9 5 <input type="hidden" name="issueId" id="issueId" value="#$issueId#" /> <xar:if condition="!empty($formErrorMsg)"> <font color="Red">There is an a problem with your story. Please see details in red below.</font><br/> </xar:if> I33 26 <xar:if condition="$canUseArticles"> <tr > <td valign="top"> <xar:mlstring>Use Article</xar:mlstring>: </td> <td> <xar:if condition="isSet($articletitle)"> #$articletitle# <br> <a href="#xarModURL('newsletter', 'admin', 'newstory')#&publicationId=#$publicationId#&issueId=#$issueId#&articleid=0" tabindex="2">None</a> - <A HREF="javascript:newwindow('#xarModURL('articles', 'user', 'display', array('aid' => $articleid))#?theme=print')" tabindex="3" >Preview</A> - <input type="hidden" name="articleid" id="articleid" value="#$articleid#" /> </xar:if> <!--<A HREF="javascript:newwindow('#xarModURL('newsletter', 'admin', 'choosearticle')#&publicationId=#$publicationId#&issueId=#$issueId#','Choose Article','600','400')" >Choose</A>--> <A HREF="javascript:newwindow('#xarModURL('newsletter', 'admin', 'choosearticle')#&publicationId=#$publicationId#&issueId=#$issueId#')" tabindex="4">Choose</A> </td> </tr> </xar:if> D39 1 I39 1 <select name="ownerId" tabindex="5"> I47 3 <xar:if condition="!empty($formErrorMsg['owner'])"> <br/><font color="Red">#$formErrorMsg['owner']#</font><br/> </xar:if> D56 1 I56 1 <select name="categoryId" tabindex="6"> D58 1 I58 5 <xar:if condition="!empty($categoryId) && $categoryId eq $loop:item['cid']"> <option name="cid" value="#$loop:item['cid']#" selected>#$loop:item['name']#</option> <xar:else/> <option name="cid" value="#$loop:item['cid']#">#$loop:item['name']#</option> </xar:if> D67 1 I67 1 <td valign="top" > D71 1 I71 10 \ <xar:if condition="!empty($title)"> <input type="text" name="title" id="title" value="#$title#" size="50" maxlength="255" tabindex="7" /> <xar:else/> <input type="text" name="title" id="title" value="" size="50" maxlength="255" tabindex="7" /> </xar:if> <xar:if condition="!empty($formErrorMsg['title'])"> <br/><font color="Red">#$formErrorMsg['title']#</font><br/> </xar:if> D79 1 I79 6 <xar:if condition="!empty($source)"> <input type="text" name="source" id="source" value="#$source#" size="50" maxlength="255" tabindex="8" /> <xar:else/> <input type="text" name="source" id="source" value="" size="50" maxlength="255" tabindex="8" /> </xar:if> D87 1 I87 1 <input type="text" name="storyDateMon" id="storyDateMon" value="#$storyDate['mon']#" size="2" maxlength="2" tabindex="9" /> D89 1 I89 1 <input type="text" name="storyDateDay" id="storyDateDay" value="#$storyDate['day']#" size="2" maxlength="2" tabindex="9" /> D91 1 I91 1 <input type="text" name="storyDateYear" id="storyDateYear" value="#$storyDate['year']#" size="4" maxlength="4" tabindex="10" /> D101 1 I101 6 <xar:if condition="!empty($altDate)"> <input type="text" name="altDate" id="altDate" value="#$altDate#" size="50" maxlength="255" tabindex="11" /> <xar:else/> <input type="text" name="altDate" id="altDate" value="" size="50" maxlength="255" tabindex="11" /> </xar:if> D109 1 I109 4 <textarea name="content" rows="15" cols="50" tabindex="12"><xar:if condition="!empty($content)">#$content# </xar:if></textarea> <xar:if condition="!empty($formErrorMsg['content'])"> <br/><font color="Red">#$formErrorMsg['content']#</font><br/> </xar:if> D117 1 I117 6 <xar:if condition="!empty($fullTextLink)"> <input type="text" name="fullTextLink" id="fullTextLink" value="#$fullTextLink#" size="50" maxlength="255" tabindex="13" /> <xar:else/> <input type="text" name="fullTextLink" id="fullTextLink" value="" size="50" maxlength="255" tabindex="13" /> </xar:if> D125 1 I125 1 <input type="checkbox" name="registerLink" value="1" tabindex="14" /> D135 1 I135 1 <input type="text" name="linkExpiration" id="linkExpiration" value="#$linkExpires#" size="4" maxlength="4" tabindex="15" /> D137 1 I137 1 <input type="text" name="linkExpiration" id="linkExpiration" size="4" maxlength="4" tabindex="15" /> D147 1 I147 4 <textarea name="commentary" rows="8" cols="50" tabindex="16"> <xar:if condition="!empty($commentary)">#$commentary#</xar:if> </textarea> D156 1 I156 1 <select name="commentarySource" tabindex="17"> D166 1 I166 9 \ <xar:if condition="!empty($fullTextLink)"> <input type="text" name="newCommentarySource" id="newCommentarySource" value="#$newCommentarySource#" size="50" maxlength="255" tabindex="18" /> <xar:else/> <input type="text" name="newCommentarySource" id="newCommentarySource" value="" size="50" maxlength="255" tabindex="18" /> </xar:if> <xar:if condition="!empty($formErrorMsg['comment'])"> <br/><font color="Red">#$formErrorMsg['comment']#</font><br/> </xar:if> D172 2 I173 2 <input type="submit" name="submitValue" value="#$nextlabel#" tabindex="18" /> <input type="submit" name="submitValue" value="#$addlabel#" tabindex="19" /> == newsletter/xartemplates/admin-viewstory.xd == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-viewstory.xd|20040519165038|50464|7a4994e6a394d49 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xartemplates/admin-viewstory.xd|20040519165039|11101 D 1.2 04/11/22 11:38:50-08:00 ajones-V/[email protected] +8 -1 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 28353 O -rw-rw-r-- P newsletter/xartemplates/admin-viewstory.xd ------------------------------------------------ D113 1 I113 8 <td> <xar:if condition="!empty($loop:item['article']['title']) && empty($loop:item['title'])"> #$loop:item['article']['title']# <xar:else/> #$loop:item['title']# </xar:if> </td> == newsletter/xaruserapi/get.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/get.php|20040519165039|49187|691263ba9b138e05 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/get.php|20041120005809|52836 D 1.11 04/11/22 11:38:50-08:00 ajones-V/[email protected] +6 -3 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 61480 O -rw-rw-r-- P newsletter/xaruserapi/get.php ------------------------------------------------ D194 1 I194 2 $storiesTable.xar_commentarysrc, $storiesTable.xar_articleid D268 1 I268 2 $commentarySource, $articleid) = $result->fields; D308 1 I308 2 'commentarySource' => $commentarySource, 'articleid'=>$articleid); == newsletter/xaruserapi/getissuestories.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/getissuestories.php|20040519165039|03940|5355d36cdd7d0288 caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/getissuestories.php|20041028184657|26771 D 1.4 04/11/22 11:38:50-08:00 ajones-V/[email protected] +25 -4 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 1515 O -rw-rw-r-- P newsletter/xaruserapi/getissuestories.php ------------------------------------------------ D98 1 I98 2 $storiesTable.xar_commentarysrc, $storiesTable.xar_articleid D168 1 I168 2 $commentarySource, $articleid) = $result->fields; I190 13 // no article title by $_article['title']=NULL; // if there is an article ID, get the article title if (!empty($articleid)){ $_article = current(xarModAPIFunc('articles','user','getAll', array('aids'=>array($articleid), 'extra'=>array('dynamicdata') ) )); \ } D207 2 I208 4 'commentarySource' => $commentarySource, 'articleid' => $articleid, 'article' => array("title"=>$_article['title'])); I209 4 } == newsletter/xaruserapi/getstory.php == caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/getstory.php|20040519165039|32146|fa88bc7e55d4458b caveman-bbP6X+ZHlj22nSIwn8tFp+x8cNe9sq/[email protected]|newsletter/xaruserapi/getstory.php|20041028184657|00990 D 1.5 04/11/22 11:38:50-08:00 ajones-V/[email protected] +38 -3 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c can now use articles as stories inside of newsletter K 31499 O -rw-rw-r-- P newsletter/xaruserapi/getstory.php ------------------------------------------------ D64 1 I64 2 xar_commentarysrc, xar_articleid D98 1 I98 2 $commentarySource, $articleid) = $result->fields; D155 1 I155 34 'commentarySource' => $commentarySource, 'articleid' => $articleid); \ // if we have an article ID, get the article if (!empty($story['articleid'])){ // retrieve the article $_article = current(xarModAPIFunc('articles','user','getAll', array('aids'=>array($story['articleid']), 'extra'=>array('dynamicdata') ) )); \ \ // put all the article info in an array w/ the story array $story['article']['title']=$_article['title']; $story['article']['body']=$_article['body']; $story['article']['summary']=$_article['summary']; \ // loop through and get all the images, if any // put them in vars the template can use if (!empty($_article['image_output'])){ while (list($_key, $_image) = each($_article['image_output'])) { $story['article']['imagesarray'][]=$_image; } } \ //xarDerefData("story",$_article,0); } //if (xarModIsAvailable('images')){ // $tag = xarModAPIFunc('images', 'user', 'resize', array('src' => "http://ajones01/~ajones/xarChsf/index.php/uploads/374.jpg",'width' => "400",'constrain' => "1",'label' => "test")); // die("tag: ".$tag); //} // == BitKeeper/etc/logging_ok == [email protected]|BitKeeper/etc/logging_ok|20020928141157|31740|a891b4fe9b65f332 [email protected]|BitKeeper/etc/logging_ok|20041101094033|65480 D 1.142 04/11/22 11:38:56-08:00 ajones-V/[email protected] +1 -0 B [email protected]|ChangeSet|20020928140945|52607|ce70d3e6fd7d585b C c Logging to [email protected] accepted K 3526 O -rw-rw-r-- P BitKeeper/etc/logging_ok ------------------------------------------------ I20 1 ajones-V/[email protected] # Patch checksum=52aa417c