PDA

View Full Version : moved Forumjump - little problem


kurti
01-14-2009, 09:42 PM
hi,
in the SHOWTHREAD template i moved the Forumjump menu
right next to the Moderation menu:
http://img407.imageshack.us/img407/7977/jumpbp6.jpg

the problem is that Forumjump does not work properly now.
i think its because the GO buttons at the forum jump and the Moderation
probably have the same ID / name or so.
When i want to use the Forumjump it reacts like
i clicked on the GO of the Moderation menu without any thread being marked before.
and it says "You did not select any posts to which the action you picked can be applied."

could you please tell me what i should change so the Forumjump works?
(im not 100% sure which and how many changes are necessary for this)



controls part from the SHOWTHREAD template:

<!-- controls below postbits -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>

<!--REPLY BUTTON-->
<if condition="$show['largereplybutton']">
<td class="tcat" style="padding-left:25px;">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow">
<if condition="$show['closethread']">
<img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else />
<img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if>
</a>
</td>
<else />
<td class="tcat" style="padding-left:25px">&nbsp;</td>
</if>

<!--PAGENAV-->
<if condition="$show['pagenav']">
<td class="tcat" align="$stylevar[right]" nowrap="nowrap" style="padding-right:25px;">
$pagenav
</td>
</if>
</tr>
</table>





<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="top">


<!--FORUMJUMP-->
<td align="$stylevar[right]" style="width:100%;padding-left:25px;padding-right:25px;">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap; float:$stylevar[right]">
$forumjump
</div>
</td>


<!--MODERATION-->

<if condition="$show['inlinemod']">
<td align="$stylevar[right]" style="padding-right:25px;">
<if condition="$show['inlinemod']">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap; float:$stylevar[right]">
<strong>$vbphrase[moderation]</strong>
<br />
<select name="do">
<if condition="$show['managethread'] OR $show['spamctrls'] OR $show['managepost'] OR $show['approvepost'] OR $show['approveattachment'] OR $template_hook['inlinemod_post_bottom']">
<optgroup label="$vbphrase[option]">
<if condition="$show['managethread']">
<option value="mergeposts">$vbphrase[merge_posts]</option>
<option value="moveposts">$vbphrase[move_posts]</option>
<option value="copyposts">$vbphrase[copy_posts]</option>
</if>
<if condition="$show['spamctrls']">
<option value="spampost">$vbphrase[delete_posts_as_spam]</option>
</if>
<if condition="$show['managepost']">
<option value="deleteposts">$vbphrase[delete_posts]</option>
<option value="undeleteposts">$vbphrase[undelete_posts]</option>
</if>
<if condition="$show['approvepost']">
<option value="approveposts">$vbphrase[approve_posts]</option>
<option value="unapproveposts">$vbphrase[unapprove_posts]</option>
</if>
<if condition="$show['approveattachment']">
<option value="approveattachments">$vbphrase[approve_attachments]</option>
<option value="unapproveattachments">$vbphrase[unapprove_attachments]</option>
</if>
$template_hook[inlinemod_post_bottom]
</optgroup>
</if>
<optgroup label="____________________">
<option value="viewpost">$vbphrase[view_selected_posts]</option>
<option value="clearpost">$vbphrase[clear_post_list]</option>
</optgroup>
</select>
<input type="submit" class="button" id="inlinego" value="$vbphrase[go]" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="threadid" value="$threadinfo[threadid]" />
<input type="hidden" name="p" value="$postid" />
<input type="hidden" name="url" value="$url" />
</div>




<script type="text/javascript" src="clientscript/vbulletin_inlinemod.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
inlineMod = new vB_Inline_Mod('inlineMod', 'post', 'inlinemodform', '$vbphrase[go_x]');
//-->
</script>

</if>
</td>
</if>
</tr>
</table>
<!-- / controls below postbits -->




forumjump template:

<div class="smallfont" style="text-align:$stylevar[left];white-space:nowrap;">

<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="daysprune" value="$daysprune" />


<strong>$vbphrase[forum_jump]</strong><br />
<select name="f" onchange="this.form.submit();">

<optgroup label="$vbphrase[site_areas]">
<option value="cp" $frmjmpsel[usercp]>$vbphrase[user_control_panel]</option>
<option value="pm" $frmjmpsel[pm]>$vbphrase[private_messages]</option>
<option value="wol" $frmjmpsel[wol]>$vbphrase[whos_online]</option>
<option value="home" $frmjmpsel[home]>$vbphrase[forums_home]</option>
</optgroup>

<if condition="$jumpforumbits">
<optgroup label="$vbphrase[forums]">
$jumpforumbits
</optgroup>
</if>
</select>$gobutton
</form>
</div>


gobutton template:
<input type="submit" class="button" value="$vbphrase[go]" />

SEOvB
01-14-2009, 10:33 PM
make sure you dont have a form within a form

kurti
01-14-2009, 10:45 PM
ah, thats it. theres a form around that part in the SHOWTHREAD template.

what could be an easy trick to make it work anyway?

should i simply copy the code from the forumjump template code
into SHOWTHREAD ...but leaving out the extra form around it?

or could i close the SHOWTHREAD form right before the forumjump variable
and open it again after it?:o

Lynne
01-14-2009, 10:56 PM
You can't close it and then open it. Why not add the forumjump menu onto the right side of the moderation menu after the end of the form?

kurti
01-15-2009, 01:40 AM
ok ill try. :)
the end of the "controls below postbits" table (in the SHOWTHREAD template)
looks like this. the form is closing a bit after that...


</td>
</if>
</tr>
</table>
<!-- / controls below postbits -->

<if condition="$show['inlinemod']">
$spacer_close
</form>





would it be ok for the form to change it like this:
(the $spacer_open is within the form)


</td>
</if>

</form>

<!--FORUMJUMP-->
<td align="$stylevar[right]" style="width:100%;padding-left:25px;padding-right:25px;">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap; float:$stylevar[right]">
$forumjump
</div>
</td>
<!--end FORUMJUMP-->

</tr>
</table>
<!-- / controls below postbits -->


<if condition="$show['inlinemod']">
$spacer_close


or should i create a new table for the forumjump next to that table? :erm:

Lynne
01-15-2009, 02:24 AM
The only problem I see there is you are adding in another column to the table and so you really need to take a look at that table and make sure all the columns add up properly.

kurti
01-15-2009, 02:52 PM
yes, theres just one row in this table so its ok.

it all works fine now. thanks very much for the help! :)