View Full Version : How do I get a jumpbox on forumhome?
Canis Firebrand
07-17-2006, 01:27 PM
I'd like to have the jumpbox show up on the forumhome page. I think that is the template when you go to your main forum page.
www.forum.com/index.php
I have the $jumpbox code there, and it does show a jumpbox. However, the jumpbox only contains items under the Site Areas(User Control Panel, etc) and nothing under Forums.
How can I have it show the forums as well?
I did a search here and on vbulletin.org as well and did not find an answer.
Simon2323
03-27-2012, 12:49 AM
been searching for this answer for quite some time today, anyone can please help
Pandemikk
03-27-2012, 03:55 AM
As far as I know, there's no reliable code in vB that allows for a forumjump list. Because of this, I had to create my own in a recent modification I have created.
Simon2323
03-27-2012, 12:27 PM
thank you for your answer, is there a place to get your mod? are you willing to share it?
I got part of the code, but i need to find the function that will list all the forums in a tree structure.
Do you know any documentation from vbulletin on how the Quick Navigation function is called?
I am new to vbulletin and I am having a hard time getting documentation on the functions to do my own customizations. To list all the forums in a tree structure like the quick navigation window should not be so difficult, yet I find all questions about it go unanswered on this board, anyone from vbulletin can help?
vbenhancer
03-27-2012, 01:48 PM
something like this ?!
https://vborg.vbsupport.ru/showthread.php?t=230562
Simon2323
03-27-2012, 02:13 PM
Thank you for your reply, it is exactly what I am looking for. I installed it and had to remove it because of tons of errors.
Seems like it is not compatible with 4.1.10, and the last post there is from 2009, so I do not expect to get much support.
Unfortunately every time I search for a fix or customization on this forum, I only find old mods, not working and not supported, it makes me wonder what is supported nowadays in Vbulletin.org?
--------------- Added 1332861595 at 1332861595 ---------------
@vbenhancer, I see you are a coder, not sure if it is against the rules of this board, can you help me with it? you can pm me if there is any charge.
So far I have been able to create a simple block (using html) with the fixed links to the forum functions such as usercp.php, private.php, subscription.php, online.php, search.php, forum.php, but I can not find the function or file to list the forums in a tree structure.
Sorry for the double post.
Thanks
Pandemikk
03-27-2012, 02:35 PM
thank you for your answer, is there a place to get your mod? are you willing to share it?
It's in vBAnalytics. It offers more than a forumjump constructor but the below code extracted should work if you follow the steps below.
function createSelectOptions($array, $selectedid = '', $htmlise = false)
{
if (!is_array($array))
{
return '';
}
$options = '';
foreach ($array as $key => $val)
{
if (is_array($val))
{
// Create the template
$templater = vB_Template::create('optgroup');
$templater->register('optgroup_label', ($htmlise ? htmlspecialchars_uni($key) : $key));
$templater->register('optgroup_options', createSelectOptions($val, $selectedid, $tabindex, $htmlise));
$options .= $templater->render();
}
else
{
if (is_array($selectedid))
{
$selected = iif(in_array($key, $selectedid), ' selected="selected"', '');
}
else
{
$selected = iif($key == $selectedid, ' selected="selected"', '');
}
$templater = vB_Template::create('option');
$templater->register('optionvalue', ($key !== 'no_value' ? $key : ''));
$templater->register('optionselected', $selected);
$templater->register('optiontitle', ($htmlise ? htmlspecialchars_uni($val) : $val));
$options .= $templater->render();
}
}
return $options;
}
function construct_forums()
{
global $vbulletin, $vbphrase;
if (empty($vbulletin->iforumcache))
{
cache_ordered_forums(0, 1);
}
$forums = array(0 => $vbphrase['total']);
foreach ($vbulletin->iforumcache AS $parentid => $forums_arr)
{
$forumperms = $vbulletin->userinfo['forumpermissions']["$parentid"];
if ($parentid == -1
OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview'])
AND ($vbulletin->forumcache["$parentid"]['showprivate'] == 1
OR (!$vbulletin->forumcache["$parentid"]['showprivate'] AND !$vbulletin->options['showprivateforums'])))
OR !($vbulletin->forumcache["$parentid"]['options'] & $vbulletin->bf_misc_forumoptions['showonforumjump'])
OR !$vbulletin->forumcache["$parentid"]['displayorder']
OR !($vbulletin->forumcache["$parentid"]['options'] & $vbulletin->bf_misc_forumoptions['active'])
)
{
continue;
}
$forum = $vbulletin->forumcache["$parentid"];
$forums[$parentid] = $forum['title'];
foreach ($forums_arr AS $forumid)
{
$forumperms = $vbulletin->userinfo['forumpermissions']["$forumid"];
if ((!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND ($vbulletin->forumcache["$forumid"]['showprivate'] == 1 OR (!$vbulletin->forumcache["$forumid"]['showprivate'] AND !$vbulletin->options['showprivateforums']))) OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['showonforumjump']) OR !$vbulletin->forumcache["$forumid"]['displayorder'] OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['active']))
{
continue;
}
else
{
$forum = $vbulletin->forumcache["$forumid"];
$forums[$forumid] = $forum['title'];
}
}
}
return $forums;
}
Add the above code to a hook, such as global_start.
Then you can create the the forumjump with:
$forumjump = createSelectOptions(construct_forums());
This should result in $forumjump having a list of forums available based on forum permissions for the logged-in user. This is for vB4 not vB3 btw.
Untested.
vbenhancer
03-27-2012, 03:27 PM
Seems like it is not compatible with 4.1.10, and the last post there is from 2009, so I do not expect to get much support.
actually, you are in the vB3 forum... so i'm in the right place, you are not... ;)
but yes i could help you... i'm updating all my 3.x hacks to be compatible with vB 4.x these days, so in the next hours i will update this one as it is in the row.
Simon2323
03-27-2012, 05:09 PM
thanks, i am running vb4, i found this question to be very similar to what I have been looking for and bumped it to see if i could get the answer, sorry about that, i am still kind of new and trying to find my way around. As a newbie I was under the assumption that all the mods should work for the latest version, what a mistake and waste of time.
Thank you for your help
simon
vbenhancer
03-27-2012, 07:13 PM
As a newbie I was under the assumption that all the mods should work for the latest version, what a mistake and waste of time.
that's actually why the Mods section you can visit by the tab on top of this page is seperate in sections containing versions of the scripts that are for each legacy... 3.8.x codes MAY work with 4.x generation, but as there are template changes and some code variations, they need their own version... that's what i'm updating myself right now, after a 2 years absence...
Simon2323
03-27-2012, 08:45 PM
i am glad you are back, i just installed vbulletin last month and every time i look for a mod, if i am lucky enough to find it, it is outdated or not supported, is like time stopped and vbulletin is not what it used to be......
vbenhancer
03-27-2012, 10:16 PM
i am glad you are back, i just installed vbulletin last month and every time i look for a mod, if i am lucky enough to find it, it is outdated or not supported, is like time stopped and vbulletin is not what it used to be......
i will have to act like a time-machine then... rofl
Pandemikk
03-28-2012, 12:51 AM
I didn't even realize this was such a necropost. You really should make a new topic in the right section next time, Simon.
Simon2323
03-28-2012, 12:05 PM
sorry about that, i did not realize it was so old as well, i have to learn to look at the dates and versions, i was really not ready to find a forum with so many old, out of date and unanswered questions.
Pandemikk
03-29-2012, 08:43 AM
retracted
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.