Quote
I don know why this information needs to be inserted twice in the same table, maybe someone can explain this?
Quote
In PHPFusion-9, for display on all pages, this value needs to be set to 3.
function forum_query() {
return dbquery("SELECT * FROM ".DB_FORUMS);
}
// Model.php
function thread_query() {
return dbquery("SELECT * FROM ".DB_FORUM_THREADS);
}
function more_thread_info($item) {
return $item + array(
"thread_special_link" => "....",
"user_avatar_with_modal" => "...",
"colorbox" => "...."
);
}
function control() {
$list = array();
$thread = false;
$result = forum_query();
if ($thread_id = get("viewthread")) { // Where $_GET['viewthread'] exist.
$result = thread_query();
$thread = true;
}
if (dbrows($result)) {
while ($data = dbarray($result)) {
$list[] = $data;
}
}
return view_everything($list, $thread);
}
function view_everything($items, $is_thread_view = FALSE) {
if ($is_thread_view) {
return render_thread($items);
}
return render_forum($items);
}
if (!defined("render_forum")) {
function render_form($data) {
return 'default forum view';
}
}
if (!defined("render_thread")) {
function render_thread($data) {
return 'default thread view';
}
}
function render_forum($data) {
// Custom capability
return 'Custom forum view';
}
function render_thread($data) {
// Custom thread view
return 'Custom thread view';
}
echo control();
$result= dbquery("");
if (dbrows($result)) {
while ($data = dbarray($result);
// this is mutation.
$data = dbarray(dbquery($result));
}
Quote
echo "<div>"; // drop rating -1
echo "<div class='this'>"; // drop rating -1
function render_forum($data) {
echo "<div>"
}
function render_forum($data) {
$tpl = Template::getInstance('forum');
$tpl->set_template("path-to-template-folder".DIRECTORY_SEPERATOR."template.html");
$tpl->set_tag("block_1", $data["forum_name"]);
return $tpl->get_output();
}
<div class="forum"><h4>{%block_1%}</h4></div>
function render_forum($data) {
return fusion_render("path-to-template-folder", "template.twig", $data);
}
Category Forum
General DiscussionLabels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions