Example #1
0
 public static function GetURI($p_publicationId, $p_languageId, $p_issueNo = null, $p_sectionNo = null, $p_articleNo = null)
 {
     $translator = \Zend_Registry::get('container')->getService('translator');
     $languageObj = new Language($p_languageId);
     if (!$languageObj->exists()) {
         return new PEAR_Error($translator->trans('Language does not exist.'));
     }
     $uri = '/' . $languageObj->getCode() . '/';
     if (!is_null($p_issueNo) && is_null($p_articleNo)) {
         $issueObj = new Issue($p_publicationId, $p_languageId, $p_issueNo);
         if (!$issueObj->exists()) {
             return new PEAR_Error($translator->trans('Issue does not exist.'));
         }
         $uri .= $issueObj->getUrlName() . '/';
     }
     if (!is_null($p_sectionNo) && is_null($p_articleNo)) {
         $sectionObj = new Section($p_publicationId, $p_issueNo, $p_languageId, $p_sectionNo);
         if (!$sectionObj->exists()) {
             return new PEAR_Error($translator->trans('Section does not exist.'));
         }
         $uri .= $sectionObj->getUrlName() . '/';
     }
     if (!is_null($p_articleNo)) {
         $articleObj = new Article($p_languageId, $p_articleNo);
         if (!$articleObj->exists()) {
             return new PEAR_Error($translator->trans('Article does not exist.'));
         }
         $issueObj = new Issue($p_publicationId, $p_languageId, $articleObj->getIssueNumber());
         $sectionObj = new Section($p_publicationId, $articleObj->getIssueNumber(), $p_languageId, $articleObj->getSectionNumber());
         $uri .= $issueObj->getUrlName() . '/';
         $uri .= $sectionObj->getUrlName() . '/';
         $uri .= $articleObj->getUrlName() . '/';
     }
     return $uri;
 }
Example #2
0
 public static function GetURI($p_publicationId, $p_languageId, $p_issueNo = null, $p_sectionNo = null, $p_articleNo = null)
 {
     $languageObj = new Language($p_languageId);
     if (!$languageObj->exists()) {
         return new PEAR_Error(getGS('Language does not exist.'));
     }
     $uri = $GLOBALS['Campsite']['SUBDIR'] . '/' . $languageObj->getCode() . '/';
     if (!is_null($p_issueNo) && is_null($p_articleNo)) {
         $issueObj = new Issue($p_publicationId, $p_languageId, $p_issueNo);
         if (!$issueObj->exists()) {
             return new PEAR_Error(getGS('Issue does not exist.'));
         }
         $uri .= $issueObj->getUrlName() . '/';
     }
     if (!is_null($p_sectionNo) && is_null($p_articleNo)) {
         $sectionObj = new Section($p_publicationId, $p_issueNo, $p_languageId, $p_sectionNo);
         if (!$sectionObj->exists()) {
             return new PEAR_Error(getGS('Section does not exist.'));
         }
         $uri .= $sectionObj->getUrlName() . '/';
     }
     if (!is_null($p_articleNo)) {
         $articleObj = new Article($p_languageId, $p_articleNo);
         if (!$articleObj->exists()) {
             return new PEAR_Error(getGS('Article does not exist.'));
         }
         $issueObj = new Issue($p_publicationId, $p_languageId, $articleObj->getIssueNumber());
         $sectionObj = new Section($p_publicationId, $articleObj->getIssueNumber(), $p_languageId, $articleObj->getSectionNumber());
         $uri .= $issueObj->getUrlName() . '/';
         $uri .= $sectionObj->getUrlName() . '/';
         $uri .= $articleObj->getUrlName() . '/';
     }
     return $uri;
 }
Example #3
0
        				<TD align="left" valign="top">
        					<?php print htmlspecialchars($dest->getDisplayName()); ?>
        				</TD>
        				<TD ALIGN="RIGHT" valign="top" style="padding-left: 1em;"><b><nobr><?php  putGS("Creation date"); ?>:</nobr></b></TD>
        				<TD align="left" valign="top" nowrap>
        					<?php print $curPreview->getCreationDate(); ?>
        				</TD>
        				<TD ALIGN="RIGHT" valign="top" style="padding-left: 1em;"></TD>
        				<TD align="left" valign="top"  style="padding-top: 0.25em;">
        				<?php  putGS('Show article on section page'); ?>
        				</TD>
        			</TR>
        			<TR>
        			    <td align="right" valign="top" nowrap><b><?php putGS("Number"); ?>:</b></td>
        			    <td align="left" valign="top"  style="padding-top: 2px; padding-left: 4px;"><?php p($curPreview->getArticleNumber()); ?> <?php if (isset($publicationObj) && $publicationObj->getUrlTypeId() == 2) { ?>
        &nbsp;(<a href="/<?php echo $languageObj->getCode()."/".$issueObj->getUrlName()."/".$sectionObj->getUrlName()."/".$curPreview->getUrlName(); ?>"><?php putGS("Link to public page"); ?></a>)<?php } ?></td>

        				<TD ALIGN="RIGHT" valign="top" style="padding-left: 1em;"><b><?php  putGS("Publish date"); ?>:</b></TD>
        				<TD align="left" valign="top">
        					<?php print htmlspecialchars($curPreview->getPublishDate()); ?>
        				</TD>
        				<TD ALIGN="RIGHT" valign="top" style="padding-left: 1em;"></TD>
        				<TD align="left" valign="top" style="padding-top: 0.25em;">
        				<?php putGS('Allow users without subscriptions to view the article'); ?>
        				</TD>
        			</TR>
        			</TABLE>
        		</TD>
        	</TR>

        	<TR>
Example #4
0
        ?>
        				</TD>
        			</TR>
        			<TR>
        			    <td align="right" valign="top" nowrap><b><?php 
        putGS("Number");
        ?>
:</b></td>
        			    <td align="left" valign="top"  style="padding-top: 2px; padding-left: 4px;"><?php 
        p($curPreview->getArticleNumber());
        ?>
 <?php 
        if (isset($publicationObj) && $publicationObj->getUrlTypeId() == 2) {
            ?>
        &nbsp;(<a href="/<?php 
            echo $languageObj->getCode() . "/" . $issueObj->getUrlName() . "/" . $sectionObj->getUrlName() . "/" . $curPreview->getUrlName();
            ?>
"><?php 
            putGS("Link to public page");
            ?>
</a>)<?php 
        }
        ?>
</td>

        				<TD ALIGN="RIGHT" valign="top" style="padding-left: 1em;"><b><?php 
        putGS("Publish date");
        ?>
:</b></TD>
        				<TD align="left" valign="top">
        					<?php