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


PHP CKunenaLink::GetAnnouncementURL方法代码示例

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


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

示例1: edit

	function edit() {
		require_once KPATH_SITE . '/lib/kunena.link.class.php';
		$app = JFactory::getApplication ();
		if (! JRequest::checkToken ()) {
			$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_ERROR_TOKEN' ), 'error' );
			$this->redirectBack ();
		}

		$model = $this->getModel('announcement');
		$this->canEdit = $model->getCanEdit();
		if (! $this->canEdit) {
			$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_POST_NOT_MODERATOR' ), 'error' );
			$this->redirectBack ();
		}

		$model->edit();
		if (1) {
			$id = JRequest::getInt ( 'id', 0 );
			$app->enqueueMessage ( JText::_ ( $id ? 'COM_KUNENA_ANN_SUCCESS_EDIT' : 'COM_KUNENA_ANN_SUCCESS_ADD' ) );
		}
		$this->setRedirect (CKunenaLink::GetAnnouncementURL ( 'show', false, false ));
	}
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:22,代码来源:announcement.php

示例2: displayLoginBox

	function displayLoginBox($tpl = null) {
		$my = JFactory::getUser ();
		$cache = JFactory::getCache('com_kunena', 'output');
		$cachekey = "{$this->template->name}.common.loginbox.u{$my->id}";
		$cachegroup = 'com_kunena.template';

		$contents = $cache->get($cachekey, $cachegroup);
		if (!$contents) {
			require_once KPATH_SITE . '/lib/kunena.link.class.php';

			$this->assign ( 'moduleHtml', $this->getModulePosition('kunena_profilebox'));

			$login = KunenaFactory::getLogin();
			if ($my->get ( 'guest' )) {
				$this->setLayout('login');
				if ($login) {
					$this->assignRef ( 'login', $login->getLoginFormFields() );
					$this->assignRef ( 'register', $login->getRegistrationURL() );
					$this->assignRef ( 'lostpassword', $login->getResetURL() );
					$this->assignRef ( 'lostusername', $login->getRemindURL() );
				}
			} else {
				$this->setLayout('logout');
				if ($login) $this->assignRef ( 'logout', $login->getLogoutFormFields() );
				$this->lastvisitDate = KunenaDate::getInstance($this->me->lastvisitDate);

				// Private messages
				$private = KunenaFactory::getPrivateMessaging();
				if ($private) {
					$count = $private->getUnreadCount($this->me->userid);
					$this->assign ( 'privateMessagesLink', $private->getInboxLink($count ? JText::sprintf('COM_KUNENA_PMS_INBOX_NEW', $count) : JText::_('COM_KUNENA_PMS_INBOX')));
				}

				// TODO: Edit profile (need to get link to edit page, even with integration)
				//$this->assign ( 'editProfileLink', '<a href="' . CKunenaLink::GetAnnouncementURL ( 'show' ).'">'. JText::_('COM_KUNENA_PROFILE_EDIT').'</a>');

				// Announcements
				if ( $this->me->isModerator()) {
					$this->assign ( 'announcementsLink', '<a href="' . CKunenaLink::GetAnnouncementURL ( 'show' ).'">'. JText::_('COM_KUNENA_ANN_ANNOUNCEMENTS').'</a>');
				}

			}
			$contents = $this->loadTemplate($tpl);
			if (JError::isError($contents)) {
				return $contents;
			}
			$cache->store($contents, $cachekey, $cachegroup);
		}
		$contents = preg_replace_callback('|\[K=(\w+)(?:\:([\w-_]+))?\]|', array($this, 'fillLoginBoxInfo'), $contents);
		echo $contents;
	}
开发者ID:rich20,项目名称:Kunena,代码行数:51,代码来源:view.html.php

示例3: delete

 function delete($id)
 {
     if (!$this->canEdit) {
         while (@ob_end_clean()) {
         }
         $this->app->redirect(CKunenaLink::GetKunenaURL(false), JText::_('COM_KUNENA_POST_NOT_MODERATOR'));
     }
     $query = "DELETE FROM #__kunena_announcement WHERE id={$this->db->Quote($id)} ";
     $this->db->setQuery($query);
     $this->db->query();
     if (KunenaError::checkDatabaseError()) {
         return;
     }
     while (@ob_end_clean()) {
     }
     $this->app->redirect(CKunenaLink::GetAnnouncementURL('show', null, false), JText::_('COM_KUNENA_ANN_DELETED'));
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:17,代码来源:kunena.announcement.class.php

示例4: myValidate

// ]]>');
?>
<div id="Kunena">
<?php
$this->displayMenu ();
$this->displayLoginBox ();
?>
<div class="kblock kannouncement">
	<div class="kheader">
		<h2><?php echo JText::_('COM_KUNENA_ANN_ANNOUNCEMENTS'); ?>: <?php echo $this->announcement->id ? JText::_('COM_KUNENA_ANN_EDIT') : JText::_('COM_KUNENA_ANN_ADD'); ?></h2>
	</div>
	<div class="kcontainer" id="kannouncement">
		<div class="kactions"><?php echo CKunenaLink::GetAnnouncementLink('show',NULL, JText::_('COM_KUNENA_ANN_CPANEL'), JText::_('COM_KUNENA_ANN_CPANEL')); ?></div>
		<div class="kbody">
			<div class="kanndesc">
				<form class="form-validate" action="<?php echo CKunenaLink::GetAnnouncementURL('doedit'); ?>" method="post" name="editform" onsubmit="return myValidate(this);">
					<?php echo JHTML::_( 'form.token' ); ?>
				<div>
					<label>
						<?php echo JText::_('COM_KUNENA_ANN_TITLE'); ?>:
						<input class="klarge required" type="text" name="title" value="<?php echo $this->escape($this->announcement->title) ;?>"/>
					</label>
					<label>
						<?php echo JText::_('COM_KUNENA_ANN_SORTTEXT'); ?>:
						<textarea class="ksmall required" rows="80" cols="4" name="sdescription"><?php echo $this->escape($this->announcement->sdescription); ?></textarea>
					</label>
				</div>
				<div>
					<label>
						<?php echo JText::_('COM_KUNENA_ANN_LONGTEXT'); ?>:
						<textarea class="klarge" rows="80" cols="16" name="description"><?php echo $this->escape($this->announcement->description); ?></textarea>
开发者ID:rich20,项目名称:Kunena,代码行数:31,代码来源:edit.php

示例5: trigger_dberror

                    <br/>

                    <br/>

                    <br/>
                </form>
            </td>
        </tr>
    </tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?php 
    }
    // FINISH: EDIT ANN
    // BEGIN: delete ANN
    if ($do == "delete") {
        $query1 = "DELETE FROM #__fb_announcement WHERE id={$id} ";
        $kunena_db->setQuery($query1);
        $kunena_db->query() or trigger_dberror("Unable to delete announcement.");
        $app->redirect(CKunenaLink::GetAnnouncementURL($fbConfig, 'show'), _ANN_DELETED);
    }
    // FINISH: delete ANN
    ?>
<!-- /announcement-->
<?php 
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:30,代码来源:announcement.php

示例6: myValidate

echo JText::_('COM_KUNENA_ANN_ANNOUNCEMENTS');
?>
: <?php 
echo $this->id ? JText::_('COM_KUNENA_ANN_EDIT') : JText::_('COM_KUNENA_ANN_ADD');
?>
</h2>
	</div>
	<div class="kcontainer" id="kannouncement">
		<div class="kactions"><?php 
echo CKunenaLink::GetAnnouncementLink('show', NULL, JText::_('COM_KUNENA_ANN_CPANEL'), JText::_('COM_KUNENA_ANN_CPANEL'));
?>
</div>
		<div class="kbody">
			<div class="kanndesc">
				<form class="form-validate" action="<?php 
echo CKunenaLink::GetAnnouncementURL('doedit');
?>
" method="post" name="editform" onsubmit="return myValidate(this);">
					<?php 
echo JHTML::_('form.token');
?>
				<div>
					<label>
						<?php 
echo JText::_('COM_KUNENA_ANN_TITLE');
?>
:
						<input class="klarge required" type="text" name="title" value="<?php 
echo $this->escape($this->announcement->title);
?>
"/>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:edit.php

示例7:

    ?>
</li>
					<?php 
}
?>
					<?php 
$user_fields = @explode(',', $this->config->annmodid);
if (in_array($this->my->id, $user_fields) || $this->my->usertype == 'Administrator' || $this->my->usertype == 'Super Administrator') {
    $is_editor = true;
} else {
    $is_editor = false;
}
if ($is_editor) {
    ?>
						<li><a href="<?php 
    echo CKunenaLink::GetAnnouncementURL('show');
    ?>
"><?php 
    echo JText::_('COM_KUNENA_ANN_ANNOUNCEMENTS');
    ?>
</a></li>
					<?php 
}
?>
				</ul>
				<ul class="kprofilebox-welcome">
					<li><?php 
echo JText::_('COM_KUNENA_PROFILEBOX_WELCOME');
?>
, <strong><?php 
echo CKunenaLink::GetProfileLink(intval($this->user->id), $this->escape($this->kunena_username));
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:logout.php

示例8:

    ?>
"><?php 
    echo _PROFILEBOX_LOGOUT;
    ?>
</a>
<?php 
    $user_fields = @explode(',', $fbConfig->annmodid);
    if (in_array($kunena_my->id, $user_fields) || $kunena_my->usertype == 'Administrator' || $kunena_my->usertype == 'Super Administrator') {
        $is_editor = true;
    } else {
        $is_editor = false;
    }
    if ($is_editor) {
        ?>
| <a href = "<?php 
        echo CKunenaLink::GetAnnouncementURL($fbConfig, 'show');
        ?>
"><?php 
        echo _ANN_ANNOUNCEMENTS;
        ?>
 </a>
<?php 
    }
    ?>
| <?php 
    echo CKunenaLink::GetSearchLink($fbConfig, 'search', '', 0, 0, _KUNENA_SEARCH_ADVSEARCH);
    ?>

</td>
			<?php 
    if (JDocumentHTML::countModules('kunena_profilebox')) {
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:profilebox.php

示例9:

                        <?php 
    }
    ?>

                        <div class = "anndesc">
<?php 
    echo $annsdescription;
    ?>

<?php 
    if (!empty($anndescription)) {
        ?>

    &nbsp;&nbsp;&nbsp;<a href = "<?php 
        echo CKunenaLink::GetAnnouncementURL($fbConfig, 'read', $annID);
        ?>
"> <?php 
        echo _ANN_READMORE;
        ?>
</a>

<?php 
    }
    ?>
                        </div>
                    </td>
                </tr>
        </tbody>
    </table>
    </div>
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:30,代码来源:announcementbox.php


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