Quote:
Originally Posted by eoc_Jason
SimCityForum - I'm not 100% sure you will need to check the code (either the PHP file or the template), but if you set it to the proper variable it should auto-fill it for you.
|
I figured out a solution. In the postbit or postbit_legacy templates replace the rep button with:
Code:
<a href="itrader_feedback.html?u=$post[userid]&p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a>
Then in the iTrader_feedback template I replaced the dealurl code with:
Code:
<if condition="$_GET[p]>0">
<input class="bginput" type="hidden" name="dealurl" value="$vboptions[bburl]/showthread.html?p=$_GET[p]#post$_GET[p]" />
<else />
</td>
</tr>
<tr>
<td class="alt2" nowrap="nowrap">
$vbphrase[itrader_thread_url]:
<br /><span class="smallfont">
<if condition="$vbulletin->options['itrader_requrl'] == 1">
$vbphrase[itrader_required]
<else />
$vbphrase[itrader_optional]
</if>
</span>
</td>
<td class="alt2" width="100%">
<input class="bginput" type="text" name="dealurl" size="45" maxlength="255" value="$itrader[dealurl]" /><br />
<span class="smallfont">$vbphrase[itrader_url_example]</span>
</if>
You'll notice that I changed the dealurl input to hidden from text as the user doesn't need to see it if the value has been prepadded. I used the postid instead of the threadid so that the link could be related back to the exact post not just the thread.
A similar tweak can be done to the normal iTrader link, but it requires passing the postid value along at the itrader_user template using the following code:
Code:
<a href="itrader_feedback.html?$session[sessionurl]u=$userinfo[userid]<if condition="$_GET[p]>0">&p=$_GET[p]</if>"><strong>$vbphrase[itrader_submit_feedback] $userinfo[username]</strong></a>
This was a fairly clean tweak as it impacted only a few templates.