本文整理汇总了PHP中ACSMsg::get_tag_replace方法的典型用法代码示例。如果您正苦于以下问题:PHP ACSMsg::get_tag_replace方法的具体用法?PHP ACSMsg::get_tag_replace怎么用?PHP ACSMsg::get_tag_replace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACSMsg
的用法示例。
在下文中一共展示了ACSMsg::get_tag_replace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
$context = $this->getContext();
$controller = $context->getController();
$request = $context->getRequest();
$user = $context->getUser();
$acs_user_info_row = $user->getAttribute('acs_user_info_row');
// 対象となるコミュニティIDを取得
$community_id = $request->ACSgetParameter('community_id');
$form = $request->ACSGetParameters();
// コミュニティ情報
$community_row = ACSCommunity::get_community_profile_row($community_id);
if ($form['mode'] == 'parent') {
$parent_community_id = $form['delete_community_id'];
$sub_community_id = $community_id;
} elseif ($form['mode'] == 'sub') {
$parent_community_id = $community_id;
$sub_community_id = $form['delete_community_id'];
}
// 削除
ACSCommunity::delete_community_link($parent_community_id, $sub_community_id);
// forward
$done_obj = new ACSDone();
$done_obj->set_title(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'M001'));
$done_obj->set_message(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'M002'));
$done_obj->add_link(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'M003'), $this->getControllerPath('Community', 'CommunityLink') . '&community_id=' . $community_row['community_id']);
$done_obj->add_link(ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $community_row['community_name'])), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
$request->setAttribute('done_obj', $done_obj);
$controller->forward('Common', 'Done');
}
示例2: execute
function execute()
{
$context = $this->getContext();
$controller = $context->getController();
$request = $context->getRequest();
$user = $context->getUser();
if (!$this->get_execute_privilege()) {
$controller->forward(SECURE_MODULE, SECURE_ACTION);
return;
}
$acs_user_info_row = $user->getAttribute('acs_user_info_row');
// 対象となるコミュニティIDを取得
$community_id = $request->ACSgetParameter('community_id');
// コミュニティ情報
$community_row = ACSCommunity::get_community_row($community_id);
$form = $request->ACSGetParameters();
$form['community_id'] = $community_row['community_id'];
// 更新
ACSCommunity::update_community_admin($acs_user_info_row, $form);
$done_obj = new ACSDone();
$done_obj->set_title(ACSMsg::get_msg('Community', 'EditCommunityAdminAction.class.php', 'M001'));
$done_obj->set_message(ACSMsg::get_msg('Community', 'EditCommunityAdminAction.class.php', 'M002'));
$done_obj->add_link(ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'EditCommunityAdminAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $community_row['community_name'])), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
$request->setAttribute('done_obj', $done_obj);
$controller->forward('Common', 'Done');
}
示例3: execute
function execute()
{
$context = $this->getContext();
$controller = $context->getController();
$request = $context->getRequest();
$user = $context->getUser();
if (!$this->get_execute_privilege()) {
$controller->forward(SECURE_MODULE, SECURE_ACTION);
return;
}
/* コミュニティ情報取得 */
$target_community_id = $request->getParameter('community_id');
$target_community_row = ACSCommunity::get_community_row($request->getParameter('community_id'));
/* 削除処理 */
$delete_user_community_id_array = $request->getParameter('delete_user_community_id_array');
$ret = ACSCommunity::delete_community_member($target_community_id, $delete_user_community_id_array);
if (!$ret) {
"ERROR : delete community member failed";
exit;
}
/* 完了画面表示 */
// 引数セット
$community_top_url = $this->getControllerPath('Community', '');
$community_top_url .= '&community_id=' . $target_community_row['community_id'];
$community_top_link_name = ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'DeleteCommunityMemberAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $target_community_row['community_name']));
$done_obj = new ACSDone();
$done_obj->set_title(ACSMsg::get_msg('Community', 'DeleteCommunityMemberAction.class.php', 'M001'));
$done_obj->set_message(ACSMsg::get_msg('Community', 'DeleteCommunityMemberAction.class.php', 'M002'));
$done_obj->add_link($community_top_link_name, $community_top_url);
$request->setAttribute('done_obj', $done_obj);
// 画面呼び出し
$controller->forward('Common', 'Done');
}
示例4: execute
/**
* コミュニティ削除処理
*/
function execute()
{
$context = $this->getContext();
$controller = $context->getController();
$request = $context->getRequest();
$user = $context->getUser();
if (!$this->get_execute_privilege()) {
$controller->forward(SECURE_MODULE, SECURE_ACTION);
return;
}
/* コミュニティ情報取得 */
$target_community_id = $request->getParameter('community_id');
$target_community_row = ACSCommunity::get_community_row($request->getParameter('community_id'));
/* 削除処理 */
ACSDB::_do_query("BEGIN");
$ret = ACSCommunity::delete_community($target_community_id);
if (!$ret) {
ACSDB::_do_query("ROLLBACK");
"ERROR : delete community failed";
exit;
}
// フォルダのディレクトリ移動
$from_dir = ACS_FOLDER_DIR . "/";
$from_dir .= ACSFile::get_upload_file_save_path($target_community_id);
if (file_exists($from_dir)) {
$to_dir = ACS_TRASH_FOLDER_DIR . "/";
$to_dir .= ACSFile::get_upload_file_save_path($target_community_id);
if (!file_exists(ACS_TRASH_FOLDER_DIR)) {
// 置き場所ディレクトリがなければ作成する
mkdir(ACS_TRASH_FOLDER_DIR);
chmod(ACS_TRASH_FOLDER_DIR, 0777);
}
$ret = rename($from_dir, $to_dir);
if (!$ret) {
ACSDB::_do_query("ROLLBACK");
"ERROR : delete community failed";
exit;
}
}
ACSDB::_do_query("COMMIT");
/* 完了画面表示 */
// 引数セット
$message = ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'DeleteCommunityAction.class.php', 'DELETECM'), array('{TARGET_COMMUNITY_NAME}' => $target_community_row['community_name']));
$top_page_url = $this->getControllerPath('User', 'Index');
$top_page_link_name = ACSMsg::get_msg('Community', 'DeleteCommunityAction.class.php', 'M001');
$done_obj = new ACSDone();
$done_obj->set_title(ACSMsg::get_msg('Community', 'DeleteCommunityAction.class.php', 'M002'));
$done_obj->set_message($message);
$done_obj->add_link($top_page_link_name, $top_page_url);
$request->setAttribute('done_obj', $done_obj);
// 画面呼び出し
$controller->forward('Common', 'Done');
}
示例5: execute
function execute()
{
$context = $this->getContext();
$controller = $context->getController();
$request = $context->getRequest();
$user = $context->getUser();
if (!$this->get_execute_privilege()) {
$controller->forward(SECURE_MODULE, SECURE_ACTION);
return;
}
$acs_user_info_row = $user->getAttribute('acs_user_info_row');
$form = $form = $request->ACSGetParameters();
// 対象となるコミュニティIDを取得
$community_id = $request->ACSgetParameter('community_id');
// コミュニティ情報
$community_row = ACSCommunity::get_community_profile_row($community_id);
ACSDB::_do_query("BEGIN");
// 生成されたwaiting_idの配列
$waiting_id_array = array();
foreach ($form['user_community_id_array'] as $invited_user_community_id) {
// コミュニティ招待承認待ち登録
$waiting_id = ACSWaiting::set_waiting_for_invite_to_community($invited_user_community_id, $community_id, $acs_user_info_row['user_community_id'], $form['message']);
if (!$waiting_id) {
ACSDB::_do_query("ROLLBACK");
break;
}
// 生成されたwaiting情報を保持
array_push($waiting_id_array, $waiting_id);
}
if ($waiting_id) {
ACSDB::_do_query("COMMIT");
}
// 生成されたwaiting情報を元に複数メール送信
foreach ($waiting_id_array as $waiting_id) {
// コミュニティ招待承認依頼通知メール
ACSWaiting::send_admission_request_notify_mail($waiting_id);
}
// forward
$done_obj = new ACSDone();
$done_obj->set_title(ACSMsg::get_msg('Community', 'InviteToCommunityAction.class.php', 'M001'));
$done_obj->set_message(ACSMsg::get_msg('Community', 'InviteToCommunityAction.class.php', 'M002'));
$done_obj->add_link(ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'InviteToCommunityAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $community_row['community_name'])), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
$request->setAttribute('done_obj', $done_obj);
$controller->forward('Common', 'Done');
}
示例6: print_paging_link
/**
* ページングリンク出力
*
* @param $paging_info
*/
function print_paging_link($paging_info)
{
if (!$paging_info) {
return;
}
// 件数表示
//echo "全$paging_info[all_count]件: $paging_info[start_count]-$paging_info[end_count]件を表示<br>\n";
echo ACSMsg::get_tag_replace(ACSMsg::get_msg('lib', 'ACSTemplateLib.class.php', 'PAGE_INFO'), array("{ALL_COUNT}" => $paging_info[all_count], "{START_COUNT}" => $paging_info[start_count], "{END_COUNT}" => $paging_info[end_count]));
// 1ページのみの場合は表示終了
if (!$paging_info['paging_row_array']) {
echo "<br>\n";
return;
}
// 前へ・次へ
if ($paging_info['prev_link']) {
echo "<a href=\"{$paging_info['prev_link']}\">" . ACSMsg::get_mdmsg(__FILE__, 'M001') . "</a>";
} else {
echo ACSMsg::get_mdmsg(__FILE__, 'M001');
}
echo " ";
if ($paging_info['next_link']) {
echo "<a href=\"{$paging_info['next_link']}\">" . ACSMsg::get_mdmsg(__FILE__, 'M002') . "</a>";
} else {
echo ACSMsg::get_mdmsg(__FILE__, 'M002');
}
echo " ";
// ページ数表示
foreach ($paging_info['paging_row_array'] as $paging_row) {
print '<span class="page_number">';
// リンクがある場合のみ
if ($paging_row['link_url']) {
print '<a href="' . $paging_row['link_url'] . '">';
print $paging_row['page_number'];
print '</a>';
} else {
print '<b>' . $paging_row['page_number'] . '</b>';
}
print '</span>' . "\n";
}
print "<br><br>\n";
}
示例7: execute
/**
* コミュニティ削除処理
*/
function execute()
{
$context = $this->getContext();
$controller = $context->getController();
$request = $context->getRequest();
$user = $context->getUser();
/* アクセスしているユーザ情報 */
$acs_user_info_row = $user->getAttribute('acs_user_info_row');
/* コミュニティ情報取得 */
$target_community_id = $request->getParameter('community_id');
$target_community_row = ACSCommunity::get_community_row($request->getParameter('community_id'));
/* 削除処理 */
ACSDB::_do_query("BEGIN");
$ret = ACSCommunity::delete_community_member($target_community_id, array($acs_user_info_row['user_community_id']));
if (!$ret) {
ACSDB::_do_query("ROLLBACK");
"ERROR : Delete community member failed.";
exit;
}
ACSDB::_do_query("COMMIT");
/* 完了画面表示 */
// 引数セット
$message = ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'LeaveCommunityAction.class.php', 'LEAVE_CM'), array("{COMMUNITY_NAME}" => $target_community_row['community_name']));
// マイページトップページURL
$top_page_url = $this->getControllerPath('User', 'Index');
$top_page_link_name = ACSMsg::get_msg('Community', 'LeaveCommunityAction.class.php', 'M001');
// コミュニティURL
$community_top_page_url = $this->getControllerPath('Community', 'Index');
$community_top_page_url .= '&community_id=' . $target_community_row['community_id'];
$community_top_page_link_name = ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'LeaveCommunityAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $target_community_row['community_name']));
$done_obj = new ACSDone();
$done_obj->set_title(ACSMsg::get_msg('Community', 'LeaveCommunityAction.class.php', 'M002'));
$done_obj->set_message($message);
$done_obj->add_link($top_page_link_name, $top_page_url);
$done_obj->add_link($community_top_page_link_name, $community_top_page_url);
$request->setAttribute('done_obj', $done_obj);
// 画面呼び出し
$controller->forward('Common', 'Done');
}
示例8: array
<?php
// $Id: CommunityList.tpl.php,v 1.7 2007/03/28 02:51:47 w-ota Exp $
?>
<?php
echo "<div class=\"ttl\">";
if ($this->_tpl_vars['is_self_page']) {
echo ACSMsg::get_msg("User", "CommunityList.tpl.php", 'M001');
} else {
echo "<a href=\"" . $this->_tpl_vars['link_page_url']['else_user_top_page_url'] . "\">";
echo ACSMsg::get_tag_replace(ACSMsg::get_msg("User", "CommunityList.tpl.php", 'NAME'), array("{USER_NAME}" => htmlspecialchars($this->_tpl_vars['target_user_info_row']['community_name'])));
echo "</a> :: ";
echo ACSMsg::get_msg("User", "CommunityList.tpl.php", 'M002');
}
echo " (" . $this->_tpl_vars['community_row_array_num'] . ")";
echo "</div><br>\n";
?>
<?php
// ページング表示
ACSTemplateLib::print_paging_link($this->_tpl_vars['paging_info']);
?>
<table width="650" border="0" cellpadding="8" cellspacing="1" bgcolor="#99CC33">
<tr>
<td bgcolor="#ffffff">
<table width="100%" border="0" cellspacing="10" cellpadding="5">
<?php
if (count($this->_tpl_vars['community_row_array'])) {
$count = 0;
示例9: array
<!-- HTML -->
<div class="ttl">
<a href="<?php
echo $this->_tpl_vars['top_page_url'];
?>
"> <?php
echo ACSMsg::get_msg("User", "SelectDesign.tpl.php", 'M001');
?>
</a> :: <?php
echo ACSMsg::get_msg("User", "SelectDesign.tpl.php", 'M002');
?>
</div>
<br>
<?php
echo ACSMsg::get_tag_replace(ACSMsg::get_msg("User", "SelectDesign.tpl.php", 'TITLE'), array("{USER_NAME}" => htmlspecialchars($this->_tpl_vars['acs_user_info_row']['community_name'])));
?>
<br>
<?php
echo ACSMsg::get_msg("User", "SelectDesign.tpl.php", 'M010');
?>
<br>
<?php
ACSTemplateLib::print_error_message($this->_tpl_vars['error_message']);
?>
<form name="design_select" action="<?php
echo $this->_tpl_vars['action_url'];
?>
" method="post">
<table class="common_table" border="0" cellpadding="6" cellspacing="1" bgcolor="#99CC33">
示例10: get_decision_mail_subject
/**
* スケジュール調整決定通知件名取得
*
* @return true / false
*/
function get_decision_mail_subject($lang)
{
$current_lang = ACSMsg::get_lang();
ACSMsg::set_lang($lang);
$subject = ACSMsg::get_mdmsg(__FILE__, 'M001');
$subject = ACSMsg::get_tag_replace($subject, array('{SUBJECT_NAME}' => $this->schedule_name));
ACSMsg::set_lang($current_lang);
return $subject;
}
示例11: array
<table border="0" cellpadding="6" cellspacing="1" bgcolor="#99CC33">
<tr>
<?php
if ($this->_tpl_vars['move_id'] == 2) {
echo "<td height=30px id=\"myttl\" bgcolor=\"#DEEEBD\">" . ACSMsg::get_msg("User", "MessageShow.tpl.php", 'M006') . "</td>";
} else {
echo "<td height=30px id=\"myttl\" bgcolor=\"#DEEEBD\">" . ACSMsg::get_msg("User", "MessageShow.tpl.php", 'M007') . "</td>";
}
?>
<td bgcolor="#ffffff">
<a href="<?php
echo $this->_tpl_vars['link_page_url']['else_user_message_url'];
?>
">
<?php
echo ACSMsg::get_tag_replace(ACSMsg::get_msg("User", "MessageShow.tpl.php", 'NAME'), array("{USER_NAME}" => htmlspecialchars($this->_tpl_vars['message_row']['user_name'])));
?>
</a>
</td>
</tr>
<tr>
<td height=30px id="myttl" bgcolor="#DEEEBD"><?php
echo ACSMsg::get_msg("User", "MessageShow.tpl.php", 'M008');
?>
</td>
<td bgcolor="#ffffff">
<?php
echo nl2br(ACSLib::sp2nbsp(htmlspecialchars($this->_tpl_vars['message_row']['post_date'])));
?>
</td>
</tr>
示例12: array
// $Id: EditFileDetail.tpl.php,v 1.7 2007/03/28 08:39:33 w-ota Exp $
?>
<?php
// ファイルコンテンツ切り替えJS出力
ACSTemplateLib::print_change_file_contents_js('edit_file_detail_form', $this->_tpl_vars['file_contents_type_master_array'], $this->_tpl_vars['file_contents_type_master_row_array_array']);
?>
<?php
if ($this->_tpl_vars['is_self_page']) {
$title = ACSMsg::get_msg("User", "EditFileDetail.tpl.php", 'M001');
} else {
$title = '<a href="' . $this->_tpl_vars['target_user_info_row']['top_page_url'] . '">';
//$title .= htmlspecialchars($this->_tpl_vars['target_user_info_row']['community_name']) . "さん";
$title .= ACSMsg::get_tag_replace(ACSMsg::get_msg("User", "EditFileDetail.tpl.php", 'NAME'), array("{USER_NAME}" => htmlspecialchars($this->_tpl_vars['target_user_info_row']['community_name'])));
$title .= '</a>';
$title .= ' :: <a href="' . $this->_tpl_vars['back_url'] . '">' . ACSMsg::get_msg("User", "EditFileDetail.tpl.php", 'M002') . '</a>';
}
?>
<div class="sub_title"><?php
echo $title;
?>
:: <?php
echo ACSMsg::get_msg("User", "EditFileDetail.tpl.php", 'M003');
?>
:: <?php
echo ACSMsg::get_msg("User", "EditFileDetail.tpl.php", 'M004');
?>
</div>
示例13: nl2br
echo "<td valign=\"top\" colspan=\"2\">";
if ($bbs_row['bbs_delete_flag'] == 'f') {
echo nl2br(ACSTemplateLib::auto_link(ACSLib::sp2nbsp(htmlspecialchars($bbs_row['body']))));
} else {
echo ACSMsg::get_msg("Community", "BBS.tpl.php", 'M021');
}
echo "</td>";
echo "</tr>\n";
echo "</table>";
echo "</td>";
echo "</tr>\n";
// 表示件数が省略されている場合
if ($bbs_row['omission_num']) {
echo "<tr><td colspan=\"2\" align=\"right\" bgcolor=\"#ffffff\">";
//echo "<span class=\"note\">(1 - $bbs_row[omission_num] 件目は省略されました)</span>";
echo "<span class=\"note\">" . ACSMsg::get_tag_replace(ACSMsg::get_msg("Community", "BBS.tpl.php", 'TPL'), array("{OMISSION_NUM}" => $bbs_row['omission_num'])) . "</span>";
echo " ";
//echo "<a href=\"$bbs_row[bbs_res_url]\">全て読む($bbs_row[bbs_res_row_array_num])</a>";
echo "<a href=\"" . $bbs_row['bbs_res_url'] . "\">" . ACSMsg::get_msg("Community", "BBS.tpl.php", 'M027') . "(" . $bbs_row['bbs_res_row_array_num'] . ")</a>";
echo "</td></tr>\n";
}
// 返信記事
if ($bbs_row['bbs_delete_flag'] == 'f') {
foreach ($bbs_row['bbs_res_row_array'] as $bbs_res_row) {
//親が削除されている時 ここから無し
echo "<tr>";
echo "<td align=\"center\" width=\"80px\" bgcolor=\"#ffffff\">";
if ($bbs_res_row['bbs_res_delete_flag'] == 'f') {
echo "<a href=\"" . $bbs_res_row['top_page_url'] . "\"><img src=\"" . $bbs_res_row['image_url'] . "\" border=\"0\"></a><br>";
echo "<a href=\"" . $bbs_res_row['top_page_url'] . "\">" . htmlspecialchars($bbs_res_row['community_name']) . "</a>";
}
示例14: send_info_mail
/**
* 通知メールを送信する
*
* @param $message_id メッセージID
* @param $receiver_id 受信者ID
* @param $sender_id 送信者ID
*/
static function send_info_mail($message_id, $receiver_id, $sender_id)
{
$system_group = ACSMsg::get_mst('system_config_group', 'D01');
// システムURL
$system_base_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_URL');
// システムログインURL
$system_base_login_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_LOGIN_URL');
// システムのメールアドレス (From:)
$system_mail_addr = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_MAIL_ADDR');
// 利用者の言語設定を一時的に保存
$org_lang = ACSMsg::get_lang();
// 各言語のタイトルを取得
$mail_titles = array();
foreach (ACSMsg::get_lang_list_array() as $lang_key => $lang_name) {
ACSMsg::set_lang($lang_key);
$mail_titles[$lang_key] = ACSMsg::get_serial_msg('lib', 'ACSWaiting.class.php', 'MTL%03d') . "\n";
}
// 言語を一旦元に戻す
ACSMsg::set_lang($org_lang);
// 依頼側のユーザ情報
$user_info_row = ACSUser::get_user_profile_row($sender_id);
// 依頼される側のユーザ情報
$target_user_info_row = ACSUser::get_user_profile_row($receiver_id);
// 待機承認URL
$message_url = $system_base_login_url . SCRIPT_PATH;
$message_url .= "?" . MODULE_ACCESSOR . "=User";
$message_url .= "&" . ACTION_ACCESSOR . "=MessageShow";
$message_url .= "&id={$receiver_id}";
$message_url .= "&message_id={$message_id}";
$target_lang = ACSMsg::get_mail_lang_by_inforow($target_user_info_row);
// 一旦依頼される側の言語に設定する
ACSMsg::set_lang($target_lang);
$body = $mail_titles[$target_lang];
$body .= ACSMsg::get_tag_replace(ACSMsg::get_serial_msg('lib', 'ACSMessage.class.php', 'ADF%03d'), array("{TARGET_USER_NAME}" => $target_user_info_row['user_name'], "{USER_NAME}" => $user_info_row['user_name'], "{USER_COMMUNITY_NAME}" => $user_info_row['community_name'], "{MESSAGE_URL}" => $message_url, "{SYSTEM_BASE_URL}" => $system_base_url));
$subject = ACSMsg::get_mdmsg(__FILE__, 'M002');
// 言語を元に戻す
ACSMsg::set_lang($org_lang);
$ret = ACSLib::send_mail($system_mail_addr, $target_user_info_row['mail_addr'], null, $subject, $body);
}
示例15: print_diary_rss
/**
* ダイアリーRSSを出力する
*
* @param $target_user_info_row 対象ユーザ情報
* @param $diary_row_array ダイアリー一覧
* @param $params パラメータ等
*/
static function print_diary_rss($target_user_info_row, $diary_row_array, $params)
{
// 使用クラス: acs/webapp/lib/feedcreator/feedcreator.class.php
$rss = new UniversalFeedCreator();
// 概要等 <channel>
$rss->useCached();
$rss->title = ACSMsg::get_tag_replace(ACSMsg::get_mdmsg(__FILE__, 'NAME'), array("{USER_NAME}" => $target_user_info_row['community_name']));
// ○○さん
$rss->description = $params['description'];
// プロフィール (公開範囲別)
$rss->link = $params['base_url'] . $target_user_info_row['top_page_url'];
// マイページURL
$rss->url = $params['base_url'] . $target_user_info_row['image_url'];
// 画像URL <image rdf:resource="...">
$rss->syndicationURL = $params['rss_syndication_url'];
// 自身のURL <channel rdf:about="...">
// ロゴ画像 <image>
$image = new FeedImage();
$image->title = $target_user_info_row['image_title'];
// ファイル名
$image->link = ACSMsg::get_mdmsg(__FILE__, 'M002');
// 写真
$image->url = $params['base_url'] . $target_user_info_row['image_url'];
$rss->image = $image;
// 1件のダイアリー: <item>
foreach ($diary_row_array as $index => $diary_row) {
// CRLF → LF
$body = preg_replace('/\\r\\n/', "\n", $diary_row['body']);
$item = new FeedItem();
$item->post_date = $diary_row['post_date'];
$item->title = $diary_row['subject'];
$item->link = $params['base_url'] . $diary_row['diary_comment_url'];
$item->description = $body;
if ($diary_row['file_url'] != '') {
$item->image_link = $params['base_url'] . $diary_row['file_url'];
}
$item->description2 = $body;
//第2の本文 <content:encoded>
$rss->addItem($item);
}
// http-header
mb_http_output('pass');
header('Content-type: application/xml; charset=UTF-8');
echo mb_convert_encoding($rss->createFeed("RSS1.0"), 'UTF-8', mb_internal_encoding());
}