PDA

View Full Version : Postbit - reputation pop-up works for one part of code but not another


steampunks
04-03-2009, 10:56 AM
My postbit code is below.

The first instance of the reputation pop-up works, but the second (which is where I want ot locate the reputation button to) does not, it directs the user to a new page on which to enter reputation.

$template_hook[postbit_start]
<table id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr valign="top">


<td class="postbit bright" width="212">
<div id="postmenu_$post[postid]" align="center" style="padding: 4px 0 4px 0;">

<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>



<if condition="$post['rank']"><div align="center" class="smallfont">$post[rank]</div></if>
<if condition="$post['usertitle']"><div align="center">$post[usertitle]</div><br /></if>

$template_hook[postbit_userinfo_left]




<if condition="$show['avatar']">
<div class="avatar" align="center">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
<div align="center" style="padding: 8px 0 0 0;">

<if condition="$post['rank']"><div>$post[rank]</div><br /></if>

<table cellpadding="2" cellspacing="0" border="0" align="center">

<if condition="$post['joindate']">
<tr>
<td align="right" class="time" width="50%">$vbphrase[join_date]:</td>

<td align="left" width="50%">$post[joindate]</td>
</tr>
</if>

<if condition="$post['field2']">
<tr>
<td align="right" class="time" width="50%">$vbphrase[location_perm]:</td>

<td align="left" width="50%">$post[field2]</td>
</tr>
</if>

<if condition="$post['age']">
<tr>
<td align="right" class="time" width="50%">$vbphrase[age]:</td>

<td align="left" width="50%">$post[age]</td>
</tr>
</if>
<tr>
<td align="right" class="time" width="50%">$vbphrase[posts]:</td>

<td align="left" width="50%">$post[posts]</td>
</tr>


<!--$template_hook[postbit_userinfo_right_after_posts]-->
<if condition="$show['infraction']"><tr>
<td align="right" class="time" width="50%">$vbphrase[infractions]:</td>
<td align="left">$post[warnings]/$post[infractions] ($post[ipoints])</td>
</tr>
</if>

<if condition="$show['reputation'] & $show['reppower']">
<tr>
<td align="right" class="time" width="50%">$vbphrase[reppower]:</td>
<td align="left"><span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span></td>
</tr>
</if>
<tr>
<td colspan="2" align="center" style="padding-top:5px;">


<if condition="$show['member']">$post[onlinestatus] </if>
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]">
<a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>


<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
</if>
$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] $post[iplogged]
</td>
</tr>
</table>
$template_hook[postbit_userinfo_right]
</div>
</td>
<if condition="$show['spam']">
<if condition="$show['spam']">
<td class="alt4" id="td_post_$post[postid]" style="padding: 4px 8px 4px 8px;" title="$vbphrase[spam_post]">
<else />
<td class="alt1" id="td_post_$post[postid]" style="padding: 4px 8px 4px 8px;">
</if>
<else />
<if condition="$show['moderated'] OR $show['deletedpost']">
<td class="alt3" id="td_post_$post[postid]" style="padding: 4px 8px 4px 8px;">
<else />
<td class="alt1" id="td_post_$post[postid]" style="padding: 4px 8px 4px 8px;">
</if>
</if>
$template_hook[postbit_messagearea_start]
<div class="bbot2" style="padding-bottom:4px">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" $post[scrolltothis]>
<!-- icon and title -->
<!--<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>-->
<if condition="$post['title']"><strong><a class="post-title" href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]">$post[title]</a>,</strong> </if>
<!-- / icon and title -->
<if condition="$show['announcement']">
<span title="$post[statustitle]">Posted <span class="time"><phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase></span></span>
<else />
<!-- status icon and date -->
<span title="$post[statustitle]"><a name="post$post[postid]"></a>Posted <span class="time">$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if></span></span>
$post[firstnewinsert]
<!-- / status icon and date -->
</if>
<if condition="$show['reportlink']"><span class="desc2"> | <a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow" title="$vbphrase[report_bad_post]">Report</a></span></if>
</td>
<td align="right">
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
<if condition="$show['inlinemod']"><input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle;padding:0px;margin:0px 0px 0px 5px" value="$post[checkbox_value]" /></if>
</td>
</tr>
</table>
</div>
<!-- message -->
<div class="post" id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]
</div>
<!-- / message -->
<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">
<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[cellpadding]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[cellpadding]px">
$post[imageattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>
<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>
<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>
</div>
<!-- / attachments -->
</if>
$template_hook[postbit_signature_start]
$ad_location[ad_showthread_firstpost_sig]
<if condition="$post['signature']">
<!-- sig -->
<div class="sig">$post[signature]</div>
<!-- / sig -->
</if>
$template_hook[postbit_signature_end]
</td>
</tr>
<tr>
<td class="postbit bright" align="center">

<center>



<if condition="$show['member']">$post[onlinestatus] </if>
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]">
<a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>














<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
</if>

<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" style="padding-left: 4px; padding-right: 4px;" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a></if>




<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" style="padding-left: 4px; padding-right: 4px;" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]





</center

</td>
<if condition="$show['spam']">
<if condition="$show['spam']">
<td class="alt4" align="right" style="padding: 4px 8px 4px 8px;">
<else />
<td class="alt1" align="right" style="padding: 4px 8px 4px 8px;">
</if>
<else />
<if condition="$show['moderated'] OR $show['deletedpost']">
<td class="alt3" align="right" style="padding: 4px 8px 4px 8px;">
<else />
<td class="alt1" align="right" style="padding: 4px 8px 4px 8px;">
</if>
</if>
<div class="btop2" style="padding-top:5px">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="desc" width="100%">
<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont">
<if condition="$show['postedithistory']">
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]" 4="posthistory.php?$session[sessionurl]p=$post[postid]">$vbphrase[last_edited_link_by_x_on_y_at_z_postid]</phrase>.
<else />
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
</if>
<if condition="$post['edit_reason']">
$vbphrase[reason]: $post[edit_reason]
</if>
</div>
<!-- / edit note -->



</if>
</td>
<td align="right" nowrap="nowrap">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['deletedpost'] & $show['managepost']">
<a href="postings.php?$session[sessionurl]do=managepost&amp;p=$post[postid]"><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[manage]" border="0" /></a>
</if>
$template_hook[postbit_controls]
<!-- / controls -->
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<div class="postsep btop bbot"><img src="$stylevar[imgdir_misc]/post_sep.gif" alt="" /></div>
$template_hook[postbit_end]
<!-- post $post[postid] popup menu -->
<div class="dropdown" id="postmenu_$post[postid]_menu" style="display:none">
<dl>
<dt>$post[username]</dt>
<if condition="$show['profile']"><dd><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></dd></if>
<if condition="$show['pmlink']"><dd><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></dd></if>
<if condition="$show['emaillink']"><dd><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></dd></if>
<if condition="$show['homepage']"><dd><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></dd></if>
<if condition="$show['search']"><dd><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></dd></if>
<if condition="$post['userid'] AND $show['member']"><dd><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></dd> </if>
<if condition="$show['infractionlink']"><dd><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase></a></dd></if>
<if condition="$show['redcard']">
<dd><a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]">$vbphrase[received_infraction]</a></dd>
<else />
<if condition="$show['yellowcard']"><dd><a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]">$vbphrase[received_warning]</a></dd></if>
</if>
$template_hook[postbit_user_popup]
</dl>
</div>
<!-- / post $post[postid] popup menu -->

Lynne
04-03-2009, 02:04 PM
You cannot have two different things with the same id "reputationmenu_$post[postid]" An id must be unique.

steampunks
04-03-2009, 09:00 PM
Thanks, fixed it.