本文整理汇总了PHP中Topic::getUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Topic::getUrl方法的具体用法?PHP Topic::getUrl怎么用?PHP Topic::getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Topic
的用法示例。
在下文中一共展示了Topic::getUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exequery
$pagSection = "Home";
require_once "__inc__.php";
require_once ROOT_PATH . "header.php";
?>
<h3>Ultimi topics</h3>
<ul class="nav-list" style="margin: 1em 0;">
<?php
// Ultimi topics nel forum
$q = exequery(Topic::SELECT_SQL . "WHERE a.private = 0 AND type = " . Forum::TYPE_TOPIC . " \n\t\t\t\tORDER BY last_post_date DESC LIMIT 0,15");
while ($values = mysqli_fetch_array($q)) {
$topic = new Topic($values);
?>
<li>
<a class="nowrap" href="<?php
echo $topic->getUrl();
?>
">
<span class="tag pull-right" style="margin-left: 0.5em;"><?php
echo $topic['argument_title'];
?>
</span>
<span class="bubble red pull-right"><?php
echo $topic['replies'];
?>
</span>
<?php
echo $topic->getName();
?>
<span class="hide-phone hide-tablet"> - <?php
echo $topic->getFormattedDate();
示例2: isset
$message = db_escape(Charset::Utf8ToDB($_POST['message']));
$is_poll = isset($_POST['poll']);
// Le domande del sondaggio vengono memorizzate nel campo
// "poll" come array serializzato. Se "poll" e' null, allora
// vuol dire che il topic non e' un sondaggio
if ($is_poll) {
$poll_questions = explode("\n", trim(purify(Charset::Utf8ToDB($_POST['poll']))));
if (count($poll_questions) >= 2) {
$poll_data = db_escape(serialize($poll_questions));
} else {
// Numero di domande nel sondaggio non valido (< 2)
$poll_data = null;
}
}
if (!Forum::IsUserFlooding($currentUser)) {
exequery(sprintf("INSERT INTO forum_posts (user_id, argument, subject, message, type, post_date, last_post_date, ip, poll, replies) \n VALUES(%d, %d, '%s', '%s', %d, %d, %d, '%s', \"%s\", 0)", $currentUser['id'], $_POST['forum_id'], $subject, $message, Forum::TYPE_TOPIC, time(), time(), get_ip(), $poll_data));
$id = DB::LastId();
$topic = new Topic($id);
Forum::IncPostCountForUser($currentUser);
$response->set("topic_url", $topic->getUrl());
$response->setSuccess(true);
} else {
$response->setError("Attendi almeno " . Forum::FLOOD_SECONDS_LIMIT . " secondi tra un post e l'altro.");
}
} else {
$response->setError("Non sei loggato.");
}
} else {
$response->setError($av->getLastError());
}
$response->send();
示例3: function
},
ShowReplyForm: function(){
$("#frm-forum-reply").show();
$("#btn-forum-reply").hide();
FormBuilder.GetField("frm-forum-reply", "message").focusToEnd();
$("body").scrollTo("#frm-forum-reply", {duration: 500});
}
};
$(function(){
<?php
if ($topic['locked']) {
?>
// Se il topic e' bloccato, non permettere agli utenti di rispondere e quotare
$(".btn-quote, #btn-forum-reply").addClass("disabled");
<?php
}
?>
});
</script>
<?php
$pag = new Pagination($posts_count, Forum::POSTS_PER_PAGE, $_GET['p']);
echo $pag->getNavigator("default.html", $topic->getUrl("#PAGE#"));
?>
<?php
require_once ROOT_PATH . "footer.php";