Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2006, 01:27 PM
Canis Firebrand Canis Firebrand is offline
 
Join Date: Jun 2006
Location: Michigan
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I get a jumpbox on forumhome?

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.
Reply With Quote
  #2  
Old 03-27-2012, 12:49 AM
Simon2323 Simon2323 is offline
 
Join Date: Feb 2012
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

been searching for this answer for quite some time today, anyone can please help
Reply With Quote
  #3  
Old 03-27-2012, 03:55 AM
Pandemikk Pandemikk is offline
 
Join Date: Jul 2009
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 03-27-2012, 12:27 PM
Simon2323 Simon2323 is offline
 
Join Date: Feb 2012
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 03-27-2012, 01:48 PM
vbenhancer's Avatar
vbenhancer vbenhancer is offline
 
Join Date: Dec 2009
Location: Qu?bec city, Canada
Posts: 740
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

something like this ?!

https://vborg.vbsupport.ru/showthread.php?t=230562
Reply With Quote
  #6  
Old 03-27-2012, 02:13 PM
Simon2323 Simon2323 is offline
 
Join Date: Feb 2012
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 [DATE]1332861595[/DATE] at [TIME]1332861595[/TIME] ---------------

@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
Reply With Quote
  #7  
Old 03-27-2012, 02:35 PM
Pandemikk Pandemikk is offline
 
Join Date: Jul 2009
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon2323 View Post
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.

Code:
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:

Code:
$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.
Reply With Quote
  #8  
Old 03-27-2012, 03:27 PM
vbenhancer's Avatar
vbenhancer vbenhancer is offline
 
Join Date: Dec 2009
Location: Qu?bec city, Canada
Posts: 740
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon2323 View Post
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.
Reply With Quote
  #9  
Old 03-27-2012, 05:09 PM
Simon2323 Simon2323 is offline
 
Join Date: Feb 2012
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 03-27-2012, 07:13 PM
vbenhancer's Avatar
vbenhancer vbenhancer is offline
 
Join Date: Dec 2009
Location: Qu?bec city, Canada
Posts: 740
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon2323 View Post
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...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:52 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10303 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete