当前位置: 首页>>代码示例>>PHP>>正文


PHP Publication::getPublicationId方法代码示例

本文整理汇总了PHP中Publication::getPublicationId方法的典型用法代码示例。如果您正苦于以下问题:PHP Publication::getPublicationId方法的具体用法?PHP Publication::getPublicationId怎么用?PHP Publication::getPublicationId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Publication的用法示例。


在下文中一共展示了Publication::getPublicationId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getGS

	if ($cSubs == "d") {
		$numSubscriptionsDeleted = Subscription::DeleteSubscriptionsInSection($Pub, $Section);
		if ($numSubscriptionsDeleted < 0) {
			$errors[] = getGS('Error updating subscriptions.');
		}
	}

	$conflictingSection = array_pop(Section::GetSections($Pub, $Issue, $Language, $cShortName, null, null, true));
	if (is_object($conflictingSection) && ($conflictingSection->getSectionNumber() != $Section)) {
		$conflictingSectionLink = "/$ADMIN/sections/edit.php?Pub=$Pub&Issue=$Issue&Language=$Language&Section=".$conflictingSection->getSectionNumber();

		$msg = getGS('The URL name must be unique for all sections in this issue.<br>The URL name you specified ("$1") conflicts with section "$2$3. $4$5"',
			$cShortName,
			"<a href='$conflictingSectionLink' class='error_message' style='color:#E30000;'>",
			$conflictingSection->getSectionNumber(),
			htmlspecialchars($conflictingSection->getName()),
			"</a>");
		camp_html_add_msg($msg);
		// placeholder for localization string - we might need this later.
		// getGS("The section could not be changed.");
	} else {
		$modified &= $sectionObj->setUrlName($cShortName);
		camp_html_add_msg(getGS("Section updated"), "ok");
	}
	$logtext = getGS('Section "$1" ($2) updated. (Publication: $3, Issue: $4)',
			 $cName, $Section, $publicationObj->getPublicationId(), $issueObj->getIssueNumber());
	Log::Message($logtext, $g_user->getUserId(), 21);
}
camp_html_goto_page($editUrl);

?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_edit.php

示例2: Publication

}
if (camp_html_has_msgs()) {
    camp_html_goto_page($backLink);
}
$lastIssueObj = Issue::GetLastCreatedIssue($f_publication_id);
$publicationObj = new Publication($f_publication_id);
$newIssueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);
$created = $newIssueObj->create($f_url_name, array('Name' => $f_issue_name));
//add default theme
$resourceId = new ResourceId('Publication/Edit');
$syncRsc = $resourceId->getService(ISyncResourceService::NAME);
$outputService = $resourceId->getService(IOutputService::NAME);
$outputSettingIssueService = $resourceId->getService(IOutputSettingIssueService::NAME);
$issueService = $resourceId->getService(IIssueService::NAME);
$themeManagementService = $resourceId->getService(IThemeManagementService::NAME_1);
$publicationThemes = $themeManagementService->getThemes($publicationObj->getPublicationId());
if (is_array($publicationThemes) && count($publicationThemes) > 0) {
    if ($lastIssueObj instanceof Issue) {
        $outSetIssues = $outputSettingIssueService->findByIssue($lastIssueObj->getIssueId());
        $themePath = null;
        if (count($outSetIssues) > 0) {
            $outSetIssue = $outSetIssues[0];
            $themePath = $outSetIssue->getThemePath()->getPath();
        }
        if ($themePath == null) {
            $themePath = $publicationThemes[0]->getPath();
        }
        if ($themePath == null) {
            $f_theme_id = '0';
        } else {
            $f_theme_id = $themePath;
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:do_add_new.php

示例3: serialize

				 'PaidTime' => $f_paid,
				 'TrialTime' => $f_trial,
				 'UnitCost' => $f_unit_cost,
				 'UnitCostAllLang' => $f_unit_cost_all_lang,
				 'Currency' => $f_currency,
                 'comments_enabled' => $f_comments_enabled,
			     'comments_article_default_enabled'=> $f_comments_article_default,
			     'comments_subscribers_moderated' => $f_comments_subscribers_moderated,
			     'comments_public_moderated' => $f_comments_public_moderated,
			     'comments_captcha_enabled' => $f_comments_captcha_enabled,
				 'comments_spam_blocking_enabled' => $f_comments_spam_blocking_enabled,
                 'seo' => serialize($f_seo));

$created = $publicationObj->create($columns);
if ($created) {
	$alias->setPublicationId($publicationObj->getPublicationId());

	$forum = camp_forum_create($publicationObj, $f_comments_public_enabled);
	camp_forum_update($forum, $f_name, $f_comments_enabled, $f_comments_public_enabled);
	$setting = new Phorum_setting('mod_emailcomments', 'S');
	if (!$setting->exists()) {
		$setting->create();
	}
	$setting->update(array('addresses' => array($forum->getForumId() => $f_comments_moderator_to)));
	$setting->update(array('from_addresses' => array($forum->getForumId() => $f_comments_moderator_from)));

	camp_html_add_msg("Publication created.", "ok");
	camp_html_goto_page("/$ADMIN/pub/edit.php?Pub=".$publicationObj->getPublicationId());
} else {
	$alias->delete();
	camp_html_add_msg(getGS('The publication could not be added.'));
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_add.php

示例4: GetLastIssue

 public static function GetLastIssue(Publication $publication, $p_langId = null, $p_isPublished = true)
 {
     global $g_ado_db;
     if (!$publication->exists()) {
         return null;
     }
     if (empty($p_langId)) {
         $p_langId = $publication->getDefaultLanguageId();
     }
     $sql = 'SELECT MAX(Number) AS Number FROM Issues ' . 'WHERE IdPublication = ' . (int) $publication->getPublicationId() . ' AND IdLanguage = ' . (int) $p_langId;
     if ($p_isPublished == true) {
         $sql .= " AND Published = 'Y'";
     }
     $issueNo = $g_ado_db->GetOne($sql);
     if (empty($issueNo)) {
         return null;
     }
     return array($issueNo, $p_langId);
 }
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:19,代码来源:CampSystem.php

示例5: getGS

    exit;
}
$backLink = "/{$ADMIN}/pub/add.php";
if (empty($f_name)) {
    camp_html_add_msg(getGS('You must fill in the $1 field.', '<B>' . getGS('Name') . '</B>'));
}
if (empty($f_default_alias)) {
    camp_html_add_msg(getGS('You must fill in the $1 field.', '<B>' . getGS('Site') . '</B>'));
}
if (camp_html_has_msgs()) {
    camp_html_goto_page($backLink);
}
camp_is_alias_conflicting($f_default_alias);
camp_is_publication_conflicting($f_name);
if (camp_html_has_msgs()) {
    camp_html_goto_page($backLink);
}
$alias = new Alias();
$alias->create(array('Name' => $f_default_alias));
$publicationObj = new Publication();
$columns = array('Name' => $f_name, 'IdDefaultAlias' => $alias->getId(), 'IdDefaultLanguage' => $f_language, 'IdURLType' => $f_url_type, 'TimeUnit' => $f_time_unit, 'PaidTime' => $f_paid, 'TrialTime' => $f_trial, 'UnitCost' => $f_unit_cost, 'UnitCostAllLang' => $f_unit_cost_all_lang, 'Currency' => $f_currency, 'comments_enabled' => $f_comments_enabled, 'comments_article_default_enabled' => $f_comments_article_default, 'comments_subscribers_moderated' => $f_comments_subscribers_moderated, 'comments_public_moderated' => $f_comments_public_moderated, 'comments_public_enabled' => $f_comments_public_enabled, 'comments_captcha_enabled' => $f_comments_captcha_enabled, 'comments_spam_blocking_enabled' => $f_comments_spam_blocking_enabled, 'comments_moderator_to' => $f_comments_moderator_to, 'comments_moderator_from' => $f_comments_moderator_from, 'seo' => serialize($f_seo));
$created = $publicationObj->create($columns);
if ($created) {
    $alias->setPublicationId($publicationObj->getPublicationId());
    camp_html_add_msg("Publication created.", "ok");
    camp_html_goto_page("/{$ADMIN}/pub/edit.php?Pub=" . $publicationObj->getPublicationId());
} else {
    $alias->delete();
    camp_html_add_msg(getGS('The publication could not be added.'));
    camp_html_goto_page($backLink);
}
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:do_add.php


注:本文中的Publication::getPublicationId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。