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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2007, 09:05 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Using vB drop-down menus more than once

In our site, we use 3.0.xx.

Some of our threads are quite large (about 50 pages or more). So I decided to imitate the drop-down menu shown in the latest releases of vB, where you are allowed to enter a number, hit the Go menu and the program takes you to the specified page in the thread. I am using a drop-down menu (vbmenu_register) to create the drop-down menu, in the pagenav template. The code for the menu is entered in the SHOWTHREAD or SHOWFORUM templates (that's where I need the drop-down menu) and it is just a form to get the page number where you want to go).

The code works fine in the page navigation section on the top of the page, but does not work at the bottom one. From some tests I did, it looks as if you can't use vbmenu_register, to register a menu more than once.

Any ideas how to solve this problem?

Here is the code I am using:

In template pagenav:

After:

Code:
<if condition="$show['last']"><td class="alt1"><a class="smallfont" href="$address&amp;page=$totalpages$address2" title="$vbphrase[last_page] - <phrase 1="$lastnumbers[first]" 2="$lastnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">$vbphrase[last] <strong>&raquo;</strong></a></td></if>
I entered:

Code:
<if condition="$show['popups']"><td id="pagenav" class="vbmenu_control" title="$address$address2"><a name="PageNav"></a> <script type="text/javascript"> vbmenu_register("pagenav"); </script></td></if>

And in template SHOWTHREAD, I entered this code as an additional drop-down menu.

Code:
<!-- Page Navigation form menu -->
<if condition="$show[popups]">

<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
	<form action="$address" method="post">
	<table cellpadding="4" cellspacing="1" border="0">
	<tr>
		<td class="thead" nowrap="nowrap">Go to Page...</td>
	</tr>

	<tr>
		<td class="vbmenu_option" title="nohilite">
<if condition="THIS_SCRIPT=='showthread'"><input type="hidden" name="perpage" value="$vboptions[maxposts]" /><else /><input type="hidden" name="perpage" value="$vboptions[maxthreads]" /></if>
<input type="text" class="bginput" name="pagenumber" size="4" />
<input type="submit" class="button" value="$vbphrase[go]"  /><br />
		</td>
	</tr>
	</table>
	</form>
</div>
</if>
Any help will be appreciated.
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 11:18 AM.


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.03102 seconds
  • Memory Usage 2,161KB
  • 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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete