Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 06-27-2005, 08:27 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vb_dropdowns not working (vb-html question)

for some reason i can't get the following drop downs to work, even though all other ones on the page do, can someone tell me where i'm going wrong please.

HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:-1px">
	<tr>
		<td class="tcat" width="100%">Pieces In Category<span class="normal">: $cats[title]</span></td>
		<td class="tcat" id="displyoptions" nowrap="nowrap"><a href="#goto_displyoptions">Display Options</a> <script type="text/javascript"> vbmenu_register("displyoptions"); </script></td>
		<if condition="$show['catsearch']">
			<td class="tcat" id="catsearch" nowrap="nowrap"><a href="#goto_catsearch">Search Category</a> <script type="text/javascript"> vbmenu_register("catsearch"); </script></td>
		</if>
	</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
	<tr>
		<td class="thead" width="100%">
			<span style="float:$stylevar[right]">$vbphrase[rating]</a> $sortarrow[voteavg]</span>
			Piece Info
		</td>
		<td class="thead" width="150" align="center" nowrap="nowrap">Review Info</td>
	</tr>
		$browsebits
</table>

<br />

<if condition="$vboptions['usepopups']">
	<br />
	<!-- popup menu contents -->

	<!-- display options -->
	<div class="vbmenu_popup" id="displayoptions_menu" style="display:none">
		<table cellpadding="4" cellspacing="1">
			<tr>
				<td class="thead">
					Display Options<a name="goto_displyoptions"></a>
				</td>
			</tr>
			<tr>
				<td class="vbmenu_option">
					<div class="smallfont">
						From The:<br />
						<div id="clause">
							<select name="daysprune">
								<option value="1" $daysprunesel[1]>$vbphrase[last_day]</option>
								<option value="2" $daysprunesel[2]>$vbphrase[last_2_days]</option>
								<option value="7" $daysprunesel[7]>$vbphrase[last_week]</option>
								<option value="10" $daysprunesel[10]>$vbphrase[last_10_days]</option>
								<option value="14" $daysprunesel[14]>$vbphrase[last_2_weeks]</option>
								<option value="30" $daysprunesel[30]>$vbphrase[last_month]</option>
								<option value="45" $daysprunesel[45]>$vbphrase[last_45_days]</option>
								<option value="60" $daysprunesel[60]>$vbphrase[last_2_months]</option>
								<option value="75" $daysprunesel[75]>$vbphrase[last_75_days]</option>
								<option value="100" $daysprunesel[100]>$vbphrase[last_100_days]</option>
								<option value="365" $daysprunesel[365]>$vbphrase[last_year]</option>
								<option value="-1" $daysprunesel[all]>$vbphrase[beginning]</option>
							</select>
						</div>
						Order By: <br />
						<div id="order">
							<select name="sort">
								<option value="title" $sort[title]>Title</option>
								<option value="postdate" $sort[lastpost]>Date Posted</option>
								<option value="lastreview" $sort[lastpost]>Last Review Date</option>
								<option value="reviewcount" $sort[replycount]>Number Of Reviews</option>
								<option value="views" $sort[views]>Views</option>
								<option value="postusername" $sort[postusername]>Author</option>
								<option value="voteavg" $sort[voteavg]>Rating</option>
							</select>
						</div>
						Sort By: <br />
						<div id="direction">
							<select name="order">
								<option value="asc" $order[asc]>$vbphrase[ascending]</option>
								<option value="desc" $order[desc]>$vbphrase[descending]</option>
							</select>
						</div>
						<div id="submit">
							<input type="submit" class="button" value="Show Pieces" />
						</div>
					</div>
				</td>
			</tr>
		<table>
	</div>
	<!-- / display options -->

	<!-- / popup menu contents -->
<else />
	<!-- controls for non-popup browsers -->

	<b>this ++++ aint working</b>

	<!-- / controls for non-popup browsers -->
</if>


<if condition="$vboptions['popups'] AND $show['catsearch']">
<!-- search this cat -->
<div class="vbmenu_popup" id="catsearch_menu" style="display:none">
	<form action="find.php" method="post">
		<table cellpadding="4" cellspacing="1" border="0">
			<tr>
				<td class="thead">Search Category<a name="goto_catsearch"></a></td>
			</tr>
			<tr>
				<td class="vbmenu_option" title="nohilite" align="center">
					<input type="hidden" name="s" value="$session[sessionhash]" />
					<input type="hidden" name="do" value="process" />
					<input type="hidden" name="catchoice" value="$cat[catid]" />
					<input type="hidden" name="formuserid" value="$bbuserinfo[userid]" />
					Title:<br/><input type="text" class="bginput" name="query" size="20" style="width:175px" /><br/>
					Author:<br/><input type="text" class="bginput" name="query" size="20" style="width:175px" /><br/>
					Text:<br/><input type="text" class="bginput" name="query" size="20" style="width:175px" /><br/>
					$gobutton<br />
				</td>
			</tr>
		</table>
	</form>
</div>
<!-- / search this cat -->
</if>
Reply With Quote
  #2  
Old 06-27-2005, 10:33 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have a look here: http://www.vbulletin.com/docs/html/m...tes_vbmenu#top

I couldn't find anything on the first glance, two things I did see:

You can use $show['popups'] instead of $vboptions['usepopups'], as the first will check if the browser actually supports popups.

And you could use the CSS class vbmenu_control for the control...
Reply With Quote
  #3  
Old 06-27-2005, 11:35 AM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here's an edited version:
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:-1px">
  <tr>
    <td class="tcat" width="100%">Pieces In Category<span class="normal">: $cats[title]</span></td>
    <td class="vbmenu_control" id="displyoptions" nowrap="nowrap"><a href="#goto_displyoptions" onclick="return toggle_collapse('displyoptions')">Display Options</a>
      <script type="text/javascript"> vbmenu_register("displyoptions"); </script></td>
  </tr>
</table>

<if condition="$show['popups']">
<div class="vbmenu_popup" id="displyoptions_menu" style="display:none">
<table cellpadding="4" cellspacing="1">
<tr>
  <td class="thead"> Display Options<a name="goto_displyoptions"></a> </td>
</tr>
<tr>
  <td class="vbmenu_option"><div class="smallfont"> From The:<br />
      <div id="clause">
        <select name="daysprune">
          <option value="1" $daysprunesel[1]>$vbphrase[last_day]</option>
          <option value="2" $daysprunesel[2]>$vbphrase[last_2_days]</option>
          <option value="7" $daysprunesel[7]>$vbphrase[last_week]</option>
          <option value="10" $daysprunesel[10]>$vbphrase[last_10_days]</option>
          <option value="14" $daysprunesel[14]>$vbphrase[last_2_weeks]</option>
          <option value="30" $daysprunesel[30]>$vbphrase[last_month]</option>
          <option value="45" $daysprunesel[45]>$vbphrase[last_45_days]</option>
          <option value="60" $daysprunesel[60]>$vbphrase[last_2_months]</option>
          <option value="75" $daysprunesel[75]>$vbphrase[last_75_days]</option>
          <option value="100" $daysprunesel[100]>$vbphrase[last_100_days]</option>
          <option value="365" $daysprunesel[365]>$vbphrase[last_year]</option>
          <option value="-1" $daysprunesel[all]>$vbphrase[beginning]</option>
        </select>
      </div>
      Order By: <br />
      <div id="order">
        <select name="sort">
          <option value="title" $sort[title]>Title</option>
          <option value="postdate" $sort[lastpost]>Date Posted</option>
          <option value="lastreview" $sort[lastpost]>Last Review Date</option>
          <option value="reviewcount" $sort[replycount]>Number Of Reviews</option>
          <option value="views" $sort[views]>Views</option>
          <option value="postusername" $sort[postusername]>Author</option>
          <option value="voteavg" $sort[voteavg]>Rating</option>
        </select>
      </div>
      Sort By: <br />
      <div id="direction">
        <select name="order">
          <option value="asc" $order[asc]>$vbphrase[ascending]</option>
          <option value="desc" $order[desc]>$vbphrase[descending]</option>
        </select>
      </div>
      <div id="submit">
        <input type="submit" class="button" value="Show Pieces" />
      </div>
    </div></td>
</tr>
</table>
</div>
</if>
Reply With Quote
  #4  
Old 06-27-2005, 11:59 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not a bad idea but i need it as a dropdown rather than a collapseable object.
Reply With Quote
  #5  
Old 06-27-2005, 12:02 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

huh?
Reply With Quote
  #6  
Old 06-27-2005, 12:05 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i need a drop down menu not for something to open and close.
Reply With Quote
  #7  
Old 06-27-2005, 12:10 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have you installed/tested it as-is?

it's similar to the navbar/forum tools/search this forum menu options

If that's not what you want then I am at a lost.

If you are speaking about the actual dropdown options (objects) and not the effect ... you need to wrap it with a <form> tag -- something which you are lacking in the above example.
Reply With Quote
  #8  
Old 06-27-2005, 01:21 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nah i never tried, which was very rude of me so i apologise i should've said that first, however upon reading it, it appeared to act more like the forumbits than the navbar.

anyway i got the left one working (displayoptions) however it's showing both dropdowns as one men

HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:-1px">
	<tr>
		<td class="tcat" width="100%">Pieces In Category<span class="normal">: $cats[title]</span></td>
		<td id="displyoptions" class="vbmenu_control" nowrap="nowrap"><a href="#goto_displyoptions">Display Options</a> <script type="text/javascript"> vbmenu_register("displyoptions"); </script></td>
		<if condition="$show['catsearch']">
			<td id="categorysearch" class="vbmenu_control" nowrap="nowrap"><a href="#goto_categorysearch">Search Category</a> <script type="text/javascript"> vbmenu_register("categorysearch"); </script></td>
		</if>
	</tr>
</table>

<if condition="$show['popups']">
	<!-- popup menu contents -->

	<!-- display options -->
	<div class="vbmenu_popup" id="displyoptions_menu" style="display:none">
		<form action="browse.php" method="post">
			<table cellpadding="4" cellspacing="1">
				<tr>
					<td class="thead" colspan="2">
						Display Options
					</td>
				</tr>
				<tr>
					<td class="vbmenu_option">
						<span class="smallfont">
							From The:
						</span>
					</td>
					<td class="vbmenu_option">
						<span class="smallfont">
							<select name="daysprune">
								<option value="1" $daysprunesel[1]>$vbphrase[last_day]</option>
								<option value="2" $daysprunesel[2]>$vbphrase[last_2_days]</option>
								<option value="7" $daysprunesel[7]>$vbphrase[last_week]</option>
								<option value="10" $daysprunesel[10]>$vbphrase[last_10_days]</option>
								<option value="14" $daysprunesel[14]>$vbphrase[last_2_weeks]</option>
								<option value="30" $daysprunesel[30]>$vbphrase[last_month]</option>
								<option value="45" $daysprunesel[45]>$vbphrase[last_45_days]</option>
								<option value="60" $daysprunesel[60]>$vbphrase[last_2_months]</option>
								<option value="75" $daysprunesel[75]>$vbphrase[last_75_days]</option>
								<option value="100" $daysprunesel[100]>$vbphrase[last_100_days]</option>
								<option value="365" $daysprunesel[365]>$vbphrase[last_year]</option>
								<option value="-1" $daysprunesel[all]>$vbphrase[beginning]</option>
							</select>
						</span>
					</td>
				</tr>
				<tr>
					<td class="vbmenu_option">
						<span class="smallfont">
							Order By: 
						</span>
					</td>
					<td class="vbmenu_option">
						<span class="smallfont">
							<select name="sort">
								<option value="title" $sort[title]>Title</option>
								<option value="postdate" $sort[lastpost]>Date Posted</option>
								<option value="lastreview" $sort[lastpost]>Last Review Date</option>
								<option value="reviewcount" $sort[replycount]>Number Of Reviews</option>
								<option value="views" $sort[views]>Views</option>
								<option value="postusername" $sort[postusername]>Author</option>
								<option value="voteavg" $sort[voteavg]>Rating</option>
							</select>
						</span>
					</td>
				</tr>
				<tr>
					<td class="vbmenu_option">
						<span class="smallfont">
							Sort By: 
						</span>
					</td>
					<td class="vbmenu_option">
						<span class="smallfont">
							<select name="order">
								<option value="asc" $order[asc]>$vbphrase[ascending]</option>
								<option value="desc" $order[desc]>$vbphrase[descending]</option>
							</select>
						</span>
					</td>
				</tr>
				<tr>
					<td class="vbmenu_option" colspan="2" align="center">
						<span class="smallfont">
							<input type="submit" class="button" value="Show Pieces" />
						</span>
					</td>
				</tr>
			<table>
		</form>
	</div>
	<!-- / display options -->
</if>

<if condition="$show['popups'] AND $show['catsearch']">
	<!-- search this cat -->
	<div class="vbmenu_popup" id="categorysearch_menu" style="display:none">
		<form action="find.php" method="post">
			<table cellpadding="4" cellspacing="1" border="0">
				<tr>
					<td class="thead" colspan="2">Search Category</td>
				</tr>
				<tr>
					<td class="vbmenu_option" title="nohilite">
						Title:
					</td>
					<td>
						<input type="text" class="bginput" name="query" size="20" style="width:175px" />
					</td>
				</tr>
				<tr>
					<td class="vbmenu_option" title="nohilite">
						Author:
					</td>
					<td>
						<input type="text" class="bginput" name="query" size="20" style="width:175px" />
					</td>
				</tr>
				<tr>
					<td class="vbmenu_option" title="nohilite">
						Text:
					</td>
					<td>
						<input type="text" class="bginput" name="query" size="20" style="width:175px" />
					</td>
				</tr>
				<tr>
					<td class="vbmenu_option" title="nohilite" align="center" colspan="2">
						<input type="hidden" name="s" value="$session[sessionhash]" />
						<input type="hidden" name="do" value="process" />
						<input type="hidden" name="catchoice" value="$cat[catid]" />
						<input type="hidden" name="formuserid" value="$bbuserinfo[userid]" />
						$gobutton
					</td>
				</tr>
			</table>
		</form>
	</div>
	<!-- / search this cat -->
	<!-- / popup menu contents -->
<else />
	<!-- controls for non-popup browsers -->

	<b>this ++++ aint working</b>

	<!-- / controls for non-popup browsers -->
</if>
Reply With Quote
  #9  
Old 06-27-2005, 02:12 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try closing the <table> tag...
Reply With Quote
  #10  
Old 06-27-2005, 02:22 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're right i had a <table> tag instead of a </table>

thanks princeton, all working perfectly now
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.13390 seconds
  • Memory Usage 2,343KB
  • Queries Executed 13 (?)
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_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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_postinfo_query
  • fetch_postinfo
  • 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