Hi,
I've successfully learned how to create my own custom page within Mybb.
I'm curious if it's possible, on the custom pages, to include a specific category within that page?
What I'd like to do, is create landing pages for specific categories in my forums. I don't want the page to be filled with the entire forum, but a specific category that is related to the custom page.
For example: If I have players that play Battlefield -- I make a custom battlefield group page and only have the forum category that is related to Battlefield show up on said page.
HI sorry to bump,
I think this thread is explaining what I'd like to do. ( I just didn't know what to technically call it)
http://community.mybb.com/thread-116225-...pid1088165
Could someone explain in more details how I can add the forum jump into a custom page for a specific category/forum?
Thanks
For the parameter $pid put the fid of the category. Ex. If the fid of your category is 5, you will use
build_forum_jump(5,"", "", "", 0, true);
You might also try build_forumbits(5,1);
So the part I'm getting confused at is do I add this code into the actual php file or the page template?
I'm guessing if I add it to the php file then how do I call it into the template?
You do it in the php file.
<?php
define("IN_MYBB", 1);
require_once "global.php";
$myvar = build_forum_jump(5, "", "", "", 0, true);
output_page($myvar);
?>
(2015-01-22, 11:13 PM)dragonexpert Wrote: [ -> ]You do it in the php file.
<?php
define("IN_MYBB", 1);
require_once "global.php";
$myvar = build_forum_jump(5, "", "", "", 0, true);
output_page($myvar);
?>
<?php
define('IN_MYBB', 1);
require_once "global.php";
require_once "inc/functions_forumlist.php";
$myvar = build_forum_jump(9, "", "", "", 0, true);
add_breadcrumb("Art of War Member", "aowmember.php");
eval("\$html = \"".$templates->get("aowmember")."\";");
output_page($html);
?>
Hi Dragon,
Thanks for having patience with me. I'm new to mybb and I'm learning how it all works.
So I have this in my custom php page, but I'm not sure how it shows up inside of my aowmember template.
Your aowmember template will need to have {$myvar} where you want the forum jump to be.
Hi again Dragon,
I assumed that was the case , so I included the {$myvar} code in my aowmember template in the admin cp. I refresh the page and it doesn't show the forum jump at all. So, I'm not sure what I'm doing incorrectly.
So , upon playing with the code, this does display a forumjump box :
build_forum_jump($pid="0", $selitem="", $addselect="1", $depth="", $showextras="1", $showall=false, $permissions="", $name="fid")
However; the build_forumbits still isn't displaying anything.
I've included the
require_once "inc/functions_forumlist.php";
in the file
also I've tried
$myvar = build_forumbits($pid=3, $depth=1);
and
$myvar = build_forumbits(3,1);