Thank you asmecher, the second thing is what I need. Still have to learn.
If I could please you about one last thing. On the IssueToc I have as input in foreach the files of every article which is scheduled to this issue.
In basis, the order of the articles is sorted by the filename - e.g.
28-88-1-PB.pdf
29-89-1-PB.pdf
30-90-1-PB.pdf
ā¦
Iāve scored one case, where I upload testing documents ārightā way, first article1.pdf, second article2.pdf, third article3.pdf, etcā¦ But the order was changed like this: article3.pdf, article1.pdf, article2.pdf - thatās only an example. I donāt know, why itās happened, in other issues, that was ok.
But, main thing - In issueToc, there are possiblity to moveArticles and change order before publishing. Iām using modificated script (4th reply) to get files of these articles - but it doesnāt respect changed order. Thatās clear.
If I would like to get articles in right order, I need to use same function like in issueToc:
// get issue sections and articles
$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
$publishedArticles = $publishedArticleDao->getPublishedArticles($issueId);
$layoutEditorSubmissionDao =& DAORegistry::getDAO('LayoutEditorSubmissionDAO');
$proofedArticleIds = $layoutEditorSubmissionDao->getProofedArticlesByIssueId($issueId);
$templateMgr->assign('proofedArticleIds', $proofedArticleIds);
$currSection = 0;
$counter = 0;
$sections = array();
$sectionCount = 0;
$sectionDao =& DAORegistry::getDAO('SectionDAO');
foreach ($publishedArticles as $article) {
$sectionId = $article->getSectionId();
if ($currSection != $sectionId) {
$lastSectionId = $currSection;
$sectionCount++;
if ($lastSectionId !== 0) $sections[$lastSectionId][5] = $customSectionOrderingExists?$sectionDao->getCustomSectionOrder($issueId, $sectionId):$sectionCount; // Store next custom order
$currSection = $sectionId;
$counter++;
$sections[$sectionId] = array(
$sectionId,
$article->getSectionTitle(),
array($article),
$counter,
$customSectionOrderingExists?
$sectionDao->getCustomSectionOrder($issueId, $lastSectionId): // Last section custom ordering
($sectionCount-1),
null // Later populated with next section ordering
);
I didnāt understand this script very well. Is there possible to fill the array $articleFiles in above script with sorted articles like in this case? If editor make changes in order, than save it. Iām sorry about my question, but this is too difficult for me still.
Thanks a lot.
duff